/* ── Tablet & Small Laptop ── */
@media screen and (max-width: 1400px) {
  #profile {
    height: auto;
    margin-bottom: 4rem;
  }
  .about-containers {
    flex-wrap: wrap;
  }
  #contact,
  #projects {
    height: fit-content;
  }
}

/* ── Landscape Tablet ── */
@media screen and (max-width: 1200px) {
  #desktop-nav {
    display: flex;
    position: sticky;
    top: 0.5rem;
    z-index: 100;
    width: calc(100% - 1.5rem);
    padding: 0.5rem 1rem;
    min-height: 3.2rem;
    height: auto;
    justify-content: space-between;
    gap: 0.7rem;
  }
  .nav-actions {
    position: static;
    left: auto;
    transform: none;
  }
  #desktop-nav .nav-links {
    padding-left: 0.5rem;
    font-size: 0.88rem;
    gap: 1rem;
    white-space: nowrap;
  }
  .desktop-theme-toggle {
    position: static;
    top: auto;
    right: auto;
    transform: none;
    min-width: 2.5rem;
    min-height: 2.5rem;
    padding: 0.25rem;
  }
  .desktop-theme-toggle .theme-icon {
    height: 1.6rem;
  }
  .desktop-theme-toggle:hover {
    transform: scale(1.06);
  }
  #experience,
  .experience-details-container {
    margin-top: 1.5rem;
  }
  #profile,
  .section-container {
    display: block;
  }
  #profile {
    height: auto;
    margin-bottom: 1.5rem;
  }
  .arrow {
    display: none;
  }
  section,
  .section-container {
    height: fit-content;
    min-height: unset;
  }
  section {
    padding-left: 1.2rem;
    padding-right: 1.2rem;
    margin: 0 auto;
    max-width: 100vw;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
  }
  .section__pic-container {
    width: 250px;
    height: 250px;
    margin: 0 auto 2rem;
  }
  .about-containers {
    margin-top: 0;
  }

  #profile .btn {
    font-size: 0.75rem;
    padding: 0.72rem 1.2rem;
    min-width: 7.44rem;
  }

  #socials-container {
    gap: 1rem;
  }

  #socials-container .icon {
    height: 2.82rem;
    padding: 0.46rem;
  }
}

/* ── Mobile ── */
@media screen and (max-width: 600px) {
  #contact {
    height: fit-content;
  }
  footer {
    padding: 2rem 1rem;
  }
  #profile {
    height: auto;
    margin-bottom: 1rem;
  }
  article {
    font-size: 0.95rem;
  }
  footer nav {
    height: fit-content;
    margin-bottom: 1.5rem;
  }
  .about-containers,
  .contact-info-upper-container,
  .btn-container {
    flex-wrap: wrap;
  }

  .contact-info-upper-container {
    padding: 0.75rem;
    gap: 0.3rem 0.5rem;
  }

  .contact-info-container {
    margin: 0.35rem 0.5rem;
  }
  .contact-info-container p,
  .nav-links li a {
    font-size: 0.92rem;
  }
  .experience-sub-title {
    font-size: 1.2rem;
  }
  .logo {
    display: none;
  }
  .nav-links-container .nav-links {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
  #desktop-nav {
    padding: 0.4rem 0.5rem;
    width: calc(100% - 1rem);
    top: 0.35rem;
  }
  #desktop-nav .nav-links {
    font-size: 0.78rem;
    gap: 0.6rem;
  }
  .desktop-theme-toggle {
    width: clamp(2.2rem, 8vw, 2.6rem);
    height: clamp(2.2rem, 8vw, 2.6rem);
    min-width: 2.2rem;
    min-height: 2.2rem;
    margin-right: max(8px, env(safe-area-inset-right));
    flex-shrink: 0;
  }
  .desktop-theme-toggle .theme-icon {
    height: 1.4rem;
  }

  .section__pic-container {
    width: auto;
    height: 46vw;
    justify-content: center;
  }
  .section__text__p2 {
    font-size: 1.1rem;
  }
  .title {
    font-size: 2rem;
    letter-spacing: -0.03em;
  }
  .text-container {
    text-align: justify;
  }
  .btn {
    font-size: 0.85rem;
    padding: 0.75rem 1.25rem;
    min-width: 7.5rem;
  }

  #profile .btn {
    font-size: 0.72rem;
    padding: 0.66rem 1.08rem;
    min-width: 7.04rem;
  }

  #socials-container {
    gap: 0.9rem;
  }

  #socials-container .icon {
    height: 2.64rem;
    padding: 0.42rem;
  }

  /* Scroll-reveal – reduce travel for mobile */
  .reveal {
    --section-reveal-distance: 20px;
  }

  /* Tighter section padding */
  section {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}