/* v6: the v5 cube, v2's ink / paper / ultramarine, laid out as a print
   system: boxed chrome, solid ultramarine and paper blocks, giant split
   headlines on hairlines, halftone texture, crop marks around the model. */

@font-face {
    font-family: 'Source Code Pro';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url(/fonts/source-code-pro-latin.woff2) format('woff2');
}

:root {
    --ink: #0b0c0e;
    --ink-2: #2a2d36;
    --paper: #ecebe6;
    --card: #f6f5f1;
    --signal: #3450ff;
    --signal-hi: #8a9bff;
    --mono: 'Source Code Pro', ui-monospace, 'Cascadia Mono', Consolas, monospace;
    /* Notation is set like a textbook: italic variables, upright face turns. */
    --math: 'Cambria Math', 'STIX Two Math', 'Latin Modern Math', Cambria, Georgia, 'Times New Roman', serif;
    --sans: 'Helvetica Neue', 'Inter', 'Segoe UI Variable Display', 'Segoe UI', Arial, sans-serif;
    --gutter: clamp(16px, 2.2vw, 36px);
    --ease: cubic-bezier(.2, .7, .1, 1);
    --ease-io: cubic-bezier(.7, 0, .2, 1);
}

.tone-signal { --bg: var(--signal); --fg: var(--paper); --dim: rgba(236, 235, 230, .74); --line: rgba(236, 235, 230, .34); --accent: var(--paper); }
.tone-paper  { --bg: var(--paper);  --fg: var(--ink);   --dim: rgba(11, 12, 14, .62);  --line: rgba(52, 80, 255, .55);  --accent: var(--signal); }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0; background: var(--paper); color: var(--ink);
    font-family: var(--sans); font-size: 17px; line-height: 1.45;
    -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; font-weight: 400; }
