/* Shared finishing details; the existing artwork, palette, and layouts remain. */
@media screen {
  :root { --control-width: 17.5rem; --control-height: 4.5rem; }
  html { scroll-padding-top: var(--scroll-offset, 7.5rem); }
  .header { background: var(--bg); }

  /* One primary-action size, with room for labels and enlarged user fonts. */
  .button, .hero-actions .button {
    width: min(100%, var(--control-width));
    min-height: var(--control-height);
    padding: .625rem clamp(16px, 4vw, 1.5rem);
    font-size: 1.125rem;
    line-height: 1.35;
    font-weight: 600;
    text-wrap: balance;
    touch-action: manipulation;
  }
  .hero-actions {
    grid-template-columns: minmax(0, 1fr);
    width: min(100%, var(--control-width));
    gap: 14px;
  }
  .button:hover { transform: none; }
  .button:active { filter: brightness(.94); }
  .button:focus-visible { outline: 3px solid var(--text); outline-offset: 5px; }

  /* Navigation remains lightweight, with generous tap and focus targets. */
  .nav-links { gap: 20px; }
  .nav-links a, .footer-links a, .study-nav a, .text-link {
    min-height: 3rem;
    min-width: 2.75rem;
    font-size: 1rem;
    line-height: 1.5;
    touch-action: manipulation;
  }
  .nav-links a { padding: 8px 4px; }
  .footer-links { flex-wrap: wrap; gap: 12px 28px; }
  .footer-inner { font-size: .875rem; }
  a, button, summary { -webkit-tap-highlight-color: #b6cfa62e; }
  .project-window > a:focus-visible {
    outline-color: var(--amber);
    outline-offset: 8px;
  }
  .project-window > a:is(:hover, :focus-visible) h3 { color: var(--accent); }

  /* Raise small functional labels without changing the type hierarchy. */
  .eyebrow, .gallery-toolbar p, .study-facts dt,
  .diagram > p:first-child, .artifact figcaption span:first-child,
  .decision-index, .storyboard .step, .delivered h3 { font-size: .875rem; }
  .hero-foot, .specimen-label, .footer-location { font-size: .75rem; }
  .education p { font-size: 1rem; }
  .education span { font-size: .875rem; }
  .diagram-pair p, .storyboard p, .study-evidence > div { font-size: 1rem; }
  .education p:last-child { margin-bottom: 0; }
  .about-copy > p:not(.eyebrow), .decision-copy p { line-height: 1.75; }
  .window-copy h3 { line-height: 1.18; }
  .window-copy { background: var(--bg); }
  .project-gallery:before { opacity: .42; }
  .study-page main > section { scroll-margin-top: 0; }
  .study-nav > div { min-height: 4.5rem; }
  .study-nav-links { gap: 24px; }
  .study-end { align-items: stretch; }
  .study-end a { min-height: 3rem; font-size: 1rem; }
  .study-open > *, .study-section > header > *, .decision > * { min-width: 0; }
  .hero-copy, .about-copy.motion-enter { animation: none; }
  .hero #hero-title { font-size: min(clamp(2.25rem, 16.5cqi, 4.5rem), 22cqi); }
  .hero #hero-title .title-human { white-space: normal; }

  @media (min-width: 701px) and (max-width: 850px) {
    :root { --control-width: 14rem; }
  }
  @media (min-width: 481px) and (max-width: 900px) {
    .project-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .project-window:nth-child(3n + 2) { margin-top: 0; transform: none; }
    .project-window:nth-child(even) { margin-top: 42px; transform: none; }
  }
  @media (max-width: 760px) {
    .study-nav > div { padding-block: 4px; gap: 2px; }
    .study-nav > div > a, .study-nav-links a { min-height: 3rem; }
    .study-nav-links { gap: 0 18px; }
    .project-gallery:before { opacity: .34; }
  }
  @media (max-width: 700px) {
    :root { --control-width: 22rem; }
    html { scroll-padding-top: var(--scroll-offset, 1.5rem); }
    .nav-links { max-width: 100%; flex-wrap: wrap; row-gap: 4px; }
    .hero-foot { line-height: 1.8; }
    .hero-foot-note { max-width: 48%; }
    .hero-foot > span:first-child { max-width: 45%; }
    .about-copy h2 { line-height: 1.12; }
    .contact-invitation { width: 100%; }
    .contact-nautilus { max-width: 380px; }
    .resume-sheet .toolbar { align-items: flex-start; gap: 20px; }
  }
  /* Keep the hive imagery; give long project names a readable measure on phones. */
  @media (max-width: 480px) {
    .project-gallery {
      grid-template-columns: minmax(0, 1fr);
      max-width: 26rem;
      margin-inline: auto;
      row-gap: 56px;
      padding-bottom: 36px;
    }
    .project-window:nth-child(n) { margin-top: 0; transform: none; }
    .hex-window { width: min(100%, 19rem); margin-inline: auto; }
    .window-copy { padding-top: 24px; }
    .window-copy h3 { font-size: 1.9rem; }
    .window-copy p { max-width: 34ch; }
    .gallery-note { margin: 36px 12% 12px; font-size: 1.5rem; }
    .gallery-note--growth { margin-left: auto; margin-right: 10%; }
    .study-end { flex-direction: column; gap: 14px; }
    .study-end a { max-width: 100%; }
  }
  @media (prefers-contrast: more) {
    .project-gallery:before { opacity: .18; }
    .window-copy, .header, .study-nav { background: var(--bg); }
  }
}
