/* =========================
   LARGE SCREENS
========================= */

@media screen and (max-width: 1400px) {
  #profile {
    height: auto;
    margin-bottom: 2rem;
  }

  .about-containers {
    flex-wrap: wrap;
  }

  #projects,
  #contact {
    height: auto;
  }

  section {
    margin: 0 5rem;
  }
}

/* =========================
   TABLETS
========================= */

@media screen and (max-width: 1200px) {
  #desktop-nav {
    display: none;
  }

  #hamburger-nav {
    display: flex;
  }

  section {
    height: auto;
    margin: 0 3rem;
    padding-top: 3rem;
  }

  #profile,
  .section-container {
    display: block;
    height: auto;
  }

  .section-container {
    gap: 2rem;
  }

  .section__pic-container {
    width: 300px;
    height: 300px;
    margin: 0 auto 2rem;
  }

  .section__pic-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .about-containers {
    flex-wrap: wrap;
  }

  .arrow {
    display: none;
  }

  .article-container {
    justify-content: center;
  }

  article {
    width: 45%;
  }
}

/* =========================
   MOBILE
========================= */

@media screen and (max-width: 768px) {

  nav {
    height: auto;
    padding: 1rem 0;
  }

  section {
    margin: 0 1.2rem;
    padding-top: 2rem;
    height: auto;
  }

  html, body {
    overflow-x: hidden;
  }

  /* PROFILE */
 #profile {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
    padding-bottom: 0;
    margin-bottom: 0;
  }

  

  .section__pic-container {
    width: 350px;
    height: 350px;
    margin: 0 auto 2rem;
  }

  /* ABOUT */
#about {
    margin-top: 0;
    padding-top: 0;
  }

  #about {
    padding-top: 1rem;
  }

  .section-container {
    gap: 1rem;
  }

  .about-containers {
    flex-direction: column;
  }


  @media screen and (max-width: 768px) {

  #about .section__pic-container {
    width: 280px;
    height: 280px;
    margin: 0 auto 1rem;
  }

  #about .about-pic {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

}

  /* SKILLS */
  .article-container {
    flex-direction: column;
    gap: 1rem;
  }

  article {
    width: 100%;
    justify-content: flex-start;
  }

  /* CONTACT */
  @media screen and (max-width: 768px) {

  .article-container {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

  /* FOOTER */
  footer .nav-links {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }

  /* =========================
     🔥 FIX PROJECTS (MAIN FIX)
  ========================= */

  #projects .about-containers {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
    width: 100%;
  }

  #projects .details-container {
    width: 100%;
    max-width: 100%;
    flex: none;
  }

  #projects {
    height: auto;
  }

  img {
    max-width: 100%;
  }

}

/* =========================
   SMALL MOBILE
========================= */

@media screen and (max-width: 480px) {
  section {
    margin: 0 1rem;
  }

  .title {
    font-size: 1.8rem;
  }

  .logo {
    font-size: 1.4rem;
  }

  .section__text__p2,
  p,
  a {
    font-size: 0.95rem;
  }

  .section__pic-container {
    width: 180px;
    height: 180px;
  }

  .details-container {
    padding: 1rem;
  }

  .btn {
    font-size: 0.9rem;
    padding: 0.8rem;
  }
}