/* =========================================================
   Marius Bontas — portfolio v3
   Off-white, living dot-field background, coral accent + soft tints.
   ========================================================= */

:root {
  --bg: #F4F2EE;
  --bg-deep: #EAE6DF;
  --surface: #FBFAF8;
  --line: #DCD8D0;
  --ink: #16140F;
  --ink-2: #57524A;
  --ink-3: #9A948A;

  --accent: #FF5A36;
  --accent-soft: rgba(255, 90, 54, .14);
  --tint-ux: #E4E0FF;  --tint-ux-ink: #4B3FB8;
  --tint-mk: #FFE2D6;  --tint-mk-ink: #B2431F;
  --tint-md: #D8F0E4;  --tint-md-ink: #1F6B4A;
  --kz-bg: #17151F;    --kz-mint: #52F2CF;

  --sans: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;

  --max: 1240px;
  --gutter: clamp(1.1rem, 4vw, 2.5rem);
  --radius: 20px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.03em; line-height: 1.02; }
p { margin: 0; }
.serif { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }
.wrap { max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }
.mono { font-family: var(--mono); font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 1rem; top: 1rem; z-index: 999; background: var(--ink); color: #fff; padding: .5rem .8rem; border-radius: 8px; }
:where(html[data-theme="dark"]) .skip:focus { background: var(--raise); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- LIVING BACKGROUND ---------- */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.blob {
  position: absolute; width: 46vmax; height: 46vmax; border-radius: 50%;
  filter: blur(70px); opacity: .55; will-change: transform;
}
.blob.b1 { background: radial-gradient(circle at 30% 30%, #FFD3C2, transparent 65%); top: -18vmax; left: -12vmax; animation: drift1 26s ease-in-out infinite alternate; }
.blob.b2 { background: radial-gradient(circle at 60% 40%, #DCD6FF, transparent 65%); top: 30vh; right: -20vmax; animation: drift2 32s ease-in-out infinite alternate; }
.blob.b3 { background: radial-gradient(circle at 50% 50%, #CFEFE0, transparent 65%); bottom: -24vmax; left: 20vw; animation: drift3 38s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(18vw, 22vh) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-22vw, -12vh) scale(.9); } }
@keyframes drift3 { to { transform: translate(-14vw, -26vh) scale(1.1); } }

/* ---------- progress + nav ---------- */
.progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 100; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }

.nav {
  position: fixed; top: 14px; left: 50%; z-index: 90; transform: translateX(-50%);
  width: min(calc(100% - 2 * var(--gutter)), 760px);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .5rem .5rem .5rem .6rem;
  background: rgba(251, 250, 248, .72);
  backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid rgba(22, 20, 15, .08); border-radius: 999px;
  box-shadow: 0 8px 30px -14px rgba(22, 20, 15, .25);
  transition: transform .5s var(--ease);
}
:where(html[data-theme="dark"]) .nav { background: rgba(28,28,31,.72); border: 1px solid rgba(255,255,255,0.08); box-shadow: 0 8px 30px -14px rgba(0,0,0, .25); }
.nav.hide { transform: translate(-50%, -150%); }
.nav-mark { display: flex; align-items: center; gap: .6rem; text-decoration: none; font-weight: 600; font-size: .95rem; letter-spacing: -0.02em; white-space: nowrap; }
.nav-mark img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.nav-links { display: flex; list-style: none; margin: 0; padding: 0; gap: .15rem; }
.nav-links a, .nav-links button {
  display: block; text-decoration: none; font-size: .88rem; color: var(--ink-2);
  padding: .5rem .85rem; border-radius: 999px; border: 0; background: none; cursor: pointer;
  transition: background .25s, color .25s;
}
.nav-links a:hover, .nav-links a.active { background: var(--bg-deep); color: var(--ink); }
.nav-links .cta { background: var(--ink); color: var(--bg); }
:where(html[data-theme="dark"]) .nav-links .cta { background: var(--raise); color: #F2F0EC; }
.nav-links .cta:hover { background: var(--accent); color: #fff; }
@media (max-width: 680px) { .nav-links li:not(:last-child) { display: none; } }

/* ---------- SECTION TAG (01 Portfolio …) ---------- */
.stag {
  display: inline-flex; align-items: center; gap: .7rem;
  padding: .4rem 1rem .4rem .4rem; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 6px 20px -14px rgba(22,20,15,.4);
  font-family: var(--mono); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink);
  margin-bottom: 1.4rem;
}
:where(html[data-theme="dark"]) .stag { box-shadow: 0 6px 20px -14px rgba(0,0,0,.4); }
.stag b {
  display: grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 50%;
  background: var(--accent); color: #fff; font-weight: 500; letter-spacing: 0; font-size: .78rem;
}
.stag.dark { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.14); color: var(--bg); box-shadow: none; }
:where(html[data-theme="dark"]) .stag.dark { color: #F2F0EC; }

/* ---------- reveal system ---------- */
.rv { transition: opacity .9s var(--ease), transform 1s var(--ease); transition-delay: var(--d, 0s); }
.js .rv { opacity: 0; transform: translateY(34px); }
.js .rv.in { opacity: 1; transform: none; }
.words .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .1em; margin-bottom: -.1em; }
.words .w > span { display: inline-block; transform: translateY(110%); transition: transform .9s var(--ease); transition-delay: calc(var(--i) * 45ms); }
.words.in .w > span { transform: none; }
.read .rw { opacity: .18; transition: opacity .3s linear; }
.read .rw.on { opacity: 1; }
.img-reveal { overflow: hidden; border-radius: var(--radius); transition: clip-path 1.3s var(--ease); }
.img-reveal img { transition: transform 1.6s var(--ease); }
.js .img-reveal { clip-path: inset(12% 8% 12% 8% round var(--radius)); }
.js .img-reveal img { transform: scale(1.18); }
.js .img-reveal.in { clip-path: inset(0 0 0 0 round var(--radius)); }
.js .img-reveal.in img { transform: scale(1); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .6rem; max-width: 100%;
  padding: .95rem 1.4rem; border-radius: 999px; font-size: 1rem; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: background .3s, color .3s, border-color .3s, transform .5s var(--spring);
}
.btn:active { transform: scale(.96); }
.btn.primary { background: var(--ink); color: var(--bg); }
:where(html[data-theme="dark"]) .btn.primary { background: var(--raise); color: #F2F0EC; }
.btn.primary:hover { background: var(--accent); color: #fff; }
.btn.accent { background: var(--accent); color: #fff; }
.btn.accent:hover { background: #fff; color: var(--ink); }
:where(html[data-theme="dark"]) .btn.accent:hover { background: var(--surface); }
.btn.ghost { background: rgba(255,255,255,.5); border-color: var(--line); color: var(--ink); }
:where(html[data-theme="dark"]) .btn.ghost { background: rgba(255,255,255,.08); }
.btn.ghost:hover { border-color: var(--ink); }
:where(html[data-theme="dark"]) .btn.ghost:hover { border-color: var(--line-strong); }
.btn.ghost-dark { background: transparent; color: var(--bg); border-color: rgba(244,242,238,.3); }
:where(html[data-theme="dark"]) .btn.ghost-dark { color: #F2F0EC; }
.btn.ghost-dark:hover { border-color: var(--bg); }
.btn .email-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- TAGS ---------- */
.tag { display: inline-flex; align-items: center; gap: .4rem; font-family: var(--mono); font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; padding: .32rem .65rem; border-radius: 999px; white-space: nowrap; }
.tag.ux { background: var(--tint-ux); color: var(--tint-ux-ink); }
.tag.mk { background: var(--tint-mk); color: var(--tint-mk-ink); }
.tag.md { background: var(--tint-md); color: var(--tint-md-ink); }
.tag.plain { border: 1px solid var(--line); color: var(--ink-2); background: var(--surface); }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  min-height: 100svh; padding-top: 7.5rem; padding-bottom: 4rem;
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: clamp(2rem, 5vw, 5rem); align-items: center;
}
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 6.5rem; } }

.hello { display: flex; align-items: center; gap: .7rem; margin-bottom: 1.4rem; font-size: clamp(1.3rem, 2.4vw, 1.7rem); font-weight: 500; letter-spacing: -0.03em; }
.hello .wave { display: inline-block; width: .55em; height: .55em; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 6px var(--accent-soft); animation: ping 2.4s var(--ease) infinite; }
@keyframes ping { 0%,100% { box-shadow: 0 0 0 4px var(--accent-soft); } 50% { box-shadow: 0 0 0 10px rgba(255,90,54,0); } }
.hello-word { position: relative; display: inline-block; height: 1.3em; overflow: hidden; min-width: 3.2ch; vertical-align: bottom; }
.hello-word span { position: absolute; left: 0; top: 0; line-height: 1.3em; white-space: nowrap; transform: translateY(110%); opacity: 0; transition: transform .7s var(--ease), opacity .5s; }
.hello-word span.in { position: relative; transform: none; opacity: 1; }
.hello-word span.out { transform: translateY(-110%); opacity: 0; }

.hero h1 { font-size: clamp(2.4rem, 5.6vw, 5.3rem); letter-spacing: -0.055em; line-height: .95; }
.hero h1 .hi { font-size: .62em; letter-spacing: -0.04em; margin-bottom: .18em; }
.hero h1 .hello-word { height: 1.05em; min-width: 0; vertical-align: bottom; color: var(--accent); font-family: var(--serif); font-style: italic; font-weight: 400; }
.hero h1 .hello-word span { line-height: 1.05em; }
.hero h1 .serif { color: var(--accent); letter-spacing: -0.035em; }
.line { display: block; overflow: hidden; padding-bottom: .07em; }
.line > span { display: inline-block; transition: transform 1.1s var(--ease); }
.js .line > span { transform: translateY(105%); }
.loaded .line > span { transform: none; }
.loaded .line:nth-child(2) > span { transition-delay: .1s; }
.loaded .line:nth-child(3) > span { transition-delay: .2s; }

.roles { margin-top: 1.6rem; display: flex; flex-wrap: wrap; gap: .45rem; }
.roles span { font-family: var(--mono); font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; padding: .45rem .8rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.roles span:nth-child(1) { background: var(--tint-mk); border-color: transparent; color: var(--tint-mk-ink); }
.roles span:nth-child(2) { background: var(--tint-md); border-color: transparent; color: var(--tint-md-ink); }
.roles span:nth-child(3) { background: var(--tint-ux); border-color: transparent; color: var(--tint-ux-ink); }
.hero-lede { margin-top: 1.6rem; font-size: clamp(1.05rem, 1.5vw, 1.2rem); color: var(--ink-2); max-width: 48ch; }
.hero-lede strong { color: var(--ink); font-weight: 500; }
.hero-cta { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: .7rem; }
.js .hero-copy .fade { opacity: 0; transform: translateY(18px); }
.hero-copy .fade { transition: opacity .9s var(--ease), transform .9s var(--ease); }
.loaded .hero-copy .fade { opacity: 1; transform: none; }
.loaded .hero-copy .fade:nth-of-type(1) { transition-delay: .35s; }

/* photo card */
.portrait { position: relative; perspective: 1000px; justify-self: center; width: min(100%, 420px); }
.portrait-card {
  position: relative; border-radius: 28px; overflow: hidden; aspect-ratio: 4 / 5; max-width: 100%;
  box-shadow: 0 40px 80px -40px rgba(22,20,15,.55), 0 0 0 1px rgba(22,20,15,.06);
  transform-style: preserve-3d; transition: transform .6s var(--ease);
  background: #8fb8e8;
}
:where(html[data-theme="dark"]) .portrait-card { box-shadow: 0 40px 80px -40px rgba(0,0,0,.55), 0 0 0 1px rgba(0,0,0,.06); }
.js .portrait-card { transform: scale(.4) rotate(-14deg); opacity: 0; }
.loaded .portrait-card { animation: popin 1.2s var(--spring) .25s forwards; }
@keyframes popin { to { transform: scale(1) rotate(-3deg); opacity: 1; } }
.portrait-card img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.portrait-card .glare { position: absolute; inset: 0; background: radial-gradient(circle at var(--gx, 50%) var(--gy, 0%), rgba(255,255,255,.35), transparent 45%); mix-blend-mode: soft-light; pointer-events: none; }
.sticker {
  position: absolute; z-index: 2; display: inline-flex; align-items: center; gap: .5rem;
  padding: .8rem 1.25rem; border-radius: 999px; background: #fff; color: var(--ink);
  font-size: 1.02rem; font-weight: 600; letter-spacing: -0.01em; box-shadow: 0 18px 36px -14px rgba(22,20,15,.55); white-space: nowrap; border: 2px solid var(--ink);
  opacity: 0; transform: scale(.6);
}
:where(html[data-theme="dark"]) .sticker { background: var(--surface); box-shadow: 0 18px 36px -14px rgba(0,0,0,.55); border: 2px solid var(--line-strong); }
.loaded .sticker { animation: stick .8s var(--spring) forwards, bob 5s ease-in-out 1.8s infinite; }
.sticker.s1 { top: 8%; left: -10%; animation-delay: .9s, 1.8s !important; }
.sticker.s2 { background: var(--tint-md); bottom: 16%; right: -8%; animation-delay: 1.1s, 2.4s !important; }
.sticker.s3 { bottom: -3%; left: 6%; animation-delay: 1.3s, 3s !important; background: var(--accent); color: #fff; border-color: var(--accent); }
.sticker .pulse { width: 10px; height: 10px; border-radius: 50%; background: #3CCB7F; box-shadow: 0 0 0 0 rgba(60,203,127,.6); animation: pulse 2s infinite; }
.sticker svg { flex-shrink: 0; }
@keyframes stick { to { opacity: 1; transform: scale(1); } }
@keyframes bob { 0%,100% { translate: 0 0; } 50% { translate: 0 -8px; } }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(60,203,127,0); } 100% { box-shadow: 0 0 0 0 rgba(60,203,127,0); } }
@media (max-width: 900px) { .portrait { width: min(100%, 360px); margin-top: 1rem; } .sticker.s1 { left: -4%; } .sticker.s2 { right: -4%; } }

/* =========================================================
   SECTIONS
   ========================================================= */
.section { padding-block: clamp(4.5rem, 10vw, 8rem); position: relative; scroll-margin-top: 2rem; }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; align-items: end; margin-bottom: clamp(2.5rem, 6vw, 4rem); }
.section-head h2 { font-size: clamp(2.6rem, 7vw, 5.6rem); letter-spacing: -0.055em; line-height: .94; }
.section-head h2 .serif { color: var(--accent); }
.section-head p { color: var(--ink-2); max-width: 40ch; justify-self: end; }
@media (max-width: 820px) { .section-head { grid-template-columns: 1fr; } .section-head p { justify-self: start; } }

/* ---------- WORK CARDS (tilt + glare + cursor bubble) ---------- */
.work-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(1rem, 2vw, 1.5rem); }
.work-card { grid-column: span 7; display: flex; flex-direction: column; gap: 1.1rem; text-decoration: none; perspective: 1200px; }
.work-card.small { grid-column: span 5; }
@media (max-width: 900px) { .work-card, .work-card.small { grid-column: 1 / -1; } }

.tilt { position: relative; transform-style: preserve-3d; transition: transform .5s var(--ease), box-shadow .5s var(--ease); will-change: transform; }
.tilt .glare { position: absolute; inset: 0; pointer-events: none; border-radius: inherit; background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255,255,255,.28), transparent 42%); opacity: 0; transition: opacity .4s; z-index: 3; }
.tilt:hover .glare { opacity: 1; }

.work-media { position: relative; height: clamp(300px, 29vw, 380px); max-width: 100%; border-radius: var(--radius); overflow: hidden; background: var(--kz-bg); box-shadow: 0 30px 60px -40px rgba(22,20,15,.5); }
:where(html[data-theme="dark"]) .work-media { box-shadow: 0 30px 60px -40px rgba(0,0,0,.5); }
.work-media img { width: 100%; height: 100%; object-fit: cover; object-position: 20% center; transition: transform 1.2s var(--ease); }
.work-card:hover .work-media img { transform: scale(1.05); }
.work-media .alt { position: absolute; inset: 0; opacity: 0; transition: opacity .5s var(--ease), transform 1.2s var(--ease); object-position: top center; }
.work-media .alt.modal { object-fit: contain; padding: 6% 0; background: radial-gradient(circle at 70% 20%, rgba(82,242,207,.16), transparent 55%), var(--kz-bg); filter: drop-shadow(0 20px 30px rgba(0,0,0,.5)); }
.work-media .alt.show { opacity: 1; }
@media (max-width: 900px) { .work-media { height: auto; aspect-ratio: 1600 / 836; } }

.work-meta { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.work-meta h3 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); letter-spacing: -0.04em; }
.work-meta p { color: var(--ink-2); font-size: .98rem; max-width: 52ch; margin-top: .45rem; }
.work-tags { display: flex; gap: .4rem; flex-wrap: wrap; }
.arrow-link { display: inline-flex; align-items: center; gap: .5rem; margin-top: .8rem; font-weight: 500; font-size: .95rem; }
.arrow-link i { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--bg); font-style: normal; transition: transform .5s var(--spring), background .3s; }
:where(html[data-theme="dark"]) .arrow-link i { background: var(--raise); color: #F2F0EC; }
.work-card:hover .arrow-link i { transform: rotate(-45deg); background: var(--accent); }

.award-badge { position: absolute; left: 1rem; top: 1rem; z-index: 4; display: flex; align-items: center; gap: .55rem; padding: .4rem .9rem .4rem .45rem; border-radius: 999px; background: #fff; color: var(--ink); font-weight: 600; font-size: .9rem; line-height: 1.1; box-shadow: 0 12px 26px -12px rgba(0,0,0,.6); transform: rotate(-3deg); transition: transform .5s var(--spring); }
:where(html[data-theme="dark"]) .award-badge { background: var(--surface); }
.award-badge small { display: block; font-weight: 400; font-size: .72rem; color: var(--ink-2); }
.work-card:hover .award-badge { transform: rotate(0) scale(1.05); }
/* pending marketing card */
.pending-media { position: relative; height: clamp(300px, 29vw, 380px); max-width: 100%; border-radius: var(--radius); overflow: hidden; background: var(--ink); color: var(--bg); padding: 1.4rem; display: flex; flex-direction: column; justify-content: space-between; }
:where(html[data-theme="dark"]) .pending-media { background: var(--raise); color: #F2F0EC; }
@media (max-width: 900px) { .pending-media { height: auto; min-height: 300px; gap: 1.5rem; } }
.pending-media .mono { color: rgba(244,242,238,.6); }
.pending-media .big { font-size: clamp(2rem, 3.6vw, 2.9rem); letter-spacing: -0.05em; line-height: 1; font-weight: 600; max-width: 11ch; }
.pending-media .big .serif { color: var(--accent); }
.chart { display: flex; align-items: flex-end; gap: 8px; height: 110px; }
.chart i { flex: 1; border-radius: 8px 8px 3px 3px; background: rgba(244,242,238,.16); height: var(--h0, 20%); transition: height .9s var(--spring), background .4s; }
.chart i:last-child { background: var(--accent); }
.work-card:hover .chart i, .chart.in i { height: var(--h, 60%); }
.work-card:hover .chart i { background: rgba(244,242,238,.3); }
.work-card:hover .chart i:last-child { background: var(--accent); }
.pending-media .spark { position: absolute; right: 1.2rem; top: 1.2rem; width: 42%; opacity: .9; }
.spark path { stroke-dasharray: 400; stroke-dashoffset: 400; transition: stroke-dashoffset 2s var(--ease); }
.work-card:hover .spark path, .chart.in ~ .spark path { stroke-dashoffset: 0; }

/* cursor bubble (desktop) */
.cursor-bubble {
  position: fixed; left: 0; top: 0; z-index: 80; pointer-events: none;
  width: 104px; height: 104px; margin: -52px 0 0 -52px; border-radius: 50%;
  display: grid; place-items: center; text-align: center; line-height: 1.1;
  background: var(--accent); color: #fff; font-size: .82rem; font-weight: 500;
  transform: translate3d(var(--cx, -200px), var(--cy, -200px), 0) scale(0); transition: transform .45s var(--spring);
}
.cursor-bubble.on { transform: translate3d(var(--cx), var(--cy), 0) scale(1); }
@media (hover: none) { .cursor-bubble { display: none; } }

/* ---------- CASE STUDY LIST with floating preview ---------- */
.cs-list { border-top: 1px solid var(--ink); position: relative; }
:where(html[data-theme="dark"]) .cs-list { border-top: 1px solid var(--line-strong); }
.cs-row { display: grid; grid-template-columns: 3.5rem minmax(0, 1.3fr) minmax(0, 1fr) auto; gap: 1.5rem; align-items: center; padding: 1.6rem .4rem; border-bottom: 1px solid var(--line); text-decoration: none; position: relative; }
.cs-row::before { content: ''; position: absolute; inset: 0; background: var(--surface); z-index: -1; transform: scaleY(0); transform-origin: bottom; transition: transform .5s var(--ease); }
.cs-row:hover::before { transform: scaleY(1); }
.cs-row .num { font-family: var(--mono); font-size: .8rem; color: var(--ink-3); }
.cs-row h3 { font-size: clamp(1.35rem, 3vw, 2.4rem); letter-spacing: -0.045em; transition: transform .5s var(--ease), color .3s; }
.cs-row:hover h3 { transform: translateX(.7rem); }
.cs-row .desc { color: var(--ink-2); font-size: .92rem; }
.cs-row .state { font-family: var(--mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); white-space: nowrap; }
.cs-row .arrow { width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--ink); display: grid; place-items: center; transition: background .3s, color .3s, transform .5s var(--spring); }
:where(html[data-theme="dark"]) .cs-row .arrow { border: 1px solid var(--line-strong); }
a.cs-row:hover .arrow { background: var(--accent); border-color: var(--accent); color: #fff; transform: rotate(-45deg); }
.cs-row.muted h3 { color: var(--ink-2); }
@media (max-width: 760px) { .cs-row { grid-template-columns: 2.2rem minmax(0, 1fr) auto; gap: .9rem; } .cs-row .desc { grid-column: 2 / -1; grid-row: 2; } }

.cs-preview {
  position: fixed; left: 0; top: 0; z-index: 70; pointer-events: none; width: 300px; aspect-ratio: 4 / 3;
  border-radius: 16px; overflow: hidden; box-shadow: 0 30px 60px -20px rgba(22,20,15,.5);
  transform: translate3d(var(--px, -500px), var(--py, -500px), 0) rotate(var(--pr, 0deg)) scale(0); transition: transform .45s var(--spring);
}
:where(html[data-theme="dark"]) .cs-preview { box-shadow: 0 30px 60px -20px rgba(0,0,0,.5); }
.cs-preview.on { transform: translate3d(var(--px), var(--py), 0) rotate(var(--pr, 0deg)) scale(1); }
.cs-preview .pv { position: absolute; inset: 0; opacity: 0; transition: opacity .3s; display: grid; place-items: center; text-align: center; padding: 1.2rem; }
.cs-preview .pv.show { opacity: 1; }
.cs-preview .pv img { width: 100%; height: 100%; object-fit: cover; object-position: left center; position: absolute; inset: 0; }
.cs-preview .pv b { font-size: 1.7rem; letter-spacing: -0.04em; line-height: 1; }
.cs-preview .pv small { display: block; margin-top: .6rem; font-family: var(--mono); font-size: .66rem; text-transform: uppercase; letter-spacing: .08em; opacity: .7; }
@media (hover: none) { .cs-preview { display: none; } }

/* =========================================================
   ABOUT — BENTO
   ========================================================= */
.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: minmax(150px, auto); gap: clamp(.8rem, 1.6vw, 1.1rem); }
.tile {
  position: relative; border-radius: var(--radius); background: rgba(251,250,248,.82);
  border: 1px solid rgba(22,20,15,.07); padding: clamp(1.1rem, 2vw, 1.5rem); overflow: hidden;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: transform .6s var(--ease), box-shadow .6s var(--ease);
}
:where(html[data-theme="dark"]) .tile { background: rgba(28,28,31,.82); border: 1px solid rgba(255,255,255,0.07); }
.tile:hover { box-shadow: 0 24px 50px -30px rgba(22,20,15,.4); }
:where(html[data-theme="dark"]) .tile:hover { box-shadow: 0 24px 50px -30px rgba(0,0,0,.4); }
.tile .mono { display: block; margin-bottom: .8rem; }
.t-statement { grid-column: span 4; grid-row: span 2; background: var(--ink); color: var(--bg); display: flex; flex-direction: column; justify-content: space-between; gap: 2rem; }
:where(html[data-theme="dark"]) .t-statement { background: var(--raise); color: #F2F0EC; }
.t-statement .mono { color: rgba(244,242,238,.55); }
.t-statement p { font-size: clamp(1.6rem, 3.3vw, 2.7rem); letter-spacing: -0.04em; line-height: 1.08; font-weight: 500; }
.t-statement p .serif { color: var(--accent); }
.t-statement .read .rw { opacity: .22; }
.t-statement .read .rw.on { opacity: 1; }
.t-now { grid-column: span 2; background: var(--tint-mk); border-color: transparent; }
.t-now h3 { font-size: 1.35rem; letter-spacing: -0.03em; line-height: 1.15; }
.t-now p { color: var(--tint-mk-ink); font-size: .92rem; margin-top: .4rem; }
.t-now .live { display: inline-flex; align-items: center; gap: .45rem; font-family: var(--mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: var(--tint-mk-ink); }
.t-now .live i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: ping 1.8s infinite; }
.t-clock { grid-column: span 2; display: flex; align-items: center; gap: 1rem; }
.clock-face { width: 84px; height: 84px; flex-shrink: 0; }
.t-clock b { display: block; font-size: 2rem; letter-spacing: -0.04em; line-height: 1; font-weight: 600; }
.t-clock small { color: var(--ink-2); font-size: .9rem; }

.t-map { grid-column: span 4; grid-row: span 2; background: var(--surface); }
.t-map svg { width: 100%; height: auto; display: block; margin-top: .4rem; }
.map-path { stroke-dasharray: 1200; stroke-dashoffset: 1200; transition: stroke-dashoffset 2.6s var(--ease); }
.t-map.in .map-path { stroke-dashoffset: 0; }
.map-pin { opacity: 0; transform: scale(0); transform-box: fill-box; transform-origin: center; transition: opacity .4s, transform .7s var(--spring); }
.t-map.in .map-pin { opacity: 1; transform: scale(1); }
.t-map.in .map-pin.p2 { transition-delay: .7s; } .t-map.in .map-pin.p3 { transition-delay: 1.3s; } .t-map.in .map-pin.p4 { transition-delay: 2s; }
.map-pin text { font-family: var(--sans); }
.map-pin:hover circle.halo { r: 18; }

.t-lang { grid-column: span 2; grid-row: span 2; background: var(--tint-ux); border-color: transparent; display: flex; flex-direction: column; }
.t-lang .mono { color: var(--tint-ux-ink); }
.bubble-say { transform-origin: left center; font-size: clamp(2.2rem, 4vw, 3.2rem); font-weight: 600; letter-spacing: -0.05em; line-height: 1; color: var(--ink); min-height: 1.1em; margin-bottom: 1rem; transition: transform .4s var(--spring); }
.bubble-say.bump { transform: scale(1.12) rotate(-2deg); }
.lang-list { display: grid; gap: .35rem; margin-top: auto; }
.lang-list button {
  display: flex; justify-content: space-between; align-items: center; gap: .6rem; width: 100%;
  padding: .55rem .75rem; border-radius: 12px; border: 0; cursor: pointer; text-align: left;
  background: rgba(255,255,255,.55); color: var(--ink); font-size: .92rem; transition: background .25s, transform .4s var(--spring);
}
:where(html[data-theme="dark"]) .lang-list button { background: rgba(255,255,255,.08); }
.lang-list button:hover, .lang-list button.active { background: #fff; transform: translateX(4px); }
:where(html[data-theme="dark"]) .lang-list button:hover, :where(html[data-theme="dark"]) .lang-list button.active { background: var(--surface); }
.lang-list small { font-family: var(--mono); font-size: .64rem; text-transform: uppercase; letter-spacing: .06em; color: var(--tint-ux-ink); }

.t-tools { grid-column: 1 / -1; background: var(--surface); }
.pipeline { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr) auto minmax(0,1fr); gap: 1rem; align-items: stretch; margin-top: .4rem; }
.stage-col { border-radius: 16px; padding: 1.1rem; background: #fff; border: 1px solid var(--line); }
:where(html[data-theme="dark"]) .stage-col { background: var(--surface); }
.stage-n { font-family: var(--mono); font-size: .72rem; color: var(--accent); }
.stage-col h4 { font-size: 1.25rem; letter-spacing: -0.03em; margin: .3rem 0 .9rem; }
.stage-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.stage-col li { display: flex; align-items: center; gap: .7rem; padding: .45rem .55rem; border-radius: 12px; font-weight: 500; transition: background .25s, transform .4s var(--spring); }
.stage-col li:hover { background: var(--bg); transform: translateX(4px); }
.tmk { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; font-style: normal; font-family: var(--mono); font-size: .72rem; font-weight: 500; flex-shrink: 0; }
.m1 { background: var(--ink); color: var(--bg); }
:where(html[data-theme="dark"]) .m1 { background: var(--raise); color: #F2F0EC; }
.js .t-tools .stage-col li { opacity: 0; transform: translateY(12px); }
.t-tools.in .stage-col li { opacity: 1; transform: none; transition: opacity .5s var(--ease), transform .6s var(--spring), background .25s; transition-delay: calc(var(--s) * .35s + var(--k) * .07s); }
.pipe-arrow { position: relative; width: 44px; align-self: center; height: 2px; background: var(--line); }
.pipe-arrow::after { content: ''; position: absolute; right: -2px; top: -5px; border: 6px solid transparent; border-left-color: var(--line); border-right: 0; }
.pipe-arrow::before { content: ''; position: absolute; left: 0; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); animation: flow 2.4s var(--ease) infinite; }
@keyframes flow { from { left: 0; opacity: 1; } to { left: 34px; opacity: 0; } }
@media (max-width: 860px) { .pipeline { grid-template-columns: 1fr; } .pipe-arrow { width: 2px; height: 30px; justify-self: center; } .pipe-arrow::after { right: -5px; top: auto; bottom: -2px; border: 6px solid transparent; border-top-color: var(--line); border-bottom: 0; } .pipe-arrow::before { left: -4px; animation-name: flowv; } }
@keyframes flowv { from { top: 0; opacity: 1; } to { top: 22px; opacity: 0; } }

.t-award { grid-column: span 2; background: var(--ink); color: var(--bg); cursor: zoom-in; display: flex; flex-direction: column; gap: .9rem; border: 0; text-align: left; font: inherit; }
:where(html[data-theme="dark"]) .t-award { background: var(--raise); color: #F2F0EC; }
.t-award .mono { color: rgba(244,242,238,.55); margin: 0; }
.t-award img { border-radius: 10px; transform: rotate(-3deg); transition: transform .6s var(--spring); box-shadow: 0 16px 30px -16px #000; }
.t-award:hover img { transform: rotate(0) scale(1.03); }
.t-award b { font-size: 1.1rem; letter-spacing: -0.02em; line-height: 1.2; font-weight: 600; }

@media (max-width: 980px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .t-statement, .t-map, .t-tools { grid-column: 1 / -1; grid-row: auto; }
  .t-now, .t-lang { grid-column: span 1; }
  .t-lang { grid-row: span 1; }
}
@media (max-width: 600px) {
  .t-now, .t-lang { grid-column: 1 / -1; }
}

/* ---------- CAREER FILM STRIP ---------- */
.reel-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; flex-wrap: wrap; margin-top: clamp(3.5rem, 8vw, 5.5rem); margin-bottom: 1.2rem; }
.reel-head h3 { font-size: clamp(1.8rem, 4vw, 3rem); letter-spacing: -0.045em; }
.reel-head h3 .serif { color: var(--accent); }
.reel-ctrl { display: flex; gap: .5rem; }
.reel-ctrl button { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--ink); background: transparent; cursor: pointer; display: grid; place-items: center; transition: background .3s, color .3s; }
:where(html[data-theme="dark"]) .reel-ctrl button { border: 1px solid var(--line-strong); }
.reel-ctrl button:hover { background: var(--ink); color: var(--bg); }
:where(html[data-theme="dark"]) .reel-ctrl button:hover { background: var(--raise); color: #F2F0EC; }
.reel {
  position: relative; background: var(--ink); border-radius: var(--radius); padding: 30px 0; overflow: hidden;
}
:where(html[data-theme="dark"]) .reel { background: var(--raise); }
.reel::before, .reel::after {
  content: ''; position: absolute; left: 0; right: 0; height: 14px; pointer-events: none;
  background-image: radial-gradient(circle, transparent 0, transparent 0), linear-gradient(90deg, rgba(244,242,238,.85) 0 14px, transparent 14px 34px);
  background-size: 34px 14px; opacity: .22; transform: translateX(var(--sprocket, 0));
}
.reel::before { top: 8px; } .reel::after { bottom: 8px; }
.reel-track { display: flex; gap: 14px; overflow-x: auto; padding: 0 24px; scroll-snap-type: x mandatory; scrollbar-width: none; cursor: grab; }
.reel-track::-webkit-scrollbar { display: none; }
.reel-track.dragging { cursor: grabbing; scroll-snap-type: none; }
.frame {
  flex: 0 0 clamp(230px, 24vw, 290px); scroll-snap-align: start; border-radius: 12px; padding: 1.1rem;
  background: #24211B; color: var(--bg); display: flex; flex-direction: column; gap: .5rem; min-height: 220px;
  border: 1px solid rgba(244,242,238,.08); transition: transform .5s var(--spring), background .3s; user-select: none;
}
:where(html[data-theme="dark"]) .frame { background: #2E2E33; color: #F2F0EC; }
.frame:hover { transform: translateY(-6px); background: #2C2922; }
.frame .yr { font-size: 2.3rem; font-weight: 600; letter-spacing: -0.05em; line-height: 1; color: var(--bg); }
:where(html[data-theme="dark"]) .frame .yr { color: #F2F0EC; }
.frame .yr small { font-size: .9rem; color: rgba(244,242,238,.5); letter-spacing: -0.01em; font-weight: 400; margin-left: .2rem; }
.frame h4 { font-size: 1.05rem; letter-spacing: -0.02em; line-height: 1.25; margin-top: auto; }
.frame p { font-size: .88rem; color: rgba(244,242,238,.62); }
.frame .tag { align-self: flex-start; }
.frame.now { background: var(--accent); }
.frame.now p, .frame.now .yr small { color: rgba(255,255,255,.85); }
.reel-bar { height: 3px; background: rgba(244,242,238,.12); margin: 22px 24px 0; border-radius: 3px; position: relative; }
.reel-bar i { position: absolute; left: 0; top: 50%; width: 14px; height: 14px; margin-top: -7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 6px rgba(255,90,54,.25); transform: translateX(var(--rp, 0px)); }
.reel-bar b { position: absolute; left: 0; top: 0; height: 100%; width: var(--rw, 0px); background: var(--accent); border-radius: 3px; }

/* =========================================================
   CONTACT (footer block, floating button, overlay)
   ========================================================= */
.contact { background: var(--ink); color: var(--bg); border-radius: clamp(24px, 4vw, 44px) clamp(24px, 4vw, 44px) 0 0; overflow: hidden; position: relative; }
:where(html[data-theme="dark"]) .contact { background: var(--raise); color: #F2F0EC; }
.contact h2 { font-size: clamp(3.2rem, 12vw, 10.5rem); letter-spacing: -0.065em; line-height: .88; }
.contact h2 .serif { color: var(--accent); }
.contact-row { margin-top: clamp(2.5rem, 6vw, 3.5rem); display: flex; gap: .8rem; flex-wrap: wrap; align-items: center; }
.contact-foot { margin-top: clamp(4rem, 10vw, 6rem); padding-block: 1.6rem; border-top: 1px solid rgba(244,242,238,.14); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .85rem; color: rgba(244,242,238,.6); }
.contact-foot a { text-decoration: none; }
.contact-foot a:hover { color: var(--bg); }
:where(html[data-theme="dark"]) .contact-foot a:hover { color: #F2F0EC; }

.talk-fab {
  position: fixed; right: clamp(1rem, 3vw, 2rem); bottom: clamp(1rem, 3vw, 2rem); z-index: 85;
  display: flex; align-items: center; gap: .7rem; padding: .45rem 1.2rem .45rem .45rem; border-radius: 999px;
  background: var(--ink); color: var(--bg); border: 0; cursor: pointer; font-size: .95rem; font-weight: 500;
  box-shadow: 0 20px 40px -18px rgba(22,20,15,.7);
  transform: translateY(160%) scale(.8); opacity: 0; transition: transform .6s var(--spring), opacity .4s, background .3s;
}
:where(html[data-theme="dark"]) .talk-fab { background: var(--raise); color: #F2F0EC; box-shadow: 0 20px 40px -18px rgba(0,0,0,.7); }
.talk-fab.show { transform: none; opacity: 1; }
.talk-fab:hover { background: var(--accent); }
.talk-fab img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.talk-fab .dot { position: absolute; left: 36px; top: 6px; width: 11px; height: 11px; border-radius: 50%; background: #3CCB7F; border: 2px solid var(--ink); }
:where(html[data-theme="dark"]) .talk-fab .dot { border: 2px solid var(--line-strong); }
.talk-fab .label-wrap { position: relative; overflow: hidden; height: 1.4em; }
.talk-fab .label-wrap span { display: block; line-height: 1.4em; transition: transform .45s var(--ease); }
.talk-fab:hover .label-wrap span { transform: translateY(-100%); }

.overlay { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: var(--gutter); visibility: hidden; }
.overlay.open { visibility: visible; }
.overlay-bg { position: absolute; inset: 0; background: var(--ink); clip-path: circle(0 at var(--ox, 90%) var(--oy, 90%)); transition: clip-path .8s var(--ease); }
:where(html[data-theme="dark"]) .overlay-bg { background: var(--raise); }
.overlay.open .overlay-bg { clip-path: circle(150vmax at var(--ox, 90%) var(--oy, 90%)); }
.overlay-inner { position: relative; width: min(100%, 900px); color: var(--bg); opacity: 0; transform: translateY(30px); transition: opacity .5s .25s, transform .7s var(--ease) .25s; }
:where(html[data-theme="dark"]) .overlay-inner { color: #F2F0EC; }
.overlay.open .overlay-inner { opacity: 1; transform: none; }
.overlay h2 { font-size: clamp(3rem, 11vw, 8.5rem); letter-spacing: -0.065em; line-height: .88; }
.overlay h2 .serif { color: var(--accent); }
.overlay .who { display: flex; align-items: center; gap: .9rem; margin-bottom: 1.8rem; }
.overlay .who img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
.overlay .who small { display: block; color: rgba(244,242,238,.6); font-size: .9rem; }
.o-links { margin-top: 2.2rem; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; }
.o-link {
  display: flex; flex-direction: column; gap: .5rem; padding: 1.1rem 1.2rem; border-radius: 16px; text-decoration: none; text-align: left;
  background: rgba(244,242,238,.06); border: 1px solid rgba(244,242,238,.12); color: var(--bg); cursor: pointer; transition: background .3s, transform .5s var(--spring);
  min-width: 0;
}
:where(html[data-theme="dark"]) .o-link { color: #F2F0EC; }
.o-link:hover { background: var(--accent); transform: translateY(-4px); }
.o-link .mono { color: rgba(244,242,238,.55); }
.o-link:hover .mono { color: rgba(255,255,255,.85); }
.o-link b { font-weight: 500; font-size: 1.02rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 700px) { .o-links { grid-template-columns: 1fr; } }
.o-close { position: absolute; top: clamp(1rem, 3vw, 2rem); right: clamp(1rem, 3vw, 2rem); width: 54px; height: 54px; border-radius: 50%; border: 1px solid rgba(244,242,238,.3); background: transparent; color: var(--bg); cursor: pointer; display: grid; place-items: center; opacity: 0; transform: rotate(-90deg); transition: opacity .4s .3s, transform .6s var(--spring) .3s, background .3s; }
:where(html[data-theme="dark"]) .o-close { color: #F2F0EC; }
.overlay.open .o-close { opacity: 1; transform: none; }
.o-close:hover { background: var(--accent); border-color: var(--accent); }

.toast { position: fixed; left: 50%; bottom: 1.5rem; transform: translate(-50%, 180%); z-index: 130; background: var(--surface); color: var(--ink); border: 1px solid var(--line); padding: .7rem 1.1rem; border-radius: 999px; font-size: .9rem; box-shadow: 0 10px 30px -10px rgba(0,0,0,.3); transition: transform .5s var(--ease); }
.toast.show { transform: translate(-50%, 0); }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 125; display: grid; place-items: center; padding: var(--gutter); background: rgba(22,20,15,.86); backdrop-filter: blur(6px); opacity: 0; visibility: hidden; transition: opacity .4s, visibility .4s; cursor: zoom-out; }
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox img { max-height: 86vh; width: auto; border-radius: 12px; transform: scale(.9) rotate(-2deg); transition: transform .6s var(--spring); box-shadow: 0 40px 80px -30px #000; }
.lightbox.open img { transform: none; }
.lightbox p { position: absolute; bottom: 1.2rem; left: 0; right: 0; text-align: center; color: rgba(244,242,238,.75); font-size: .9rem; padding-inline: 1rem; }

/* =========================================================
   CASE STUDY
   ========================================================= */
.cs-hero { padding-top: clamp(7rem, 13vw, 9.5rem); }
.back { display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; font-size: .9rem; color: var(--ink-2); margin-bottom: 1.8rem; padding: .45rem .9rem; border-radius: 999px; background: rgba(251,250,248,.7); border: 1px solid var(--line); }
:where(html[data-theme="dark"]) .back { background: rgba(28,28,31,.7); }
.back:hover { color: var(--ink); border-color: var(--ink); }
:where(html[data-theme="dark"]) .back:hover { border-color: var(--line-strong); }
.cs-hero h1 { font-size: clamp(2.6rem, 7.6vw, 7rem); letter-spacing: -0.06em; line-height: .94; max-width: 14ch; }
.cs-hero h1 .serif { color: var(--accent); }
.cs-meta { margin-top: 1.6rem; display: flex; flex-wrap: wrap; gap: .5rem; }

.award-pill {
  display: inline-flex; align-items: center; gap: .7rem; padding: .35rem 1rem .35rem .35rem; border-radius: 999px;
  background: var(--ink); color: var(--bg); border: 0; cursor: zoom-in; font-size: .9rem; text-align: left;
  transition: background .3s, transform .5s var(--spring);
}
:where(html[data-theme="dark"]) .award-pill { background: var(--raise); color: #F2F0EC; }
.award-pill:hover { background: var(--accent); transform: translateY(-2px); }
.award-pill img { width: 56px; height: 36px; object-fit: cover; border-radius: 999px; }
.award-pill small { display: block; opacity: .65; font-size: .75rem; }

.cover-zoom { margin-top: clamp(2rem, 5vw, 3.5rem); }
.cover-zoom + * { margin-top: 0; }
.cover-zoom .frame-z { border-radius: calc(var(--radius) + 10px); overflow: hidden; transform: scale(var(--cz, .88)); transform-origin: 50% 0; background: var(--kz-bg); box-shadow: 0 50px 100px -50px rgba(22,20,15,.6); aspect-ratio: 1600 / 836; max-width: 100%; }
:where(html[data-theme="dark"]) .cover-zoom .frame-z { box-shadow: 0 50px 100px -50px rgba(0,0,0,.6); }
.cover-zoom img { width: 100%; height: 100%; object-fit: cover; }

/* sticky chapter bar */
.chapbar { position: sticky; top: 76px; z-index: 60; margin-top: clamp(1rem, 3vw, 2rem); transition: top .5s var(--ease); }
.nav-hidden .chapbar { top: 14px; }
.chapbar-inner { display: flex; gap: .3rem; overflow-x: auto; scrollbar-width: none; padding: .35rem; border-radius: 999px; background: rgba(251,250,248,.8); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid rgba(22,20,15,.08); box-shadow: 0 10px 30px -18px rgba(22,20,15,.3); position: relative; }
:where(html[data-theme="dark"]) .chapbar-inner { background: rgba(28,28,31,.8); border: 1px solid rgba(255,255,255,0.08); box-shadow: 0 10px 30px -18px rgba(0,0,0,.3); }
.chapbar-inner::-webkit-scrollbar { display: none; }
.chapbar a { flex-shrink: 0; text-decoration: none; font-size: .84rem; color: var(--ink-2); padding: .45rem .85rem; border-radius: 999px; white-space: nowrap; transition: background .3s, color .3s; }
.chapbar a span { font-family: var(--mono); font-size: .68rem; margin-right: .35rem; color: var(--ink-3); }
.chapbar a.active { background: var(--ink); color: var(--bg); }
:where(html[data-theme="dark"]) .chapbar a.active { background: var(--raise); color: #F2F0EC; }
.chapbar a.active span { color: var(--accent); }
.chapbar .cprog { position: absolute; left: 1.2rem; right: 1.2rem; bottom: 1px; height: 2px; border-radius: 2px; overflow: hidden; }
.chapbar .cprog i { display: block; height: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(var(--cp, 0)); }

.chapter { padding-block: clamp(4.5rem, 10vw, 7.5rem); scroll-margin-top: 8rem; }
.chapter h2 { font-size: clamp(2.2rem, 5.4vw, 4.4rem); letter-spacing: -0.05em; line-height: .98; max-width: 16ch; }
.chapter h2 .serif { color: var(--accent); }
.lead { margin-top: 1.3rem; font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--ink-2); max-width: 54ch; }
.lead strong { color: var(--ink); font-weight: 500; }

/* TL;DR */
.tldr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: clamp(2.5rem, 5vw, 3.5rem); }
@media (max-width: 860px) { .tldr { grid-template-columns: 1fr; } }
.tldr > div { border-radius: var(--radius); padding: 1.4rem; background: var(--surface); border: 1px solid var(--line); }
.tldr > div:nth-child(1) { background: var(--tint-mk); border-color: transparent; }
.tldr > div:nth-child(2) { background: var(--tint-md); border-color: transparent; }
.tldr > div:nth-child(3) { background: var(--tint-ux); border-color: transparent; }
.tldr h3 { font-size: 1.3rem; letter-spacing: -0.025em; line-height: 1.2; margin-top: .6rem; font-weight: 500; }

/* stats */
.stats { margin-top: 2.5rem; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 700px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat { border-top: 2px solid var(--ink); padding-top: .9rem; }
:where(html[data-theme="dark"]) .stat { border-top: 2px solid var(--line-strong); }
.stat b { display: block; font-size: clamp(3rem, 7vw, 5.4rem); font-weight: 600; letter-spacing: -0.06em; line-height: .9; }
.stat b sup { font-size: .4em; color: var(--accent); vertical-align: top; margin-left: .05em; }
.stat span { display: block; margin-top: .5rem; font-size: .9rem; color: var(--ink-2); }

/* competitor arena */
.arena { margin-top: 2.5rem; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; }
@media (max-width: 860px) { .arena { grid-template-columns: 1fr; } }
.arena .panel { border-radius: var(--radius); padding: 1.5rem; background: var(--surface); border: 1px solid var(--line); }
.chips { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .8rem; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: .5rem .95rem; font-size: .92rem; cursor: default; transition: transform .4s var(--spring), background .3s, color .3s; }
:where(html[data-theme="dark"]) .chip { background: var(--surface); }
.chip:hover { transform: translateY(-3px) rotate(-2deg); }
.chip.me { background: var(--kz-bg); color: var(--kz-mint); border-color: var(--kz-bg); }
.chip.dx { background: var(--tint-md); border-color: transparent; }
.meter { margin-top: 1.1rem; display: grid; gap: .8rem; }
.meter div { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: .8rem; align-items: center; font-size: .9rem; }
.meter .bar { height: 12px; border-radius: 12px; background: var(--bg-deep); overflow: hidden; }
.meter .bar i { display: block; height: 100%; border-radius: 12px; width: 0; transition: width 1.6s var(--ease); }
.meter.in .bar i { width: var(--w); }
.meter small { grid-column: 2; color: var(--ink-3); font-size: .78rem; margin-top: -.5rem; }
.devs { display: flex; gap: .5rem; margin-top: 1rem; }
.devs span { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-family: var(--mono); font-size: .78rem; background: var(--ink); color: var(--bg); transform: scale(0); transition: transform .6s var(--spring); }
:where(html[data-theme="dark"]) .devs span { background: var(--raise); color: #F2F0EC; }
.devs.in span { transform: scale(1); }
.devs.in span:nth-child(2) { transition-delay: .1s; } .devs.in span:nth-child(3) { transition-delay: .2s; } .devs.in span:nth-child(4) { transition-delay: .3s; } .devs.in span:nth-child(5) { transition-delay: .4s; }
.devs span:nth-child(odd) { background: var(--accent); }

/* flip cards */
.flips { margin-top: 2.5rem; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 860px) { .flips { grid-template-columns: 1fr; } }
.flip { perspective: 1200px; border: 0; background: none; padding: 0; cursor: pointer; text-align: left; min-height: 280px; }
.flip-inner { position: relative; width: 100%; height: 100%; min-height: 280px; transform-style: preserve-3d; transition: transform .9s var(--spring); }
.flip.flipped .flip-inner { transform: rotateY(180deg); }
.flip-face { position: absolute; inset: 0; border-radius: var(--radius); padding: 1.5rem; display: flex; flex-direction: column; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.flip-front { background: var(--surface); border: 1px solid var(--line); }
.flip-back { background: var(--ink); color: var(--bg); transform: rotateY(180deg); }
:where(html[data-theme="dark"]) .flip-back { background: var(--raise); color: #F2F0EC; }
.flip-face .mono b { color: var(--accent); font-weight: 500; }
.flip-front h3 { font-size: 1.45rem; letter-spacing: -0.03em; line-height: 1.15; margin-top: .8rem; }
.flip-back h3 { font-size: 1.7rem; letter-spacing: -0.035em; line-height: 1.08; margin-top: .8rem; }
.flip-back h3 .serif { color: var(--accent); }
.flip-back p { color: rgba(244,242,238,.7); margin-top: .8rem; font-size: .95rem; }
.flip-hint { margin-top: auto; display: inline-flex; align-items: center; gap: .5rem; font-family: var(--mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.flip-hint i { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; font-style: normal; transition: transform .5s var(--spring); }
.flip:hover .flip-front .flip-hint i { transform: rotate(180deg); }
.flip-back .flip-hint { color: rgba(244,242,238,.5); }

/* persona + journey */
.persona-row { margin-top: 2.5rem; display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 1rem; }
@media (max-width: 900px) { .persona-row { grid-template-columns: 1fr; } }
.persona { border-radius: var(--radius); background: var(--ink); color: var(--bg); padding: 1.6rem; display: flex; flex-direction: column; gap: 1.2rem; }
:where(html[data-theme="dark"]) .persona { background: var(--raise); color: #F2F0EC; }
.persona .face { width: 64px; height: 64px; border-radius: 50%; background: var(--tint-ux); color: var(--tint-ux-ink); display: grid; place-items: center; font-size: 1.6rem; font-weight: 600; }
.persona .traits { display: flex; gap: .4rem; flex-wrap: wrap; }
.persona .traits span { font-size: .8rem; padding: .35rem .7rem; border-radius: 999px; background: rgba(244,242,238,.1); }
.persona blockquote { margin: auto 0 0; font-size: clamp(1.5rem, 2.8vw, 2.2rem); letter-spacing: -0.035em; line-height: 1.08; font-weight: 500; }
.persona blockquote .serif { color: var(--accent); }
.journey { border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); padding: 1.4rem; overflow-x: auto; position: relative; }
.journey svg { width: 100%; min-width: 520px; height: auto; display: block; }
.journey .path { stroke-dasharray: 1000; stroke-dashoffset: 1000; transition: stroke-dashoffset 2.2s var(--ease); }
.journey.in .path { stroke-dashoffset: 0; }
.journey .drop { opacity: 0; transition: opacity .6s; cursor: pointer; }
.journey.in .drop { opacity: 1; }
.journey.in .drop.d1 { transition-delay: .7s; } .journey.in .drop.d2 { transition-delay: 1.2s; } .journey.in .drop.d3 { transition-delay: 1.7s; }
.journey .drop .halo { transition: r .4s var(--spring); }
.journey .drop:hover .halo, .journey .drop.active .halo { r: 22; }
.journey-tip { margin-top: .6rem; min-height: 3.2rem; font-size: 1rem; color: var(--ink); display: flex; gap: .7rem; align-items: baseline; }
.journey-tip b { font-family: var(--mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); flex-shrink: 0; }

/* big statement */
.statement { margin-top: 2rem; font-size: clamp(1.7rem, 4vw, 3.2rem); letter-spacing: -0.04em; line-height: 1.12; font-weight: 500; max-width: 24ch; }
.statement .serif { color: var(--accent); }

/* stacked HMW cards */
.stack { margin-top: 2.5rem; display: grid; gap: 1.2rem; }
.stack-card {
  position: sticky; top: calc(9.5rem + var(--i) * 1.4rem);
  border-radius: var(--radius); padding: clamp(1.4rem, 3vw, 2.2rem); min-height: 220px;
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1.5rem; align-items: start;
  box-shadow: 0 -20px 40px -30px rgba(22,20,15,.35);
}
:where(html[data-theme="dark"]) .stack-card { box-shadow: 0 -20px 40px -30px rgba(0,0,0,.35); }
.stack-card:nth-child(1) { background: var(--tint-mk); }
.stack-card:nth-child(2) { background: var(--tint-md); }
.stack-card:nth-child(3) { background: var(--ink); color: var(--bg); }
:where(html[data-theme="dark"]) .stack-card:nth-child(3) { background: var(--raise); color: #F2F0EC; }
.stack-card .n { font-size: clamp(3rem, 7vw, 5rem); font-weight: 600; letter-spacing: -0.06em; line-height: .85; }
.stack-card:nth-child(3) .n { color: var(--accent); }
.stack-card .mono { color: inherit; opacity: .6; }
.stack-card p { font-size: clamp(1.25rem, 2.6vw, 2rem); letter-spacing: -0.03em; line-height: 1.15; margin-top: .5rem; font-weight: 500; }
@media (max-width: 600px) { .stack-card { grid-template-columns: 1fr; gap: .6rem; top: calc(8rem + var(--i) * 3.4rem); min-height: 200px; } }

/* MVP tabs */
.mvp { margin-top: 2.5rem; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 860px) { .mvp { grid-template-columns: 1fr; } }
.mvp > div { border-radius: var(--radius); padding: 1.4rem; background: var(--surface); border: 1px solid var(--line); transition: transform .5s var(--spring), border-color .3s; }
.mvp > div:hover { transform: translateY(-6px); border-color: var(--ink); }
:where(html[data-theme="dark"]) .mvp > div:hover { border-color: var(--line-strong); }
.mvp .ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--kz-bg); color: var(--kz-mint); margin-bottom: 1rem; }
.mvp h3 { font-size: 1.3rem; letter-spacing: -0.025em; }
.mvp p { color: var(--ink-2); font-size: .94rem; margin-top: .4rem; }

/* prototype player */
.player { max-width: 1000px; margin-inline: auto; margin-top: 2.5rem; border-radius: calc(var(--radius) + 6px); background: linear-gradient(135deg, #1B1826, #2A2340 55%, #3B2447); padding: clamp(.8rem, 2vw, 1.2rem); color: var(--bg); box-shadow: 0 50px 100px -50px rgba(22,20,15,.7); }
:where(html[data-theme="dark"]) .player { color: #F2F0EC; box-shadow: 0 50px 100px -50px rgba(0,0,0,.7); }
.player-top { display: flex; align-items: center; gap: .5rem; padding: .3rem .4rem 1rem; }
.player-top i { width: 11px; height: 11px; border-radius: 50%; background: rgba(244,242,238,.2); }
.player-top i:first-child { background: #FF5F57; } .player-top i:nth-child(2) { background: #FEBC2E; } .player-top i:nth-child(3) { background: #28C840; }
.player-top .url { margin-left: .6rem; flex: 1; min-width: 0; font-family: var(--mono); font-size: .72rem; color: rgba(244,242,238,.55); background: rgba(0,0,0,.25); padding: .35rem .8rem; border-radius: 999px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stage { position: relative; border-radius: 14px; overflow: hidden; aspect-ratio: 1440 / 1024; max-width: 100%; background: radial-gradient(circle at 70% 20%, rgba(82,242,207,.18), transparent 50%), radial-gradient(circle at 20% 90%, rgba(215,56,232,.18), transparent 50%), #15131C; }
.stage::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px); background-size: 40px 40px; }
.shot { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; opacity: 0; transform: translateY(24px) scale(.96); transition: opacity .6s var(--ease), transform .8s var(--spring); }
.shot.on { opacity: 1; transform: none; }
.shot img { height: 90%; width: auto; max-width: 92%; object-fit: contain; filter: drop-shadow(0 30px 40px rgba(0,0,0,.5)); }
.shot.full img { width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: top; filter: none; }
.mine-chip { display: inline-flex; align-items: center; gap: .35rem; font-family: var(--mono); font-size: .66rem; letter-spacing: .06em; text-transform: uppercase; padding: .25rem .6rem; border-radius: 999px; background: var(--kz-mint); color: var(--kz-bg); vertical-align: middle; white-space: nowrap; }
.mine-chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--kz-bg); }
.player-mine { margin-left: .4rem; opacity: 0; transform: scale(.8); transition: opacity .3s, transform .4s var(--spring); }
.player.is-mine .player-mine { opacity: 1; transform: none; }
.player-count { color: rgba(244,242,238,.55); margin-right: .4rem; }
@media (max-width: 600px) { .player-top .url { display: none; } .player-mine { margin-left: auto; } }

/* scroll-through landing page */
.scrolly { position: relative; height: 260vh; margin-top: clamp(3rem, 7vw, 5rem); }
.scrolly-sticky { position: sticky; top: 7.5rem; max-width: 1000px; margin-inline: auto; }
.nav-hidden .scrolly-sticky { top: 5rem; }
.scrolly-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.scrolly-head h3 { font-size: clamp(1.4rem, 3vw, 2.2rem); letter-spacing: -0.04em; margin-top: .4rem; }
.scrolly-head h3 .serif { color: var(--accent); }
.seg { display: inline-flex; padding: .3rem; border-radius: 999px; background: var(--ink); }
:where(html[data-theme="dark"]) .seg { background: var(--raise); }
.seg button { border: 0; background: transparent; color: rgba(244,242,238,.7); padding: .55rem 1.1rem; border-radius: 999px; cursor: pointer; font-size: .9rem; transition: background .3s, color .3s; }
.seg button[aria-selected="true"] { background: var(--accent); color: #fff; }
.browser { border-radius: calc(var(--radius) + 4px); background: var(--ink); padding: .7rem; box-shadow: 0 50px 100px -50px rgba(22,20,15,.7); }
:where(html[data-theme="dark"]) .browser { background: var(--raise); box-shadow: 0 50px 100px -50px rgba(0,0,0,.7); }
.browser .player-top { padding: .2rem .3rem .7rem; }
.viewport { position: relative; height: min(62vh, 620px); border-radius: 12px; overflow: hidden; background: #fff; }
:where(html[data-theme="dark"]) .viewport { background: var(--surface); }
.viewport .page { position: absolute; left: 0; top: 0; width: 100%; height: auto; transform: translateY(var(--sy, 0px)); opacity: 0; transition: opacity .5s; will-change: transform; }
.viewport .page.on { opacity: 1; }
@media (max-width: 700px) { .scrolly { height: 220vh; } .viewport { height: 56vh; } }
.player-foot { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; align-items: center; padding: 1rem .4rem .3rem; }
.player-foot h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); letter-spacing: -0.02em; }
.player-foot p { color: rgba(244,242,238,.65); font-size: .92rem; margin-top: .2rem; }
.player-ctrl { display: flex; align-items: center; gap: .5rem; }
.player-ctrl button { width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(244,242,238,.25); background: transparent; color: var(--bg); cursor: pointer; display: grid; place-items: center; transition: background .3s; }
:where(html[data-theme="dark"]) .player-ctrl button { color: #F2F0EC; }
.player-ctrl button:hover { background: var(--kz-mint); color: var(--kz-bg); border-color: var(--kz-mint); }
.player-dots { display: flex; gap: .4rem; padding: 0 .4rem .2rem; }
.player-dots button { flex: 1; height: 4px; border-radius: 4px; border: 0; background: rgba(244,242,238,.18); cursor: pointer; padding: 0; position: relative; overflow: hidden; }
.player-dots button i { position: absolute; inset: 0; background: var(--kz-mint); transform: scaleX(0); transform-origin: 0 50%; }
.player-dots button.done i { transform: scaleX(1); }
.player-dots button.active i { animation: fill var(--dur, 4.5s) linear forwards; }
.player.paused .player-dots button.active i { animation-play-state: paused; }
@keyframes fill { to { transform: scaleX(1); } }
@media (max-width: 600px) { .player-foot { grid-template-columns: 1fr; } }

/* compare slider */
.compare { max-width: 1000px; margin-inline: auto; position: relative; margin-top: 2.5rem; border-radius: var(--radius); overflow: hidden; aspect-ratio: 1440 / 1024; max-width: 100%; user-select: none; touch-action: pan-y; background: #ddd; }
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.compare .after { clip-path: inset(0 0 0 var(--cx, 50%)); }
.compare .handle { position: absolute; top: 0; bottom: 0; left: var(--cx, 50%); width: 2px; background: #fff; transform: translateX(-1px); }
:where(html[data-theme="dark"]) .compare .handle { background: var(--surface); }
.compare .handle i { position: absolute; top: 50%; left: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; box-shadow: 0 10px 30px -10px rgba(0,0,0,.5); cursor: ew-resize; font-style: normal; }
.compare .lbl { position: absolute; top: 1rem; padding: .35rem .7rem; border-radius: 999px; background: rgba(22,20,15,.8); color: #fff; font-family: var(--mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; }
.compare .lbl.l { left: 1rem; } .compare .lbl.r { right: 1rem; }

/* iteration timeline */
.iter { margin-top: 2.5rem; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; position: relative; }
@media (max-width: 860px) { .iter { grid-template-columns: 1fr; } }
.iter > div { border-radius: var(--radius); padding: 1.4rem; background: var(--surface); border: 1px solid var(--line); }
.iter .fid { display: inline-flex; font-family: var(--mono); font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; padding: .35rem .7rem; border-radius: 999px; background: var(--ink); color: var(--bg); }
:where(html[data-theme="dark"]) .iter .fid { background: var(--raise); color: #F2F0EC; }
.iter > div:nth-child(2) .fid { background: var(--ink-2); }
:where(html[data-theme="dark"]) .iter > div:nth-child(2) .fid { background: var(--line-strong); }
.iter > div:nth-child(3) .fid { background: var(--accent); }
.iter ul { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: .6rem; }
.iter li { display: grid; grid-template-columns: 1.3rem minmax(0, 1fr); gap: .5rem; font-size: .95rem; line-height: 1.4; }
.iter li::before { content: '→'; color: var(--accent); }

/* my part */
.role { margin-top: 2.5rem; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 860px) { .role { grid-template-columns: 1fr; } }
.role > div { border-radius: var(--radius); padding: 1.5rem; }
.role > div:nth-child(1) { background: var(--tint-ux); } .role > div:nth-child(2) { background: var(--tint-mk); } .role > div:nth-child(3) { background: var(--tint-md); }
.role h3 { font-size: 1.35rem; letter-spacing: -0.03em; margin: .6rem 0 .8rem; }
.role ul { margin: 0; padding: 0; list-style: none; display: grid; gap: .45rem; }
.role li { padding: .55rem .8rem; border-radius: 12px; background: rgba(255,255,255,.6); font-size: .93rem; line-height: 1.35; }
:where(html[data-theme="dark"]) .role li { background: rgba(255,255,255,.08); }

/* reflections */
.reflect { margin-top: 2rem; }
.reflect p { font-size: clamp(1.5rem, 3.4vw, 2.6rem); letter-spacing: -0.04em; line-height: 1.15; font-weight: 500; padding-block: 1.3rem; border-bottom: 1px solid var(--line); }
.reflect p:first-child { border-top: 2px solid var(--ink); }
:where(html[data-theme="dark"]) .reflect p:first-child { border-top: 2px solid var(--line-strong); }
.reflect p .serif { color: var(--accent); }

/* award proof */
.proof { margin-top: 2.5rem; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: center; border-radius: calc(var(--radius) + 6px); background: var(--ink); color: var(--bg); padding: clamp(1.4rem, 4vw, 3rem); overflow: hidden; }
:where(html[data-theme="dark"]) .proof { background: var(--raise); color: #F2F0EC; }
@media (max-width: 860px) { .proof { grid-template-columns: 1fr; } }
.proof button { border: 0; padding: 0; background: none; cursor: zoom-in; perspective: 1000px; }
.proof .cert { border-radius: 12px; overflow: hidden; transform: rotate(-4deg); transition: transform .8s var(--spring); box-shadow: 0 40px 60px -30px #000; position: relative; }
.proof button:hover .cert { transform: rotate(0) scale(1.02); }
.proof .cert::after { content: ''; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.45) 45%, transparent 60%); transform: translateX(-100%); animation: shine 4s ease-in-out 1s infinite; }
@keyframes shine { 0%, 60% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
.proof h3 { font-size: clamp(2rem, 4.4vw, 3.6rem); letter-spacing: -0.05em; line-height: .98; }
.proof h3 .serif { color: var(--accent); }
.proof p { color: rgba(244,242,238,.7); margin-top: 1rem; }

.next-cs { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap; padding-block: clamp(3rem, 7vw, 5rem); border-top: 2px solid var(--ink); text-decoration: none; }
:where(html[data-theme="dark"]) .next-cs { border-top: 2px solid var(--line-strong); }
.next-cs h3 { font-size: clamp(2rem, 6vw, 4.6rem); letter-spacing: -0.05em; transition: color .3s; }
.next-cs:hover h3 { color: var(--accent); }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .blob { animation: none !important; }
  .js .rv, .words .w > span, .js .line > span, .js .img-reveal, .js .img-reveal img, .js .hero-copy .fade { opacity: 1 !important; transform: none !important; clip-path: none !important; }
  .js .portrait-card { opacity: 1 !important; transform: rotate(-3deg) !important; }
  .sticker { opacity: 1 !important; transform: none !important; }
  .read .rw { opacity: 1 !important; }
  .journey .path, .map-path { stroke-dashoffset: 0 !important; }
  .journey .drop, .map-pin { opacity: 1 !important; transform: none !important; }
}

.btn.talk-hero { font-weight: 600; padding: 1rem 1.6rem; box-shadow: 0 14px 30px -12px rgba(255,90,54,.7); animation: glow 2.4s ease-in-out infinite; }
.btn.talk-hero:hover { background: var(--ink); color: #fff; animation: none; }
:where(html[data-theme="dark"]) .btn.talk-hero:hover { background: var(--raise); }
@keyframes glow { 0%,100% { box-shadow: 0 14px 30px -12px rgba(255,90,54,.7), 0 0 0 0 rgba(255,90,54,.45); } 50% { box-shadow: 0 14px 30px -12px rgba(255,90,54,.7), 0 0 0 10px rgba(255,90,54,0); } }
.nav-links .cta { background: var(--accent); color: #fff; }
.nav-links .cta:hover { background: var(--ink); }
:where(html[data-theme="dark"]) .nav-links .cta:hover { background: var(--raise); }
.hero-lede + .hero-lede { margin-top: .9rem; }

.inline-link { color: var(--ink); font-weight: 500; text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.inline-link:hover { color: var(--accent); }
.main-tool { background: var(--tint-mk); }
.main-badge { margin-left: auto; font-family: var(--mono); font-size: .6rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; padding: .25rem .5rem; border-radius: 999px; background: var(--accent); color: #fff; white-space: nowrap; }
.email-reveal .er { display: inline-grid; overflow: hidden; }
.email-reveal .er > span { grid-area: 1 / 1; transition: opacity .3s, transform .4s var(--ease); white-space: nowrap; }
.email-reveal .er-b, .email-reveal .er-c { opacity: 0; transform: translateY(100%); }
.email-reveal:hover .er-a, .email-reveal:focus-visible .er-a, .email-reveal.copied .er-a { opacity: 0; transform: translateY(-100%); }
.email-reveal:hover .er-b, .email-reveal:focus-visible .er-b { opacity: 1; transform: none; }
.email-reveal.copied .er-b { opacity: 0; transform: translateY(-100%); }
.email-reveal.copied .er-c { opacity: 1; transform: none; }
.email-reveal.copied, .email-reveal.copied:hover { background: #3CCB7F; color: var(--ink); }
.cs-hero { position: relative; }
.hero-award { position: absolute; right: var(--gutter); top: clamp(7.5rem, 13vw, 9.5rem); width: clamp(160px, 16vw, 210px); aspect-ratio: 1; border: 0; padding: 0; background: none; cursor: zoom-in; border-radius: 50%; transition: transform .6s var(--spring); filter: drop-shadow(0 24px 30px rgba(22,20,15,.35)); }
.hero-award svg { width: 100%; height: 100%; display: block; }
.hero-award .ring-text { transform-origin: 100px 100px; animation: spin 18s linear infinite; }
.hero-award:hover { transform: scale(1.08) rotate(-8deg); }
.hero-award:hover .ring-text { animation-duration: 5s; }
.ha-tip { position: absolute; left: 50%; bottom: -2.2rem; transform: translateX(-50%) translateY(6px); opacity: 0; white-space: nowrap; font-family: var(--mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; background: var(--ink); color: var(--bg); padding: .35rem .7rem; border-radius: 999px; transition: opacity .3s, transform .4s var(--ease); }
:where(html[data-theme="dark"]) .ha-tip { background: var(--raise); color: #F2F0EC; }
.hero-award:hover .ha-tip { opacity: 1; transform: translateX(-50%); }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 1000px) { .hero-award { position: relative; right: auto; top: auto; display: block; width: 150px; margin: 0 0 1.5rem; } }
@media (min-width: 1001px) { .cs-hero h1 { max-width: min(14ch, calc(100% - 250px)); } }

.work-meta > div:first-child { flex: 1 1 240px; min-width: 0; }
.work-tags { flex: 0 0 auto; flex-wrap: nowrap; }
.t-lang.wide { grid-column: 1 / -1; grid-row: auto; display: grid; grid-template-columns: minmax(180px, auto) minmax(0, 1fr); align-items: center; gap: 1rem 2rem; }
.t-lang.wide .mono { grid-column: 1 / -1; margin-bottom: 0; }
.t-lang.wide .bubble-say { margin: 0; min-width: 5ch; }
.t-lang.wide .lang-list { margin-top: 0; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.t-lang.wide .lang-list button { flex-direction: column; align-items: flex-start; gap: .15rem; }
@media (max-width: 860px) { .t-lang.wide { grid-template-columns: 1fr; } .t-lang.wide .lang-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.journey-map .t-map { padding: clamp(1rem, 3vw, 2rem); }
.journey-map .t-map svg { max-height: 560px; margin: 0 auto; }
.work-meta { flex-direction: column; align-items: flex-start; gap: .8rem; }
.work-meta > div:first-child { flex: none; }
.journey-map .t-map { max-width: 960px; margin-inline: auto; }

.t-tools { background: var(--ink); color: var(--bg); border-color: transparent; }
:where(html[data-theme="dark"]) .t-tools { background: var(--raise); color: #F2F0EC; }
.t-tools > .mono { color: rgba(244,242,238,.55); }
.t-tools .stage-col { background: #24211B; border-color: rgba(244,242,238,.08); }
:where(html[data-theme="dark"]) .t-tools .stage-col { background: #2E2E33; }
.t-tools .stage-col li:hover { background: #2E2A23; }
.t-tools .main-tool { background: rgba(255,90,54,.18); }
.t-tools .m1 { background: var(--bg); color: var(--ink); }
.t-tools .pipe-arrow { background: rgba(244,242,238,.25); }
.t-tools .pipe-arrow::after { border-left-color: rgba(244,242,238,.25); }
@media (max-width: 860px) { .t-tools .pipe-arrow::after { border-left-color: transparent; border-top-color: rgba(244,242,238,.25); } }

.portrait-tilt { position: relative; z-index: 2; }
.orbit { list-style: none; margin: 0; padding: 0; position: absolute; left: 50%; top: 50%; width: 0; height: 0; z-index: 3; pointer-events: none; }
.orbit li { position: absolute; left: 0; top: 0; white-space: nowrap; pointer-events: auto; padding: .45rem .85rem; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: .85rem; font-weight: 500; box-shadow: 0 10px 24px -14px rgba(22,20,15,.5); will-change: transform, opacity; transition: background .25s, color .25s; }
:where(html[data-theme="dark"]) .orbit li { background: var(--surface); box-shadow: 0 10px 24px -14px rgba(0,0,0,.5); }
.orbit li:nth-child(3n+1) { background: var(--tint-mk); border-color: transparent; color: var(--tint-mk-ink); }
.orbit li:nth-child(3n+2) { background: var(--tint-ux); border-color: transparent; color: var(--tint-ux-ink); }
.orbit li:hover { background: var(--accent); color: #fff; }
.orbit li.back { z-index: -1; }
.portrait { isolation: isolate; }
.orbit { z-index: auto; }
.orbit li { z-index: 3; }
.orbit li.back { z-index: 1; }

.cs-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 2vw, 1.5rem); }
@media (max-width: 900px) { .cs-grid { grid-template-columns: 1fr; } }
.ph-card { display: flex; flex-direction: column; gap: 1rem; }
.ph-media { position: relative; aspect-ratio: 4 / 3; max-width: 100%; border-radius: var(--radius); overflow: hidden; background: var(--bg-deep); border: 1px dashed #CFCAC0; display: grid; place-items: center; }
:where(html[data-theme="dark"]) .ph-media { border: 1px dashed #3A3A40; }
.ph-media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.55) 50%, transparent 70%); transform: translateX(-100%); animation: shimmer 2.4s ease-in-out infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }
.ph-media span { font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); position: relative; z-index: 1; }
.ph-bar { height: 14px; border-radius: 8px; background: var(--bg-deep); }
.ph-bar.t { height: 26px; width: 70%; }
.ph-bar.s { width: 90%; } .ph-bar.xs { width: 55%; }
.ph-card .tags { display: flex; gap: .4rem; flex-wrap: wrap; }

.orbit li, .orbit li:nth-child(3n+1), .orbit li:nth-child(3n+2) { background: var(--bg); color: var(--ink); border: 1.6px solid var(--ink); box-shadow: 2px 3px 0 rgba(22,20,15,.85); border-radius: 255px 18px 225px 18px / 18px 225px 18px 255px; font-family: var(--serif); font-style: italic; font-size: 1.02rem; font-weight: 400; padding: .35rem .95rem; opacity: 1 !important; z-index: 3; }
:where(html[data-theme="dark"]) .orbit li, :where(html[data-theme="dark"]) .orbit li:nth-child(3n+1), :where(html[data-theme="dark"]) .orbit li:nth-child(3n+2) { border: 1.6px solid var(--line-strong); box-shadow: 2px 3px 0 rgba(0,0,0,.85); }
.orbit li:hover { background: var(--ink); color: var(--bg); }
:where(html[data-theme="dark"]) .orbit li:hover { background: var(--raise); color: #F2F0EC; }
.orbit li, .orbit li:nth-child(3n+1), .orbit li:nth-child(3n+2) { font-size: .9rem; padding: .22rem .7rem; }
@media (max-width: 700px) { .orbit li, .orbit li:nth-child(3n+1), .orbit li:nth-child(3n+2) { font-size: .78rem; padding: .18rem .55rem; } }

.hero h1 .hi { margin-bottom: .35em; }
.roles { margin-top: 2.4rem; gap: .6rem; }
.hero-lede { margin-top: 2.2rem; line-height: 1.7; }
.hero-lede + .hero-lede { margin-top: 1.3rem; }
.hero-cta { margin-top: 2.8rem; }

.reel-head.in-reel { margin: 0 24px 18px; }
.reel-head.in-reel .mono { color: rgba(244,242,238,.6); }
.reel-head.in-reel .reel-ctrl button { width: 40px; height: 40px; border-color: rgba(244,242,238,.3); color: var(--bg); }
:where(html[data-theme="dark"]) .reel-head.in-reel .reel-ctrl button { color: #F2F0EC; }
.reel-head.in-reel .reel-ctrl button:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

.talk-fab { top: 50%; bottom: auto; text-decoration: none; transform: translate(130%, -50%); }
.talk-fab.show { transform: translate(0, -50%); }
.cs-grid .work-card { grid-column: span 2; }
@media (max-width: 900px) { .cs-grid .work-card { grid-column: 1 / -1; } }
@media (max-width: 700px) { .talk-fab { display: none !important; } }

/* v-mobile nav, stag links, toolstack carousel, back-to-top */
.stag-link { text-decoration: none; color: inherit; transition: background .25s, color .25s, transform .35s var(--spring); }
.stag-link span { display: inline-block; transition: transform .3s var(--ease); }
.stag-link:hover { background: var(--ink); color: var(--bg); }
:where(html[data-theme="dark"]) .stag-link:hover { background: var(--raise); color: #F2F0EC; }
.stag-link:hover span { transform: translateX(3px); }
.contact-foot { align-items: center; padding-bottom: 5.5rem; }
.contact-foot .to-top { padding: .7rem 1.2rem; font-size: .88rem; color: var(--bg); }
:where(html[data-theme="dark"]) .contact-foot .to-top { color: #F2F0EC; }
@media (max-width: 680px) {
  .nav-links li:not(:last-child) { display: list-item; }
  .nav-mark .nm { display: none; }
  .nav-links a, .nav-links button { padding: .45rem .6rem; font-size: .8rem; }
  .contact-foot .to-top { width: 100%; justify-content: center; order: -1; }
}
@media (max-width: 860px) {
  .t-tools { min-width: 0; }
  .t-tools .pipeline { display: flex; grid-template-columns: none; gap: .75rem; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: .6rem; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .t-tools .pipeline::-webkit-scrollbar { display: none; }
  .t-tools .stage-col { flex: 0 0 82%; scroll-snap-align: start; }
  .t-tools .pipe-arrow { display: none; }
  .t-tools > .mono::after { content: '  · swipe →'; opacity: .55; }
}

/* v-audit: sr-only, CV download menu */
.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; }
.cv-drop { position: relative; display: inline-flex; }
.cv-btn { gap: .5rem; }
.cv-caret { font-size: .7em; transition: transform .3s var(--ease); }
.cv-drop:hover .cv-caret, .cv-drop:focus-within .cv-caret, .cv-drop.open .cv-caret { transform: rotate(180deg); }
.cv-menu { position: absolute; left: 50%; bottom: calc(100% + .6rem); transform: translate(-50%, 6px); display: grid; gap: .25rem; padding: .4rem; min-width: 190px; border-radius: 16px; background: var(--bg); border: 1px solid rgba(22,20,15,.1); box-shadow: 0 20px 40px -18px rgba(0,0,0,.55); opacity: 0; visibility: hidden; transition: opacity .5s cubic-bezier(.65,0,.35,1), transform .5s cubic-bezier(.65,0,.35,1), visibility .5s; z-index: 30; }
:where(html[data-theme="dark"]) .cv-menu { border: 1px solid rgba(255,255,255,0.1); }
.cv-drop:hover .cv-menu, .cv-drop:focus-within .cv-menu, .cv-drop.open .cv-menu { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.cv-menu::after { content: ''; position: absolute; left: 50%; bottom: -6px; width: 12px; height: 12px; margin-left: -6px; transform: rotate(45deg); background: var(--bg); border-right: 1px solid rgba(22,20,15,.1); border-bottom: 1px solid rgba(22,20,15,.1); }
:where(html[data-theme="dark"]) .cv-menu::after { border-right: 1px solid rgba(255,255,255,0.1); border-bottom: 1px solid rgba(255,255,255,0.1); }
.cv-menu a { display: flex; align-items: center; gap: .6rem; padding: .6rem .7rem; border-radius: 12px; text-decoration: none; color: var(--ink); font-size: .92rem; font-weight: 500; transition: background .2s; }
.cv-menu a:hover { background: var(--bg-deep); }
.cv-menu a b { font-family: var(--mono); font-size: .68rem; letter-spacing: .06em; padding: .25rem .45rem; border-radius: 7px; background: var(--tint-mk); color: var(--tint-mk-ink); }
.cv-menu a:last-child b { background: var(--tint-ux); color: var(--tint-ux-ink); }
@media (hover: none) { .cv-menu { transition: opacity .2s, visibility .2s; } }

/* v-audit: hero CTA + light CV menu */
.hero-cta { margin-top: clamp(1.6rem, 3vw, 2.2rem); display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.cv-drop.light .cv-menu { background: var(--surface); border-color: var(--line); box-shadow: 0 20px 40px -22px rgba(22,20,15,.4); }
:where(html[data-theme="dark"]) .cv-drop.light .cv-menu { box-shadow: 0 20px 40px -22px rgba(0,0,0,.4); }
.cv-drop.light .cv-menu::after { background: var(--surface); border-color: var(--line); }
.cv-drop.down .cv-menu { bottom: auto; top: calc(100% + .6rem); left: 0; transform: translate(0, -6px); }
.cv-drop.down:hover .cv-menu, .cv-drop.down:focus-within .cv-menu, .cv-drop.down.open .cv-menu { transform: translate(0, 0); }
.cv-drop.down .cv-menu::after { bottom: auto; top: -6px; left: 34px; margin-left: 0; border: 0; border-left: 1px solid var(--line); border-top: 1px solid var(--line); }

/* v-audit: overlay timing + reveal links */
.overlay { transition: visibility 0s linear .85s; }
.overlay.open { transition-delay: 0s; }
.overlay-bg { transition: clip-path 1.15s cubic-bezier(.65,0,.2,1); }
.overlay-inner { transition: opacity .75s .35s, transform 1s var(--ease) .35s; }
.o-close { transition: opacity .6s .5s, transform .9s var(--spring) .5s, background .3s, border-color .3s; }
.o-links { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: .9rem; }
.o-link { transition: background .35s var(--ease), transform .45s var(--spring), color .35s; }
.link-reveal .er { display: inline-grid; overflow: hidden; }
.link-reveal .er > span { grid-area: 1 / 1; transition: opacity .35s, transform .5s var(--ease); white-space: nowrap; }
.link-reveal .er-b { opacity: 0; transform: translateY(100%); }
.link-reveal:hover .er-a, .link-reveal:focus-visible .er-a { opacity: 0; transform: translateY(-100%); }
.link-reveal:hover .er-b, .link-reveal:focus-visible .er-b { opacity: 1; transform: none; }
.o-link .er { font-weight: 500; font-size: 1.02rem; }
.o-link.email-reveal .er-b, .o-link.link-reveal .er-b { font-size: .95rem; }
.email-reveal.copied, .email-reveal.copied:hover { background: #3CCB7F; color: var(--ink); }

/* v-scroll: two-way reveal, directional exits, parallax drift */
.js .rv, .js .words, .js .img-reveal { will-change: opacity, transform; }
.js .out-up, .js .out-down { opacity: 0; transition-duration: .5s, .55s; transition-delay: 0s; }
.js .out-up { transform: translateY(-26px) scale(.986); }
.js .out-down { transform: translateY(26px) scale(.986); }
.js .work-card.out-up, .js .work-card.out-down, .js .cs-row.out-up, .js .cs-row.out-down { transform: translateY(-26px) scale(.97); }
.js .cs-grid > .out-down, .js .work-grid > .out-down { transform: translateY(34px) scale(.97); }
.js .roles > .out-up, .js .roles > .out-down { transform: translateY(14px) scale(.9); }
.portrait { transform: translate3d(0, var(--py, 0px), 0); transition: transform .2s linear; }
@media (prefers-reduced-motion: reduce) {
  .js .out-up, .js .out-down { opacity: 1 !important; transform: none !important; }
  .portrait { transform: none; }
}

/* ============ v-a11y: contrast, touch, targets, print ============ */
:root {
  --accent: #D8401C;            /* passes contrast on light bg and with white text */
  --accent-bright: #FF5A36;     /* decorative only: dots, glows, shapes */
  --accent-text: #C93A16;       /* small coral text */
  --accent-soft: rgba(216, 64, 28, .14);
  --ink-3: #6E6960;
}
.stage-n, .chapbar a.active span, .flip-face .mono b, .journey-tip b, .nf .code, .stat b sup { color: var(--accent-text); }
.dot-field, .blob, .sticker.s1, .sticker.s2 { --accent: var(--accent-bright); }

/* touch devices: nothing important hides behind hover */
@media (hover: none) {
  .email-reveal .er-a, .link-reveal .er-a { opacity: 0; transform: translateY(-100%); }
  .email-reveal .er-b, .link-reveal .er-b { opacity: 1; transform: none; }
  .contact-row .email-reveal .er-b { font-size: .92rem; }
}

/* comfortable tap targets on small screens */
@media (max-width: 680px) {
  .nav-links a, .nav-links button { min-height: 44px; display: flex; align-items: center; padding: .6rem .7rem; }
  .nav-mark { min-height: 44px; padding-block: .3rem; }
  .nav { padding: .38rem .4rem .38rem .5rem; }
  .back, .skip, .cs-row, .chapbar a, .reel-ctrl button, .seg button, .o-close { min-height: 44px; }
  .chapbar a { display: inline-flex; align-items: center; }
  .btn { min-height: 44px; }
}

/* no sideways scroll on narrow screens (never on <html>: it breaks position:sticky) */
.bg > div { max-width: 100vw; }

/* keep the browser's memory use sane: only animate what is moving */
.js .rv, .js .words, .js .img-reveal { will-change: auto; }
.js .rv.in, .js .out-up, .js .out-down { will-change: opacity, transform; }

/* before / after slider by keyboard */
.compare:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.compare .handle:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

@media print {
  .nav, .chapbar, .talk-fab, .overlay, .toast, .lightbox, .bg, .skip, .reel-ctrl, .reel-bar, .cv-menu, .seg, .hero-cta { display: none !important; }
  * { background: #fff !important; color: #16140F !important; box-shadow: none !important; }
:where(html[data-theme="dark"]) * { background: var(--surface) !important; color: var(--ink) !important; }
  a { text-decoration: underline; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .8em; word-break: break-all; }
  .section, .chapter { page-break-inside: avoid; padding-block: 1rem !important; }
  img { max-width: 100% !important; }
}

/* legal page */
.legal { max-width: calc(70ch + var(--gutter) * 2); margin-inline: 0 auto; padding-top: 0; }
.legal h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-top: 3rem; }
.legal h3 { font-size: 1.15rem; margin-top: 2rem; }
.legal p { color: var(--ink-2); margin-top: .8rem; }
.legal p .mono { color: var(--ink-3); display: inline-block; margin-bottom: .2rem; }
.legal p.small { font-size: .85rem; color: var(--ink-3); }
.contact-foot a[href="legal.html"] { color: rgba(244,242,238,.6); }
.contact-foot a[href="legal.html"]:hover { color: var(--bg); }
:where(html[data-theme="dark"]) .contact-foot a[href="legal.html"]:hover { color: #F2F0EC; }

/* v-fix: landing page frame scrolls inside itself, no sticky dead space */
.scrolly { height: auto; }
.scrolly-sticky { position: static; }
.viewport { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(22,20,15,.25) transparent; -webkit-overflow-scrolling: touch; }
.viewport .page { transform: none; will-change: auto; }
.viewport .vp-spacer { width: 1px; }
.viewport::-webkit-scrollbar { width: 8px; }
.viewport::-webkit-scrollbar-thumb { background: rgba(22,20,15,.22); border-radius: 8px; }
.viewport:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.scroll-hint { display: inline-flex; align-items: center; gap: .4rem; margin-top: .7rem; font-family: var(--mono); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: rgba(244,242,238,.55); }
.scroll-hint i { width: 14px; height: 14px; border-radius: 50%; border: 1px solid currentColor; display: grid; place-items: center; font-style: normal; font-size: .6rem; }
@media (max-width: 700px) { .scrolly { height: auto; } .viewport { height: 58vh; } }

/* language switch */
.lang-switch { display: inline-flex; align-items: center; gap: 2px; padding: 2px; margin-right: .1rem; border-radius: 999px; background: var(--bg-deep); }
.lang-switch button { font-family: var(--mono); font-size: .72rem !important; letter-spacing: .06em; padding: .4rem .6rem !important; border-radius: 999px; border: 0; background: transparent; color: var(--ink-2); cursor: pointer; transition: background .25s, color .25s; }
.lang-switch button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 4px rgba(22,20,15,.12); }
:where(html[data-theme="dark"]) .lang-switch button[aria-pressed="true"] { box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.lang-switch button:hover { color: var(--ink); }
@media (max-width: 680px) {
  .lang-switch { background: transparent; padding: 0; }
  .lang-switch button[aria-pressed="true"] { display: none; }
  .lang-switch button { min-height: 44px; padding: .4rem .55rem !important; background: var(--bg-deep); }
}

/* nav stays on one line in both languages */
.nav-links a, .nav-links button, .lang-switch button { white-space: nowrap; }
@media (max-width: 430px) {
  .nav-links a, .nav-links button { padding: .5rem .45rem !important; font-size: .76rem; }
  .nav-links .cta { padding: .5rem .7rem !important; }
  .lang-switch button { padding: .4rem .4rem !important; }
  .nav-mark img { width: 28px; height: 28px; }
}
.nav-mark { flex-shrink: 0; }
.nav-mark img { flex: 0 0 auto; }

/* language switch: its own pill, to the right of the nav */
:root { --nav-shift: 0px; --nav-w: min(calc(100vw - 2 * var(--gutter)), 760px); }
.nav { width: var(--nav-w); transform: translateX(calc(-50% - var(--nav-shift))); }
.nav.hide { transform: translate(calc(-50% - var(--nav-shift)), -150%); }
.lang-switch {
  position: fixed; z-index: 90; top: 14px;
  left: calc(50% - var(--nav-shift) + var(--nav-w) / 2 + 8px);
  display: inline-flex; align-items: center; gap: 1px; padding: 3px; margin: 0;
  background: rgba(251, 250, 248, .72);
  backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid rgba(22, 20, 15, .08); border-radius: 999px;
  box-shadow: 0 8px 30px -14px rgba(22, 20, 15, .25);
  transition: transform .5s var(--ease);
}
:where(html[data-theme="dark"]) .lang-switch { background: rgba(28,28,31,.72); border: 1px solid rgba(255,255,255,0.08); box-shadow: 0 8px 30px -14px rgba(0,0,0, .25); }
.nav-hidden .lang-switch { transform: translateY(-160%); }
.lang-switch button { font-family: var(--mono); font-size: .72rem !important; letter-spacing: .06em; padding: .45rem .55rem !important; min-height: 0; border-radius: 999px; border: 0; background: transparent; color: var(--ink-3); cursor: pointer; transition: color .25s, background .25s; }
.lang-switch button:hover { color: var(--ink); }
.lang-switch button[aria-pressed="true"] { color: var(--accent); background: var(--accent-soft); display: inline-block; }
@media (max-width: 900px) {
  :root { --nav-shift: 26px; --nav-w: min(calc(100vw - 2 * var(--gutter) - 52px), 760px); }
}
@media (max-width: 430px) {
  .lang-switch { padding: 2px; }
  .lang-switch button { padding: .45rem .42rem !important; font-size: .68rem !important; }
}
@media (max-width: 680px) {
  :root { --nav-shift: 24px; --nav-w: min(calc(100vw - 2 * var(--gutter) - 48px), 760px); }
  .lang-switch button[aria-pressed="true"] { display: none; }
  .lang-switch { padding: 2px; }
}
@media (max-width: 430px) {
  .nav { gap: .4rem; padding: .35rem .35rem .35rem .45rem; }
  .nav-links { gap: 0; }
  .nav-links a, .nav-links button { padding: .5rem .38rem !important; font-size: .72rem; }
  .nav-links .cta { padding: .5rem .6rem !important; }
  .nav-mark img { width: 26px; height: 26px; }
}
@media (max-width: 360px) {
  :root { --nav-w: min(calc(100vw - 2 * var(--gutter) - 42px), 760px); --nav-shift: 21px; }
  .nav { gap: .3rem; padding: .3rem .3rem .3rem .35rem; }
  .nav-links a, .nav-links button { padding: .5rem .3rem !important; font-size: .68rem; }
  .nav-links .cta { padding: .5rem .5rem !important; }
  .nav-mark img { width: 24px; height: 24px; }
  .lang-switch button { padding: .45rem .35rem !important; font-size: .64rem !important; }
}

/* switch sits on the nav's centre line */
.lang-switch { top: calc(14px + var(--nav-h, 58px) / 2); transform: translateY(-50%); }
.nav-hidden .lang-switch { transform: translateY(calc(-50% - 160px)); }
@media (max-width: 680px) {
  .lang-switch button { min-height: 40px; display: flex; align-items: center; justify-content: center; min-width: 40px; }
}
@media (max-width: 900px) { :root { --nav-shift: 45px; --nav-w: min(calc(100vw - 2 * var(--gutter) - 90px), 760px); } }
@media (max-width: 680px) { :root { --nav-shift: 24px; --nav-w: min(calc(100vw - 2 * var(--gutter) - 48px), 760px); } }
@media (max-width: 360px) { :root { --nav-shift: 21px; --nav-w: min(calc(100vw - 2 * var(--gutter) - 42px), 760px); } }

/* narrow screens: the two research panels stack instead of overflowing */
@media (max-width: 640px) {
  .arena { grid-template-columns: 1fr; }
  .arena .panel { padding: 1.2rem; }
  .chips { flex-wrap: wrap; }
}
.arena .panel { min-width: 0; overflow-wrap: anywhere; }

/* sticky chapter bar: leave room for it when jumping to a chapter, step aside at the contact block */
.chapter, .cs-hero, #contact { scroll-margin-top: 104px; }
.chapbar.done { opacity: 0; pointer-events: none; transform: translateY(-8px); }
.chapbar { transition: top .5s var(--ease), opacity .35s var(--ease), transform .35s var(--ease); }

/* clip sideways overflow without creating a scroll container ('hidden' here breaks
   position:sticky in Safari; 'clip' does not). Older browsers just get no clipping. */
body { overflow-x: clip; }
@supports not (overflow-x: clip) { body { overflow-x: hidden; } }

/* long German compounds must not push the page sideways */
h1, h2, h3, .words .w { overflow-wrap: break-word; hyphens: auto; }

/* very small screens: headings shrink so long words keep their shape */
@media (max-width: 380px) {
  .cs-hero h1 { font-size: clamp(1.9rem, 8.6vw, 2.6rem); }
  .hero h1 { font-size: clamp(1.9rem, 8.8vw, 2.4rem); }
  .chapter h2, .section-head h2 { font-size: clamp(1.7rem, 8vw, 2.4rem); }
}

/* mobile: pin the chapter bar with fixed positioning (sticky is unreliable inside
   clipped ancestors on iOS Safari) */
@media (max-width: 680px) {
  .chapbar { position: static; }
  .chapbar.pin { position: fixed; top: 76px; left: 0; right: 0; width: auto; max-width: none; padding-inline: var(--gutter); margin: 0; }
  .nav-hidden .chapbar.pin { top: 14px; }
}

/* ============ no28 case study ============ */
.reel-embed { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: clamp(1.4rem, 4vw, 2.6rem); align-items: center; margin-top: clamp(2.2rem, 5vw, 3.4rem); }
.reel-frame { position: relative; border-radius: 22px; overflow: hidden; background: var(--ink); box-shadow: 0 40px 80px -45px rgba(22,20,15,.7); aspect-ratio: 9/16; }
:where(html[data-theme="dark"]) .reel-frame { background: var(--raise); box-shadow: 0 40px 80px -45px rgba(0,0,0,.7); }
.reel-frame img, .reel-frame iframe { width: 100%; height: 100%; object-fit: cover; display: block; border: 0; }
.reel-play { position: absolute; inset: 0; width: 100%; border: 0; background: radial-gradient(circle at 50% 50%, rgba(22,20,15,.35), rgba(22,20,15,.08) 60%); cursor: pointer; display: grid; place-items: center; transition: background .3s; }
.reel-play span { width: 74px; height: 74px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; box-shadow: 0 18px 40px -16px rgba(0,0,0,.7); transition: transform .4s var(--spring); }
.reel-play span::after { content: ''; border-left: 22px solid #fff; border-top: 14px solid transparent; border-bottom: 14px solid transparent; margin-left: 6px; }
.reel-play:hover span { transform: scale(1.08); }
.reel-note { position: absolute; left: 14px; bottom: 12px; color: rgba(244,242,238,.75); font-size: .65rem; }
.reel-side h3 { font-size: clamp(1.5rem, 3vw, 2.2rem); letter-spacing: -.04em; margin: .6rem 0 1rem; }
.reel-side h3 .serif { color: var(--accent); }
.reel-side p { color: var(--ink-2); margin-bottom: .8rem; max-width: 46ch; }
.small-note { font-size: .64rem; color: var(--ink-3); }
.split-media { display: grid; grid-template-columns: minmax(0, 280px) minmax(0, 1fr); gap: clamp(1.4rem, 4vw, 2.6rem); align-items: center; margin-top: 1.8rem; }
.split-media figure, .stills figure { margin: 0; }
.split-media img, .stills img { width: 100%; height: auto; border-radius: 16px; display: block; box-shadow: 0 30px 60px -40px rgba(22,20,15,.6); }
:where(html[data-theme="dark"]) .split-media img, :where(html[data-theme="dark"]) .stills img { box-shadow: 0 30px 60px -40px rgba(0,0,0,.6); }
.split-media figcaption, .stills figcaption { margin-top: .6rem; font-size: .65rem; color: var(--ink-3); }
.split-media .lead { font-size: 1.05rem; margin-bottom: .9rem; }
.stills { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.beats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: 1.8rem; }
.beat { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 1.1rem 1.2rem; position: relative; }
.beat .mono { color: var(--accent-text); display: block; margin-bottom: .5rem; }
.beat p { font-size: .95rem; color: var(--ink-2); }
.prompt-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 1.2rem; margin-top: 1.8rem; }
.promptbox { background: var(--ink); border-radius: var(--radius); padding: 1.3rem 1.4rem; overflow: hidden; }
:where(html[data-theme="dark"]) .promptbox { background: var(--raise); }
.promptbox .mono { color: rgba(244,242,238,.55); }
.promptbox pre { margin: .9rem 0 0; font-family: var(--mono); font-size: .76rem; line-height: 1.65; color: rgba(244,242,238,.9); white-space: pre-wrap; overflow-wrap: anywhere; }
.promptnotes { display: grid; gap: .8rem; align-content: start; }
.promptnotes > div { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: .95rem 1.1rem; }
.promptnotes .mono { color: var(--accent-text); }
.promptnotes p { font-size: .92rem; color: var(--ink-2); margin-top: .4rem; }
.wrongs { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; margin-top: 1.8rem; }
.wrong { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 1.1rem 1.2rem; border-left: 3px solid var(--accent); }
.wrong .mono { color: var(--accent-text); display: block; margin-bottom: .5rem; }
.wrong p { font-size: .93rem; color: var(--ink-2); }
@media (max-width: 860px) {
  .reel-embed, .split-media, .prompt-grid { grid-template-columns: 1fr; }
  .reel-frame { max-width: 320px; margin-inline: auto; }
  .split-media figure { max-width: 300px; margin-inline: auto; }
  .stills, .beats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) { .stills, .beats { grid-template-columns: 1fr; } }

/* no28: wide figures, toggle pair, attempt tabs */
.wide-figure { margin: 0; }
.wide-figure img { width: 100%; height: auto; border-radius: 18px; display: block; box-shadow: 0 34px 70px -45px rgba(22,20,15,.6); cursor: zoom-in; }
:where(html[data-theme="dark"]) .wide-figure img { box-shadow: 0 34px 70px -45px rgba(0,0,0,.6); }
.wide-figure figcaption { margin-top: .6rem; font-size: .65rem; color: var(--ink-3); }
.stills img, .split-media img { cursor: zoom-in; }
.toggle-pair { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 1rem; }
.tp-stage { position: relative; border-radius: 14px; overflow: hidden; background: var(--bg-deep); aspect-ratio: 4/3; }
.tp-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity .45s var(--ease); }
.tp-img.on { opacity: 1; }
.tp-ctrl { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--ink); margin-top: .9rem; }
:where(html[data-theme="dark"]) .tp-ctrl { background: var(--raise); }
.tp-ctrl button { border: 0; background: transparent; color: rgba(244,242,238,.65); font-size: .85rem; padding: .5rem 1rem; border-radius: 999px; cursor: pointer; transition: background .3s, color .3s; }
.tp-ctrl button.on { background: var(--accent); color: #fff; }
.attempts { margin-top: 1.8rem; }
.att-tabs { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--bg-deep); width: max-content; max-width: 100%; overflow-x: auto; }
.att-tabs button { border: 0; background: transparent; color: var(--ink-2); font-size: .88rem; padding: .55rem 1.1rem; border-radius: 999px; cursor: pointer; white-space: nowrap; transition: background .3s, color .3s; }
.att-tabs button[aria-selected="true"] { background: var(--ink); color: var(--bg); }
:where(html[data-theme="dark"]) .att-tabs button[aria-selected="true"] { background: var(--raise); color: #F2F0EC; }
.att-panels { margin-top: 1rem; }
.att { display: none; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 1.4rem 1.5rem; }
.att.on { display: block; animation: attin .45s var(--ease); }
@keyframes attin { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.att .mono { color: var(--accent-text); }
.att h4 { font-size: 1.35rem; letter-spacing: -.03em; margin: .5rem 0 .7rem; }
.att p { color: var(--ink-2); max-width: 70ch; }
.att ul { margin: 1rem 0 0; padding: 0; list-style: none; display: grid; gap: .55rem; }
.att li { position: relative; padding-left: 1.3rem; color: var(--ink-2); font-size: .95rem; }
.att li::before { content: ''; position: absolute; left: 0; top: .55em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.att li b { color: var(--ink); font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .att.on { animation: none; } }

/* no28: copy button + pending-content notes */
.copyable .pb-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.copy-btn { font-family: var(--mono); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; padding: .4rem .8rem; border-radius: 999px; border: 1px solid rgba(244,242,238,.25); background: transparent; color: var(--bg); cursor: pointer; transition: background .25s, color .25s, border-color .25s; }
:where(html[data-theme="dark"]) .copy-btn { color: #F2F0EC; }
.copy-btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.copy-btn.done { background: #3CCB7F; border-color: #3CCB7F; color: var(--ink); }
.todo { border: 1px dashed var(--line); border-radius: 14px; padding: .9rem 1.1rem; background: var(--bg-deep); margin-top: 1.4rem; }
.todo .mono { color: var(--accent-text); }
.todo p { font-size: .9rem; color: var(--ink-2); margin-top: .3rem; }

/* no28 v2: tag colours, stretched media, comic claim, generation ladder */
.tag.ink { background: var(--ink); color: var(--bg); }
:where(html[data-theme="dark"]) .tag.ink { background: var(--raise); color: #F2F0EC; }
.tag.tint-4 { background: #E7E2D4; color: #6A5A2E; }
:where(html[data-theme="dark"]) .tag.tint-4 { background: #302B1F; color: #D8C99A; }
.tag.tint-5 { background: #FBE3E8; color: #A33B57; }
:where(html[data-theme="dark"]) .tag.tint-5 { background: #3A1E27; color: #F2A0B5; }
h2.one-line { white-space: nowrap; }
@media (max-width: 900px) { h2.one-line { white-space: normal; } }
.split-media.stretch { align-items: stretch; }
.split-media.stretch figure { display: flex; flex-direction: column; }
.split-media.stretch figure img { flex: 1; min-height: 0; object-fit: cover; }
.comic-wrap { position: relative; display: block; container-type: inline-size; }
.comic-wrap img { display: block; }
.gens { display: grid; gap: 1.2rem; margin-top: 1.8rem; }
.gen { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 1.4rem 1.5rem; }
.gen-head h3, .gen-head h4 { font-size: 1.3rem; letter-spacing: -.03em; margin: .4rem 0 .6rem; }
.gen-head > p { color: var(--ink-2); max-width: 70ch; font-size: .98rem; }
.gen-n { color: var(--accent-text); }
.changes { margin: .9rem 0 0; padding: 0; list-style: none; display: grid; gap: .5rem; }
.changes li { font-size: .9rem; color: var(--ink-2); line-height: 1.5; }
.changes b { color: var(--ink); background: var(--accent-soft); padding: .05em .3em; border-radius: 5px; font-weight: 500; }
.chg { font-family: var(--mono); font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; padding: .2rem .45rem; border-radius: 999px; background: var(--ink); color: var(--bg); margin-right: .5rem; }
:where(html[data-theme="dark"]) .chg { background: var(--raise); color: #F2F0EC; }
.gen-shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; margin-top: 1.2rem; align-items: start; }
.gen-shots figure { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: .9rem; align-items: start; }
.gen-shots figure { margin: 0; }
.gen-shots img { width: 150px; height: auto; border-radius: 10px; display: block; cursor: zoom-in; border: 2px solid transparent; }
.gen-shots .bad img { border-color: rgba(201,58,22,.55); }
.gen-shots .good img { border-color: rgba(31,107,74,.55); }
.gen-shots figcaption { font-size: .85rem; color: var(--ink-2); line-height: 1.5; }
.gen-shots .fl { margin-bottom: .4rem; }
.fl { display: inline-block; font-family: var(--mono); font-size: .6rem; letter-spacing: .08em; text-transform: uppercase; padding: .22rem .5rem; border-radius: 999px; background: var(--tint-mk); color: var(--tint-mk-ink); margin-right: .5rem; }
.fl.ok { background: var(--tint-md); color: var(--tint-md-ink); }
.gen-prompt { margin-top: 1.1rem; background: var(--ink); border-radius: 14px; padding: .9rem 1.1rem; }
:where(html[data-theme="dark"]) .gen-prompt { background: var(--raise); }
.gen-prompt summary { cursor: pointer; color: rgba(244,242,238,.75); list-style: none; }
.gen-prompt summary::-webkit-details-marker { display: none; }
.gen-prompt summary::after { content: ' ▾'; color: var(--accent); }
.gen-prompt[open] summary::after { content: ' ▴'; }
.gen-prompt .pb-head { margin-top: .9rem; }
.gen-prompt pre { margin: .7rem 0 0; font-family: var(--mono); font-size: .74rem; line-height: 1.6; color: rgba(244,242,238,.9); white-space: pre-wrap; overflow-wrap: anywhere; }
.prompt-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; }
.prompt-pair pre { max-height: 420px; overflow: auto; }
@media (max-width: 980px) { .gen-shots, .prompt-pair { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .gen-shots figure { grid-template-columns: 110px minmax(0,1fr); } .gen-shots img { width: 110px; } }

/* ============ no28 page: one right-hand limit for everything ============ */
.cs-ai .lead,
.cs-ai .chapter p,
.cs-ai .att p,
.cs-ai .att li,
.cs-ai .gen-head > p,
.cs-ai .changes li,
.cs-ai .panel p,
.cs-ai .promptnotes p,
.cs-ai .wrong p,
.cs-ai .reflect p,
.cs-ai .reel-side p { max-width: none; }
.cs-ai .chapbar-inner, .cs-kz .chapbar-inner { justify-content: space-between; }
@media (max-width: 900px) { .cs-ai .chapbar-inner, .cs-kz .chapbar-inner { justify-content: flex-start; } }

/* changed lines inside a prompt */
.gen-prompt mark.ch, .promptbox mark.ch { background: rgba(255,106,56,.16); color: #FFB08A; border-radius: 4px; padding: .05em .15em; box-shadow: 0 0 14px rgba(255,106,56,.45); text-shadow: 0 0 10px rgba(255,106,56,.35); }
/* narration dropdown matches the voice box height when closed */
.prompt-pair { align-items: stretch; }
.prompt-drop { height: 100%; display: flex; flex-direction: column; }
.prompt-drop:not([open]) summary { flex: 1; display: grid; place-items: center; text-align: center; }
.prompt-drop summary::after { content: ' ▾'; color: var(--accent); }
.prompt-drop[open] summary::after { content: ' ▴'; }
.prompt-drop[open] { display: block; }

/* ============ no28: every prompt is a labelled dropdown ============ */
.pdrop { background: var(--ink); border-radius: 16px; overflow: hidden; }
:where(html[data-theme="dark"]) .pdrop { background: var(--raise); }
.pdrop summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .8rem; padding: 1rem 1.1rem 1rem 1.2rem; color: var(--bg); user-select: none; }
:where(html[data-theme="dark"]) .pdrop summary { color: #F2F0EC; }
.pdrop summary::-webkit-details-marker { display: none; }
.pd-tag { font-family: var(--mono); font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; padding: .3rem .6rem; border-radius: 999px; background: var(--accent); color: #fff; flex: none; }
.pd-title { font-family: var(--mono); font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: rgba(244,242,238,.82); flex: 1; min-width: 0; }
.pd-icon { flex: none; width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(244,242,238,.25); display: grid; place-items: center; transition: background .25s, border-color .25s; }
.pd-icon::before { content: ''; width: 8px; height: 8px; border-right: 2px solid var(--bg); border-bottom: 2px solid var(--bg); transform: translateY(-2px) rotate(45deg); transition: transform .35s var(--ease); }
.pdrop summary:hover .pd-icon { background: var(--accent); border-color: var(--accent); }
.pdrop[open] .pd-icon::before { transform: translateY(2px) rotate(-135deg); }
.pdrop summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 16px; }
.pd-body { padding: 0 1.2rem 1.2rem; border-top: 1px solid rgba(244,242,238,.1); }
.pd-actions { display: flex; justify-content: flex-end; padding-top: .9rem; }
.pdrop pre { margin: .8rem 0 0; font-family: var(--mono); font-size: .76rem; line-height: 1.65; color: rgba(244,242,238,.9); white-space: pre-wrap; overflow-wrap: anywhere; }
.pdrop mark.ch { background: rgba(255,106,56,.16); color: #FFB08A; border-radius: 4px; padding: .05em .15em; box-shadow: 0 0 14px rgba(255,106,56,.45); text-shadow: 0 0 10px rgba(255,106,56,.35); }
.gen .pdrop { margin-top: 1.1rem; }
.prompt-pair { align-items: start; }
.prompt-pair .pdrop pre { max-height: none; }

/* larger generation screenshots */
.gen-shots figure { grid-template-columns: 240px minmax(0, 1fr); }
.gen-shots img { width: 240px; }
@media (max-width: 1100px) { .gen-shots { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .gen-shots figure { grid-template-columns: 1fr; } .gen-shots img { width: 100%; max-width: 320px; } }

/* ============ no28 v3 ============ */
/* 01 + 05: image top sits on the cap height of the first line, bottom on the last */
.split-media.stretch > div > .lead:first-child { margin-top: 0; }
.split-media.stretch figure { padding-top: calc(1.05rem * .443); }
/* 03: two sheets side by side, prompts under each */
.sheet-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; margin-top: 1.6rem; align-items: start; }
.sheet-col { display: grid; gap: 1rem; }
.sheet-col .toggle-pair { padding: 1rem; }
.sheet-col .tp-stage { cursor: zoom-in; }
.tp-img:not(.on) { pointer-events: none; }
.sheet-foot { display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; margin-top: .9rem; min-height: 46px; }
.sheet-foot .mono { color: var(--ink-3); }
.sheet-foot .tp-ctrl { margin-top: 0; }
@media (max-width: 860px) { .sheet-pair { grid-template-columns: 1fr; } }
/* lightbox fills the screen */
.lightbox img { max-height: 92vh; max-width: 96vw; }
/* 04: larger fail/fix text */
.gen-shots figcaption { font-size: 1.02rem; line-height: 1.55; }
/* 05: narration open state = voice design open state, scrolls inside */
.voice-pair .pdrop pre { overflow: auto; }
/* 06: room between the description and the prompt */
#music .pdrop { margin-top: 1.8rem; }
/* image spans cap-height of the first line to the baseline of the last; caption hangs below */
.split-media.stretch figure { position: relative; padding-bottom: calc(1.05rem * .443); }
.split-media.stretch figcaption { position: absolute; top: 100%; left: 0; right: 0; margin-top: .2rem; }
.split-media.stretch { margin-bottom: 3.2rem; }
.split-media.stretch figure { min-height: 0; }
.split-media.stretch figure img { position: absolute; left: 0; right: 0; top: calc(1.05rem * .443); bottom: calc(1.05rem * .443); width: 100%; height: calc(100% - 2 * 1.05rem * .443); object-fit: cover; }
.split-media.stretch > div > .lead:last-child { margin-bottom: 0; }
@media (max-width: 860px) {
  .split-media.stretch figure { min-height: 0; padding: 0; }
  .split-media.stretch figure img { position: static; height: auto; }
  .split-media.stretch figcaption { position: static; margin-top: .6rem; }
}
.sheet-col .pdrop pre { overflow: auto; }
.pdrop pre { overflow: auto; }

/* no28 audit: fail labels on their own line; compact generation shots on phones */
.gen-shots .fl { display: table; margin: 0 0 .5rem; }
@media (max-width: 520px) {
  .gen-shots figure { display: flow-root; }
  .gen-shots img { float: left; width: 42%; max-width: 170px; margin: 0 .9rem .6rem 0; }
  .gen-shots figcaption { font-size: .95rem; line-height: 1.5; }
}
@media (max-width: 420px) {
  .pdrop summary { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "tag . icon" "title title title"; row-gap: .6rem; padding: .9rem 1rem; }
  .pdrop .pd-tag { grid-area: tag; justify-self: start; }
  .pdrop .pd-icon { grid-area: icon; }
  .pdrop .pd-title { grid-area: title; line-height: 1.5; }
}

@media (max-width: 360px) { .cv-menu { min-width: 170px; } }
h2.one-line { max-width: none; }
html:not([lang="de"]) pre[data-l="de"], html[lang="de"] pre[data-l="en"] { display: none; }
@media (min-width: 901px) {
  .work-grid.even > .work-card { grid-column: span 6; }
  .cs-grid.pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cs-grid.pair .work-card { grid-column: auto; }
}
@media (max-width: 900px) { .cs-grid { grid-template-columns: minmax(0, 1fr); } }
.work-tags { flex-wrap: wrap; }
/* ---- short portfolio pages ---- */
.pf-cover { margin-top: clamp(2rem, 5vw, 3rem); border-radius: var(--radius); overflow: hidden; box-shadow: 0 40px 80px -50px rgba(22,20,15,.6); }
:where(html[data-theme="dark"]) .pf-cover { box-shadow: 0 40px 80px -50px rgba(0,0,0,.6); }
.pf-cover img { display: block; width: 100%; height: auto; }
.pf-chapter { padding-top: clamp(3.5rem, 8vw, 6rem); }
.pf-mine { margin-top: 1.6rem; padding: 1.3rem 1.4rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.pf-mine h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); letter-spacing: -.02em; line-height: 1.25; margin-top: .6rem; }
.pf-film { padding-top: clamp(1.5rem, 4vw, 2.5rem); }
.pf-film .reel-frame { max-width: 340px; margin-inline: auto; }
.pf-sheets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1rem, 2vw, 1.5rem); margin-top: clamp(2rem, 5vw, 3rem); }
.pf-sheets figure { margin: 0; padding: .8rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.pf-sheets img { display: block; width: 100%; height: auto; border-radius: 10px; cursor: zoom-in; }
.pf-sheets figcaption { margin-top: .8rem; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
@media (max-width: 640px) { .pf-sheets { grid-template-columns: minmax(0, 1fr); } }
.pf-links { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.6rem; }
.pf-links.pf-bottom { margin-top: clamp(2.5rem, 6vw, 4rem); padding-bottom: clamp(3rem, 8vw, 6rem); }
.pf-block { margin-top: clamp(2.5rem, 6vw, 4rem); }
.pf-bhead { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .4rem 1.5rem; align-items: end; margin-bottom: 1.4rem; }
.pf-bhead h3 { font-size: clamp(1.3rem, 2.4vw, 1.7rem); letter-spacing: -.03em; grid-column: 1; }
.pf-bhead p { color: var(--ink-2); margin: 0; line-height: 1.55; max-width: 62ch; grid-column: 1; }
.pf-seg { grid-column: 2; grid-row: 1 / span 2; align-self: end; }
.pf-grid { display: grid; gap: clamp(.8rem, 1.6vw, 1.2rem); }
.pf-grid[hidden] { display: none; }
.pf-grid.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pf-grid.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pf-s { margin: 0; display: flex; flex-direction: column; gap: .6rem; }
.pf-sbox { border-radius: var(--radius); overflow: hidden; background: var(--kz-bg); }
.pf-sbox img { display: block; width: 100%; height: auto; cursor: zoom-in; }
.pf-grid.modal .pf-sbox { display: grid; place-items: center; padding: clamp(.8rem, 2vw, 1.6rem); flex: 1; }
.pf-grid.modal .pf-sbox img { border-radius: 10px; }
.pf-grid.modal.g2 .pf-sbox img { max-width: 440px; }
.pf-s figcaption { font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.pf-notes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(.8rem, 1.6vw, 1.2rem); margin-top: 1.6rem; }
.pf-note { padding: 1.3rem 1.4rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.pf-note p { margin: .7rem 0 0; color: var(--ink-2); line-height: 1.6; }
@media (max-width: 900px) { .pf-grid.g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pf-bhead { grid-template-columns: minmax(0, 1fr); } .pf-seg { grid-column: 1; grid-row: auto; justify-self: start; margin-top: .6rem; } }
@media (max-width: 640px) { .pf-grid.g2, .pf-notes { grid-template-columns: minmax(0, 1fr); } }
.pf-label { display: block; margin-top: 2rem; color: var(--ink-2); }
.pf-flips { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 1rem; }
.pf-flips .flip, .pf-flips .flip-inner { min-height: 240px; }
.pf-flips .flip-front h3 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); margin-top: 0; }
.pf-flips .flip-back h3 { font-size: 1.35rem; }
.pf-links.pf-mid { margin-top: 2rem; }
.pf-film-grid { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; padding-top: clamp(1.5rem, 4vw, 2.5rem); }
.pf-film-clip .reel-frame { max-width: 340px; margin: 0; }
.pf-drops { display: flex; flex-direction: column; gap: .8rem; margin-top: 1.2rem; }
.pf-drop { border-radius: var(--radius); overflow: hidden; }
.pf-drop.c1 { background: var(--tint-md); --dk: var(--tint-md-ink); }
.pf-drop.c2 { background: #E7E2D4; --dk: #6A5A2E; }
:where(html[data-theme="dark"]) .pf-drop.c2 { background: #302B1F; }
.pf-drop.c3 { background: var(--tint-mk); --dk: var(--tint-mk-ink); }
.pf-drop.c4 { background: var(--tint-ux); --dk: var(--tint-ux-ink); }
.pf-drop summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.3rem; font-family: var(--mono); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--dk); }
.pf-drop summary::-webkit-details-marker { display: none; }
.pf-drop .pd-icon { border: 0; width: 30px; height: 30px; border-radius: 50%; flex: none; background: rgba(255,255,255,.6); position: relative; transition: transform .7s cubic-bezier(.65,0,.35,1); }
:where(html[data-theme="dark"]) .pf-drop .pd-icon { background: rgba(255,255,255,.08); }
.pf-drop .pd-icon::before { content: ''; position: absolute; left: 50%; top: 45%; width: 8px; height: 8px; border-right: 1.6px solid var(--dk); border-bottom: 1.6px solid var(--dk); transform: translate(-50%, -50%) rotate(45deg); }
.pf-drop.is-open .pd-icon { transform: rotate(180deg); }
.pf-drop summary:focus-visible { outline: 2px solid var(--dk); outline-offset: -2px; border-radius: var(--radius); }
.pf-drop-body { overflow: hidden; transition: height .7s cubic-bezier(.65,0,.35,1); }
.pf-drop p { margin: 0; padding: 0 1.3rem 1.3rem; color: var(--ink); line-height: 1.6; }
.js .pf-drop .pf-drop-body p { opacity: 0; transition: opacity .7s cubic-bezier(.65,0,.35,1); }
.js .pf-drop.is-open .pf-drop-body p { opacity: 1; }
.pf-chapter#characters .pf-notes { margin-top: clamp(1rem, 2vw, 1.5rem); }
@media (max-width: 900px) { .pf-flips { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pf-film-grid { grid-template-columns: minmax(0, 1fr); } .pf-film-clip .reel-frame { margin-inline: auto; } }
@media (max-width: 480px) { .pf-flips { grid-template-columns: minmax(0, 1fr); } }
/* universal: body text runs to the right limit of the content area */
.lead, .chapter p, .pf-chapter p, .pf-bhead p, .reel-side p, .att p, .gen-head > p, .reflect p, .work-meta p, .legal { max-width: none; }
.pf-flips .flip-front { border: 0; }
.pf-flips .flip-front.t1 { background: var(--tint-ux); color: var(--tint-ux-ink); }
.pf-flips .flip-front.t2 { background: var(--tint-md); color: var(--tint-md-ink); }
.pf-flips .flip-front.t3 { background: var(--tint-mk); color: var(--tint-mk-ink); }
.pf-flips .flip-front.t4 { background: #FBE3E8; color: #A33B57; }
:where(html[data-theme="dark"]) .pf-flips .flip-front.t4 { background: #3A1E27; color: #F2A0B5; }
.pf-flips .flip-inner { transition: transform .8s cubic-bezier(.65,0,.35,1); }


/* ---- light / dark theme switch: same look as the language switch ---- */
.theme-switch {
  position: fixed; z-index: 90;
  top: calc(14px + var(--nav-h, 58px) / 2);
  left: calc(50% - var(--nav-shift) + var(--nav-w) / 2 + 8px + var(--lang-w, 78px) + 6px);
  transform: translateY(-50%);
  display: inline-flex; align-items: center; gap: 1px; padding: 3px; margin: 0;
  background: rgba(251, 250, 248, .72);
  backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid rgba(22, 20, 15, .08); border-radius: 999px;
  box-shadow: 0 8px 30px -14px rgba(22, 20, 15, .25);
  transition: transform .5s var(--ease);
}
:where(html[data-theme="dark"]) .theme-switch { background: rgba(28,28,31,.72); border: 1px solid rgba(255,255,255,0.08); box-shadow: 0 8px 30px -14px rgba(0,0,0, .25); }
.nav-hidden .theme-switch { transform: translateY(calc(-50% - 160px)); }
.theme-switch button { display: flex; align-items: center; justify-content: center; height: var(--lang-bh, 32px); padding: 0 .55rem; border-radius: 999px; border: 0; background: transparent; color: var(--ink-3); cursor: pointer; transition: color .25s, background .25s; }
.theme-switch button:hover { color: var(--ink); }
.theme-switch button[aria-pressed="true"] { color: var(--accent); background: var(--accent-soft); }
.theme-switch svg { width: 15px; height: 15px; display: block; }
.theme-switch button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (min-width: 901px) {
  :root { --nav-w: min(calc(100vw - 2 * var(--gutter) - 170px), 760px); --nav-shift: max(0px, calc(var(--nav-w) / 2 + 170px + var(--gutter) - 50vw)); }
}
@media (max-width: 900px) {
  .theme-switch { left: calc(50% - var(--nav-shift) + var(--nav-w) / 2 + 8px); top: calc(14px + var(--nav-h, 58px) / 2 + var(--lang-h, 40px) / 2 + 6px); transform: none; }
  .nav-hidden .theme-switch { transform: translateY(-220px); }
}
@media (max-width: 680px) {
  .theme-switch { padding: 2px; }
  .theme-switch button[aria-pressed="true"] { display: none; }
  .theme-switch button { height: auto; min-height: 40px; min-width: 40px; padding: 0 .4rem; }
}
@media print { .theme-switch { display: none !important; } }
html.theme-fade, html.theme-fade body, html.theme-fade *:not(canvas) { transition: background-color .5s ease, color .5s ease, border-color .5s ease, fill .5s ease, stroke .5s ease !important; }

.pipeline .stage-n { color: var(--accent-bright, #FF5A36); }

/* nav: current page */
.nav-links a[aria-current="page"] { position: relative; color: var(--ink); background: var(--bg-deep); box-shadow: inset 0 0 0 1px var(--line-strong); }
.nav-links a[aria-current="page"]::after { content: ""; position: absolute; left: 50%; bottom: .2rem; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); transform: translateX(-50%); }
.nav-links a[aria-current="page"]:hover { box-shadow: inset 0 0 0 1px var(--ink-3); }

/* == dark theme: generated == */
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0A0A0B; --bg-deep: #141416; --surface: #1C1C1F; --raise: #26262A; --line: #2C2C31; --line-strong: #4A4A52;
  --ink: #F2F0EC; --ink-2: #B3AEA6; --ink-3: #8A847B;
  --accent: #E04A26; --accent-bright: #FF7A50; --accent-text: #FF8A66; --accent-soft: rgba(255,106,69,.16);
  --tint-ux: #26224A; --tint-ux-ink: #BDB4FF;
  --tint-mk: #3A2219; --tint-mk-ink: #FF9E7C;
  --tint-md: #15302A; --tint-md-ink: #86DDB4;
}
html[data-theme="dark"] .blob { opacity: .14; }
html[data-theme="dark"] .hero-award circle[fill="#16140F"] { fill: #26262A; }
html[data-theme="dark"] .journey svg [stroke="#16140F"] { stroke: var(--ink); }
html[data-theme="dark"] .journey svg [fill="#16140F"] { fill: var(--ink); }
html[data-theme="dark"] .journey svg [stroke="#DCD8D0"] { stroke: var(--line-strong); }
html[data-theme="dark"] .journey svg [fill="#9A948A"] { fill: var(--ink-3); }
html[data-theme="dark"] .pf-drop.c2 { --dk: #D8C99A; }
html[data-theme="dark"] .lang-switch button[aria-pressed="true"], html[data-theme="dark"] .theme-switch button[aria-pressed="true"] { color: var(--accent-text); }
/* == dark theme: end == */
