@media (max-width: 767.98px) {

  body {
    background-attachment: scroll;
  }

  .navbar {
    height: 64px;
    padding: 0 1rem;
  }

  .nav-logo {
    font-size: 1.55rem;
    line-height: 1;
    max-width: calc(100% - 120px);
    /* space for hamburger + theme toggle */
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .nav-menu {
    display: none;
  }

  /* Hide desktop theme toggle — shown inside overlay instead */
  .theme-toggle-btn {
    display: none;
  }

  .hamburger-btn {
    display: flex;
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
  }

  .nav-overlay {
    padding: 1.25rem;
  }

  .nav-overlay .nav-logo {
    font-size: 1.9rem;
    max-width: calc(100% - 56px);
  }

  .overlay-menu {
    gap: 0.9rem;
    max-width: 100%;
  }

  .overlay-item a {
    font-size: 1.6rem;
    padding: 0.9rem 1.25rem;
  }

  .container {
    padding: 5rem 1rem 2rem;
  }

  .hero-banner {
    margin-top: 84px;
    padding: 1.25rem;
  }

  .hero-title {
    font-size: 3rem;
    line-height: 1.1;
  }

  .hero-subtitle {
    font-size: 0.95rem;
  }

  .hero-photo-container {
    width: min(100%, 320px);
    margin-top: 1.25rem;
    margin-left: auto;
    margin-right: auto;
    aspect-ratio: 1 / 1;
    border-radius: 20px;
    overflow: hidden;
  }

  .hero-photo-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  .section-header {
    margin: 2rem 0 1rem 0;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .scroll-row {
    gap: 12px;
    padding-bottom: 0.75rem;
  }

  .scroll-card {
    width: min(84vw, 320px);
  }

  .scroll-card-content {
    padding: 1rem;
  }

  .scroll-card-title {
    font-size: 1.2rem;
  }

  .logo-circle {
    width: 92px;
    height: 92px;
  }

  .logo-label {
    max-width: 120px;
    font-size: 0.82rem;
  }

  .about-hero,
  .portfolio-title-hero,
  .project-detail-hero {
    padding: 1.5rem 0 1rem 0;
  }

  .about-grid-who,
  .about-grid-contact,
  .portfolio-card-grid {
    display: flex;
    flex-direction: column;
  }

  .about-photo-wrapper,
  .portfolio-image-wrapper,
  .project-detail-image-container {
    width: min(100%, 340px);
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    border-radius: 20px;
    overflow: hidden;
  }

  .about-photo-wrapper {
    aspect-ratio: 1 / 1;
  }

  .about-photo-wrapper img,
  .portfolio-image-wrapper img,
  .project-detail-image-container img {
    width: 100%;
    height: 100%;
    display: block;
  }

  .about-photo-wrapper img {
    object-fit: cover;
  }

  .portfolio-image-wrapper {
    aspect-ratio: 16 / 10;
  }

  .portfolio-image-wrapper img {
    object-fit: cover;
  }

  .project-detail-image-container {
    width: min(100%, 520px);
    aspect-ratio: 16 / 10;
  }

  .project-detail-image-container img {
    object-fit: contain;
  }

  .portfolio-card-grid {
    gap: 1rem;
  }

  .portfolio-text h2 {
    font-size: 1.8rem;
    margin-bottom: 0.75rem;
  }

  .portfolio-text p,
  .project-detail-body {
    font-size: 0.95rem;
  }

  .btn-style,
  .btn-secondary-style {
    width: 100%;
    justify-content: center;
  }

  .desktop-only {
    display: none !important;
  }

  .mobile-only {
    display: block !important;
  }

  .footer {
    padding: 2rem 1rem;
  }

  .footer-copyright {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 420px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .nav-logo {
    font-size: 1.3rem;
  }

  .scroll-card {
    width: 86vw;
  }

  .overlay-item a {
    font-size: 1.6rem;
  }
}