/* Dark-only site. Layout: light dotted hero, a scrolling 'selected work' strip, soft gray project cards with tilted-shape covers, one black band for the approach. Blue is an accent only. Reading column ~680px, exhibits 920px. Yellow marks draft fields. */
:root {
  --paper: #FAFAFB;
  --sheet: #EEF0F3;
  --sheet-hover: #E8EBEF;
  --dot: #D5D9E0;
  --rule-strong: #C9CED8;
  --tile: #FFFFFF;
  --tile-dark: #12151B;
  --shape: #D6E0FC;
  --shape-dark: #262B36;
  --ink: #0B0D12;
  --muted: #5B6270;
  --rule: #E3E6ED;
  --accent: #2747E6;
  --accent-soft: #EDF1FD;
  --break: #0B0D12;
  --break-soft: #EEF0F3;
  --todo-bg: #FFF4C2;
  --todo-ink: #6A5300;
  --todo-line: #D9B52E;
  --font-display: "Geist", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: "Geist", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --blue: #1E3FD8;
  --blue-fixed: #1E3FD8;
  --night: #0B0D12;
  --night-fixed: #0B0D12;
  --accent-fixed: #2F55F0;
  --cover-pale: #E9EEFD;
  --on-band: #FFFFFF;
  --on-band-muted: rgba(255, 255, 255, 0.74);
  --on-band-line: rgba(255, 255, 255, 0.28);
  --on-band-faint: rgba(255, 255, 255, 0.08);
  --device: #FFFFFF;
  --device-ink: #0B0D12;
  --device-muted: #6B7280;
  --device-line: #E8EBF2;
  --read: 680px;
  --wide: 920px;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
/* Dark-only by choice: these override the light values above. */
:root {
    --paper: #0B0D12; --sheet: #151922; --ink: #F2F4F8; --muted: #9AA3B2; --rule: #252B37;
    --accent: #7C9CFF; --accent-soft: #1A2240; --break: #F2F4F8; --break-soft: #1E2330;
    --todo-bg: #3A3210; --todo-ink: #F2DC86; --todo-line: #8F7A25;
    --blue: #2441C9; --night: #151922; --cover-pale: #1A2240; --device: #1E232D; --device-ink: #F2F4F8; --device-muted: #9AA3B2; --device-line: #2A3040;
    --sheet-hover: #1B2029; --dot: #232936; --rule-strong: #343B4A; --tile: #1B2029; --tile-dark: #07080B; --shape: #23305F; --shape-dark: #1E2330;
    color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.68;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 0 72px;
}
img { max-width: 100%; }
.page { display: grid; gap: 88px; justify-items: center; }
.page > .band + .band, .page > .band + .marquee, .page > #locked > .band:first-child { margin-top: -88px; }
.col { width: 100%; max-width: var(--read); min-width: 0; }
.wide { width: 100%; max-width: var(--wide); min-width: 0; }

h1, h2, h3 { font-family: var(--font-display); text-wrap: balance; line-height: 1.1; margin: 0; letter-spacing: -0.025em; }
h1 { font-size: clamp(2.6rem, 7vw, 4.2rem); font-weight: 600; letter-spacing: -0.04em; }
h2 { font-size: clamp(1.5rem, 3.4vw, 2rem); font-weight: 600; }
h3 { font-size: 1.2rem; font-weight: 600; }
p { margin: 0; }
.stack { display: grid; gap: 18px; }
.label {
  font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted);
}
.mono { font-family: var(--font-mono); }
.muted { color: var(--muted); }
a { color: var(--accent); text-underline-offset: 3px; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

/* draft banner + fill-in fields */
.draft {
  background: var(--todo-bg); color: var(--todo-ink);
  font-family: var(--font-mono); font-size: 0.8rem;
  padding: 10px 14px; border-radius: 6px; border: 1px dashed var(--todo-line);
}
.todo {
  background: var(--todo-bg); color: var(--todo-ink);
  border-bottom: 1px dashed var(--todo-line);
  font-family: var(--font-mono); font-size: 0.85em; padding: 1px 5px; border-radius: 3px;
}

/* case study body */
.dek { font-size: clamp(1.15rem, 2.4vw, 1.35rem); max-width: 40ch; line-height: 1.5; }
.scene { font-size: 1.1rem; border-left: 2px solid var(--accent); padding-left: 18px; max-width: 58ch; }

/* 30-second summary */
.summary { display: grid; border-top: 1px solid var(--rule); }
.summary div { display: grid; grid-template-columns: 9.5rem 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.summary div > * { min-width: 0; }
@media (max-width: 520px) { .summary div { grid-template-columns: 1fr; gap: 4px; } }

/* project facts */
.facts {
  background: var(--sheet); border-radius: 14px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 22px 32px; padding: 28px;
}
.facts div { display: grid; gap: 6px; align-content: start; min-width: 0; }
.facts p { font-size: 1rem; line-height: 1.5; }

/* tables */
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 1rem; }
th, td { text-align: left; padding: 12px 14px 12px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
td.n { font-family: var(--font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--accent); }
td.m { font-weight: 600; white-space: nowrap; }
.table-note { display: grid; gap: 10px; margin-top: 16px; font-size: 1rem; }

/* stage diagram (checkout journey, merchant journey) */
.journey { background: var(--sheet); border-radius: 14px; padding: 32px 28px; display: grid; gap: 20px; }
.track { display: grid; grid-template-columns: repeat(var(--stops, 3), 1fr); gap: 14px; position: relative; }
.track::before { content: ""; position: absolute; left: 4%; right: 4%; top: 22px; height: 2px; background: var(--rule); }
.stop { position: relative; display: grid; gap: 10px; align-content: start; min-width: 0; }
.dot {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: var(--paper); color: var(--ink); border: 1.5px solid var(--ink);
  font-family: var(--font-mono); font-weight: 500; position: relative; z-index: 1;
}
.dot.calm { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.stop h3 { font-size: 1.25rem; }
.stop p { font-size: 0.98rem; color: var(--muted); line-height: 1.5; }
@media (max-width: 680px) {
  .track { grid-template-columns: 1fr; }
  .track::before { left: 22px; right: auto; top: 10px; bottom: 10px; width: 2px; height: auto; }
  .stop { grid-template-columns: 46px 1fr; column-gap: 14px; }
  .stop .dot { grid-row: span 2; }
}

/* findings */
.finding { display: grid; gap: 16px; }
.finding .num { font-family: var(--font-mono); color: var(--accent); font-size: 0.85rem; letter-spacing: 0.06em; }
.stat { display: flex; gap: 14px; align-items: baseline; flex-wrap: wrap; }
.stat b { font-family: var(--font-display); font-size: 2.6rem; font-weight: 600; letter-spacing: -0.03em; line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 1rem; max-width: 42ch; }
blockquote {
  margin: 0; border-left: 2px solid var(--ink); padding: 4px 0 4px 18px;
  font-size: 1.1rem; display: grid; gap: 8px;
}
blockquote cite { font-style: normal; font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted); letter-spacing: 0.04em; }

/* bar charts (HTML bars, width = value on a 0–100% scale) */
.chart { background: var(--sheet); border-radius: 14px; padding: 26px 28px; display: grid; gap: 14px; }
.chart .cap { font-size: 0.95rem; color: var(--muted); }
.bars { display: grid; gap: 10px; }
.bar { display: grid; grid-template-columns: 13rem 1fr 3.4rem; gap: 12px; align-items: center; font-size: 0.95rem; }
.bar > * { min-width: 0; }
.bar .track-b { height: 12px; background: var(--paper); border-radius: 3px; overflow: hidden; }
.bar .fill { height: 100%; background: var(--accent); border-radius: 3px; }
.bar.alt .fill { background: var(--break); }
.bar.quiet .fill { background: var(--muted); opacity: 0.55; }
.bar .v { font-family: var(--font-mono); font-variant-numeric: tabular-nums; text-align: right; }
@media (max-width: 560px) { .bar { grid-template-columns: 1fr 3.2rem; } .bar .track-b { grid-column: 1 / -1; grid-row: 2; } }
.group { display: grid; gap: 8px; }
.group + .group { border-top: 1px solid var(--rule); padding-top: 14px; }

.split { display: flex; height: 40px; border-radius: 6px; overflow: hidden; font-family: var(--font-mono); font-size: 0.85rem; }
.split > div { display: flex; align-items: center; justify-content: center; color: var(--sheet); white-space: nowrap; overflow: hidden; }
.split .a { background: var(--accent); justify-content: flex-start; padding-left: 12px; }
.split .b { background: var(--break); }
.split .c { background: var(--muted); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 0.9rem; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }

.insight {
  border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); padding: 24px 0;
  font-family: var(--font-display); font-size: clamp(1.35rem, 3vw, 1.7rem); line-height: 1.3; font-weight: 500; letter-spacing: -0.02em;
}

/* impact: before / after */
.ba { display: grid; grid-template-columns: 1fr 1fr; border-radius: 14px; overflow: hidden; background: var(--sheet); }
.ba > div { padding: 16px 20px; border-bottom: 1px solid var(--rule); font-size: 1rem; min-width: 0; }
.ba > div:nth-child(odd) { border-right: 1px solid var(--rule); color: var(--muted); }
.ba > div.h { font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); background: var(--sheet); }
.ba > div:nth-last-child(-n+2) { border-bottom: 0; }
@media (max-width: 520px) { .ba { grid-template-columns: 1fr; } .ba > div:nth-child(odd) { border-right: 0; } .ba > div.h:nth-child(2) { display: none; } }

