
  /* Layout: a spec book. Sticky index bar; a hero with the thesis and a strip of work at its real formats;
     three bands (Match days, Sundays, Build days); every project pairs a spec header with justified
     media rows that keep each piece at its true aspect ratio and label its format. */
  :root {
    --paper: #f2f4f6;
    --surface: #ffffff;
    --ink: #121922;
    --muted: #566170;
    --rule: #d3d9e0;
    --accent: #b8322a;
    --chip: #e3e7ec;
    --scrim: rgba(9, 12, 16, 0.96);
    --scrim-ink: #f1f4f7;
    --scrim-line: rgba(241, 244, 247, 0.35);
    --display: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --body: "Helvetica Neue", Helvetica, Arial, sans-serif;
    --mono: "Martian Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    --row-h: 300px;
    --row-max: 400px;
    --gap: 12px;
    --gutter-x: clamp(16px, 4vw, 44px);
  }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --paper: #0e1319; --surface: #151c24; --ink: #e8ecf1; --muted: #9ba7b5;
      --rule: #28323d; --accent: #ff6b57; --chip: #1e2731; color-scheme: dark;
    }
  }
  :root[data-theme="dark"] {
    --paper: #0e1319; --surface: #151c24; --ink: #e8ecf1; --muted: #9ba7b5;
    --rule: #28323d; --accent: #ff6b57; --chip: #1e2731; color-scheme: dark;
  }

  *, *::before, *::after { box-sizing: border-box; }
  html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
  @media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
  body {
    background: var(--paper); color: var(--ink);
    font-family: var(--body); font-size: 16px; line-height: 1.55;
    -webkit-font-smoothing: antialiased;
  }
  body::before {
    content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px);
    z-index: 10; background: var(--paper);
  }
  .wrap {
    max-width: 1280px; margin-inline: auto;
    padding-left: max(var(--gutter-x), env(safe-area-inset-left, 0px));
    padding-right: max(var(--gutter-x), env(safe-area-inset-right, 0px));
  }
  [id] { scroll-margin-top: 76px; }
  a { color: inherit; text-decoration-color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
  a:hover { color: var(--accent); }
  :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
  h1, h2, h3, h4 { text-wrap: balance; }
  p { text-wrap: pretty; }

  .label {
    font-family: var(--mono); font-size: 0.68rem; font-weight: 500;
    letter-spacing: 0.07em; text-transform: uppercase;
  }

  /* Index bar */
  .bar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--paper); border-bottom: 1px solid var(--rule); }
  .bar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 6px 20px; min-height: 52px; padding-block: 8px; }
  .mark {
    font-family: var(--display); font-stretch: 125%; font-weight: 800; font-size: 0.95rem;
    letter-spacing: 0.01em; text-transform: uppercase; text-decoration: none; white-space: nowrap;
  }
  .bar nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 2px 18px; }
  .bar nav a { color: var(--muted); text-decoration: none; padding-block: 4px; }
  .bar nav a:hover { color: var(--accent); }

  /* Hero */
  .hero { padding-block: clamp(36px, 7vw, 92px) 0; }
  .eyebrow { color: var(--accent); }
  h1 {
    font-family: var(--display); font-stretch: 125%; font-weight: 800;
    font-size: clamp(2.6rem, 10.5vw, 9rem); line-height: 0.86; letter-spacing: -0.015em;
    text-transform: uppercase; margin: 14px 0 0;
  }
  .hero-grid {
    display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: 28px clamp(28px, 5vw, 80px); align-items: end; margin-top: clamp(22px, 3.5vw, 44px);
  }
  .lede {
    font-family: var(--display); font-weight: 650; font-size: clamp(1.4rem, 2.7vw, 2.1rem);
    line-height: 1.16; letter-spacing: -0.012em; max-width: 24ch; margin: 0 0 16px;
  }
  .hero-copy > p:not(.lede) { margin: 0 0 18px; max-width: 58ch; }
  .contact-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
  .email { font-family: var(--mono); font-size: 0.82rem; -webkit-user-select: all; user-select: all; overflow-wrap: anywhere; }
  .btn {
    font-family: var(--mono); font-size: 0.66rem; font-weight: 500; letter-spacing: 0.07em; text-transform: uppercase;
    color: var(--ink); background: var(--surface); border: 1px solid var(--rule); padding: 7px 10px;
    cursor: pointer; text-decoration: none; line-height: 1.2;
  }
  .btn:hover { border-color: var(--accent); color: var(--accent); }
  .proof { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); }
  .proof div {
    border-top: 1px solid var(--rule); padding: 12px 0; min-width: 0;
    display: grid; grid-template-columns: 8.2rem minmax(0, 1fr); gap: 14px; align-items: baseline;
  }
  .proof dt {
    font-family: var(--display); font-stretch: 125%; font-weight: 800; font-size: clamp(1.6rem, 2.6vw, 2.2rem);
    line-height: 1; font-variant-numeric: tabular-nums;
  }
  .proof dd { margin: 0; font-size: 0.86rem; line-height: 1.35; color: var(--muted); }

  /* Media rows: flex-grow and basis are proportional to each piece's aspect ratio (set inline),
     so every piece in a row lands at the same height; max-width caps very tall rows. */
  .media { display: flex; flex-wrap: wrap; gap: var(--gap); align-items: flex-start; }
  .m { margin: 0; min-width: 0; }
  .m img, .m video { display: block; width: 100%; height: auto; background: var(--chip); }
  .m video { aspect-ratio: var(--ar); object-fit: cover; }
  .m figcaption, .strip .cap { display: block; margin-top: 7px; font-size: 0.8rem; line-height: 1.35; color: var(--muted); }
  .fmt {
    display: inline-block; font-family: var(--mono); font-size: 0.58rem; font-weight: 500;
    letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink); background: var(--chip);
    padding: 2px 6px; margin-right: 7px; vertical-align: 1px; white-space: nowrap;
  }
  .zoom { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
  .zoom img { transition: opacity 0.2s; }
  .zoom:hover img { opacity: 0.9; }
  .strip { margin-top: clamp(32px, 5vw, 60px); --row-h: 270px; --row-max: 400px; }
  .strip a { text-decoration: none; color: inherit; }
  .strip img { display: block; width: 100%; height: auto; background: var(--chip); }
  .strip a:hover .cap { color: var(--accent); }
  /* Per-gallery sizing: two-piece galleries may grow taller; wide-only galleries sit lower. */
  .media.big { --row-max: 520px; }
  .media.huge { --row-max: 640px; }
  .media.tight { --row-h: 250px; }

  /* Bands */
  .world { margin-top: clamp(64px, 9vw, 120px); }
  .world-head {
    border-top: 3px solid var(--ink); padding-top: clamp(18px, 2.5vw, 28px);
    display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px 48px; align-items: end;
  }
  .world-head .label { display: block; color: var(--accent); margin-bottom: 12px; }
  .world-head h2, .foot h2 {
    font-family: var(--display); font-stretch: 125%; font-weight: 800; font-size: clamp(2.5rem, 7vw, 6rem);
    line-height: 0.88; letter-spacing: -0.015em; text-transform: uppercase; margin: 0;
  }
  .world-head p { margin: 0; max-width: 46ch; color: var(--muted); font-size: 1.02rem; }

  /* Organizations */
  .org { margin-top: clamp(44px, 6vw, 84px); }
  .org-head {
    display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
    gap: 6px 24px; padding-bottom: 12px; border-bottom: 1px solid var(--rule);
  }
  .org-head h3 {
    font-family: var(--display); font-stretch: 112%; font-weight: 760; font-size: clamp(1.6rem, 3.4vw, 2.6rem);
    line-height: 1.02; letter-spacing: -0.01em; margin: 0;
  }
  .org-head .label { color: var(--muted); }
  .org-intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 20px 48px; margin-top: 18px; }
  .org-intro p { margin: 0 0 10px; max-width: 64ch; }
  .org > .media { margin-top: 26px; }
  .roles { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; align-content: start; }
  .roles li {
    display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline;
    gap: 2px 16px; border-bottom: 1px solid var(--rule); padding-bottom: 7px;
  }
  .roles b { font-weight: 600; }
  .roles span { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.04em; color: var(--muted); font-variant-numeric: tabular-nums; }
  .roles.spec span { text-transform: uppercase; }
  .links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 6px; }
  .links a { color: var(--accent); text-decoration: none; }
  .links a:hover { text-decoration: underline; }
  .stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px 24px; margin: 26px 0 0; }
  .stats div { border-top: 2px solid var(--ink); padding-top: 10px; min-width: 0; }
  .stats dt, .event dt {
    font-family: var(--display); font-stretch: 125%; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums;
  }
  .stats dt { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
  .stats dd, .event dd { margin: 6px 0 0; font-size: 0.84rem; color: var(--muted); line-height: 1.35; }
  .source { font-size: 0.76rem; color: var(--muted); margin: 12px 0 0; }

  /* Projects */
  .project { margin-top: clamp(32px, 4.5vw, 56px); }
  .project-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.9fr); gap: 10px 48px; margin-bottom: 16px; }
  .project-head h4 {
    font-family: var(--display); font-weight: 720; font-size: clamp(1.15rem, 1.8vw, 1.4rem);
    line-height: 1.15; letter-spacing: -0.005em; margin: 0;
  }
  .when { display: block; margin-top: 8px; color: var(--muted); }
  .project-head p { margin: 0 0 8px; max-width: 66ch; }
  .credit { font-size: 0.78rem; color: var(--muted); }

  /* League events */
  .events { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--gap); margin-top: 24px; }
  .event { background: var(--surface); border: 1px solid var(--rule); padding: 20px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
  .event .when { margin-top: 0; }
  .event h4 { font-family: var(--display); font-weight: 720; font-size: 1.15rem; line-height: 1.2; margin: 0; }
  .event dl { margin: 0; display: grid; gap: 14px; }
  .event dt { font-size: 1.9rem; }
  .event dt.lead { color: var(--accent); }
  .event .source { margin-top: auto; padding-top: 4px; }

  /* Smaller notes */
  .also { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px 48px; margin-top: clamp(44px, 6vw, 76px); }
  .also section { border-top: 1px solid var(--rule); padding-top: 14px; min-width: 0; }
  .also h3 { font-family: var(--display); font-stretch: 112%; font-weight: 740; font-size: 1.3rem; line-height: 1.1; margin: 0; }
  .also .label { display: block; margin-top: 8px; color: var(--muted); }
  .also p { margin: 10px 0 0; max-width: 62ch; }

  /* Footer */
  .foot { margin-top: clamp(72px, 10vw, 136px); padding-block: 0 clamp(40px, 6vw, 72px); }
  .foot-grid {
    border-top: 3px solid var(--ink); padding-top: clamp(18px, 2.5vw, 28px);
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px 48px; align-items: end;
  }
  .foot .eyebrow { display: block; margin-bottom: 12px; }
  .foot .small { font-size: 0.82rem; color: var(--muted); margin: 14px 0 0; }
  .credits { margin-top: 36px !important; }

  /* Image viewer */
  #viewer {
    position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; border: 0;
    padding: max(12px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px))
             max(12px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
    background: var(--scrim); color: var(--scrim-ink);
  }
  #viewer[open] { display: flex; flex-direction: column; gap: 10px; }
  #viewer::backdrop { background: transparent; }
  .viewer-bar { display: flex; align-items: center; gap: 12px; }
  .viewer-cap { margin: 0; font-size: 0.9rem; min-width: 0; flex: 1; }
  .viewer-count { font-family: var(--mono); font-size: 0.68rem; opacity: 0.75; }
  .viewer-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
  #viewer-img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
  .viewer-nav { display: flex; justify-content: space-between; gap: 12px; }
  .vbtn {
    font-family: var(--mono); font-size: 0.66rem; font-weight: 500; letter-spacing: 0.07em; text-transform: uppercase;
    color: var(--scrim-ink); background: transparent; border: 1px solid var(--scrim-line); padding: 9px 12px; cursor: pointer;
  }
  .vbtn:hover { border-color: var(--scrim-ink); }
  .vbtn:focus-visible { outline-color: var(--scrim-ink); }

  @media (max-width: 880px) {
    .hero-grid { grid-template-columns: minmax(0, 1fr); }
    .proof { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
    .proof div { display: block; padding-bottom: 0; }
    .proof dt { font-size: clamp(1.2rem, 5.4vw, 1.9rem); }
    .proof dd { margin-top: 8px; font-size: 0.78rem; }
  }
  @media (max-width: 800px) {
    :root { --row-h: 160px; --row-max: 440px; }
    .strip { --row-h: 140px; --row-max: 300px; }
    .media.tight { --row-h: 160px; }
    .world-head, .org-intro, .project-head, .foot-grid { grid-template-columns: minmax(0, 1fr); }
  }
  @media (max-width: 600px) {
    .mark { display: none; }
    .bar nav { justify-content: flex-start; gap: 2px 14px; }
    :root { --gap: 8px; }
  }
