@media screen and (max-width: 1400px) {
    #profile {
      height: 83vh;
      margin-bottom: 6rem;
    }
    .about-containers {
      flex-wrap: wrap;
    }
    #contact {
      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%;
    }
    .section__pic-container {
      width: 275px;
      height: 275px;
      margin: 0 auto 2rem;
    }
    .about-containers {
      margin-top: 0;
    }
  }
  
  @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;
    }
    .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;
    }
  }

  @media (max-width: 768px) {
    #ai-chat {
      padding: 1rem 0.5rem; 
      margin-top: 30px; 
    }
  
    .chat-messages {
      height: 300px;
      padding: 0.8rem;
    }
  
    .message-content {
      max-width: 90%; 
      padding: 0.6rem; 
      font-size: 0.85rem;
    }
  
    .chat-input {
      padding: 0.6rem;
    }
  
    #user-input {
      padding: 0.5rem;
      font-size: 0.85rem; 
    }
  
    .send-icon {
      height: 18px; 
      width: 18px;
    }
  }
  
  @media (max-width: 480px) {
    #ai-chat {
      padding: 0.5rem; 
      margin-top: 20px; 
    }
  
    .chat-messages {
      height: 250px; 
      padding: 0.5rem; 
    }
  
    .message-content {
      max-width: 95%; 
      padding: 0.5rem;
      font-size: 0.8rem; 
    }
  
    .chat-input {
      padding: 0.5rem; 
    }
  
    #user-input {
      padding: 0.4rem; 
      font-size: 0.8rem; 
    }
  
    .send-icon {
      height: 16px;
      width: 16px;
    }
  }

  @media (max-width: 1024px) {
    .about-containers1 {
      grid-template-columns: repeat(2, 1fr);
    }
  }
  
  @media (max-width: 768px) {
    #projects {
      padding: 3rem 1.5rem;
    }
    
    .about-containers1 {
      grid-template-columns: 1fr;
      max-width: 500px;
      margin: 2rem auto;
    }
    
    .article-container1 {
      height: 250px;
    }
  }
  
  @media (max-width: 480px) {
    #projects {
      padding: 2rem 1rem;
    }
    
    #projects .title {
      font-size: 2rem;
    }
    
    .project-title {
      font-size: 1.2rem;
    }
    
    .btn-container {
      flex-direction: column;
      align-items: center;
    }
    
    .project-btn {
      width: 100%;
      max-width: 200px;
    }
    
    .tech-icon {
      width: 25px;
      height: 25px;
    }
  }
  
  @media (max-width: 480px) {
  .timeline-item {
    flex-direction: column;
  }
  
  .timeline-date {
    text-align: left;
    margin-bottom: 5px;
    padding-right: 0;
  }
  
  .timeline-content {
    margin-left: 0;
    margin-top: 10px;
  }
}

/* Medium devices (tablets, 768px and down) */
@media (max-width: 768px) {
  .timeline-container,
  .timeline-container1 {
    padding: 15px;
  }
  
  .timeline-container::before,
  .timeline-container1::before {
    left: 40px;
  }
  
  .timeline-container::before {
    top: 40px;
    height: 45%;
  }
  
  .timeline-container1::before {
    top: 65%;
    height: 25%;
  }
}

/* Small devices (phones, 480px and down) */
@media (max-width: 480px) {
  .timeline-container,
  .timeline-container1 {
    padding: 10px;
  }
  
  .timeline-container::before,
  .timeline-container1::before {
    left: 30px;
    width: 1.5px; /* Thinner line on small screens */
  }
  
  .timeline-container::before {
    top: 35px;
    height: 50%;
  }
  
  .timeline-container1::before {
    top: 56%;
    height: 37%;
  }
}

/* Extra small devices (320px and down) */
@media (max-width: 320px) {
  .timeline-container::before,
  .timeline-container1::before {
    left: 25px;
  }
  
  .timeline-container::before {
    top: 30px;
  }
  
  .timeline-container1::before {
    top: 75%;
  }
}

@media (max-width: 768px) {
  /* .timeline-container {
    padding: 0 10px;
  }
  
  .timeline-container::before {
    left: 20px;
  } */
  
  @media (max-width: 576px) {
  .timeline-container,
  .timeline-container1 {
    padding: 10px;
  }
  
  .timeline-container::before,
  .timeline-container1::before {
    left: 30px;
    width: 1.5px;
  }
  
  /* Adjust content spacing */
  .timeline-item {
    padding-left: 15px;
  }
}

@media (max-width: 400px) {
  .timeline-container::before,
  .timeline-container1::before {
    left: 25px;
    height: 60% !important;
  }
  
  /* Make dates more compact */
  .timeline-date {
    font-size: 0.9rem;
  }
  
  /* Tighten content spacing */
  .timeline-content {
    padding: 10px 0;
  }
}

  .timeline-dot {
    left: 18px;
  }
  
  .timeline-date {
    width: 70px;
    font-size: 0.8rem;
  }
  
  .timeline-content {
    margin-left: 20px;
    padding: 15px;
  }
}


 