@media screen and (max-width: 1400px) {
    #profile {
      height: fit-content;
      min-height: 83vh;
      margin-bottom: 6rem;
    }
    .about-containers {
      flex-wrap: wrap;
    }
    #contact,
    #projects {
      height: fit-content;
    }
    /* Fix footer overflowing on screens smaller than 1450px */
    .container1 {
      width: 100%;
    }
  }
  
  @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;
    }
  }
  
  /* Tablets Landscape and Small Laptops */
  @media screen and (max-width: 992px) {
    .prof {
      font-size: 2.5rem;
    }
    .title {
      font-size: 2.5rem;
    }
    .contact-container {
      flex-direction: column;
      height: auto;
      padding-top: 50px;
      padding-bottom: 50px;
    }
    .contact-left {
      padding-bottom: 40px;
    }
    .contact-right img {
      width: 350px;
    }
    .container1 {
      flex-wrap: wrap;
    }
    .footer-content {
      width: 100%;
      margin-bottom: 1.5rem;
    }
    #certificate {
      min-height: 0;
    }
    .certificate-list {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 1rem;
    }
    .certificate-img {
      height: 15rem;
    }
  }
  
  /* Tablets Portrait and Large Mobile Devices */
  @media screen and (max-width: 768px) {
    .about-containers {
      flex-direction: column;
    }
    #robot-model {
      width: 50vw; /* Make it smaller so it fits nicely in the corner */
      height: 50vh;
      top: auto; /* Remove top constraint */
      bottom: 0; /* Anchor to bottom */
      right: 0; /* Anchor to right */
    }
    .modal-content {
      width: 95%;
    }
    .container1 {
      flex-wrap: wrap;
    }
    .footer-content {
      width: 100%;
      margin-bottom: 1.5rem;
    }
  }

  @media screen and (max-width: 480px) {

    footer{
      width: 100%;
      height: auto;
      padding-bottom: 20px;
      margin-top: 20px;
    }
    #profile {
      height: fit-content;
      min-height: 60vh;
      margin-bottom: 2rem;
    }
    .prof{
      font-size: 40px;
      text-align: center;
    }
    #about{
      padding-top: 0px;
      bottom: auto;
    }
    #about .title{
      padding-top: 100px;
    }
    #experience .title{
      padding-top: 100px;
    }
    #projects .title{
      padding-top: 100px;
    }
    #services{
      padding-top: 0px;
      padding-bottom: 0px;
    }
    #projects{
      margin-right: 20px;
      margin-left: 20px;
    }
    #certificate {
      margin-left: 5%;
      margin-right: 5%;
    }
    .certificate-list {
      grid-template-columns: 1fr;
      gap: 1.25rem;
    }
    .certificate-img {
      width: 100%;
      max-width: 22rem;
      height: auto;
      max-height: 15rem;
    }
    article {
      font-size: 1rem;
    }
    footer nav {
      height: fit-content;
      margin-bottom: 2rem;
    }
    .about-containers,
    .contact-info-upper-container,
    .btn-container {
      flex-wrap: wrap;
    }
    #contact{
      padding-top: 0px;
    }
    .contact-input{
      width: 80vw;
    }
    .contact-right{
      display: none;
    }
    .contact-container {
      padding-top: 80px;
      height: auto;
      padding-bottom: 50px;
    }
    .contact-left {
      padding-bottom: 0px;
    }
    .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: 46vw;
      height: 46vw;
      justify-content: center;
    }
    .section__text__p2 {
      font-size: 1.25rem;
    }
    .title1{
      padding-bottom: 50px;
    }
    .title {
      padding-top: 50%;
      font-size: 2rem;
    }
    .text-container {
      text-align: justify;
    }
  }