/* Responsive Styles */

@media (max-width: 1300px) {
  html {
    font-size: 60%;
  }
  .project-layout {
    display: flex;
    flex-direction: column;
    gap: 1rem; /* space between the two blocks */
    padding: 10rem 5%;
    align-items: center; /* left‑align them (or center if you prefer) */
  }

  .project-sidebar {
    position: static;
    max-width: 350px;
    width: 350px;
    margin: 0 auto;
  }

  .portfolio-layer h4 {
    /* scales between 2.4rem and 3rem based on viewport width */
    font-size: clamp(0.8rem, 5vw, 2.4rem);
    margin-bottom: 1rem;
    line-height: 1;
  }

  .portfolio-layer p {
    margin: 0.5rem 0 1.5rem;
    line-height: 1.4;
  }


}

@media (max-width: 991px) {
  .home {
    padding: 3rem 3%;
    flex-direction: column;
    text-align: center;
    height: auto;
    min-height: 100vh;
    font-size: 180%;
  }

  .home-content {
    max-width: 100%;
    margin-bottom: 3rem;
    margin-top: 10rem;
  }

  .home-img {
    width: 350px;
    height: 350px;
    margin: 0 auto;
  }

  .home-img img {
    max-width: 400px;
  }

  .social-media {
    justify-content: center;
  }
  .header {
    padding: 2rem 3%;
  }

  section {
    padding: 10rem 3% 2rem;
  }
  .services {
    padding-bottom: 7rem;
  }
  .portfolio {
    padding-bottom: 7rem;
  }
  .contact {
    min-height: auto;
  }
  .footer {
    padding: 2rem 3%;
  }
}
/* For screens below 768px (mobile) */
@media (max-width: 768px) {
  section {
    padding: 7rem 5% 2rem;
  }
  .home {
    padding: 2rem 5% 4rem;
  }

  .home-content h1 {
    font-size: 4rem;
  }

  .home-content h3 {
    font-size: 2.4rem;
  }

  .home-content p {
    font-size: 1.6rem;
  }

  .home-img {
    width: 75%;
    max-width: 300px;
    margin: 4rem auto 0;
  }

  .home-img img {
    width: 100%;
    height: auto;
  }
  .btn {
    padding: 10px 24px;
    font-size: 1rem;
  }
  #menu-icon {
    display: block;
  }
  .navbar {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    padding: 1rem 3%;
    background: var(--bg-color);
    border-top: 0.1rem solid rgba(0, 0, 0, 0.2);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.2);
    display: none;
  }
  .navbar.active {
    display: block;
  }

  .navbar a {
    display: block;
    font-size: 2rem;
    margin: 3rem 0;
  }
  .about {
    flex-direction: column-reverse;
  }
  .about img {
    width: 70vw;
    margin-top: 4rem;
  }
  .services {
    padding-bottom: 7rem;
  }
  .portfolio {
    padding-bottom: 7rem;
    padding-top: 0.01rem;
  }
  .portfolio h2 {
    margin-bottom: 3rem;
  }
  .portfolio-container {
    grid-template-columns: repeat(2, 1fr);
  }
  .carousel img {
    width: 25%;
  }
}

@media (max-width: 617px) {
  .portfolio-container {
    grid-template-columns: 1fr;
  }

  .home-img {
    width: 80%;
    max-width: 320px;
    margin: 0 auto;
  }
}

/* For very small screens */
@media (max-width: 480px) {
  .social-media a {
    width: 36px;
    height: 36px;
    font-size: 2rem;
  }

  .contact form .input-box input {
    width: 100%;
  }
}

@media (max-width: 365px) {
  .home-content h1 {
    font-size: 2.5rem;
  }

  .home-content h3 {
    font-size: 1.6rem;
  }

  .home-content p {
    font-size: 1.3rem;
  }

  .home-img {
    width: 90%;
    max-width: 220px;
  }

  .home-img img {
    width: 100%;
  }
}
