@media screen and (max-width: 1400px) {
  #profile {
    height: 83vh;
    margin-bottom: 6rem;
  }
  .about-containers {
    flex-wrap: wrap;
  }
  #contact,
  #projects {
    height: fit-content;
  }
}

@media screen and (max-width: 1200px) {
  #desktop-nav {
    display: none;
  }
  #hamburger-nav {
    display: flex;
  }
  #experience,
  .experience-details-container {
    margin-top: 2rem;
  }
  #profile,
  .section-container {
    display: block;
  }
  .arrow {
    display: none;
  }
  section,
  .section-container {
    height: fit-content;
  }
  section {
    margin: 0 5%;
    padding: 2rem;
  }
  .section__pic-container {
    width: 275px;
    height: 275px;
    margin: 0 auto 2rem;
  }
  .about-containers {
    margin-top: 0;
  }
  #profile {
    margin-top: 4rem;
  }
}

@media screen and (max-width: 900px) {
  #profile {
    height: auto;
    padding: 4rem 2rem;
  }
  .section__pic-container {
    width: 250px;
    height: 250px;
  }
  .title {
    font-size: 2.5rem;
  }
  .section__text__p2 {
    font-size: 1.5rem;
  }
  .contact-info-upper-container {
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    width: 90%;
    margin: 0 auto;
    max-width: 400px;
  }
  
  #contact {
    align-items: center;
    text-align: center;
  }
  
  /* Increase gap for mobile projects and about section */
  .details-container {
    margin-bottom: 2rem;
  }
  .text-container {
    margin-top: 2rem;
  }
  .color-container {
    margin-bottom: 2rem;
  }
}

@media screen and (max-width: 700px) {
  .article-container {
    flex-direction: column;
    gap: 1.5rem;
  }
  article {
    width: 100%;
  }
  .btn-container {
    flex-direction: column;
    align-items: center;
  }
  .btn {
    width: 100%;
    max-width: 300px;
  }
  .project-btn {
    width: 100%;
  }
}

@media screen and (max-width: 600px) {
  #contact,
  footer {
    height: auto;
  }
  #profile {
    height: auto;
    margin-bottom: 0;
    padding: 3rem 1rem;
  }
  article {
    font-size: 1rem;
  }
  footer nav {
    height: fit-content;
    margin-bottom: 2rem;
  }
  .about-containers,
  .btn-container {
    flex-wrap: wrap;
  }
  .contact-info-container {
    margin: 0;
    padding: 0.5rem;
    width: 100%;
    justify-content: center;
  }
  .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: auto;
    height: 46vw;
    justify-content: center;
  }
  .section__text__p2 {
    font-size: 1.25rem;
  }
  .title {
    font-size: 2rem;
  }
  .text-container {
    text-align: center;
  }
  .modal-content {
    margin: 20% auto;
    width: 95%;
  }
}

@media screen and (max-width: 400px) {
  .section__pic-container {
    width: 200px;
    height: 200px;
  }
  .details-container {
    padding: 1rem;
  }
  .project-title {
    font-size: 1.3rem;
  }
  .contact-info-container {
    flex-direction: column;
    text-align: center;
  }
}