/* ─── Tablet (≤ 1024px) ─────────────────────────────────────────── */
@media (max-width: 1024px) {
  :root { --gutter: 1.5rem; }
  .hero-title span { font-size: clamp(1.75rem, 4vw, 3rem); }
}

/* ─── Tablet work table ─────────────────────────────────────────── */
@media (max-width: 960px) {
  .work-table-head,
  .wt-row-head { grid-template-columns: 1fr auto; }
  .work-table-head span:nth-child(2),
  .wt-services { display: none; }
  .wt-expand-inner { grid-template-columns: 1fr; }
  .wt-info-panel { grid-column: 1; height: auto; }
  .wt-carousel-wrap { grid-column: 1; }
  .wt-carousel-outer { height: 260px; }
}

/* ─── Mobile (≤ 768px) ──────────────────────────────────────────── */
@media (max-width: 768px) {
  :root { --gutter: 1.25rem; }

  /* Header */
  .site-header { height: 64px; }

  /* Scrolled pill — maintain 44×44px min touch target (WCAG 2.5.5) */
  .is-scrolled .audio-btn,
  .is-scrolled .lang-round {
    width: 44px;
    height: 44px;
  }
  .is-scrolled .nav-fish-wrap { height: 44px; }
  .is-scrolled .nav-fish-btn  { width: 44px; height: 44px; }

  /* Suppress hover/focus-within pill expansion — mobile uses .is-open toggle */
  .nav-fish-wrap:hover,
  .nav-fish-wrap:focus-within {
    padding: 0 !important;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  .nav-fish-wrap:hover .nav-fish-pill:not(.is-open),
  .nav-fish-wrap:focus-within .nav-fish-pill:not(.is-open) {
    max-width: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  /* Fish pill → fixed dropdown toggled by JS via .is-open */
  .nav-fish-pill {
    position: fixed;
    top: 68px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(248, 248, 248, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid #e0e0e0;
    border-radius: 100px;
    padding: 10px 22px;
    gap: 1.5rem;
    max-width: none;
    overflow: visible;
    white-space: nowrap;
    z-index: 99;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
  }
  .nav-fish-pill.is-open {
    opacity: 1 !important;
    pointer-events: auto;
    max-width: none !important;
  }

  /* Hero */
  .hero-section { padding-top: 120px; }
  .hero-title span { font-size: clamp(1.4rem, 6vw, 2.2rem); }
  .hero-photo-link { width: 110px; height: 110px; margin-top: 32px; }
  .welcome-tagline { font-size: 1rem; margin-top: 80px; }

  /* Featured */
  .featured-media { aspect-ratio: 4/3; }

  /* Work grid */
  .work-item--square { width: 220px; }
  .work-item--portrait { width: 180px; }

  /* Work table — bigger touch targets + smaller carousel */
  .wt-row-head { padding: 1.1rem 0; }
  .wt-carousel-outer { height: 220px; }
  .work-table-head,
  .wt-row-head { grid-template-columns: 1fr auto; column-gap: 1rem; }
  .work-table-head span:nth-child(3),
  .work-table-head span:nth-child(4),
  .wt-services, .wt-sector { display: none; }

  /* Credits dropdown → inline on mobile so it doesn't float over carousel */
  .wt-credits-body {
    display: none;
    position: static;
    opacity: 1 !important;
    transform: none !important;
    box-shadow: none;
    width: 100%;
    border-top: 1px solid var(--border);
    margin-top: 0.5rem;
    padding: 0.75rem 0;
    max-height: none;
  }
  .wt-credits.is-open .wt-credits-body {
    display: block;
    pointer-events: auto;
  }

  /* Case lightbox — bigger touch targets */
  .case-lb-prev,
  .case-lb-next {
    padding: 1.75rem;
    font-size: 2rem;
  }
  .case-lb-close {
    top: 1rem;
    right: 1rem;
    padding: 0.75rem;
    font-size: 1.35rem;
  }

  /* Section spacing */
  .feed-showcase   { margin-top: 1.5rem; }
  .work-table-wrap { margin-top: 1.5rem; }
  .site-footer     { padding-top: 3rem; }
  .footer-top      { padding-bottom: 3rem; }

  /* Footer */
  .footer-top { grid-template-columns: 1fr; gap: 3rem; }
  .footer-wordmark { font-size: clamp(1rem, 5vw, 1.5rem); }
  .footer-col-right { grid-template-columns: 1fr 1fr; }

  /* About */
  .about-hero { grid-template-columns: 1fr; gap: 2rem; }
  .about-row { grid-template-columns: 1fr; gap: 1rem; }
  .about-clients-grid { grid-template-columns: repeat(2, 1fr); }

}

/* ─── Small mobile (≤ 480px) ────────────────────────────────────── */
@media (max-width: 480px) {
  :root { --gutter: 1rem; }
  .hero-title span { font-size: clamp(1.1rem, 5vw, 1.4rem); }
  .bio-section { text-align: left; padding: 0; }
  .work-item--square { width: 180px; }
  .work-item--portrait { width: 150px; }
}