ul.clean, ol.clean { margin: 0; padding-left: 1.1em; display: grid; gap: 8px; }

/* artifacts */
.artifacts { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.art { background: var(--sheet); border: 1px solid transparent; border-radius: 14px; padding: 18px 20px; display: grid; gap: 10px; align-content: start; font-size: 0.95rem; min-width: 0; }
.art.empty { background: transparent; border: 1px dashed var(--rule); color: var(--muted); }
.art ol, .art ul { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; }

.twocol { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
@media (max-width: 640px) { .twocol { grid-template-columns: 1fr; } }
.twocol > div { min-width: 0; }

/* study timeline (case 3) */
.studies { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.study { background: var(--sheet); border-radius: 14px; padding: 18px 20px; display: grid; gap: 10px; align-content: start; min-width: 0; }
.study .when { font-family: var(--font-mono); font-size: 0.78rem; color: var(--accent); letter-spacing: 0.05em; }
.study p { font-size: 0.97rem; line-height: 1.5; }
.study .q { color: var(--muted); }
.studies.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 760px) { .studies, .studies.two { grid-template-columns: 1fr; } }

.chapter { border-top: 1px solid var(--ink); padding-top: 24px; }

.thread { padding-top: 8px; font-family: var(--font-display); font-size: 1.3rem; line-height: 1.4; letter-spacing: -0.015em; }
.next { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-family: var(--font-mono); font-size: 0.85rem; color: var(--muted); }
.next a { text-decoration: none; }
.next a:hover { text-decoration: underline; }

/* ---------- bands: full-width sections ---------- */
.band {
  justify-self: stretch;
  margin-left: calc(-1 * max(16px, env(safe-area-inset-left, 0px)));
  margin-right: calc(-1 * max(16px, env(safe-area-inset-right, 0px)));
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  display: grid; justify-items: center;
}
.band > .inner { width: 100%; max-width: var(--wide); min-width: 0; }
.band.dots { background-color: var(--paper); background-image: radial-gradient(var(--dot) 1px, transparent 1.2px); background-size: 22px 22px; }
.band.night { background: var(--night); color: var(--on-band); }
.band.night .label, .band.night .muted { color: var(--on-band-muted); }
.band.night a { color: var(--on-band); }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.site-head .inner { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; justify-content: space-between; padding-block: 16px; }
.site-head .name { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; color: var(--ink); text-decoration: none; display: inline-flex; gap: 10px; align-items: center; }
.site-head .name i { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); display: inline-block; }
.site-head nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; font-size: 0.92rem; }
.site-head nav a { color: var(--muted); text-decoration: none; }
.site-head nav a:hover, .site-head nav a[aria-current="page"] { color: var(--ink); }
.site-head nav a.pill { color: var(--paper); background: var(--ink); padding: 7px 14px; border-radius: 999px; }

