/* Large screens */
@media screen and (max-width: 1400px) {
  #profile {
    gap: 3rem;
  }
  .about-containers {
    flex-wrap: wrap;
  }
}

/* Tablets and smaller laptops */
@media screen and (max-width: 1200px) {
  #desktop-nav {
    display: none;
  }
  #hamburger-nav {
    display: flex;
  }
  #experience,
  .experience-details-container {
    margin-top: 1rem;
  }
  .arrow {
    display: none;
  }
  section {
    padding: 4rem 1.5rem;
  }
  .about-containers {
    margin-top: 0;
  }
}

/* Portrait tablets and large phones */
@media screen and (max-width: 900px) {
  #achievements .about-containers .achievement-container {
    max-width: 350px;
    flex: 0 1 350px;
  }
  #profile {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
    min-height: auto;
    padding-top: 3rem;
    padding-bottom: 3rem;
  }
  .section__pic-container {
    width: clamp(220px, 50vw, 320px);
    height: clamp(220px, 50vw, 320px);
    margin: 0 auto;
  }
  .section-container {
    flex-direction: column;
    gap: 2rem;
  }
  .about-pic {
    max-width: 280px;
    margin: 0 auto;
    display: block;
  }
  section {
    padding: 3rem 1.5rem;
  }
  .project-img {
    width: 100%;
    max-width: 18rem;
    height: auto;
    aspect-ratio: 10/11;
  }
  .about-containers {
    justify-content: center;
  }
  .details-container {
    max-width: 280px;
    width: 100%;
  }
}

/* Mobile phones */
@media screen and (max-width: 600px) {
  nav {
    height: 12vh;
  }
  #profile {
    padding-top: 2rem;
  }
  article {
    font-size: 1rem;
    width: 100%;
    justify-content: flex-start;
  }
  .article-container {
    gap: 1.5rem;
  }
  footer {
    padding: 2rem 1rem;
  }
  footer nav {
    margin-bottom: 1.5rem;
  }
  .about-containers,
  .contact-info-upper-container,
  .btn-container {
    flex-wrap: wrap;
  }
  .contact-info-container {
    margin: 0.5rem;
  }
  .contact-info-container p,
  .nav-links li a {
    font-size: 1rem;
  }
  .experience-sub-title {
    font-size: 1.25rem;
  }
  .logo {
    font-size: 1.5rem;
  }
  .nav-links {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
  .section__pic-container {
    width: clamp(180px, 60vw, 280px);
    height: clamp(180px, 60vw, 280px);
  }
  .section__pic-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
  }
  .section__text__p2 {
    font-size: 1.25rem;
  }
  .title {
    font-size: 1.75rem;
  }
  .text-container {
    text-align: justify;
  }
  .btn {
    width: 7rem;
    padding: 0.8rem;
    font-size: 0.9rem;
  }
  .project-img {
    max-width: 100%;
    width: 100%;
  }
  .color-container {
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
  }
  .details-container {
    flex: 1 1 100%;
    max-width: 320px;
  }
  #projects .about-containers .color-container {
    flex: 1 1 100%;
    max-width: 320px;
    width: 100%;
  }
  .article-container {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .contact-info-upper-container {
    flex-direction: column;
    padding: 1rem;
    box-sizing: border-box;
    max-width: 100%;
  }
  /* the email is one long unbreakable token; let it wrap rather than push
     the container past the viewport and scroll the whole page sideways */
  .contact-info-container p,
  .contact-info-container a {
    overflow-wrap: anywhere;
  }
}

/* Extra small phones */
@media screen and (max-width: 400px) {
  section {
    padding: 2.5rem 1rem;
  }
  .title {
    font-size: 1.5rem;
  }
  .section__text__p2 {
    font-size: 1.1rem;
  }
  .btn {
    width: 6.5rem;
    padding: 0.7rem;
    font-size: 0.85rem;
  }
  .details-container {
    padding: 1rem;
  }
  article {
    width: 100%;
  }
}

/* Portrait orientation - tall screens */
@media screen and (orientation: portrait) and (min-height: 700px) {
  section {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }
}

/* Very tall portrait screens (phones held vertically) */
@media screen and (max-width: 500px) and (min-height: 800px) {
  #profile {
    min-height: auto;
    padding-top: 2rem;
    padding-bottom: 2rem;
  }
  section {
    padding: 2.5rem 1rem;
  }
}
