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

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

  section {
    padding-left: 6rem;
    padding-right: 6rem;
  }
}

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

  #hamburger-nav {
    display: flex;
    position: relative;
    top: 0;
    background: white;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  }

  body.dark-mode #hamburger-nav {
    background: rgb(20, 20, 20);
  }

  #experience,
  .experience-details-container {
    margin-top: 2rem;
  }

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

  .arrow {
    display: none;
  }

  section {
    margin: 0 auto;
    padding-left: 5%;
    padding-right: 5%;
  }

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

  .about-containers {
    margin-top: 0;
  }

  .title {
    font-size: 2.5rem;
  }

  .modal-content {
    width: 95%;
    margin: 5% auto;
  }

  .modal-title {
    font-size: 1.5rem;
    margin: 1.5rem 1.5rem 1rem 1.5rem;
  }

  .modal-body {
    padding: 0 1.5rem 1.5rem 1.5rem;
  }

  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }
}

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

  #contact,
  footer {
    min-height: 40vh;
  }

  #profile {
    min-height: 80vh;
    margin-bottom: 2rem;
    padding-top: 4rem;
  }

  /* ========================================
     FIX: SECTION SPACING TO PREVENT OVERLAP
     ======================================== */


  #experience {
    padding-top: 8vh !important;
    margin-top: 4rem !important;
  }

  .about-containers {
    margin-bottom: 3rem !important;
  }

  .text-container {
    margin-bottom: 3rem !important;
  }

  section {
    margin-bottom: 2rem !important;
    clear: both;
  }

  .title {
    margin-bottom: 2rem !important;
  }

  .section__text__p1 {
    margin-bottom: 1rem !important;
  }

  /* ======================================== */

  article {
    font-size: 1rem;
    width: 100%;
  }

  .article-container {
    gap: 1.5rem;
  }

  footer nav {
    height: fit-content;
    margin-bottom: 2rem;
  }

  .about-containers,
  .contact-info-upper-container,
  .btn-container,
  .hero-mini-cards {
    flex-wrap: wrap;
  }

  .contact-info-container {
    margin: 0;
    flex-direction: column;
    text-align: center;
  }

  .contact-info-container p,
  .nav-links li a {
    font-size: 1rem;
  }

  .experience-sub-title {
    font-size: 1.25rem;
    min-height: auto;
  }

  .logo {
    font-size: 1.5rem;
  }

  .nav-links {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }

  /* ========================================
     FIXED: PROFILE IMAGE - PERFECTLY CIRCULAR
     ======================================== */
  #profile .section__pic-container {
    width: 260px !important;
    height: 260px !important;
    border-radius: 50% !important;
    overflow: hidden !important;
    margin: 0 auto 2rem;
  }



  /* ========================================
     FIXED: ABOUT IMAGE - PERFECTLY CIRCULAR & SMALLER
     ======================================== */


  .section__text__p2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
  }

  .text-container {
    text-align: justify;
  }

  .text-container p {
    font-size: 1rem;
  }

  .btn {
    width: 8rem;
    padding: 0.85rem 1rem;
    font-size: 0.9rem;
  }

  .modal-content {
    width: 95%;
    max-height: 90vh;
    margin: 5% auto;
    border-radius: 1rem;
  }

  .modal-title {
    font-size: 1.3rem;
    margin: 1rem 1rem 0.5rem 1rem;
  }

  .modal-body {
    padding: 0 1rem 1rem 1rem;
  }

  .modal-section {
    margin-bottom: 1.5rem;
  }

  .modal-section h3 {
    font-size: 1.1rem;
  }

  .modal-section p,
  .modal-section ul li {
    font-size: 0.95rem;
  }

  .close {
    font-size: 28px;
    padding: 8px 20px;
  }

  .back-to-top {
    bottom: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
  }

  .back-to-top svg {
    width: 18px;
    height: 18px;
  }

  .project-duration {
    font-size: 0.85rem;
  }

  #projects .about-containers {
    gap: 2rem;
    flex-direction: column;
  }

  .details-container {
    padding: 1.5rem;
  }

  .project-img {
    height: auto;
    max-height: 250px;
    object-position: top;
  }

  .research-badge {
    font-size: 0.8rem;
    padding: 0.6rem 1rem;
  }

  .project-stats {
    flex-direction: column;
    gap: 1rem;
  }

  .stat-item {
    flex-direction: row;
    gap: 0.5rem;
  }

  .stat-number {
    font-size: 1.5rem;
  }

  .contact-form-container {
    padding: 0 1rem;
  }

  .contact-divider::before,
  .contact-divider::after {
    width: 25%;
  }

  .dark-mode-toggle {
    width: 45px;
    height: 45px;
    top: 15px;
    right: 15px;
  }

  .dark-mode-toggle svg {
    width: 18px;
    height: 18px;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .gallery-section p {
    font-size: 0.9rem;
  }

  .lightbox {
    padding: 20px;
  }

  .lightbox-content {
    max-width: 95%;
    max-height: 70vh;
  }

  .lightbox-prev,
  .lightbox-next {
    font-size: 35px;
    padding: 10px;
  }

  .lightbox-prev {
    left: 5px;
  }

  .lightbox-next {
    right: 5px;
  }

  .lightbox-close {
    top: 10px;
    right: 15px;
    font-size: 35px;
  }

  .lightbox-caption {
    font-size: 1rem;
    padding: 15px;
  }

  .lightbox-counter {
    bottom: 15px;
    font-size: 0.9rem;
    padding: 0.4rem 1rem;
  }
}