button { font: inherit; color: inherit; cursor: pointer; }
::selection { background: var(--signal); color: #fff; }
:focus-visible { outline: 2px solid var(--accent, var(--signal)); outline-offset: 3px; }
.mono { font-family: var(--mono); font-size: 12px; line-height: 1.5; letter-spacing: .02em; text-transform: uppercase; }
.dim { color: var(--dim); }
.skip {
    position: fixed; left: 12px; top: -60px; z-index: 30; padding: 10px 14px;
    background: var(--signal); color: #fff; font-family: var(--mono); font-size: 12px; text-transform: uppercase;
}
.skip:focus { top: 12px; }

/* ─── Loader ─────────────────────────────────────────────────────────── */
/* intro.js runs the two layers: the cover only fades, the name only moves. */
.loader {
    position: fixed; inset: 0; z-index: 40; pointer-events: none; background: var(--ink);
    /* If the script never runs, the cover still lifts. */
    animation: loader-out .6s var(--ease-io) 3s forwards;
}
.loader-word {
    position: fixed; z-index: 41; top: 0; left: 0; margin: 0; pointer-events: none; user-select: none;
    font-family: var(--mono); font-size: 12px; letter-spacing: .06em; white-space: nowrap;
    opacity: 0; transform-origin: center; will-change: transform, opacity;
}
.opening .chip span { opacity: 0; }
@keyframes loader-out { to { opacity: 0; visibility: hidden; } }

/* ─── Chrome: the boxed chip and the menu box ────────────────────────── */
.chip {
    position: fixed; z-index: 12; top: 16px; left: 16px;
    display: flex; align-items: center; height: 54px; padding: 0 22px;
    background: var(--ink); color: var(--paper); text-decoration: none;
    font-family: var(--mono); font-size: 12px; letter-spacing: .06em;
}
.chrome-r { position: fixed; z-index: 12; top: 16px; right: 16px; display: flex; }
.menu-btn, .icon-btn { height: 54px; border: 0; font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.menu-btn { width: 88px; background: var(--paper); color: var(--signal); box-shadow: inset 0 0 0 1px var(--signal); }
.icon-btn { width: 54px; background: var(--ink); color: var(--paper); font-size: 20px; }
.icon-btn span { display: inline-block; transition: transform .6s var(--ease); }
.icon-btn:hover span { transform: rotate(180deg); }
.menu-open .menu-btn { background: var(--ink); color: var(--paper); }

.menu {
    position: fixed; inset: 0; z-index: 11; display: grid; grid-template-columns: 1fr 1fr;
    column-gap: calc(var(--gutter) * 2); align-items: end;
    padding: 120px var(--gutter) 40px;
    background: var(--signal); color: var(--paper);
    background-image: linear-gradient(to right, transparent calc(50% - .5px), rgba(236,235,230,.34) calc(50% - .5px) calc(50% + .5px), transparent calc(50% + .5px));
    animation: menu-in .5s var(--ease-io);
}
.menu[hidden] { display: none; }
@keyframes menu-in { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0); } }
.menu ol { border-top: 1px solid rgba(236,235,230,.34); }
.menu li { border-bottom: 1px solid rgba(236,235,230,.34); }
.menu li a { display: flex; align-items: baseline; gap: 24px; padding: 10px 0; text-decoration: none; font-size: clamp(30px, 4vw, 64px); line-height: 1.05; letter-spacing: -.02em; }
.menu li a:hover { padding-left: 12px; transition: padding .3s var(--ease); }
.menu li span { font-family: var(--mono); font-size: 12px; letter-spacing: .04em; }
.menu-mail { display: block; margin-top: 28px; font-family: var(--mono); font-size: 13px; text-transform: uppercase; }
/* Left half: the live dashboards, smaller and dimmed until hovered. */
.menu-h { margin-bottom: 12px; font-family: var(--mono); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: #9aa0a6; }
.menu-dash li a { justify-content: space-between; gap: 16px; padding: 12px 0; font-size: clamp(18px, 1.6vw, 26px); letter-spacing: -.01em; color: #9aa0a6; transition: color .2s, padding .3s var(--ease); }
.menu-dash li a::after { content: '↗︎'; font-size: .8em; }
.menu-dash li a:hover { padding-left: 8px; color: var(--paper); }

/* ─── The rig: crop marks + cube + readout, fixed, moves between halves ── */
.stage { position: fixed; inset: 0; z-index: 4; pointer-events: none; }
.rig {
    --rc: var(--paper);
    position: absolute; top: 0; left: 0; width: 50vw; height: 100vh;
    transform-origin: 100% 0;
    transform: translate3d(50vw, 0, 0);
    transition: transform 1.1s var(--ease-io);
    color: var(--rc);
}
[data-rig="L"] .rig { transform: translate3d(0, 0, 0); }
[data-rig="H"] .rig { transform: translate3d(41.5vw, 33vh, 0) scale(.66); }
[data-rig="S"] .rig { transform: translate3d(50vw, 11vh, 0) scale(.5); }
[data-tone="paper"] .rig { --rc: var(--signal); }

/* Printer's crop marks framing the model; they close in when it is solved. */
.crop, .scene { position: absolute; inset: 14% 10% 20%; }
.crop { display: grid; place-items: center; container-type: size; opacity: 0; transition: opacity 1s var(--ease) .2s; }
.crop b { --w: 1px; position: relative; width: 96cqmin; height: 96cqmin; transition: width .9s var(--ease), height .9s var(--ease); }
.crop i { position: absolute; width: 11cqmin; height: 11cqmin; border: 0 solid currentColor; transition: border-width .9s var(--ease); }
.crop i:nth-child(1) { top: 0; left: 0; border-top-width: var(--w); border-left-width: var(--w); }
.crop i:nth-child(2) { top: 0; right: 0; border-top-width: var(--w); border-right-width: var(--w); }
.crop i:nth-child(3) { bottom: 0; left: 0; border-bottom-width: var(--w); border-left-width: var(--w); }
.crop i:nth-child(4) { bottom: 0; right: 0; border-bottom-width: var(--w); border-right-width: var(--w); }
.solved .crop b { --w: 1.4cqmin; width: 84cqmin; height: 84cqmin; }
.lit .crop { opacity: 1; }

.readout {
    position: absolute; left: 10%; bottom: 12%;
    font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; line-height: 1.7;
    opacity: 0; transition: opacity .8s var(--ease) .4s;
}
.lit .readout { opacity: 1; }
.readout b { font-weight: 600; }
.ro-move { font-family: var(--math); font-size: 14px; letter-spacing: 0; text-transform: none; display: inline-block; min-width: 3ch; margin-left: .6ch; padding: 0 4px; background: var(--rc); color: var(--bg-under, var(--signal)); }
[data-tone="paper"] .ro-move { color: var(--paper); }
/* The notes button rides with the readout; the stage itself ignores the pointer. */
.ro-help {
    pointer-events: auto; margin-top: 8px; padding: 3px 7px; cursor: pointer;
    font: inherit; letter-spacing: inherit; color: var(--rc); background: none; border: 1px solid currentColor;
    transition: background-color .2s, color .2s;
}
.ro-help:hover, .ro-help:focus-visible { background: var(--rc); color: var(--bg-under, var(--signal)); }
[data-tone="paper"] .ro-help:hover, [data-tone="paper"] .ro-help:focus-visible { color: var(--paper); }

/* ─── Notation: a panel down the right edge (a popover; no script) ─── */
.notes {
    position: fixed; inset: 0 0 0 auto; width: min(560px, 100vw); height: 100%; max-height: none; margin: 0;
    padding: 28px 36px 40px; overflow-y: auto; border: 0; border-left: 1px solid var(--signal);
    background: var(--paper); color: var(--ink);
}
.notes::backdrop { background: rgba(11, 12, 14, .45); }
.notes-top { display: flex; justify-content: space-between; align-items: center; padding-bottom: 14px; border-bottom: 1px solid var(--ink); }
.notes-top h2 { font-weight: 600; }
.notes-x { border: 1px solid var(--ink); background: none; color: var(--ink); padding: 6px 10px; cursor: pointer; }
.notes-x:hover { background: var(--ink); color: var(--paper); }
.notes-intro { margin-top: 16px; font-size: 15px; line-height: 1.5; }
.notes-list { margin: 0; }
.notes-list dt { margin-top: 22px; font-size: 19px; line-height: 1.3; }
.notes-list dt.mono { font-size: 12px; }
.notes-list dd i.math { padding-right: .15em; }   /* italic g/e otherwise touch the next word */
.notes-list dd { margin: 6px 0 0; font-size: 15px; line-height: 1.5; color: rgba(11, 12, 14, .72); }
.notes-fact { margin-top: 30px; padding-top: 16px; border-top: 1px solid rgba(11, 12, 14, .2); font-size: 15px; line-height: 1.5; }
.notes-ref { margin-top: 10px; font-size: 13px; line-height: 1.5; color: rgba(11, 12, 14, .62); }
.notes-ref a { color: inherit; }

.scene { perspective: 1400px; }
.cube {
    --s: 60px; --h: calc(var(--s) / 2);
    position: absolute; left: 50%; top: 50%; width: 0; height: 0;
    transform-style: preserve-3d;
    opacity: 0; transform: scale(.86);
    transition: opacity 1s var(--ease), transform 1.2s var(--ease);
}
.lit .cube { opacity: 1; transform: none; }
.swap .cube { opacity: 0; transform: scale(.86); transition-duration: .3s; }
.cubie {
    position: absolute; width: var(--s); height: var(--s);
    left: calc(var(--s) / -2); top: calc(var(--s) / -2);
    transform-style: preserve-3d;
}
.f { position: absolute; inset: 0; background: var(--ink); backface-visibility: hidden; }
/* Six faces from the v2 palette only: three solids, three print textures. */
.f.st::before {
    content: ''; position: absolute; inset: 5%;
    background: var(--c);
    transition: box-shadow .4s var(--ease);
}
/* One fill per face, shared by the cube stickers and the six-sides swatches. */
[data-c="U"], [data-face="U"] { --c: var(--paper); }
[data-c="D"], [data-face="D"] { --c: var(--signal); }
[data-c="F"], [data-face="F"] { --c: var(--signal-hi); }
[data-c="B"], [data-face="B"] { --c: radial-gradient(circle, var(--signal) 0 1.6px, transparent 2.1px) 0 0 / 6px 6px, var(--paper); }
[data-c="R"], [data-face="R"] { --c: repeating-linear-gradient(135deg, var(--paper) 0 3px, var(--signal) 3px 6px); }
[data-c="L"], [data-face="L"] { --c: radial-gradient(circle, var(--paper) 0 1.1px, transparent 1.6px) 0 0 / 5px 5px, var(--ink-2); }
.f::after { content: ''; position: absolute; inset: 0; background: #000; opacity: calc(var(--d, .4) * .6); }
.f.hot::before { box-shadow: inset 0 0 0 3px var(--ink), inset 0 0 0 6px var(--paper); }

/* ─── Blocks ─────────────────────────────────────────────────────────── */
.blk { position: relative; background: var(--bg); color: var(--fg); padding: 130px var(--gutter) 120px; }
.blk > * { position: relative; }
.tag { display: flex; justify-content: space-between; gap: 24px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--accent); margin-bottom: 56px; }
.tag-t { margin: 0 auto; font-size: 15px; line-height: 1; text-transform: none; letter-spacing: 0; }
.tag-t .mv { display: inline-block; padding: 1px .18em; margin-right: .12em; transition: opacity .3s, background-color .3s, color .3s; }
.tag-t .mv.done { opacity: .38; }
.tag-t .mv.now { background: var(--accent); color: var(--bg); }
.half { margin-left: 50%; padding-left: var(--gutter); }

.split {
    display: grid; grid-template-columns: 1fr 1fr;
    font-size: clamp(64px, 11vw, 210px); line-height: .9; letter-spacing: -.045em; color: var(--accent);
    margin: 0 0 90px;
}
.split > span:last-child { border-left: 1px solid var(--accent); padding-left: calc(var(--gutter) - .04em); }
.split > span:first-child:empty { display: block; }

.big { font-size: clamp(40px, 5vw, 88px); line-height: 1; letter-spacing: -.03em; color: var(--accent); max-width: calc(50% - var(--gutter)); margin-bottom: 72px; }
.big .dim { color: var(--dim); }

/* ─── 00 Hero: who I am on the left; the expression over the cube ──── */
/* Two halves. The expression sits at the top of the right half and scrolls
   with the page; the fixed cube (rig H) hangs below it. */
.hero {
    min-height: 100svh; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr auto;
    column-gap: calc(var(--gutter) * 2); padding-top: 120px; padding-bottom: 36px; overflow: hidden;
}
.ident { grid-column: 1; grid-row: 1; align-self: end; padding-bottom: 48px; }
.ident-name { font-weight: 400; font-size: clamp(52px, 6.4vw, 120px); line-height: .92; letter-spacing: -.045em; }
.ident-role { margin-top: 22px; font-size: clamp(22px, 2.2vw, 38px); line-height: 1.1; letter-spacing: -.02em; }
.ident-prac { margin-top: 26px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--dim); }

.math { font-family: var(--math); font-variant-numeric: lining-nums; letter-spacing: 0; }
.math i { font-style: italic; }
.math sup { font-size: .62em; line-height: 0; vertical-align: .72em; margin-left: .03em; }
/* The neuron field behind the hero (neurons.js). The expression shows
   while the cube is pointed at, once the glyphs have set it. */
.hero > .nn { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; animation: nn-in 1.6s var(--ease) 1s both; }
@keyframes nn-in { from { opacity: 0; } }
.neurons .expr { opacity: 0; transition: opacity .3s; }
.neurons.expr-on .expr { opacity: 1; }
.hero-set { color: var(--dim); font-size: clamp(14px, 1.05vw, 17px); margin-bottom: 14px; }
.expr { grid-column: 2; grid-row: 1; align-self: start; }
.expr-g { font-size: clamp(22px, 1.8vw, 32px); line-height: 1.3; }
.expr-g > i { margin-right: .08em; }
.expr-inv { margin-top: 12px; color: var(--dim); font-size: clamp(15px, 1.1vw, 18px); line-height: 1.5; }
.seq .mv { display: inline-block; margin-right: .3em; opacity: 0; transform: translateY(.3em); transition: opacity .3s, transform .4s var(--ease), background-color .3s, color .3s; }
.seq .mv.in { opacity: 1; transform: none; }
.expr-inv .mv { padding: 0 .18em; margin-right: .12em; }
.expr-inv .mv.done { opacity: .38; }
.expr-inv .mv.now { background: var(--paper); color: var(--signal); opacity: 1; }
.expr-done { margin-top: 8px; font-size: clamp(15px, 1.1vw, 18px); opacity: 0; transition: opacity .6s; }
.solved .expr-done { opacity: 1; }
.hero-foot { grid-column: 1; grid-row: 2; }
.btn { background: none; border: 0; padding: 0; font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.btn:hover { background: var(--paper); color: var(--signal); }

/* ─── Rows (six sides, services): accordion on hairlines ─────────────── */
.intro { color: var(--accent); margin-bottom: 28px; max-width: 34ch; }
.rows details { border-top: 1px solid var(--line); }
.rows details:last-of-type { border-bottom: 1px solid var(--line); }
.rows summary {
    display: grid; grid-template-columns: auto 1fr 28px; align-items: center; column-gap: 18px;
    padding: 18px 0; cursor: pointer; list-style: none; color: var(--accent);
}
.rows summary::-webkit-details-marker { display: none; }
.rt { font-size: clamp(24px, 2.3vw, 40px); line-height: 1.1; letter-spacing: -.02em; }
.rows summary:not(:has(.fl)) .rt { grid-column: 1 / 3; }
.rk { grid-column: 1 / 3; color: var(--dim); margin-top: 6px; font-size: 11px; }
/* The face letter beside a sticker in that face's fill: an ink cubie with
   the sticker inset, as on the cube. */
.fl { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 12px; }
.fl::before { content: ''; width: 34px; height: 34px; flex: none; background: var(--c); border: 3px solid var(--ink); transition: box-shadow .3s var(--ease); }
.side.hot .fl::before { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--signal); }
.pm { position: relative; width: 22px; height: 22px; justify-self: end; transition: transform .4s var(--ease); }
.pm::before, .pm::after { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1.5px; background: currentColor; }
.pm::after { transform: rotate(90deg); }
details[open] .pm { transform: rotate(45deg); }
.rb { padding: 4px 0 28px 70px; }
.rb p { max-width: 46ch; font-size: 17px; line-height: 1.45; }
.side.hot summary { padding-left: 10px; transition: padding .3s var(--ease); }
.side summary { transition: padding .3s var(--ease); }
.bar-btn { display: block; margin-top: 18px; padding: 24px; text-align: center; text-decoration: none; background: var(--paper); color: var(--signal); font-size: 13px; }
.bar-btn:hover { background: var(--ink); color: var(--paper); }

/* ─── 02 What I do: the headline, full width ─────────────────────────── */

/* ─── 03 Services: the four offers as a 2×2 card grid ────────────────── */
.svcs { max-width: calc(50% - var(--gutter)); display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.svc {
    display: flex; flex-direction: column; gap: 10px; padding: 22px 22px 26px;
    border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
    transition: background-color .3s var(--ease);
}
.svc:hover { background: var(--card); }
.svc h3 { font-weight: 400; font-size: clamp(22px, 1.9vw, 30px); line-height: 1.1; letter-spacing: -.02em; color: var(--signal); }
.svc-for { color: var(--dim); font-size: 11px; }
.svc p:not(.mono) { font-size: 15px; }
.svc ul { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); font-size: 14px; color: var(--dim); }
.svc li { padding: 2px 0; }
.svc li::before { content: '— '; color: var(--signal); }

/* Process: the method, as the second half of Services. */
.proc-tag { margin-top: 110px; margin-bottom: 40px; }
.proc-h { font-size: clamp(32px, 3.6vw, 64px); }
#services .bar-btn { max-width: calc(50% - var(--gutter)); margin-top: 48px; background: var(--signal); color: var(--paper); }
#services .bar-btn:hover { background: var(--ink); }

/* ─── 03 Process: tilted index cards ─────────────────────────────────── */
.cards { max-width: calc(50% - var(--gutter)); counter-reset: step; }
.cards li {
    counter-increment: step; position: relative; display: grid; gap: 10px;
    width: 82%; margin-top: -8px; padding: 22px 26px 26px;
    background: var(--card); color: var(--ink); box-shadow: 0 1px 0 rgba(11,12,14,.06), 0 18px 40px -24px rgba(11,12,14,.35);
    transform: rotate(-1.6deg); transition: transform .5s var(--ease);
}
.cards li:nth-child(even) { margin-left: 18%; transform: rotate(1.3deg); }
.cards li:nth-child(3n) { margin-left: 8%; transform: rotate(-.6deg); }
.cards li:hover { transform: none; z-index: 1; }
.cards li::before { content: counter(step, decimal-leading-zero); position: absolute; top: 16px; right: 22px; font-size: 30px; color: var(--signal); letter-spacing: -.02em; }
.cards b { font-weight: 400; font-size: 28px; color: var(--signal); padding-bottom: 12px; border-bottom: 1px solid var(--signal); letter-spacing: -.02em; }
.cards span { color: rgba(11,12,14,.72); font-size: 15px; }
.cards .end { background: var(--signal); color: var(--paper); }
.cards .end::before { color: var(--paper); }
.cards .end b { color: var(--paper); border-color: var(--paper); }
.cards .end span { color: var(--paper) !important; }

/* ─── 05 Who ─────────────────────────────────────────────────────────── */
.bio { max-width: calc(50% - var(--gutter) * 2); display: grid; gap: 16px; font-size: 18px; }
.cv { max-width: calc(50% - var(--gutter)); margin-top: 60px; border-bottom: 1px solid var(--line); }
.cv li { display: grid; grid-template-columns: 110px 1fr; column-gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.cv span { color: var(--signal); padding-top: 3px; }
.cv b { font-weight: 400; font-size: 19px; }
.cv em { grid-column: 2; font-style: normal; color: var(--dim); font-size: 11px; }

/* ─── Projects: the live monitor, then the other products ────────────── */
.live-head, .monitor, .more { max-width: calc(50% - var(--gutter)); }
.live-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; color: var(--dim); font-size: 11px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--paper); flex: none; animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.mon-refresh { margin-left: auto; }
.monitor { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.mon-tile { display: flex; flex-direction: column; gap: 6px; min-height: 210px; padding: 18px 16px 16px; color: inherit; text-decoration: none; transition: background-color .3s var(--ease); }
.mon-tile + .mon-tile { border-left: 1px solid var(--line); }
.mon-tile:hover { background: rgba(236, 235, 230, .1); }
.mon-top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 11px; }
/* The status colour is painted inline; the ring keeps it legible on blue. */
.mon-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--dim); box-shadow: 0 0 0 2px var(--paper); flex: none; }
.mon-go { margin-left: auto; transition: transform .2s; }
.mon-tile:hover .mon-go { transform: translate(2px, -2px); }
.mon-value { font-size: 14px; color: var(--dim); line-height: 1.3; }
.mon-value strong { display: block; font-size: clamp(28px, 2.6vw, 42px); font-weight: 400; line-height: 1.05; letter-spacing: -.03em; color: var(--fg); }
.mon-value small { font-size: 13px; }
.mon-sub { font-size: 14px; }
.mon-change { font-family: var(--mono); font-size: 11px; color: var(--dim); }
.mon-change .arrow { color: var(--fg); }
.mon-ts { margin-top: auto; color: var(--dim); font-size: 10px; }
.more { margin-top: 36px; border-bottom: 1px solid var(--line); }
.more a { display: grid; grid-template-columns: 110px 1fr auto; align-items: baseline; column-gap: 12px; padding: 18px 0; border-top: 1px solid var(--line); color: inherit; text-decoration: none; font-size: clamp(22px, 1.9vw, 30px); letter-spacing: -.02em; }
.more span { font-size: 11px; color: var(--dim); letter-spacing: 0; }
.more i { font-style: normal; transition: transform .2s; }
.more a:hover i { transform: translate(3px, -3px); }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }

