/* ==========================================================================
   responsive.css — Breakpoint behavior. Mobile-first overrides applied
   top-down from laptop to mobile.
   ========================================================================== */

/* Laptop: 1024–1439px */
@media (max-width: 1439px) {
  .gallery-grid {
    grid-auto-rows: 180px;
  }
}

/* Tablet: 768–1023px */
@media (max-width: 1023px) {
  .container {
    padding: 0 var(--space-md);
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .hero-visual {
    max-width: 420px;
    margin: 0 auto;
    order: -1;
  }

  .focus-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .stack-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-item--featured {
    grid-column: span 2;
    grid-row: span 1;
  }

  .lab-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile: below 768px */
@media (max-width: 767px) {
  .container {
    padding: 0 22px;
  }

  .nav-links {
    display: none;
  }

  .mobile-toggle {
    display: block;
  }

  .section {
    padding: var(--space-2xl) 0;
  }

  .hero {
    padding: calc(var(--header-height) + var(--space-lg)) 0 var(--space-xl);
  }

  .headline {
    max-width: none;
  }

  .work-grid {
    grid-template-columns: 1fr;
  }

  .focus-grid {
    grid-template-columns: 1fr;
  }

  .stack-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 220px;
  }

  .gallery-item--featured {
    grid-column: span 1;
    grid-row: span 1;
  }

  .lab-grid {
    grid-template-columns: 1fr;
  }

  .labs-head {
    align-items: flex-start;
  }

  .phil-item {
    grid-template-columns: 1fr;
    gap: var(--space-2xs);
  }

  .lightbox-nav {
    width: 38px;
    height: 38px;
  }

  .lightbox-nav.prev { left: var(--space-xs); }
  .lightbox-nav.next { right: var(--space-xs); }

  .gallery-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .gallery-filters::-webkit-scrollbar {
    display: none;
  }

  .filter-btn {
    flex-shrink: 0;
  }

  .hero-id {
    gap: var(--space-md);
  }

  .footer-grid {
    flex-direction: column;
  }
}

/* No horizontal overflow anywhere */
html,
body {
  max-width: 100%;
}
