body,
html {
  width: 100%;
  height: 100%;
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
}

/* Telefon */
@media (max-width: 767px) {
  :root {
    --header-height: 150px;
  }

  header {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: #ccc;
  }

  header .menu-toggle {
    display: block;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px 16px;
  }

  header ul {
    margin: 0;
    height: var(--header-height);
  }

  header ul:has(.open) {
    display: block;
    margin: 0;
    height: var(--header-height);
  }

  header li {
    list-style: none;
    padding: 8px 16px;
  }

  header a {
    color: black;
    text-decoration: none;
  }

  header ul:not(.open) {
    display: none;
  }

  .active {
    text-decoration: underline;
  }

  .item {
    transition: font-size 0.2s linear;
    font-size: 1.1em;
  }

  .item:hover {
    font-size: 1.2em;
  }

  /*Hlavní část*/
  .parent {
    margin-top: 70px;
    display: flex;
    flex-direction: column;
  }

  h1 {
    font-size: 2.5rem;
    text-align: center;
    margin: 20px 0 0 0;
  }

  .me {
    width: 80%;
    border-radius: 24px;
    height: auto;
    margin: 20px auto;
  }

  .center {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  #about-text {
    font-size: 1.1em;
    padding: 0 30px;
    line-height: 30px;
  }

  .project {
    background: #ccc;
    border-radius: 16px;
    height: 100%;
    width: 90%;
    border: solid #999 1px;
    margin: 20px auto;
  }

  h2 {
    font-size: 1.8em;
    padding: 0 16px;
  }

  .project-img {
    width: calc(100% - 1px);
    border-radius: 16px 16px 0 0;
    border: solid black 1px;
    border-bottom: none;
  }

  .project-content {
    padding: 16px;
  }

  section {
    scroll-margin-top: 40px;
  }

  footer {
    background-color: #444;
    color: white;
    text-align: center;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  /* Formulář */
  .form {
    max-width: 600px;
    padding: 24px;
    background-color: #e6e6e6;
    margin: 20px;
  }

  .form form {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .form label {
    display: flex;
    flex-direction: column;
    font-size: 0.9rem;
    color: #111;
    gap: 6px;
  }

  .form input,
  .form textarea {
    padding: 10px 12px;
    border-radius: 8px;
    border: solid #999 1px;
    background: #fcfcfc;
    color: black;
    font-size: 1rem;
  }

  .form textarea {
    resize: vertical;
    min-height: 120px;
  }

  .form input:focus,
  .form textarea:focus {
    outline: none;
    border-color: #6bb2ff;
    box-shadow: 0 0 0 2px rgba(77, 163, 255, 0.3);
  }

  .form button {
    margin-top: 8px;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: #a1ceff;
    color: #000;
    font-weight: 600;
    cursor: pointer;
    transition:
      background 0.2s ease,
      transform 0.1s ease;
  }

  .form button:hover {
    background: #6bb6ff;
  }

  .form button:active {
    transform: scale(0.98);
  }

  .form input.touched:invalid,
  .form textarea.touched:invalid {
    border-color: #ff5c5c;
  }
}

/* Tablet */
@media (min-width: 768px) and (max-width: 1023px) {
  :root {
    --header-height: 75px;
  }

  /*Top-menu*/
  header {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: #ccc;
  }

  header .menu-toggle {
    display: none;
  }

  header ul {
    margin: 0;
    height: var(--header-height);
    display: flex;
    justify-content: space-around;
    align-items: center;
  }

  header li {
    list-style: none;
    color: white;
  }

  header a {
    color: black;
    text-decoration: none;
  }

  .active {
    text-decoration: underline;
  }

  .item {
    transition: font-size 0.2s linear;
    font-size: 1.1em;
  }

  .item:hover {
    font-size: 1.2em;
  }

  /*Hlavní část*/
  /*Hlavní část*/
  .parent {
    margin-top: 70px;
    display: flex;
    flex-direction: column;
  }

  h1 {
    font-size: 2.5rem;
    text-align: center;
    margin: 20px 0 0 0;
  }

  .me {
    width: 65%;
    border-radius: 24px;
    height: auto;
    margin: 20px auto;
  }

  .center {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  #about-text {
    font-size: 1.2em;
    padding: 0 30px;
    line-height: 30px;
  }

  .project {
    background: #ccc;
    border-radius: 16px;
    height: 100%;
    width: 80%;
    border: solid #999 1px;
    margin: 20px auto;
  }

  h2 {
    font-size: 1.8em;
    padding: 0 16px;
  }

  .project-img {
    width: calc(100% - 1px);
    border-radius: 16px 16px 0 0;
    border: solid black 1px;
    border-bottom: none;
  }

  .project-content {
    padding: 16px;
  }

  section {
    scroll-margin-top: 65px;
  }

  footer {
    background-color: #444;
    color: white;
    text-align: center;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  /* Formulář */
  .form {
    max-width: 600px;
    padding: 24px;
    background-color: #e6e6e6;
    margin: 20px;
  }

  .form form {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .form label {
    display: flex;
    flex-direction: column;
    font-size: 0.9rem;
    color: #111;
    gap: 6px;
  }

  .form input,
  .form textarea {
    padding: 10px 12px;
    border-radius: 8px;
    border: solid #999 1px;
    background: #fcfcfc;
    color: black;
    font-size: 1rem;
  }

  .form textarea {
    resize: vertical;
    min-height: 120px;
  }

  .form input:focus,
  .form textarea:focus {
    outline: none;
    border-color: #6bb2ff;
    box-shadow: 0 0 0 2px rgba(77, 163, 255, 0.3);
  }

  .form button {
    margin-top: 8px;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: #a1ceff;
    color: #000;
    font-weight: 600;
    cursor: pointer;
    transition:
      background 0.2s ease,
      transform 0.1s ease;
  }

  .form button:hover {
    background: #6bb6ff;
  }

  .form button:active {
    transform: scale(0.98);
  }

  .form input.touched:invalid,
  .form textarea.touched:invalid {
    border-color: #ff5c5c;
  }
}

/* Počítač */
@media (min-width: 1024px) {
  :root {
    --header-height: 75px;
  }

  /*Top-menu*/
  header {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: #ccc;
  }

  header .menu-toggle {
    display: none;
  }

  header ul {
    margin: 0;
    height: var(--header-height);
    display: flex;
    justify-content: space-around;
    align-items: center;
  }

  header li {
    list-style: none;
    color: white;
  }

  header a {
    color: black;
    text-decoration: none;
  }

  .active {
    text-decoration: underline;
  }

  .item {
    transition: font-size 0.2s linear;
    font-size: 1.1em;
  }

  .item:hover {
    font-size: 1.2em;
  }

  /*Hlavní část*/
  .parent {
    margin-top: 50px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows:
      128px repeat(2, 1fr) 100px repeat(2, 1fr)
      80px min-content 80px;
    gap: 8px;
  }

  .item1 {
    grid-column: span 3 / span 3;
  }

  .item2 {
    grid-row: span 2 / span 2;
    grid-row-start: 2;
  }

  .item3 {
    grid-column: span 2 / span 2;
    grid-row: span 2 / span 2;
    grid-row-start: 2;
  }

  .item4 {
    grid-column: span 3 / span 3;
    grid-row-start: 4;
  }

  .item5,
  .item6,
  .item7 {
    grid-row: span 2 / span 2;
    grid-row-start: 5;
    justify-content: center;
    align-items: center;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .item8 {
    grid-column: span 3 / span 3;
    grid-row-start: 7;
  }

  .item9 {
    grid-column: span 3 / span 3;
    grid-row: span 2 / span 2;
    grid-row-start: 8;
  }

  .item10 {
    grid-column: span 3 / span 3;
    grid-row-start: 10;
  }

  h1 {
    font-size: 3em;
    text-align: center;
    margin: 40px 0 0 0;
  }

  .me {
    width: 50%;
    border-radius: 24px;
    height: auto;
  }

  .center {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  #about-text {
    font-size: 1.3em;
    padding-left: 10%;
    line-height: 35px;
  }

  h2 {
    font-size: 2em;
    padding-left: 16px;
  }

  .project {
    background: #ccc;
    border-radius: 16px;
    height: 100%;
    width: 85%;
    border: solid #999 1px;
  }

  .project-img {
    width: calc(100% - 1px);
    border-radius: 16px 16px 0 0;
    border: solid black 1px;
    border-bottom: none;
  }

  .project-content {
    padding: 16px;
  }

  section {
    scroll-margin-top: var(--header-height);
  }

  footer {
    background-color: #444;
    color: white;
    text-align: center;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  /* Formulář */
  .form {
    max-width: 600px;
    padding: 24px;
    background-color: #e6e6e6;
    margin: 20px;
  }

  .form form {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .form label {
    display: flex;
    flex-direction: column;
    font-size: 0.9rem;
    color: #111;
    gap: 6px;
  }

  .form input,
  .form textarea {
    padding: 10px 12px;
    border-radius: 8px;
    border: solid #999 1px;
    background: #fcfcfc;
    color: black;
    font-size: 1rem;
  }

  .form textarea {
    resize: vertical;
    min-height: 120px;
  }

  .form input:focus,
  .form textarea:focus {
    outline: none;
    border-color: #6bb2ff;
    box-shadow: 0 0 0 2px rgba(77, 163, 255, 0.3);
  }

  .form button {
    margin-top: 8px;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: #a1ceff;
    color: #000;
    font-weight: 600;
    cursor: pointer;
    transition:
      background 0.2s ease,
      transform 0.1s ease;
  }

  .form button:hover {
    background: #6bb6ff;
  }

  .form button:active {
    transform: scale(0.98);
  }

  .form input.touched:invalid,
  .form textarea.touched:invalid {
    border-color: #ff5c5c;
  }
}