/* ─── 06 Contact ─────────────────────────────────────────────────────── */
.contact { min-height: 100vh; display: flex; }
.contact .half { display: flex; flex-direction: column; gap: 22px; width: 100%; }
.solved-note { color: var(--dim); }
.solved-note { font-size: clamp(22px, 2vw, 32px); }
.foot-cols { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: auto; }
.foot-cols ul { border-left: 1px solid var(--line); padding: 4px 0 60px 14px; }
.foot-cols a { text-decoration: none; }
.foot-cols a:hover { text-decoration: underline; }
.big-mail {
    display: flex; justify-content: space-between; align-items: center; gap: 16px;
    padding: 18px 22px; border: 1px solid var(--paper); text-decoration: none;
    font-size: clamp(22px, 2.6vw, 44px); letter-spacing: -.02em;
}
.big-mail::after { content: '→'; transition: transform .4s var(--ease); }
.big-mail:hover::after { transform: translateX(8px); }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--dim); font-size: 11px; }
.foot a { text-decoration: none; }

/* ─── Phones and narrow windows ──────────────────────────────────────── */
/* ─── Motion: entrances (set up by motion.js; off for reduced motion) ── */
/* Headlines: each word rises out of its own clipped line. */
.motion .words .w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0 .06em .14em; margin: 0 -.06em -.14em; }
.motion .words .wi { display: inline-block; translate: 0 140%; transition: translate 1.1s var(--ease); }
.motion .words.in .wi { translate: none; }
/* Groups: cards, rows and tiles arrive one after another. The class is
   dropped once they land, so hover transitions are left alone. */
