@media screen and (max-width: 1400px) {
  #profile {
    height: 83vh;
    margin-bottom: 6rem;
  }
  .about-containers {
    flex-wrap: wrap;
  }
  
  /* Adjust parallax for smaller screens */
  .parallax-element.circle {
    opacity: 0.03;
  }
  
  .parallax-element.dots {
    opacity: 0.15;
    background-size: 15px 15px;
  }
  
  /* Adjust animations for medium screens */
  .animate-on-scroll {
    transition: opacity 0.6s cubic-bezier(0.165, 0.84, 0.44, 1), transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
  }
}

@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%;
  }
  .section__pic-container {
    width: 275px;
    height: 275px;
    margin: 0 auto 2rem;
  }
  .about-containers {
    margin-top: 0;
  }
  
  /* Adjust animations for tablet screens */
  .animate-on-scroll {
    transform: translateY(20px); /* Smaller transform distance */
  }
  
  .details-container:hover {
    transform: translateY(-5px); /* Reduce hover animation intensity */
  }
  
  .color-container:hover {
    transform: scale(1.02); /* Reduce scale effect */
  }
}

@media screen and (max-width: 600px) {
  #contact,
  footer {
    height: 40vh;
  }
  #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;
    gap: 1.5rem; /* Increase gap for better touch targets */
  }
  .contact-info-container {
    margin: 0;
  }
  .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: justify;
  }
  
  /* Adjust parallax for mobile screens */
  .parallax-element.circle {
    opacity: 0.02;
    filter: blur(15px);
  }
  
  .parallax-element.dots {
    opacity: 0.1;
    background-size: 10px 10px;
  }
  
  .parallax-element.circle-1 {
    width: 100px;
    height: 100px;
  }
  
  .parallax-element.circle-2 {
    width: 120px;
    height: 120px;
  }
  
  .parallax-element.circle-3 {
    width: 80px;
    height: 80px;
  }
  
  /* Optimize animations for mobile */
  .animate-on-scroll {
    transform: translateY(10px); /* Minimal transform distance for mobile */
    transition: opacity 0.5s ease, transform 0.5s ease; /* Faster animations on mobile */
  }
  
  /* Reduce or eliminate hover effects that don't make sense on touch devices */
  .btn:hover::before,
  .details-container:hover,
  .color-container:hover,
  .article-container:hover .project-img {
    transform: none;
  }
  
  /* Increase touch targets */
  .btn {
    padding: 1.2rem;
    margin-bottom: 0.5rem;
  }
  
  /* Better spacing for project cards on mobile */
  .details-container {
    margin-bottom: 2rem;
  }
  
  /* Make buttons full width on very small screens */
  @media screen and (max-width: 400px) {
    .btn-container {
      flex-direction: column;
      width: 100%;
    }
    
    .btn {
      width: 100%;
    }
  }
}