/* ---------- home hero ---------- */
.home-hero .inner { padding-block: clamp(56px, 10vw, 120px) 56px; display: grid; gap: 26px; }
.home-hero .hi { display: inline-flex; align-items: center; gap: 10px; font-size: 1rem; color: var(--muted); }
.home-hero .hi .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.home-hero .thesis { font-family: var(--font-display); font-weight: 600; font-size: clamp(2.4rem, 6.6vw, 4.8rem); line-height: 1.02; letter-spacing: -0.05em; max-width: 15ch; text-wrap: balance; }
.home-hero .thesis .hl { color: var(--accent); position: relative; white-space: nowrap; }
.home-hero .thesis .hl::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0.02em; height: 0.08em; background: var(--accent); border-radius: 2px; transform-origin: left; }
.home-hero .lede { font-size: clamp(1.05rem, 2vw, 1.2rem); max-width: 52ch; color: var(--muted); }
.home-hero .ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 999px; font-weight: 500; font-size: 0.98rem; text-decoration: none; }
.btn.solid { background: var(--ink); color: var(--paper); }
.btn.ghost { border: 1px solid var(--rule-strong); color: var(--ink); background: var(--paper); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.facts-row { display: flex; flex-wrap: wrap; gap: 10px 28px; padding-top: 22px; border-top: 1px solid var(--rule); font-size: 0.92rem; color: var(--muted); }
.facts-row b { color: var(--ink); font-weight: 600; }

/* ---------- marquee ---------- */
.marquee { justify-self: stretch; overflow: hidden; border-block: 1px solid var(--rule); padding-block: 16px; margin-left: calc(-1 * max(16px, env(safe-area-inset-left, 0px))); margin-right: calc(-1 * max(16px, env(safe-area-inset-right, 0px))); }
.marquee .track-m { display: flex; width: max-content; gap: 28px; padding-right: 28px; font-family: var(--font-display); font-weight: 500; font-size: clamp(1.4rem, 3vw, 2rem); letter-spacing: -0.03em; white-space: nowrap; }
.marquee .track-m span::after { content: "✷"; margin-left: 28px; color: var(--accent); }

/* ---------- project showcase ---------- */
.showcase { display: grid; gap: 22px; }
.project {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 40px); align-items: center;
  border-radius: 28px; padding: clamp(14px, 1.6vw, 18px); background: var(--sheet); text-decoration: none; color: var(--ink);
  transition: transform 0.25s ease, background-color 0.25s ease;
}
.project:hover { background: var(--sheet-hover); }
.project:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.project .text { padding: clamp(8px, 2vw, 24px) clamp(8px, 2vw, 24px) clamp(8px, 2vw, 24px) 0; display: grid; gap: 14px; align-content: center; min-width: 0; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tagx { font-size: 0.75rem; padding: 4px 10px; border-radius: 999px; background: var(--ink); color: var(--paper); }
.tagx.soft { background: var(--paper); color: var(--ink); }
.project h3 { font-size: clamp(1.5rem, 3vw, 2.1rem); letter-spacing: -0.04em; }
.project .find { font-size: 1rem; color: var(--muted); }
.project .meta { font-family: var(--font-mono); font-size: 0.76rem; color: var(--muted); }
.project .go { font-weight: 500; display: inline-flex; gap: 8px; align-items: center; }
.project .go .arr { transition: transform 0.2s ease; }
@media (prefers-reduced-motion: no-preference) {
  .project:hover .go .arr { transform: translateX(5px); }
  .project:hover .cover .shape { transform: rotate(-2deg) scale(1.03); }
}
@media (max-width: 760px) {
  .project { grid-template-columns: 1fr; }
  .project .text { padding: 4px 8px 12px; }
}

/* ---------- cover illustrations (HTML/CSS, no images) ---------- */
.cover { position: relative; min-height: 320px; border-radius: 20px; display: grid; place-items: center; padding: 32px; overflow: hidden; min-width: 0; background: var(--tile); }
.cover.dark { background: var(--tile-dark); }
.cover .shape { position: absolute; inset: 14% 12%; border-radius: 28px; background: var(--shape); transform: rotate(-7deg); transition: transform 0.4s ease; }
.cover.dark .shape { background: var(--shape-dark); transform: rotate(6deg); }
.cover .shape.alt { transform: rotate(5deg); }
.cover > .phone, .cover > .dash, .cover > .plan { position: relative; }

/* 1: phone at checkout */
.phone { width: 158px; aspect-ratio: 9 / 18; background: var(--device); border-radius: 26px; padding: 12px; box-shadow: 0 24px 50px -22px rgba(11,13,18,0.5); display: grid; grid-template-rows: auto 1fr auto; gap: 10px; color: var(--device-ink); font-size: 0.72rem; }
.phone .notch { width: 46px; height: 5px; border-radius: 4px; background: var(--device-line); justify-self: center; }
.phone .scr { display: grid; gap: 8px; align-content: center; justify-items: center; text-align: center; }
.phone .ok { width: 40px; height: 40px; border-radius: 50%; background: var(--night-fixed); color: #fff; display: grid; place-items: center; font-size: 1.2rem; font-weight: 600; }
.phone .amt { font-family: var(--font-display); font-size: 1.1rem; font-weight: 600; color: var(--device-ink); }
.phone .ghost { border: 1px dashed var(--device-muted); border-radius: 8px; padding: 6px 8px; color: var(--device-muted); font-family: var(--font-mono); font-size: 0.64rem; width: 100%; }
.phone .btm { height: 26px; border-radius: 8px; background: var(--device-line); }
.bubble { position: absolute; z-index: 2; font-family: var(--font-display); font-weight: 600; font-size: 1rem; color: #fff; background: var(--night-fixed); padding: 8px 14px; border-radius: 16px 16px 16px 4px; box-shadow: 0 10px 24px -14px rgba(0,0,0,0.5); }
.cover .bubble.b1 { top: 16%; left: calc(50% + 62px); }
.receipt { position: absolute; z-index: 1; left: calc(50% - 168px); bottom: 14%; width: 92px; background: #fff; color: var(--night-fixed); font-family: var(--font-mono); font-size: 0.58rem; padding: 10px 9px 14px; display: grid; gap: 4px; transform: rotate(-8deg); box-shadow: 0 12px 26px -16px rgba(0,0,0,0.45); clip-path: polygon(0 0, 100% 0, 100% 92%, 90% 100%, 80% 92%, 70% 100%, 60% 92%, 50% 100%, 40% 92%, 30% 100%, 20% 92%, 10% 100%, 0 92%); }
.receipt i { display: block; height: 4px; background: #D9DCE3; border-radius: 2px; }
.receipt i.s { width: 60%; }
@media (max-width: 440px) { .receipt { left: 6%; } .cover .bubble.b1 { left: auto; right: 6%; } }

/* 2: ads dashboard */
.dash { width: min(280px, 100%); background: var(--device); color: var(--device-ink); border-radius: 18px; padding: 18px; display: grid; gap: 14px; box-shadow: 0 24px 50px -20px rgba(0,0,0,0.6); font-size: 0.75rem; }
.dash .row { display: flex; justify-content: space-between; color: var(--device-muted); font-family: var(--font-mono); font-size: 0.64rem; }
.dash .cols { display: flex; align-items: flex-end; gap: 8px; height: 90px; }
.dash .cols span { display: block; flex: 1; background: var(--accent-fixed); border-radius: 4px 4px 0 0; }
.dash .kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.dash .kpi { background: var(--device-line); border-radius: 10px; padding: 8px; display: grid; gap: 2px; }
.dash .kpi b { font-family: var(--font-display); font-size: 1rem; color: var(--device-ink); }
.dash .kpi.q { background: transparent; border: 1px dashed var(--device-muted); }
.dash .kpi.q b { color: var(--accent-fixed); }

/* 3: installments */
.plan { display: grid; gap: 14px; width: min(300px, 100%); background: var(--device); color: var(--device-ink); border-radius: 18px; padding: 20px; box-shadow: 0 24px 50px -22px rgba(11,13,18,0.5); }
.plan .line { display: grid; gap: 6px; }
.plan .tag2 { font-family: var(--font-mono); font-size: 0.68rem; color: var(--device-muted); }
.plan .pills { display: flex; gap: 5px; }
.plan .pills span { flex: 1; height: 26px; border-radius: 7px; background: var(--device-line); }
.plan .pills span.on { background: var(--night-fixed); }
.plan .line.one .pills span { background: var(--accent-fixed); }
.plan .note { justify-self: start; font-family: var(--font-display); font-weight: 600; font-size: 0.95rem; background: var(--night-fixed); color: #fff; padding: 8px 12px; border-radius: 12px 12px 12px 4px; }

/* ---------- approach band ---------- */
.approach .inner { padding-block: clamp(56px, 9vw, 104px); display: grid; gap: 40px; }
.approach h2 { font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -0.04em; max-width: 18ch; }
.principles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; counter-reset: p; }
.principle { display: grid; gap: 10px; align-content: start; border-top: 1px solid var(--on-band-line); padding-top: 18px; min-width: 0; }
.principle::before { counter-increment: p; content: "0" counter(p); font-family: var(--font-mono); font-size: 0.8rem; color: var(--on-band-muted); }
.principle strong { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; letter-spacing: -0.02em; }
.principle p { font-size: 0.97rem; color: var(--on-band-muted); }
@media (max-width: 860px) { .principles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .principles { grid-template-columns: 1fr; } }
.toolsline { font-size: 0.92rem; color: var(--on-band-muted); }

/* ---------- section heads, about teaser, contact ---------- */
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 10px 24px; }
.section-head h2 { font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -0.04em; }
.teaser { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 48px; align-items: start; }
.teaser h2 { font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -0.04em; }
.teaser .body { display: grid; gap: 16px; font-size: 1.08rem; justify-items: start; }
@media (max-width: 720px) { .teaser { grid-template-columns: 1fr; gap: 20px; } }
.contact { display: grid; gap: 18px; padding: clamp(32px, 6vw, 64px); background: var(--sheet); border-radius: 28px; }
.contact .big { font-family: var(--font-display); font-weight: 600; font-size: clamp(2.4rem, 8vw, 5rem); letter-spacing: -0.05em; line-height: 1; }
.contact .mail { font-size: clamp(1.1rem, 3vw, 1.5rem); font-weight: 500; user-select: all; overflow-wrap: anywhere; }

/* ---------- about page ---------- */
.about-hero .inner { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 48px; align-items: center; padding-block: clamp(56px, 9vw, 104px) 56px; }
.about-hero h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); letter-spacing: -0.05em; line-height: 1; }
.about-hero .lede { margin-top: 20px; font-size: 1.15rem; color: var(--muted); max-width: 46ch; }
.photo { position: relative; justify-self: center; width: min(320px, 100%); aspect-ratio: 4 / 5; }
.photo .shape { position: absolute; inset: 6% -6% -4% 6%; border-radius: 32px; background: var(--shape); transform: rotate(6deg); }
.photo .frame { position: absolute; inset: 0; border-radius: 28px; background: var(--sheet); border: 2px dashed var(--rule-strong); display: grid; place-items: center; text-align: center; padding: 20px; color: var(--muted); font-size: 0.9rem; overflow: hidden; }
.photo .frame img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 720px) { .about-hero .inner { grid-template-columns: 1fr; } .photo { width: min(240px, 80%); order: -1; } }
.cards3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card3 { background: var(--sheet); border-radius: 20px; padding: 22px 24px; display: grid; gap: 8px; align-content: start; min-width: 0; }
.card3 strong { font-family: var(--font-display); font-size: 1.1rem; font-weight: 600; }
.card3 p, .card3 li { font-size: 0.98rem; color: var(--muted); }
.card3 ul { margin: 0; padding-left: 1.1em; display: grid; gap: 4px; }
@media (max-width: 760px) { .cards3 { grid-template-columns: 1fr; } }

/* ---------- case study hero ---------- */
.case-hero .inner { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 40px; align-items: center; padding-block: clamp(56px, 8vw, 96px) clamp(40px, 6vw, 72px); }
.case-hero h1 { font-size: clamp(2.8rem, 7vw, 4.8rem); letter-spacing: -0.05em; line-height: 0.98; }
.case-hero .dek { color: var(--muted); margin-top: 18px; }
.case-hero .stats { display: flex; flex-wrap: wrap; gap: 18px 32px; margin-top: 28px; }
.case-hero .stats div { display: grid; }
.case-hero .stats b { font-family: var(--font-display); font-size: 1.9rem; font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; }
.case-hero .stats span { font-size: 0.85rem; color: var(--muted); }
@media (max-width: 760px) { .case-hero .inner { grid-template-columns: 1fr; } .case-hero .cover { min-height: 280px; } }

.site-foot { width: 100%; max-width: var(--wide); border-top: 1px solid var(--rule); padding-top: 18px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: 0.85rem; color: var(--muted); }
.prose { max-width: var(--read); }

@media (prefers-reduced-motion: no-preference) {
  .fill { animation: grow 0.9s ease-out both; transform-origin: left; }
  @keyframes grow { from { transform: scaleX(0.02); } to { transform: scaleX(1); } }
  .home-hero .thesis .hl::after { animation: mark 0.9s 0.3s cubic-bezier(.2,.7,.2,1) both; }
  @keyframes mark { from { transform: scaleX(0); } to { transform: scaleX(1); } }
  .rise { animation: rise 0.7s cubic-bezier(.2,.7,.2,1) both; }
  .rise.d1 { animation-delay: 0.08s; } .rise.d2 { animation-delay: 0.16s; } .rise.d3 { animation-delay: 0.24s; }
  @keyframes rise { from { transform: translateY(14px); } to { transform: none; } }
  .marquee .track-m { animation: slide 38s linear infinite; }
  @keyframes slide { from { transform: translateX(0); } to { transform: translateX(-50%); } }
}

/* 2b: checkout with wallet toggle */
.checkout { width: min(290px, 100%); background: var(--device); color: var(--device-ink); border-radius: 18px; padding: 16px; display: grid; gap: 8px; box-shadow: 0 24px 50px -22px rgba(11,13,18,0.5); font-size: 0.78rem; position: relative; }
.checkout .h { font-family: var(--font-mono); font-size: 0.64rem; color: var(--device-muted); margin-bottom: 2px; }
.checkout .opt { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; background: var(--device-line); }
.checkout .opt .r { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--device-muted); flex: none; }
.checkout .opt.sel .r { border: 4px solid var(--night-fixed); }
.checkout .wal { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 10px; border-radius: 10px; border: 1px dashed var(--device-muted); align-items: center; }
.checkout .wal small { grid-column: 1; color: var(--device-muted); font-size: 0.68rem; }
.checkout .tg { grid-row: 1 / span 2; grid-column: 2; width: 34px; height: 20px; border-radius: 999px; background: var(--device-muted); position: relative; opacity: 0.6; }
.checkout .tg::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; }
.checkout .pay { height: 30px; border-radius: 9px; background: var(--night-fixed); margin-top: 4px; }
.cover .bubble.b2 { top: 12%; right: 8%; }

