/* ------------ LARGER TABLETS & SMALL DESKTOPS ------------ */
@media screen and (max-width: 1400px) {
#profile {
  height: 83vh;
  margin-bottom: 6rem;
}

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

#projects {
  padding: 1.5rem 4rem 8rem 4rem;
}

#contact {
  height: auto;
  padding: 4rem 2rem;
}

.project-card {
  gap: 1.5rem;
  margin: 3rem 0;
}

.project-image img {
  max-width: 400px;
}

.project-content {
  max-width: 500px;
}
}

/* ------------ TABLETS & SMALL LAPTOPS ------------ */
@media screen and (max-width: 1200px) {
  #desktop-nav {
    display: none;
  }

  #hamburger-nav {
    display: flex;
  }

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

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

  .arrow {
    display: none;
  }

  section,
  .section-container {
    height: auto;
    padding: 4rem 2rem;
  }

  section {
    margin: 0 5%;
  }

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

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

  /* Projects section responsive */
  #projects {
    height: auto;
    padding: 4rem 2rem 6rem 2rem;
  }

  .project-row {
    flex-direction: column !important;
    text-align: center;
    gap: 2rem;
    padding: 40px 0;
    margin: 0;
  }

  .project-row.reverse {
    flex-direction: column !important;
  }

  .project-image {
    max-width: 100%;
    width: 100%;
    /* Add consistent height for all project images */
    height: 300px;
    aspect-ratio: 16 / 10;
  }

  .project-image img {
    max-width: 100%;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .project-content {
    max-width: 100%;
  }

  .project-title::after {
    display: none;
  }

  /* Contact section responsive */
  #contact {
    height: auto;
    padding: 4rem 2rem 4rem 2rem;
  }

  .contact-info-upper-container {
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
  }

  /* Footer responsive */
  footer {
    padding: 2rem 1rem;
  }

  .footer-nav {
    gap: 2rem;
  }
}

/* ------------ MOBILE DEVICES ------------ */
@media screen and (max-width: 599px) {
  #profile {
    height: auto;
    margin-bottom: 0;
    padding-top: 2rem;
  }

  article {
    font-size: 1rem;
  }

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

  .contact-info-container {
    margin: 0.5rem 0;
  }

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

  /* Skills mobile responsive */
  #skills {
    padding-bottom: 2rem;
  }

  #skills .title {
    margin-bottom: 3rem;
  }

  .skills-details-container {
    margin-top: 2rem;
  }

  .skills-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;
  }

  /* Projects mobile responsive */
  #projects {
    height: auto;
    padding: 4rem 1rem 6rem 1rem;
  }

  .project-row {
    flex-direction: column !important;
    text-align: center;
    gap: 1.5rem;
    padding: 30px 0;
    margin: 0;
  }

  .project-row.reverse {
    flex-direction: column !important;
  }

  .project-image {
    max-width: 100%;
    width: 100%;
    /* Consistent height for mobile as well */
    height: 250px;
    aspect-ratio: 16 / 10;
  }

  .project-image img {
    max-width: 100%;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .project-content {
    width: 100%;
    padding: 0;
  }

  .project-title {
    font-size: 1.5rem;
  }

  .project-title::after {
    display: none;
  }

  .tech-stack {
    justify-content: center;
  }

  .btn-container {
    justify-content: center;
    gap: 1rem;
  }

  /* Contact mobile responsive */
  #contact {
    height: auto;
    padding: 4rem 1rem;
  }

  .contact-info-upper-container {
    flex-direction: column;
    margin: 1rem auto;
    padding: 1rem;
  }

  .contact-info-container {
    margin: 0.5rem 0;
  }

  /* Footer mobile responsive */
  footer {
    height: auto;
    padding: 2rem 1rem;
  }

  .footer-nav {
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
  }

  .footer-nav li a {
    font-size: 1rem;
  }

  footer p {
    font-size: 0.85rem;
  }
}