.motion .rise { opacity: 0; translate: 0 36px; transition: opacity .8s var(--ease), translate 1.1s var(--ease); }
.motion .rise.in { opacity: 1; translate: none; }
/* Section rules draw across from the left, then the labels come up. */
.motion .tag.draw { position: relative; border-top-color: transparent; }
.motion .tag.draw::before {
    content: ''; position: absolute; left: 0; right: 0; top: -1px; height: 1px; background: var(--line);
    transform: scaleX(0); transform-origin: 0 50%; transition: transform 1.3s var(--ease-io);
}
.motion .tag.draw > * { opacity: 0; transition: opacity .6s var(--ease) .5s; }
.motion .tag.draw.in::before { transform: none; }
.motion .tag.draw.in > * { opacity: 1; }
/* The menu links step in when it opens. */
.motion .menu:not([hidden]) li { animation: menu-in .7s var(--ease) both; }
.motion .menu li:nth-child(2) { animation-delay: .05s; }
.motion .menu li:nth-child(3) { animation-delay: .1s; }
.motion .menu li:nth-child(4) { animation-delay: .15s; }
.motion .menu li:nth-child(5) { animation-delay: .2s; }
@keyframes menu-in { from { opacity: 0; translate: 0 40%; } }
/* Scroll-linked, where the browser supports it: the name eases up and
   fades as the hero scrolls away. Desktop only: on phones the name starts
   below the fold and would fade just as it arrives. */
