  :root {
    --chalk: #EBEEF0;
    --chalk-deep: #DCE1E5;
    --ink: #15202B;
    --ink-soft: #46535F;
    --cobalt: #2D4BDC;
    --saffron: #F5B31B;
    --coral: #EF5B7B;
    --moss: #2F9E6B;
    --display: "Archivo", "Arial Narrow", system-ui, sans-serif;
    --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    --body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    --gutter: clamp(20px, 4vw, 56px);
  }

  *, *::before, *::after { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  @media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

  body {
    margin: 0;
    background: var(--chalk);
    color: var(--ink);
    font-family: var(--body);
    font-size: 1.0625rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
  }

  a { color: inherit; }
  :focus-visible { outline: 3px solid var(--cobalt); outline-offset: 3px; }

  .wrap { max-width: 1240px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

  h1, h2, h3 { font-family: var(--display); margin: 0; letter-spacing: -0.02em; }
  h2 {
    font-size: clamp(2.4rem, 5.5vw, 4.4rem);
    font-weight: 800;
    font-stretch: 80%;
    line-height: 0.95;
  }

  /* ---------- Hero ---------- */
  .hero {
    position: relative;
    min-height: 88vh;
    min-height: 88svh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }
  #sand {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
    touch-action: none;
    cursor: crosshair;
  }
  .hero-top, .hero-copy { position: relative; pointer-events: none; }
  .hero-top {
    display: flex;
    justify-content: flex-end;
    padding: 22px var(--gutter) 0;
  }
  .hero-top nav { pointer-events: auto; display: flex; gap: 22px; font-weight: 500; font-size: 0.95rem; }
  .hero-top a { text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
  .hero-top a:hover { border-bottom-color: var(--ink); }

  .hero-copy { padding: clamp(24px, 6vh, 64px) var(--gutter) 0; max-width: 1240px; width: 100%; margin: 0 auto; }
  .hero h1 {
    font-size: clamp(4.5rem, 17vw, 14rem);
    font-weight: 800;
    font-stretch: 75%;
    line-height: 0.82;
    letter-spacing: -0.035em;
  }
  .lede {
    max-width: 30ch;
    margin: 28px 0 0;
    font-size: clamp(1.15rem, 2vw, 1.4rem);
    line-height: 1.4;
    font-weight: 500;
  }
  .controls {
    pointer-events: auto;
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 18px;
    margin-top: 26px;
    padding: 10px 14px;
    background: rgba(235, 238, 240, 0.88);
    border: 2px solid var(--ink);
    border-radius: 999px;
  }
  .controls .label { font-size: 0.9rem; font-weight: 600; }
  .swatches { display: flex; gap: 8px; }
  .swatch {
    width: 28px; height: 28px;
    border-radius: 50%;
    border: 2px solid var(--ink);
    padding: 0;
    cursor: pointer;
    background: var(--c);
  }
  .swatch[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--chalk), 0 0 0 5px var(--ink); }
  .swatch.mix { background: conic-gradient(var(--cobalt) 0 25%, var(--saffron) 0 50%, var(--coral) 0 75%, var(--moss) 0); }
  .btn {
    font: inherit;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 6px 16px;
    border-radius: 999px;
    border: 2px solid var(--ink);
    background: var(--ink);
    color: var(--chalk);
    cursor: pointer;
  }
  .btn.quiet { background: transparent; color: var(--ink); }
  .btn:hover { background: var(--cobalt); border-color: var(--cobalt); color: #fff; }
  .hint { margin: 12px 0 0; font-size: 0.95rem; color: var(--ink-soft); }
  .hero-copy .hint { background: rgba(235, 238, 240, 0.8); display: inline-block; padding: 0 6px 0 0; }

  /* ---------- Shelf ---------- */
  .shelf { padding: clamp(72px, 11vw, 150px) 0 clamp(64px, 9vw, 120px); }
  .shelf-head { display: grid; gap: 14px; max-width: 46ch; }
  .shelf-head p { margin: 0; color: var(--ink-soft); }
  .items { list-style: none; margin: clamp(32px, 5vw, 56px) 0 0; padding: 0; border-top: 2px solid var(--ink); }
  .item {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 1.6fr auto;
    gap: 8px 32px;
    align-items: baseline;
    padding: 26px 0;
    border-bottom: 2px solid var(--ink);
  }
  .item h3 { font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 700; font-stretch: 85%; line-height: 1; }
  .item p { margin: 0; max-width: 52ch; }
  .item h3 a { text-decoration: none; }
  .item h3 a:hover { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 6px; }
  .actions { display: flex; flex-wrap: wrap; gap: 10px; }
  .pill {
    display: inline-block;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 6px 16px;
    border-radius: 999px;
    border: 2px solid var(--ink);
    text-decoration: none;
    white-space: nowrap;
  }
  .pill:hover { background: var(--ink); color: var(--chalk); }
  .pill.solid { background: var(--ink); color: var(--chalk); }
  .pill.solid:hover { background: var(--cobalt); border-color: var(--cobalt); color: #fff; }

  /* ---------- Contact ---------- */
  .contact { padding: clamp(72px, 11vw, 150px) 0; }
  .contact h2 { max-width: 12ch; }
  .contact p { margin: 22px 0 0; max-width: 40ch; font-size: 1.2rem; }
  .mail {
    display: inline-block;
    margin-top: 30px;
    font-family: var(--display);
    font-size: clamp(1.4rem, 3.4vw, 2.4rem);
    font-weight: 700;
    text-decoration: none;
    border-bottom: 4px solid var(--saffron);
  }
  .mail:hover { border-bottom-color: var(--cobalt); color: var(--cobalt); }

  footer { background: var(--ink); color: var(--chalk); padding: 26px 0; font-size: 0.95rem; }
  footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
  footer p { margin: 0; }
  footer :focus-visible { outline-color: var(--saffron); }

  @media (max-width: 800px) {
    .item { grid-template-columns: 1fr; gap: 10px; }
      .hero-top nav { gap: 16px; }
  }

  /* ---------- Project pages ---------- */
  .bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px var(--gutter); max-width: 1240px; margin: 0 auto; }
  .bar .mark { font-family: var(--display); font-weight: 800; font-stretch: 80%; font-size: 1.5rem; letter-spacing: -0.02em; text-decoration: none; }
  .bar nav { display: flex; gap: 22px; font-weight: 500; font-size: 0.95rem; }
  .bar nav a { text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
  .bar nav a:hover { border-bottom-color: currentColor; }

  .proj-head { background: var(--accent); color: var(--on-accent); }
  .proj-head :focus-visible { outline-color: var(--on-accent); }
  .proj-head .wrap { padding-top: clamp(8px, 2vw, 20px); padding-bottom: clamp(48px, 8vw, 110px); }
  .crumbs { margin: 0 0 clamp(28px, 5vw, 64px); font-size: 0.95rem; font-weight: 500; }
  .crumbs a { text-underline-offset: 4px; }
  .proj-head h1 {
    font-size: clamp(3.4rem, 11vw, 9.5rem);
    font-weight: 800;
    font-stretch: 75%;
    line-height: 0.88;
    letter-spacing: -0.035em;
  }
  .proj-head .lede { max-width: 36ch; }
  .btn-open {
    display: inline-block;
    margin-top: 30px;
    font-family: var(--display);
    font-weight: 700;
    font-size: 1.25rem;
    padding: 12px 28px;
    border-radius: 999px;
    border: 3px solid var(--on-accent);
    background: var(--on-accent);
    color: var(--accent);
    text-decoration: none;
  }
  .btn-open:hover { background: transparent; color: var(--on-accent); }

  .block { padding: clamp(56px, 8vw, 104px) 0 0; }
  .block:last-of-type { padding-bottom: clamp(56px, 8vw, 104px); }
  .split { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(28px, 5vw, 72px); align-items: start; }
  .split p { margin: 18px 0 0; max-width: 46ch; }
  .shot {
    aspect-ratio: 16 / 10;
    border: 3px dashed var(--ink-soft);
    border-radius: 12px;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 20px;
    color: var(--ink-soft);
    font-weight: 500;
    background: var(--chalk-deep);
  }
  .caps { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
  .caps h3 { font-size: 1.6rem; font-weight: 700; font-stretch: 85%; line-height: 1.05; padding-top: 14px; border-top: 4px solid var(--accent); }
  .caps p { margin: 10px 0 0; max-width: 34ch; }
  .steps { margin: 32px 0 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 0; border-top: 2px solid var(--ink); max-width: 760px; }
  .steps li { counter-increment: step; display: grid; grid-template-columns: 56px 1fr; gap: 12px; padding: 20px 0; border-bottom: 2px solid var(--ink); }
  .steps li::before { content: counter(step); font-family: var(--display); font-weight: 800; font-size: 2rem; line-height: 1; }
  .steps h3 { font-size: 1.35rem; font-weight: 700; font-stretch: 85%; }
  .steps p { margin: 6px 0 0; }
  .more { list-style: none; margin: 32px 0 0; padding: 0; border-top: 2px solid var(--ink); }
  .more a { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 22px 0; border-bottom: 2px solid var(--ink); text-decoration: none; font-family: var(--display); font-weight: 700; font-stretch: 85%; font-size: clamp(1.6rem, 3.4vw, 2.5rem); line-height: 1; }
  .more a span { font-family: var(--body); font-weight: 600; font-size: 0.95rem; }
  .more a:hover { background: var(--ink); color: var(--chalk); padding-left: 16px; padding-right: 16px; }
  .more a:hover { transition: padding 120ms; }

  @media (max-width: 800px) {
    .split { grid-template-columns: 1fr; }
    .caps { grid-template-columns: 1fr; }
    .steps li { grid-template-columns: 40px 1fr; }
  }

  /* ---------- Project detail: facts, prose, capabilities ---------- */
  .facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: clamp(32px, 5vw, 56px) 0 0; padding: 20px 0 0; border-top: 3px solid var(--on-accent); }
  .facts div { min-width: 0; }
  .facts dt { font-size: 0.9rem; font-weight: 600; }
  .facts dd { margin: 4px 0 0; font-family: var(--display); font-weight: 700; font-stretch: 90%; font-size: 1.2rem; line-height: 1.2; }
  .facts.compact { grid-template-columns: 1fr; gap: 12px; margin-top: 28px; }
  .facts.compact div { display: grid; grid-template-columns: 7.5rem 1fr; gap: 12px; align-items: baseline; }
  .facts.compact dd { font-size: 1.05rem; }

  .prose p { margin: 0 0 1em; max-width: 58ch; }
  .prose p:last-child { margin-bottom: 0; }
  .split > h2 { align-self: start; }

  .cap-grid { list-style: none; margin: 36px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px clamp(32px, 5vw, 72px); }
  .cap-grid h3 { font-size: 1.55rem; font-weight: 700; font-stretch: 85%; line-height: 1.1; padding-top: 14px; border-top: 4px solid var(--accent); }
  .cap-grid p { margin: 10px 0 0; max-width: 52ch; }

  .notes { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 14px; max-width: 760px; }
  .notes li { padding: 16px 20px; background: var(--chalk-deep); border-left: 8px solid var(--accent); }

  .cta-band { margin-top: clamp(56px, 8vw, 104px); background: var(--accent); color: var(--on-accent); padding: clamp(48px, 7vw, 88px) 0; }
  .cta-band .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 40px; }
  .cta-band .btn-open { margin-top: 0; }
  .cta-band :focus-visible { outline-color: var(--on-accent); }
  .block + .block:has(+ .cta-band) { padding-bottom: 0; }

  .btn-ghost {
    display: inline-block;
    font-family: var(--display);
    font-weight: 700;
    font-size: 1.25rem;
    padding: 12px 28px;
    border-radius: 999px;
    border: 3px solid var(--on-accent);
    color: var(--on-accent);
    text-decoration: none;
  }
  .btn-ghost:hover { background: var(--on-accent); color: var(--accent); }

  /* ---------- Projects index ---------- */
  .idx-head .wrap { padding-top: clamp(24px, 5vw, 64px); padding-bottom: clamp(40px, 6vw, 80px); }
  .idx-head h1 { font-size: clamp(4rem, 14vw, 11rem); font-weight: 800; font-stretch: 75%; line-height: 0.85; letter-spacing: -0.035em; }
  .idx-head .lede { max-width: 38ch; }

  .panel { background: var(--accent); color: var(--on-accent); padding: clamp(48px, 7vw, 96px) 0; }
  .panel :focus-visible { outline-color: var(--on-accent); }
  .panel-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
  .panel h2 { font-size: clamp(2.8rem, 7vw, 6rem); line-height: 0.9; }
  .panel-lede { margin: 20px 0 0; max-width: 34ch; font-size: clamp(1.1rem, 1.8vw, 1.35rem); line-height: 1.4; font-weight: 500; }
  .panel .btn-open { margin-top: 0; }
  .panel-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
  .panel:nth-of-type(even) .panel-grid { grid-template-columns: 1fr 1.1fr; }
  .panel:nth-of-type(even) .art { order: -1; }

  .art svg { display: block; width: 100%; height: auto; }
  .art .win { fill: var(--chalk); stroke: var(--ink); stroke-width: 3; }
  .art .win-bar { fill: var(--chalk-deep); }
  .art .dot { fill: var(--ink); }
  .art .ln { fill: var(--ink-soft); }
  .art .hl { fill: var(--accent); }
  .art .ln-hl { fill: var(--on-accent); }
  .art .lbl, .art .lbl-ink { font-family: var(--display); font-weight: 800; font-size: 15px; }
  .art .lbl { fill: var(--on-accent); }
  .art .lbl-ink { fill: var(--ink); }
  .art svg { filter: drop-shadow(8px 8px 0 var(--ink)); }
  .bar nav a[aria-current="page"] { border-bottom-color: currentColor; }

  @media (max-width: 800px) {
    .facts { grid-template-columns: 1fr; gap: 14px; }
    .cap-grid { grid-template-columns: 1fr; }
    .panel-grid, .panel:nth-of-type(even) .panel-grid { grid-template-columns: 1fr; }
    .panel:nth-of-type(even) .art { order: 0; }
    .art { max-width: 460px; }
    .facts.compact div { grid-template-columns: 6.5rem 1fr; }
  }

  /* ---------- Tech and sturdy: Archivo condensed + Plex Mono for code-like text ---------- */
  h1, h2 { font-weight: 800; font-stretch: 70%; letter-spacing: -0.015em; }
  .hero h1, .proj-head h1, .idx-head h1 { font-weight: 800; font-stretch: 66%; letter-spacing: -0.02em; line-height: 0.88; }
  .item h3, .caps h3, .steps h3, .more a, .cap-grid h3, .bar .mark, .facts dd { font-weight: 700; font-stretch: 80%; }
  .btn-open, .btn-ghost, .mail { font-stretch: 85%; }
  code {
    font-family: var(--mono);
    font-size: 0.88em;
    font-weight: 500;
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(21, 32, 43, 0.09);
    white-space: nowrap;
  }
  .panel code, .proj-head code, .cta-band code { background: transparent; padding: 0; border: 0; }
  .bar .mark { white-space: nowrap; }

  h1, h2, h3, .more a, .facts dd, .bar .mark, .btn-open, .btn-ghost { word-spacing: 0.12em; }
  .item h3, .caps h3, .steps h3, .cap-grid h3 { letter-spacing: 0; }

  /* hint always sits on its own line below the controls */
  .hero-copy .hint { display: block; width: fit-content; margin-top: 12px; }
  .articles { background: var(--chalk-deep); }
  .articles .items { border-top-color: var(--ink); }
  .contact { padding-top: clamp(64px, 9vw, 120px); }

  .nowrap { white-space: nowrap; }

  .actions .read { font-size: 0.9rem; font-weight: 500; color: var(--ink-soft); align-self: center; white-space: nowrap; }
  .articles .item h3 { font-size: clamp(1.25rem, 2.2vw, 1.7rem); line-height: 1.1; }
  .articles .item { align-items: start; }
  .articles .item { grid-template-columns: minmax(220px, 1fr) 1.6fr 250px; }
  .articles .actions { justify-content: flex-end; flex-wrap: nowrap; }
  @media (max-width: 800px) {
    .articles .item { grid-template-columns: 1fr; }
    .articles .actions { justify-content: flex-start; flex-wrap: wrap; }
  }


  /* ================= v2: sand stage on top, project columns below ================= */
  .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

  .stage { position: relative; overflow: hidden; display: flex; flex-direction: column; min-height: 80vh; min-height: 80svh; }
  .topbar { position: relative; pointer-events: none; display: flex; justify-content: space-between; align-items: center; gap: 12px 28px; width: 100%; max-width: 1440px; margin: 0 auto; box-sizing: border-box; padding: 22px var(--gutter); }
  .topbar a { pointer-events: auto; }
  .topbar .mark { font-family: var(--display); font-weight: 800; font-stretch: 80%; font-size: 1.6rem; letter-spacing: -0.01em; text-decoration: none; white-space: nowrap; word-spacing: 0.12em; }
  .topbar nav { display: flex; gap: 22px; font-weight: 500; font-size: 0.95rem; }
  .topbar nav a { text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
  .topbar nav a:hover { border-bottom-color: var(--ink); }

  .stage-copy { position: relative; pointer-events: none; width: 100%; max-width: 1440px; margin: 0 auto; box-sizing: border-box; padding: clamp(12px, 3vh, 40px) var(--gutter) 0; }
  .stage-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px 48px; }
  .stage h1 { font-size: clamp(3.6rem, 12.5vw, 11.5rem); font-weight: 800; font-stretch: 66%; line-height: 0.84; letter-spacing: -0.02em; word-spacing: 0.1em; }
  .stage .tag { margin: 0; max-width: 16ch; font-size: clamp(1.15rem, 2vw, 1.5rem); font-weight: 500; line-height: 1.35; }
  .stage-copy .controls { margin-top: 28px; }
  .stage-copy .hint { display: block; width: fit-content; margin-top: 12px; padding-right: 6px; background: rgba(235, 238, 240, 0.85); }

  .cols { display: flex; flex-wrap: wrap; }
  .col { flex: 1 1 340px; min-width: 0; box-sizing: border-box; background: var(--accent); color: var(--on-accent); padding: 44px 40px 48px; min-height: 540px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; }
  .col h2 { font-size: clamp(3.2rem, 6vw, 5.6rem); line-height: 0.88; word-spacing: 0.1em; }
  .col h2 a { color: inherit; text-decoration: none; }
  .col h2 a:hover { text-decoration: underline; text-decoration-thickness: 4px; text-underline-offset: 8px; }
  .col p { margin: 0; max-width: 30ch; font-size: 18px; line-height: 1.5; }
  .col .acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
  .col .btn-open, .col .btn-ghost { margin-top: 0; font-size: 1.05rem; padding: 10px 24px; }
  .col code { background: transparent; padding: 0; font-weight: 500; }
  .col :focus-visible { outline-color: var(--on-accent); }
  .cols-foot { max-width: 1440px; margin: 0 auto; box-sizing: border-box; padding: 32px var(--gutter) 0; }

  .articles-band { padding: clamp(64px, 9vw, 112px) 0 clamp(40px, 6vw, 72px); }
  .head-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px 40px; margin-bottom: 36px; }
  .alist-wrap { display: flex; flex-wrap: wrap; gap: 0 56px; }
  .alist { flex: 1 1 460px; min-width: 0; list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
  .alist:last-child { }
  .alist li { display: flex; flex-direction: column; gap: 6px; padding: 20px 0; border-bottom: 2px solid var(--ink); }
  .alist a { font-family: var(--display); font-weight: 700; font-stretch: 80%; font-size: 1.35rem; line-height: 1.12; word-spacing: 0.12em; color: var(--ink); text-decoration: none; }
  .alist a:hover { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 5px; }
  .alist .read { font-size: 0.95rem; color: var(--ink-soft); }

  @media (max-width: 800px) {
    .stage .tag { max-width: none; }
    .col { padding: 36px 24px 40px; min-height: 440px; }
    .topbar .mark { font-size: 1.25rem; }
    .topbar nav { gap: 14px; }
  }

  .home .wrap { max-width: 1440px; }
