/* ==========================================================================
   responsive.css — layout changes per breakpoint
   Base (style.css) = mobile. 640px = large phone, 768px = tablet,
   1024px = laptop, 1440px = large desktop.
   ========================================================================== */

/* ---------- Phones: re-compose the justified gallery ----------
   Three-image rows break into one full-width lead image followed by
   a pair of 4:5 crops, so images stay large on narrow screens. */
@media (max-width: 639.98px) {
  .gallery__row { flex-wrap: wrap; }
  .gallery__row > .gallery__item:first-child:nth-last-child(3) { flex-basis: 100%; }
  .gallery__row > .gallery__item:first-child:nth-last-child(3) ~ .gallery__item {
    aspect-ratio: 4 / 5 !important;
  }
}

/* ---------- Tablet and up ---------- */
@media (min-width: 768px) {
  :root {
    --gutter: 2.5rem;
    --gallery-gutter: 1.5rem;
    --header-height: 7rem;
  }

  .site-header { padding-top: 2rem; }
  .main-nav { display: flex; }
  .menu-toggle,
  .mobile-menu { display: none !important; }

  .hero-title {
    padding-top: 2rem;
    padding-bottom: 3.5rem;
    font-size: 2.6rem;
  }

  .archive-tabs {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-inline: 0;
    padding-inline: 0;
    overflow: visible;
  }
  .archive-tab { height: 4rem; padding-right: 0.5rem; }

  .project-filters { margin-inline: 0; padding: 1.5rem 0; }

  .lightbox { padding: 3rem; }
  .lightbox__prev { left: 1.25rem; }
  .lightbox__next { right: 1.25rem; }

  .site-footer { margin-top: 8rem; padding-block: 3rem; }
  .site-footer__grid { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .site-footer__brand { grid-column: span 7; }
  .site-footer__links { grid-column: span 5; }
  .site-footer__bottom { margin-top: 5rem; }

  /* Inner pages */
  .page { padding-top: 0.75rem; }
  .grid-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .display-title { font-size: var(--fs-8xl); }

  .bio-header { padding-bottom: 3.5rem; }
  .bio-header .eyebrow { grid-column: span 3; }
  .bio-header__title { grid-column: span 9; }
  .bio-figure { grid-column: span 7; }
  .bio-intro { grid-column: 9 / span 4; padding-top: 6rem; }
  .bio-lead { font-size: var(--fs-4xl); line-height: 1.25; }
  .bio-sections { margin-top: 8rem; }
  .bio-section { padding-block: 2.5rem; }
  .bio-section__num { grid-column: span 1; }
  .bio-section__title { grid-column: span 4; }
  .bio-section__text { grid-column: span 7; }

  .contact-header { padding-bottom: 3.5rem; }
  .contact-header .eyebrow { grid-column: span 3; }
  .contact-header .display-title { grid-column: span 9; }
  .contact-body { padding-top: 4rem; }
  .contact-aside { grid-column: span 4; }
  .inquiry {
    grid-column: 6 / span 7;
    padding-top: 0;
    border-top: 0;
  }
  .form__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Laptop and up ---------- */
@media (min-width: 1024px) {
  :root {
    --gutter: 3.5rem;
    --gallery-gutter: 2rem;
  }
  .display-title { font-size: var(--fs-display); }
}

/* ---------- Tablet portrait: keep the 5 tabs legible ---------- */
@media (min-width: 768px) and (max-width: 899.98px) {
  .archive-tab__num { margin-right: 0.35rem; }
}

/* ---------- Small phones ---------- */
@media (max-width: 340px) {
  .display-title { font-size: 3.25rem; }
  .mobile-menu__nav a { font-size: 2.6rem; }
}