@supports (animation-timeline: scroll()) {
    @media (min-width: 901px) {
        .motion .hero .ident { animation: ident-away linear both; animation-timeline: scroll(root); animation-range: 0 90vh; }
    }
    @keyframes ident-away { to { translate: 0 -14vh; opacity: .15; } }
}

/* ─── Overlay scrollbar (set up by scrollbar.js, mouse users only) ────── */
/* Hidden from the first paint (same test as scrollbar.js), so the page
   doesn't widen when the script arrives. */
@media (pointer: fine) and (prefers-reduced-motion: no-preference) {
    html { scrollbar-width: none; }
    html::-webkit-scrollbar { display: none; }
}
.sbar { position: fixed; top: 0; right: 0; bottom: 0; z-index: 13; width: 14px; }
.sbar-thumb {
    position: absolute; top: 0; left: 3px; width: 8px; border-radius: 8px;
    background: var(--signal); box-shadow: 0 0 0 1px var(--paper);
    opacity: 0; transition: opacity .5s var(--ease), background-color .4s, box-shadow .4s;
}
[data-tone="signal"] .sbar-thumb { background: var(--paper); box-shadow: 0 0 0 1px var(--signal); }
.sbar.on .sbar-thumb, .sbar:hover .sbar-thumb { opacity: .6; transition-duration: .15s, .4s, .4s; }
.sbar-thumb:hover, .sbar-drag .sbar-thumb { opacity: 1; }
.sbar-drag, .sbar-drag * { user-select: none; cursor: grabbing; }
.menu-open .sbar { visibility: hidden; }