/* 4: merchant report */
.report { width: min(300px, 100%); background: var(--device); color: var(--device-ink); border-radius: 18px; padding: 16px; display: grid; gap: 10px; box-shadow: 0 24px 50px -22px rgba(11,13,18,0.5); font-size: 0.72rem; position: relative; }
.report .top { display: flex; justify-content: space-between; align-items: center; }
.report .range { font-family: var(--font-mono); font-size: 0.64rem; background: var(--device-line); padding: 4px 8px; border-radius: 6px; }
.report .exp { font-family: var(--font-mono); font-size: 0.62rem; color: #fff; background: var(--night-fixed); padding: 4px 8px; border-radius: 6px; }
.report table { font-family: var(--font-mono); font-size: 0.62rem; width: 100%; border-collapse: collapse; }
.report td { padding: 5px 4px; border-bottom: 1px solid var(--device-line); color: var(--device-muted); }
.report td.bad { color: var(--accent-fixed); font-weight: 600; }
.cover > .checkout, .cover > .report { position: relative; }

.cover.dark .bubble { background: #fff; color: var(--night-fixed); }

/* hero dot field (canvas replaces the CSS dots when JS runs) */
.home-hero { position: relative; overflow: hidden; }
.home-hero .dotfield { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.home-hero > .inner { position: relative; z-index: 1; }
.home-hero.has-field { background-image: none; }

/* ---------- password lock ---------- */
.lock-band .inner { padding-block: clamp(56px, 10vw, 120px); display: grid; justify-items: center; }
.lock-card { width: 100%; max-width: 560px; background: var(--sheet); border: 1px solid var(--rule); border-radius: 28px; padding: clamp(28px, 5vw, 48px); display: grid; gap: 14px; justify-items: start; }
.lock-card .icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--paper); font-size: 1.2rem; }
.lock-card h1 { font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -0.04em; }
.lock-card form { display: flex; flex-wrap: wrap; gap: 10px; width: 100%; margin-top: 6px; }
.lock-card input { flex: 1 1 220px; min-width: 0; font: inherit; font-size: 1rem; color: var(--ink); background: var(--paper); border: 1px solid var(--rule-strong); border-radius: 999px; padding: 11px 18px; transition: border-color 0.2s ease; }
.lock-card input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lock-card button { font: inherit; border: 0; cursor: pointer; }
.lock-card .err { color: #F28B82; font-size: 0.95rem; }
.lock-card .hint { font-size: 0.9rem; color: var(--muted); }
.lock-card .back { font-size: 0.92rem; color: var(--muted); text-decoration: none; margin-top: 6px; }
.lock-card .back:hover { color: var(--ink); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#locked { display: contents; }
.lock-card.shake { animation: shake 0.35s ease; }
@keyframes shake { 0%,100% { transform: none; } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
[hidden] { display: none !important; }

/* about: toolbox */
.toolbox2 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tgroup { background: var(--sheet); border-radius: 20px; padding: 22px 24px; display: grid; gap: 14px; align-content: start; min-width: 0; }
.tlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.tlist li { padding-bottom: 10px; border-bottom: 1px solid var(--rule); font-size: 1rem; }
.tlist li:last-child { border-bottom: 0; padding-bottom: 0; }
.tlist strong { font-weight: 600; font-size: 1rem; }
.tlist span { font-size: 0.9rem; color: var(--muted); }
.toolsline2 { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; font-size: 0.98rem; }
.cards2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 860px) { .toolbox2 { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .cards2 { grid-template-columns: 1fr; } }

/* ---------- smooth movement ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.35s; animation-timing-function: ease; }
[id] { scroll-margin-top: 84px; }
.site-head nav a, .site-foot a, .btn { transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease; }
.btn:hover { transform: translateY(-1px); }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .js-reveal .reveal { opacity: 0.001; transform: translateY(28px); transition: opacity 0.8s cubic-bezier(.2,.7,.2,1) var(--d, 0s), transform 0.8s cubic-bezier(.2,.7,.2,1) var(--d, 0s); }
  .js-reveal .reveal.in { opacity: 1; transform: none; }
  .js-reveal .reveal .fill { animation-play-state: paused; }
  .js-reveal .reveal.in .fill { animation-play-state: running; animation-delay: 0.25s; }
}
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
}

.photo .frame.has-img { border: 0; padding: 0; background: var(--sheet); box-shadow: 0 30px 60px -30px rgba(0,0,0,0.7); }
.photo .frame picture, .photo .frame img { display: block; width: 100%; height: 100%; }
.photo .frame img { object-fit: cover; }

/* about: outside work, photo and text side by side */
.story { display: grid; gap: clamp(48px, 8vw, 96px); }
.story-row { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: center; }
.story-row.flip { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }
.story-row.flip .story-img { order: 2; }
.story-img { margin: 0; border-radius: 22px; overflow: hidden; background: var(--sheet); box-shadow: 0 30px 60px -34px rgba(0,0,0,0.8); }
.story-img.portrait { width: 100%; max-width: 380px; justify-self: center; }
.story-img img { display: block; width: 100%; height: auto; transition: transform 0.7s cubic-bezier(.2,.7,.2,1); }
.story-text { display: grid; gap: 16px; max-width: 44ch; }
.story-text h2 { font-size: clamp(1.8rem, 4.4vw, 2.6rem); letter-spacing: -0.04em; }
.story-text p:not(.label):not(.sub) { font-family: var(--font-display); font-size: clamp(1.25rem, 2.4vw, 1.55rem); line-height: 1.4; letter-spacing: -0.015em; }
.story-text p.sub { font-size: 1.05rem; color: var(--muted); line-height: 1.7; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) { .story-img:hover img { transform: scale(1.04); } }
@media (max-width: 760px) {
  .story-row, .story-row.flip { grid-template-columns: 1fr; }
  .story-row.flip .story-img { order: 0; }
  .story-img.portrait { max-width: 100%; }
}

.skill-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.card3 .chip { background: var(--paper); color: var(--ink); font-size: 0.88rem; padding: 6px 12px; border-radius: 999px; }
