@media screen and (max-width: 1400px) {
  #profile {
    height: 83vh;
    margin-bottom: 6rem;
  }
  .about-containers {
    grid-template-columns: repeat(2, 1fr);
  }
}

@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;
  }
  .scroll-down-link, .scroll-up-link {
    right: -2rem; /* Consistent spacing with other pages */
  }
  section,
  .section-container {
    height: fit-content;
  }
  section {
    margin: 0 5%;
  }
  .section__pic-container {
    width: 275px;
    height: 275px;
    margin: 0 auto 2rem;
  }
  .about-containers {
    margin-top: 0;
    grid-template-columns: repeat(2, 1fr);
  }

  /* Experience section responsiveness */
  .experience-sub-title {
    font-size: 1.5rem;
  }
  article h3 {
    font-size: 1rem;
  }
  article p {
    font-size: 0.85rem;
  }
  .icon {
    width: 22px;
    height: 22px;
  }
  
  /* Testimonial & Blog */
  .testimonial-card, .blog-card {
    max-width: 100%;
  }
  
  /* Contact form */
  #contact-form {
    max-width: 90%;
  }
}

@media screen and (max-width: 992px) {
  .project-grid {
      grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }
  .testimonial-grid-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media screen and (max-width: 600px) {
  #contact,
  footer {
    height: auto;
  }
  #profile {
    height: 83vh;
    margin-bottom: 0;
  }
  article {
    font-size: 1rem;
  }
  footer nav {
    height: fit-content;
    margin-bottom: 2rem;
  }
  .about-containers,
  .contact-info-upper-container,
  .btn-container {
    flex-wrap: wrap;
  }
  .filter-container {
    flex-wrap: wrap;
  }

  /* Ensure single-button containers don't wrap */
  .view-more-container,
  .download-cv-container {
    flex-wrap: nowrap;
  }

  /* Keep profile buttons side-by-side on mobile */
  #profile .btn-container {
    flex-wrap: nowrap;
  }
  .contact-info-container {
    margin: 0;
  }
  .contact-info-upper-container {
    gap: 1rem;         /* Space between Gmail & LinkedIn blocks */
  }
  
  .contact-info-container {
    margin: 0.5rem 0;
  }
  .contact-info-container p,
  .nav-links li a,
  .menu-links span {
    font-size: 1rem; /* This was a bug, should be on .menu-links a */
  }
  .btn {
    padding: 0.6rem 1rem; /* Further reduce padding for small screens */
    font-size: 0.9rem; /* Make button text smaller on mobile */
  }
  .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: 2.5rem;
  }
  .text-container {
    text-align: justify;
  }
  .about-containers,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .icon {
    width: 20px;
    height: 20px;
  }
  
  .project-img {
    height: 250px;
  }
  
  /* Testimonials & Blog on small screens */
  .blog-grid-container {
    grid-template-columns: 1fr; /* Make blog cards stack in a single column */
  }
  .testimonial-author {
    justify-content: center;
  }
  .blog-card, .testimonial-card {
    margin: 0 auto; /* Center the card when it's in a single column */
    width: 100%;
  }

  /* Contact form on small screens */
  #contact-form {
    padding: 2rem 1.5rem; /* Adjust horizontal padding */
    width: 80%; /* Reduce form width on small screens */
  }
  .form-group input,
  .form-group textarea {
    padding: 1rem;
  }

  .scroll-down-link, .scroll-up-link {
    display: none; /* Strictly hide on small screens */
  }
}