@media (max-width: 900px) {
    .chip { top: 10px; left: 10px; height: 44px; padding: 0 16px; font-size: 11px; }
    .chrome-r { top: 10px; right: 10px; }
    .menu-btn, .icon-btn { height: 44px; }
    .menu-btn { width: 72px; } .icon-btn { width: 44px; }
    .menu { grid-template-columns: 1fr; align-content: end; row-gap: 40px; padding: 90px 18px 30px; background-image: none; overflow-y: auto; }
    .menu-dash { order: 2; }

    .rig, [data-rig] .rig { width: 100vw; height: 60svh; top: 54px; transform: none; }
    .crop, .scene { inset: 4% 8% 14%; }
    .readout { left: 6%; bottom: 3%; }
    /* In the hero the cube hangs below the expression. */
    [data-rig="H"] .rig { transform: translate3d(0, 24svh, 0); }
    /* Docked: once the expression scrolls away, the rig shrinks into a
       small free-floating cube under the menu and keeps solving. */
    .docked .rig { transform: translateY(4px) scale(.3); }
    .docked .readout { opacity: 0; }
    .docked .ro-help { visibility: hidden; }   /* faded out, so not clickable either */
    .notes { padding: 20px 18px 32px; }

    .blk { padding: 96px 18px 84px; }
    .hero { display: flex; flex-direction: column; padding-top: 80px; min-height: 0; }
    .expr { order: -1; margin-bottom: 61svh; }
    .hero-set { font-size: 13px; }
    .expr-g { font-size: 19px; }
    .expr-inv, .expr-done { font-size: 14px; }
    .ident { padding-bottom: 36px; }
    .ident-name { font-size: 15vw; }
    .big, .cards, .bio, .cv, .svcs, #services .bar-btn, .live-head, .monitor, .more { max-width: none; }
    .monitor { grid-template-columns: 1fr; }
    .mon-tile { min-height: 0; padding: 18px 0; }
    .mon-tile + .mon-tile { border-left: 0; border-top: 1px solid var(--line); }
    .more a { grid-template-columns: 1fr auto; }
    .more span { grid-column: 1 / -1; }
    .svcs { grid-template-columns: 1fr; }
    .proc-tag { margin-top: 70px; }
    .half { margin-left: 0; padding-left: 0; }
    .split { font-size: 19vw; margin-bottom: 48px; }
    .split > span:first-child:empty { display: none; }
    .split:has(> span:empty) { grid-template-columns: 1fr; }
    .rb { padding-left: 0; }
    .cards li, .cards li:nth-child(even), .cards li:nth-child(3n) { width: 94%; margin-left: 0; }
    .cards li:nth-child(even) { margin-left: 6%; }
    .contact { min-height: 0; }
    .foot-cols ul { padding-bottom: 30px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .loader { display: none; }
    *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
}
