/* =============================================================
   Anik Prasla — portfolio v2 ("the playground")
   Sticker-brutalist: thick ink borders, hard offset shadows,
   one amber accent, one radius. Light + dark via light-dark().
   Fonts self-hosted: Outfit + Geist Mono (SIL OFL).
   ============================================================= */

@font-face {
  font-family: "Outfit";
  src: url("../fonts/outfit-latin-wght.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Geist Mono";
  src: url("../fonts/geist-mono-latin-wght.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  color-scheme: light dark;

  --bg:        light-dark(#eeeef2, #0d0d10);
  --surface:   light-dark(#f9f9fb, #17171c);
  --surface-2: light-dark(#e1e1e8, #212128);
  --ink:       light-dark(#121216, #f1f1f4);
  --text-2:    light-dark(#4b4b57, #a8a8b3);
  --line:      light-dark(rgb(18 18 22 / .16), rgb(255 255 255 / .16));

  --accent:     #e8ae4e;
  --accent-ink: light-dark(#7a4f06, #e8ae4e);
  --on-accent:  #17120a;
  --shadow-c:   light-dark(#121216, #e8ae4e);

  --font: "Outfit", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --r: 10px;                       /* the one radius */
  --bw: 2px;                       /* the one border width */
  --sh: 4px 4px 0 var(--shadow-c);
  --sh-up: 7px 7px 0 var(--shadow-c);
  --nav-h: 4.5rem;
  --max: 1360px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --gap: clamp(1rem, 2vw, 2rem);
  --ease: cubic-bezier(.16, 1, .3, 1);

  --z-sticker: 5; --z-header: 40; --z-peek: 60; --z-toast: 70; --z-skip: 100;
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"]  { color-scheme: dark; }

/* ── Base ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 1rem); }
body {
  margin: 0; min-height: 100dvh; overflow-x: clip;
  background: var(--bg); color: var(--ink);
  font: 400 1.0625rem/1.6 var(--font);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg, canvas { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
a, button, label, summary { touch-action: manipulation; -webkit-tap-highlight-color: rgb(232 174 78 / .25); }
button, input, textarea, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent-ink); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--accent); color: var(--on-accent); }
kbd { font: 500 .75rem var(--mono); padding: .15rem .45rem; border: var(--bw) solid var(--ink); border-radius: 6px; background: var(--surface); }

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: .75rem; left: .75rem; z-index: var(--z-skip); padding: .7rem 1rem; background: var(--accent); color: var(--on-accent); border: var(--bw) solid var(--ink); border-radius: var(--r); font-weight: 600; transform: translateY(-200%); }
.skip-link:focus { transform: none; }
.icon { width: 1.15em; height: 1.15em; flex: none; }

/* scroll progress: pure CSS, only where supported */
.progress { display: none; }
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .progress {
      display: block; position: fixed; inset: 0 0 auto 0; height: 4px; z-index: calc(var(--z-header) + 1);
      background: var(--accent); transform-origin: 0 50%; transform: scaleX(0);
      animation: grow linear both; animation-timeline: scroll(root);
    }
  }
}
@keyframes grow { to { transform: scaleX(1); } }

/* ── Type ───────────────────────────────────────────────── */
h1, h2, h3 { font-weight: 800; letter-spacing: -.04em; line-height: .98; text-wrap: balance; }
p { max-width: 62ch; text-wrap: pretty; }
.display { font-size: clamp(3.25rem, 10.5vw, 10rem); line-height: .88; letter-spacing: -.055em; font-weight: 800; }
.h2 { font-size: clamp(2.25rem, 6vw, 5rem); line-height: .94; }
.h3 { font-size: clamp(1.5rem, 2.6vw, 2.25rem); line-height: 1; }
.lede { font-size: clamp(1.1875rem, 1.9vw, 1.5rem); line-height: 1.4; color: var(--text-2); max-width: 36ch; font-weight: 400; letter-spacing: -.01em; }
.mono { font: 500 .8125rem/1.3 var(--mono); }
.eyebrow { font: 500 .8125rem/1.2 var(--mono); color: var(--text-2); }
.eyebrow b { font-weight: 600; color: var(--ink); background: var(--accent); color: var(--on-accent); padding: .2rem .5rem; border-radius: 6px; margin-right: .6ch; }
.hl { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: .09em; text-underline-offset: .07em; text-decoration-skip-ink: none; }
.muted { color: var(--text-2); }
.nums { font-variant-numeric: tabular-nums; }

/* ── Layout ─────────────────────────────────────────────── */
.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.section { padding-block: clamp(4.5rem, 10vw, 8.5rem); }
.grid-12 { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); }

/* ── Header ─────────────────────────────────────────────── */
.site-header { position: sticky; top: 0; z-index: var(--z-header); background: var(--bg); border-bottom: var(--bw) solid var(--ink); view-transition-name: site-header; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: var(--nav-h); }
.brand { display: inline-flex; align-items: center; gap: .7rem; font-weight: 700; font-size: 1.125rem; letter-spacing: -.02em; }
.brand img { height: 2.4rem; width: auto; }
.nav ul { display: flex; gap: .25rem; }
.nav-link { position: relative; display: block; padding: .55rem .95rem; border-radius: var(--r); font-weight: 600; font-size: 1rem; transition: background-color .2s; }
.nav-link:hover { background: var(--surface-2); }
.nav-link[aria-current="page"] { background: var(--accent); color: var(--on-accent); }
.bar-actions { display: flex; align-items: center; gap: .6rem; }
.icon-btn.menu-btn { display: none; }
.menu-btn .i-close { display: none; }
.is-open .menu-btn .i-close { display: block; }
.is-open .menu-btn .i-open { display: none; }

.btn, .icon-btn, .chip {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  border: var(--bw) solid var(--ink); border-radius: var(--r);
  background: var(--surface); color: var(--ink); cursor: pointer;
  font: 600 1rem/1 var(--font); white-space: nowrap;
  box-shadow: var(--sh);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background-color .2s;
}
.btn { padding: 1rem 1.5rem; }
.icon-btn { width: 2.9rem; height: 2.9rem; padding: 0; }
.chip { padding: .7rem 1rem; font-size: .9375rem; }
.btn:hover, .icon-btn:hover, .chip:hover { transform: translate(-2px, -2px); box-shadow: var(--sh-up); }
.btn:active, .icon-btn:active, .chip:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--shadow-c); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.chip[aria-pressed="true"], .chip[aria-selected="true"] { background: var(--accent); color: var(--on-accent); }
.btn .icon { transition: transform .3s var(--ease); }
.btn:hover .icon { transform: translateX(3px); }
.palette-btn { padding: 0 .9rem; gap: .7rem; height: 2.9rem; font-size: .9375rem; }
.palette-btn kbd { box-shadow: none; }

.link { display: inline-flex; align-items: center; gap: .45rem; font-weight: 700; padding-bottom: .1rem; background: linear-gradient(var(--accent), var(--accent)) 0 100% / 100% 3px no-repeat; transition: background-size .25s var(--ease), color .2s; }
.link:hover { background-size: 100% 100%; color: var(--on-accent); }

@media (max-width: 860px) {
  .palette-btn { width: 2.9rem; padding: 0; }
  .palette-btn span, .palette-btn kbd { display: none; }
  .js .icon-btn.menu-btn { display: inline-flex; }
  .js .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; padding: .75rem var(--gutter) 1.25rem; background: var(--bg); border-bottom: var(--bw) solid var(--ink); }
  .js .is-open .nav { display: block; }
  .nav ul { flex-direction: column; gap: .35rem; }
  .nav-link { padding: 1rem; font-size: 1.375rem; border: var(--bw) solid var(--ink); background: var(--surface); }
  .bar { flex-wrap: wrap; }
  html:not(.js) .nav { order: 3; width: 100%; }
  html:not(.js) .nav ul { flex-wrap: wrap; flex-direction: row; }
  html:not(.js) .nav-link { font-size: 1rem; padding: .5rem .8rem; border: 0; background: none; }
}

/* ── Hero ───────────────────────────────────────────────── */
.hero { position: relative; isolation: isolate; overflow: clip; border-bottom: var(--bw) solid var(--ink); }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -2; background: radial-gradient(var(--line) 1.2px, transparent 1.2px) 0 0 / 26px 26px; }
.hero .wrap { padding-block: clamp(2rem, 4vw, 3.5rem) clamp(3rem, 6vw, 5rem); }
.hero-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: clamp(2rem, 5vw, 4rem); }
.status { display: inline-flex; align-items: center; gap: .6rem; padding: .5rem .9rem; border: var(--bw) solid var(--ink); border-radius: 999px; background: var(--surface); font: 500 .8125rem var(--mono); }
.dot { width: .55rem; height: .55rem; border-radius: 50%; background: var(--accent-ink); flex: none; }
.seg { display: inline-flex; padding: .25rem; gap: .25rem; border: var(--bw) solid var(--ink); border-radius: var(--r); background: var(--surface); }
.seg button { padding: .55rem 1rem; border: 0; border-radius: 7px; background: transparent; cursor: pointer; font: 600 .9375rem var(--font); transition: background-color .2s; }
.seg button:hover { background: var(--surface-2); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

.hero-grid { align-items: center; row-gap: 3rem; }
.hero-copy { grid-column: 1 / span 7; position: relative; z-index: 1; }
.hero h1 { font-size: clamp(3.25rem, 8.2vw, 8rem); line-height: .9; }
.hero-actions { display: flex; align-items: center; gap: 1.25rem 1.75rem; flex-wrap: wrap; margin-top: 2.25rem; }
.hero .lede { margin-top: 2rem; }

.code {
  margin: 0; padding: 1.5rem; border: var(--bw) solid var(--ink); border-radius: var(--r);
  background: var(--surface); box-shadow: var(--sh); overflow-x: auto;
  font: 500 clamp(.8125rem, 1.35vw, 1.0625rem)/1.7 var(--mono); tab-size: 2;
}
.code .k { color: var(--accent-ink); } .code .s { color: var(--ink); } .code .c { color: var(--text-2); }

/* draggable stickers */
.stickers { grid-column: 8 / span 5; position: relative; }
.stickers::before { content: ""; position: absolute; width: min(26rem, 90%); aspect-ratio: 1; left: 50%; top: 50%; translate: -48% -50%; border-radius: 50%; background: var(--accent); border: var(--bw) solid var(--ink); z-index: 0; }
.sticker {
  display: block; width: min(15rem, 62%); margin: 0; padding: .5rem .55rem .35rem;
  background: var(--surface); border: var(--bw) solid var(--ink); border-radius: var(--r); box-shadow: var(--sh);
  user-select: none; -webkit-user-select: none;
}
.sticker img { width: 100%; border-radius: 6px; -webkit-user-drag: none; }
.sticker-cap { display: flex; justify-content: space-between; gap: .5rem; padding: .5rem .15rem .15rem; font: 600 .875rem var(--font); }
.sticker-cap span:last-child { font: 500 .75rem var(--mono); color: var(--text-2); }
.stickers:not(.is-live) { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-content: start; }
.stickers:not(.is-live) .sticker { width: 100%; rotate: var(--r, 0deg); }
.stickers:not(.is-live)::before { display: none; }
.stickers.is-live { min-height: 33rem; }
.stickers:not(.is-live) { min-height: 0; }
.stickers.is-live .sticker {
  position: absolute; left: 0; top: 0; z-index: var(--z-sticker);
  transform: translate(var(--x, 0px), var(--y, 0px)) rotate(var(--r, 0deg));
  transition: transform .7s var(--ease), box-shadow .2s; cursor: grab; touch-action: pan-y;
}
.stickers.is-live .sticker.is-drag { cursor: grabbing; transition: none; box-shadow: var(--sh-up); }
.stickers.is-live .sticker.is-glide { transition: none; }
.stickers-tools { position: absolute; left: 0; bottom: -.5rem; z-index: 20; display: flex; align-items: center; gap: .9rem; }
.stickers:not(.is-live) .stickers-tools { position: static; grid-column: 1 / -1; }
.hint { font: 500 .8125rem var(--mono); color: var(--text-2); }

@media (max-width: 960px) {
  .hero-copy, .stickers { grid-column: 1 / -1; }
  .stickers.is-live { min-height: 0; }
}

/* ── Stacked work cards ─────────────────────────────────── */
.sec-head { display: flex; align-items: end; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; margin-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.sec-head .h2 { margin-top: 1rem; }
.stack-cards { display: grid; gap: 2rem; }
.card-sticky { position: sticky; top: calc(var(--nav-h) + 1rem + var(--n, 0) * 1.1rem); }
.pcard { display: block; background: var(--surface); border: var(--bw) solid var(--ink); border-radius: var(--r); box-shadow: var(--sh); overflow: hidden; transition: box-shadow .25s var(--ease), transform .25s var(--ease); }
.pcard:hover { transform: translate(-3px, -3px); box-shadow: var(--sh-up); }
.pcard-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; border-bottom: var(--bw) solid var(--ink); }
.pcard-top h3 { font-size: clamp(1.5rem, 3vw, 2.5rem); }
.pcard-top .mono { color: var(--text-2); }
.pcard img { width: 100%; }
.pcard-foot { display: flex; justify-content: space-between; align-items: center; padding: .9rem 1.25rem; border-top: var(--bw) solid var(--ink); font-weight: 700; }
.pcard-foot .icon { transition: transform .3s var(--ease); }
.pcard:hover .pcard-foot .icon { transform: translate(3px, -3px); }
.sec-foot { margin-top: clamp(3rem, 6vw, 4.5rem); }

/* ── Disciplines (tabs) ─────────────────────────────────── */
.tabs { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 2rem; }
.tabs .chip { font-size: clamp(1.125rem, 2.2vw, 1.5rem); padding: .8rem 1.3rem; }
.tabpanel { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); padding: clamp(1.5rem, 3vw, 2.5rem); border: var(--bw) solid var(--ink); border-radius: var(--r); background: var(--surface); box-shadow: var(--sh); }
.tabpanel > div:first-child { grid-column: 1 / span 7; }
.tabpanel > div:last-child { grid-column: 9 / span 4; align-self: end; }
.tabpanel h3 { margin-bottom: 1rem; }
.tabpanel p { font-size: clamp(1.125rem, 1.8vw, 1.5rem); line-height: 1.35; color: var(--text-2); }
.tabpanel .mono { color: var(--text-2); margin-bottom: .75rem; }
.tabpanel li + li { margin-top: .4rem; }
@media (max-width: 860px) { .tabpanel > div:first-child, .tabpanel > div:last-child { grid-column: 1 / -1; } }

/* ── CTA ────────────────────────────────────────────────── */
.cta { border-top: var(--bw) solid var(--ink); background: var(--accent); color: var(--on-accent); }
.cta .eyebrow { color: var(--on-accent); }
.cta .eyebrow b { background: var(--on-accent); color: var(--accent); }
.cta h2 { font-size: clamp(2.75rem, 9vw, 9rem); line-height: .88; letter-spacing: -.055em; max-width: 12ch; margin-top: 1.25rem; }
.cta p { margin-top: 1.5rem; font-size: 1.25rem; color: var(--on-accent); }
.cta-row { display: flex; align-items: center; gap: 1rem 1.5rem; flex-wrap: wrap; margin-top: 2.5rem; }
.cta .btn { --shadow-c: #17120a; background: var(--surface); }
.cta .btn-primary { background: #17120a; color: #f4f4f6; }
.cta .icon-btn, .cta .chip { --shadow-c: #17120a; color: #17120a; background: #f4f4f6; border-color: #17120a; }
.cta .mail { display: inline-flex; align-items: center; gap: .6rem; font-weight: 700; font-size: 1.125rem; }

/* ── Footer ─────────────────────────────────────────────── */
.site-footer { border-top: var(--bw) solid var(--ink); padding-block: 2.5rem 3rem; }
.footer-grid { display: flex; justify-content: space-between; align-items: end; gap: 2rem; flex-wrap: wrap; }
.quote { max-width: 30ch; font-size: 1.5rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.quote small { display: block; margin-top: .5rem; font: 500 .8125rem var(--mono); color: var(--text-2); letter-spacing: 0; }
.footer-links { display: flex; gap: .75rem; flex-wrap: wrap; }
.copyright { margin-top: 2rem; font: 500 .8125rem var(--mono); color: var(--text-2); }

/* ── Page heads ─────────────────────────────────────────── */
.page-head { padding-block: clamp(3rem, 7vw, 6rem) clamp(2rem, 4vw, 3rem); }
.page-head h1 { margin-top: 1.25rem; max-width: 11ch; }
.page-head .lede { margin-top: 1.75rem; }

/* ── Work index ─────────────────────────────────────────── */
.controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 1.5rem; margin-bottom: 2rem; }
.filters { display: flex; flex-wrap: wrap; gap: .6rem; }
.filters .chip { padding: .6rem .95rem; box-shadow: 3px 3px 0 var(--shadow-c); }
.filters sup { font: 500 .6875rem var(--mono); margin-left: .35em; opacity: .75; }
.views { display: flex; align-items: center; gap: 1rem; }
.empty { padding: 3rem 0; color: var(--text-2); }

.work-list[data-view="list"] { border-top: var(--bw) solid var(--ink); }
.proj-link { position: relative; display: grid; align-items: center; gap: 1rem 1.5rem; }
.work-list[data-view="list"] .proj { border-bottom: var(--bw) solid var(--ink); }
.work-list[data-view="list"] .proj-link { grid-template-columns: 3.5rem 1fr auto auto 3rem; padding-block: clamp(1.25rem, 2.6vw, 2.25rem); transition: background-color .2s, padding-inline .3s var(--ease); }
.work-list[data-view="list"] .proj-link:hover, .work-list[data-view="list"] .proj-link:focus-visible { background: var(--accent); color: var(--on-accent); padding-inline: 1.25rem; }
.proj-n { font: 600 .875rem var(--mono); }
.proj-t { font-size: clamp(2rem, 5.6vw, 5.25rem); line-height: .95; letter-spacing: -.05em; }
.proj-c, .proj-y { font: 500 .8125rem var(--mono); }
.proj-go { justify-self: end; }
.proj-img { display: none; border: var(--bw) solid var(--ink); border-radius: var(--r); overflow: hidden; grid-column: 1 / -1; }
.work-list[data-view="grid"] { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.5rem, 3vw, 2.5rem); }
.work-list[data-view="grid"] .proj-link { grid-template-columns: 1fr auto; background: var(--surface); border: var(--bw) solid var(--ink); border-radius: var(--r); box-shadow: var(--sh); padding: 1rem; transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.work-list[data-view="grid"] .proj-link:hover { transform: translate(-3px, -3px); box-shadow: var(--sh-up); }
.work-list[data-view="grid"] .proj-img { display: block; order: -1; grid-column: 1 / -1; }
.work-list[data-view="grid"] .proj-n, .work-list[data-view="grid"] .proj-y { display: none; }
.work-list[data-view="grid"] .proj-t { font-size: clamp(1.75rem, 3vw, 2.5rem); }
.work-list[data-view="grid"] .proj-c { grid-column: 1; }
.work-list[data-view="grid"] .proj-go { grid-column: 2; grid-row: 2; }
@media (hover: none), (pointer: coarse) { .work-list[data-view="list"] .proj-img { display: block; order: 5; } .work-list[data-view="list"] .proj-link { grid-template-columns: 2.5rem 1fr auto 1.5rem; } .work-list[data-view="list"] .proj-c { display: none; } }
@media (max-width: 760px) {
  .work-list[data-view="grid"] { grid-template-columns: 1fr; }
  .work-list[data-view="list"] .proj-link { grid-template-columns: 2.5rem 1fr auto 1.5rem; }
  .work-list[data-view="list"] .proj-c { display: none; }
  .work-list[data-view="list"] .proj-img { display: block; order: 5; }
}
.peek { position: fixed; left: 0; top: 0; z-index: var(--z-peek); width: min(24rem, 40vw); pointer-events: none; opacity: 0; transform: translate3d(-999px, -999px, 0); transition: opacity .2s; border: var(--bw) solid var(--ink); border-radius: var(--r); box-shadow: var(--sh); background: var(--surface); overflow: hidden; }
.peek.is-on { opacity: 1; }
.peek img { width: 100%; }
@media (hover: none), (pointer: coarse) { .peek { display: none; } }

/* ── About ──────────────────────────────────────────────── */
.about-text { grid-column: 1 / span 5; display: grid; gap: 1.4rem; align-content: start; }
.about-text p { color: var(--text-2); font-size: 1.1875rem; }
.about-text p:first-child { color: var(--ink); font-size: clamp(1.5rem, 2.4vw, 2rem); line-height: 1.2; letter-spacing: -.025em; font-weight: 600; }
.lab { grid-column: 7 / span 6; display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; align-content: start; }
.tile { margin: 0; padding: 1.1rem; border: var(--bw) solid var(--ink); border-radius: var(--r); background: var(--surface); box-shadow: var(--sh); }
.tile h2, .tile h3 { font-size: 1.25rem; letter-spacing: -.02em; margin-bottom: .35rem; }
.tile .mono { color: var(--text-2); }
.tile-wide { grid-column: 1 / -1; }
.doodle canvas { width: 100%; height: auto; aspect-ratio: 2 / 1; margin-top: .85rem; border: var(--bw) solid var(--ink); border-radius: 6px; background: #17171c; cursor: crosshair; touch-action: none; }
.doodle .row, .quiz .row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; }
.doodle .tools { display: flex; gap: .6rem; margin-top: .85rem; flex-wrap: wrap; }
.aa { font-size: clamp(5rem, 9vw, 8rem); line-height: .9; letter-spacing: -.05em; font-weight: var(--w, 600); margin: .5rem 0 .75rem; max-width: none; }
.tile input[type="range"] { width: 100%; accent-color: var(--accent-ink); }
.tile label.mono { display: block; margin-bottom: .35rem; }
.tile output { color: var(--accent-ink); font-weight: 600; }
.quiz-palette { display: flex; height: 4.5rem; margin: .85rem 0; border: var(--bw) solid var(--ink); border-radius: 6px; overflow: hidden; }
.quiz-palette span { flex: 1; background: var(--c); }
.quiz-opts { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.quiz-opts .chip { box-shadow: 3px 3px 0 var(--shadow-c); padding: .7rem .6rem; white-space: normal; }
.quiz-opts .chip.is-right { background: var(--accent); color: var(--on-accent); }
.quiz-opts .chip.is-wrong { text-decoration: line-through; opacity: .6; }
.quiz-msg { margin-top: .8rem; min-height: 1.6rem; font-weight: 600; }
.facts-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); margin-top: clamp(3rem, 7vw, 5rem); }
.facts-row div { padding: 1.1rem 1.2rem; border: var(--bw) solid var(--ink); border-radius: var(--r); background: var(--surface); }
.facts-row dt { font: 500 .8125rem var(--mono); color: var(--text-2); margin-bottom: .3rem; }
.facts-row dd { font-size: 1.375rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.kit { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.kit > div { padding: 1.1rem 1.2rem 1.3rem; border: var(--bw) solid var(--ink); border-radius: var(--r); background: var(--surface); }
.kit h3 { font: 600 .8125rem var(--mono); letter-spacing: 0; color: var(--text-2); margin-bottom: .9rem; }
.kit li { padding-block: .25rem; font-size: 1.1875rem; font-weight: 600; }
.ledger li { display: grid; grid-template-columns: minmax(5rem, 1fr) 3fr 4fr; gap: var(--gap); padding-block: 1.5rem; border-top: var(--bw) solid var(--ink); align-items: baseline; }
.ledger li:last-child { border-bottom: var(--bw) solid var(--ink); }
.ledger .yr { font: 600 .875rem var(--mono); }
.ledger h3 { font-size: 1.5rem; letter-spacing: -.03em; }
.ledger p { color: var(--text-2); }
@media (max-width: 960px) {
  .about-text, .lab { grid-column: 1 / -1; } .lab { margin-top: 3rem; }
  .kit { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ledger li { grid-template-columns: 1fr; gap: .3rem; }
}
@media (max-width: 560px) { .facts-row { grid-template-columns: 1fr; } .lab { grid-template-columns: 1fr; } .tile-wide { grid-column: auto; } }

/* ── Contact ────────────────────────────────────────────── */
.contact-grid { align-items: start; row-gap: 2.5rem; }
.contact-side { grid-column: 1 / span 5; display: grid; gap: 1rem; }
.contact-form { grid-column: 7 / span 6; display: grid; gap: 1.4rem; padding: clamp(1.25rem, 3vw, 2rem); border: var(--bw) solid var(--ink); border-radius: var(--r); background: var(--surface); box-shadow: var(--sh); }
.field { display: grid; gap: .5rem; }
.field > label, .field > legend { font: 600 .9375rem var(--font); padding: 0; }
.field input[type="text"], .field textarea { width: 100%; padding: .9rem 1rem; border: var(--bw) solid var(--ink); border-radius: var(--r); background: var(--bg); font-size: 1.0625rem; }
.field textarea { min-height: 9rem; resize: vertical; }
.field input:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--accent-ink); outline-offset: 2px; }
.field .err { color: #b3261e; font-weight: 600; font-size: .9375rem; }
:root[data-theme="dark"] .field .err { color: #ff8a80; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .field .err { color: #ff8a80; } }
.field[data-invalid="true"] textarea { border-color: #b3261e; }
fieldset.field { border: 0; margin: 0; padding: 0; min-width: 0; }
.radios { display: flex; flex-wrap: wrap; gap: .6rem; }
.radios label { position: relative; }
.radios input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.radios span { display: inline-flex; padding: .65rem 1rem; border: var(--bw) solid var(--ink); border-radius: var(--r); font-weight: 600; background: var(--bg); transition: background-color .2s; }
.radios input:checked + span { background: var(--accent); color: var(--on-accent); }
.radios input:focus-visible + span { outline: 3px solid var(--accent-ink); outline-offset: 3px; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.info-card { padding: 1.2rem 1.3rem; border: var(--bw) solid var(--ink); border-radius: var(--r); background: var(--surface); }
.info-card dt { font: 500 .8125rem var(--mono); color: var(--text-2); margin-bottom: .3rem; }
.info-card dd { font-size: 1.375rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.info-card dd small { display: block; font-size: 1rem; font-weight: 400; color: var(--text-2); letter-spacing: 0; margin-top: .2rem; }
.email-line { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.email-line a { overflow-wrap: anywhere; }
.elsewhere { display: flex; flex-wrap: wrap; gap: .6rem; }
@media (max-width: 960px) { .contact-side, .contact-form { grid-column: 1 / -1; } }

/* ── Case studies ───────────────────────────────────────── */
.cs-head { padding-top: clamp(1.75rem, 3vw, 2.5rem); padding-bottom: clamp(2rem, 4vw, 3rem); }
.back { margin-bottom: clamp(2rem, 5vw, 4rem); }
.cs-head h1 { margin-block: 1.25rem 1.5rem; max-width: 12ch; font-size: clamp(3.25rem, 10vw, 9rem); line-height: .88; letter-spacing: -.055em; }
.cover { overflow: hidden; border: var(--bw) solid var(--ink); border-radius: var(--r); box-shadow: var(--sh); background: var(--surface); }
.cover img { width: 100%; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); margin-top: clamp(2rem, 4vw, 3rem); }
.facts div { padding: 1rem 1.1rem; border: var(--bw) solid var(--ink); border-radius: var(--r); background: var(--surface); }
.facts dt { font: 500 .75rem var(--mono); color: var(--text-2); margin-bottom: .3rem; }
.facts dd { font-weight: 700; line-height: 1.25; }
@media (max-width: 760px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.story { row-gap: 2.5rem; }
.story article { grid-column: 1 / span 5; }
.story article + article { grid-column: 7 / span 6; margin-top: clamp(0rem, 6vw, 6rem); }
.story h2 { margin-block: 1rem 1.1rem; font-size: clamp(2rem, 3.4vw, 3rem); }
.story p { color: var(--text-2); font-size: 1.1875rem; }
@media (max-width: 900px) { .story article, .story article + article { grid-column: 1 / -1; margin-top: 0; } }
.process-head { margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.process-head .h2 { margin-top: 1rem; max-width: 14ch; }
.chapter { padding-block: clamp(2rem, 4vw, 3rem); border-top: var(--bw) solid var(--ink); align-items: start; row-gap: 2rem; }
.chapter-text { grid-column: 1 / span 5; }
.chapter-text h3 { margin-bottom: 1rem; font-size: clamp(1.75rem, 2.8vw, 2.5rem); }
.chapter-text p { color: var(--text-2); }
.chapter-visual { grid-column: 7 / span 6; }
.chapter-visual > img { width: 100%; border: var(--bw) solid var(--ink); border-radius: var(--r); box-shadow: var(--sh); }
@media (max-width: 900px) { .chapter-text, .chapter-visual { grid-column: 1 / -1; } }
.palette { display: grid; grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr)); gap: .75rem; }
.swatch { display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; gap: .1rem; aspect-ratio: 1 / 1.1; padding: .9rem; text-align: left; border: var(--bw) solid var(--ink); border-radius: var(--r); background: var(--c); color: var(--ink2); cursor: pointer; box-shadow: 3px 3px 0 var(--shadow-c); transition: transform .18s var(--ease), box-shadow .18s var(--ease); }
.swatch:hover { transform: translate(-2px, -2px) rotate(-1.5deg); box-shadow: 6px 6px 0 var(--shadow-c); }
.swatch:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--shadow-c); }
.swatch b { font-weight: 700; font-size: 1rem; line-height: 1.15; }
.swatch span { font: 500 .75rem var(--mono); text-transform: uppercase; opacity: .85; }
.palette-note { margin-top: .75rem; font: 500 .8125rem var(--mono); color: var(--text-2); }
.types { margin-top: 1.75rem; }
.types div { display: flex; justify-content: space-between; gap: 1rem; padding-block: .8rem; border-top: var(--bw) solid var(--ink); }
.types div:last-child { border-bottom: var(--bw) solid var(--ink); }
.types dt { font: 500 .8125rem var(--mono); color: var(--text-2); }
.types dd { font-weight: 700; text-align: right; }

.gallery-head { margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.gallery-head .h2 { margin-block: 1rem; }
.gal { --g: clamp(.75rem, 1.6vw, 1.25rem); display: grid; grid-template-columns: var(--cols, 1fr 1fr); gap: var(--g); align-items: start; }
.zoom { display: block; width: 100%; padding: 0; border: var(--bw) solid var(--ink); border-radius: var(--r); background: var(--surface); overflow: hidden; cursor: zoom-in; position: relative; box-shadow: 3px 3px 0 var(--shadow-c); transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.zoom:hover { transform: translate(-2px, -2px) rotate(-.4deg); box-shadow: 6px 6px 0 var(--shadow-c); }
.zoom img { width: 100%; }
.zoom .icon { position: absolute; right: .6rem; top: .6rem; padding: .35rem; width: 2rem; height: 2rem; border-radius: 8px; border: var(--bw) solid var(--ink); background: var(--surface); opacity: 0; transition: opacity .2s; }
.zoom:hover .icon, .zoom:focus-visible .icon { opacity: 1; }
.gal .stack { display: grid; gap: var(--g); align-content: start; }
.gal .wide { grid-column: 1 / -1; }
.gal .drop { margin-top: clamp(2rem, 7vw, 6rem); }
.gal-cafe { --cols: 1.295fr 1fr; } .gal-nail { --cols: 1.02fr 1fr; }
@media (max-width: 700px) { .gal { grid-template-columns: 1fr; } .gal .drop { margin-top: 0; } }
@media (hover: none) { .zoom .icon { opacity: 1; } }

.lightbox { width: min(96vw, 1200px); max-height: 94dvh; padding: 0; border: var(--bw) solid var(--ink); border-radius: var(--r); background: var(--surface); color: var(--ink); box-shadow: var(--sh-up); overflow: hidden; }
.lightbox::backdrop { background: rgb(8 8 12 / .72); }
.lightbox figure { display: grid; place-items: center; padding: 1rem; background: var(--bg); }
.lightbox img { max-height: calc(94dvh - 7rem); width: auto; max-width: 100%; border-radius: 6px; }
.lb-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem 1rem; border-top: var(--bw) solid var(--ink); }
.lb-bar p { flex: 1; font-size: .9375rem; color: var(--text-2); max-width: none; }
.lb-bar .icon-btn { width: 2.6rem; height: 2.6rem; }

.next { border-top: var(--bw) solid var(--ink); }
.next a { display: block; }
.next-row { display: flex; align-items: end; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; margin-block: 1rem 2rem; }
.next .cover { transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.next a:hover .cover { transform: translate(-3px, -3px); box-shadow: var(--sh-up); }
.go { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; }

/* ── Toast + 404 ────────────────────────────────────────── */
.toast { position: fixed; left: 50%; bottom: 1.5rem; z-index: var(--z-toast); translate: -50% 0; padding: .8rem 1.2rem; border: var(--bw) solid var(--ink); border-radius: var(--r); background: var(--accent); color: var(--on-accent); font-weight: 700; box-shadow: var(--sh); opacity: 0; transform: translateY(1rem); pointer-events: none; transition: opacity .25s, transform .35s var(--ease); max-width: calc(100vw - 2rem); }
.toast.is-on { opacity: 1; transform: none; }
.nf { min-height: calc(100dvh - var(--nav-h) - 12rem); display: grid; align-content: center; gap: 2rem; justify-items: start; }

/* ── Command palette ────────────────────────────────────── */
.cmd { width: min(92vw, 36rem); margin: 12vh auto auto; padding: 0; border: var(--bw) solid var(--ink); border-radius: var(--r); background: var(--surface); color: var(--ink); box-shadow: var(--sh-up); overflow: hidden; }
.cmd::backdrop { background: rgb(8 8 12 / .6); }
.pal-input { width: 100%; padding: 1.1rem 1.25rem; border: 0; border-bottom: var(--bw) solid var(--ink); background: transparent; font-size: 1.1875rem; font-weight: 600; outline: none; }
.pal-input:focus-visible { outline: none; background: var(--surface-2); box-shadow: inset 0 -4px 0 var(--accent); }
.pal-list { max-height: 20rem; overflow-y: auto; padding: .5rem; overscroll-behavior: contain; }
.pal-list li { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem .85rem; border-radius: 8px; font-weight: 600; cursor: pointer; }
.pal-list li span { font: 500 .75rem var(--mono); color: var(--text-2); }
.pal-list li[aria-selected="true"] { background: var(--accent); color: var(--on-accent); }
.pal-list li[aria-selected="true"] span { color: var(--on-accent); }
.pal-empty { padding: 1.25rem; color: var(--text-2); }
.pal-hint { display: flex; gap: 1rem; flex-wrap: wrap; padding: .75rem 1.1rem; border-top: var(--bw) solid var(--ink); font: 500 .75rem var(--mono); color: var(--text-2); max-width: none; }

/* ── Motion ─────────────────────────────────────────────── */
@keyframes rise { from { opacity: 0; transform: translateY(1.75rem); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise .8s var(--ease) both; animation-delay: calc(var(--i, 0) * 80ms); }
  @supports (animation-timeline: view()) {
    .reveal { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 35%; }
  }
  @view-transition { navigation: auto; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}

/* ── Small utilities + fixes ────────────────────────────── */
.pt-0 { padding-top: 0; }
.palette li { display: flex; }
.swatch { width: 100%; }
.stickers:not(.is-live) .hint { display: none; }
.tile-mark { display: grid; place-items: center; gap: .8rem; align-content: center; background: var(--accent); }
.tile-mark img { width: 48%; height: auto; filter: brightness(0); }
.tile-mark .mono { color: var(--on-accent); }
.palette ul, .palette { list-style: none; }
@media (min-width: 961px) { .about-text { position: sticky; top: calc(var(--nav-h) + 2rem); } }
