/* Homepage styles (index.html). Tokens and resets: css/base.css. */
:root { --nav-h: 4.6rem; }
:root[data-theme='dark'] .xp__resume b { background: var(--bg); color: var(--ink); }
html, main { overflow-x: clip; }
body { font-family: 'Archivo', system-ui, sans-serif; font-size: 1rem; line-height: 1.5; }
.mono, .label { font-family: 'Geist Mono', monospace; font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; }
.muted { color: var(--muted); }
.wrap { padding: 0 var(--gutter); }
.mask { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: .06em; margin-bottom: -.06em; }
.mask--block { display: block; }
.mask > span { display: inline-block; } .mask--block > span { display: block; }
ol, ul { list-style: none; margin: 0; padding: 0; }

.skip { position: fixed; z-index: 100; left: var(--gutter); top: .6rem; padding: .7rem 1rem; border-radius: 99px; background: var(--ink); color: var(--bg); text-decoration: none; translate: 0 -200%; transition: translate .4s var(--ease); }
.skip:focus { translate: 0 0; }
/* ---------- Progress bar (original): fill + a tick per section ---------- */
.progress { position: fixed; z-index: 70; inset: 0 0 auto; height: 3px; }
.progress__fill { position: absolute; inset: 0; background: var(--mark); transform-origin: left; scale: 0 1; }
.progress__tick { all: unset; position: absolute; top: 0; width: 24px; height: 24px; margin-left: -12px; cursor: pointer; }
.progress__tick::before { content: ''; position: absolute; left: 50%; top: 0; width: 2px; height: 8px; translate: -1px 0; background: var(--ink); opacity: .5; }
.progress__tick.is-passed::before { opacity: 1; }
.progress__tip { position: absolute; top: 12px; left: 50%; translate: -50% -4px; white-space: nowrap; padding: .35rem .55rem; border-radius: 99px; background: var(--ink); color: var(--bg); opacity: 0; pointer-events: none; transition: opacity .3s, translate .4s var(--ease); }
.progress__tick:hover .progress__tip { opacity: 1; translate: -50% 0; }

/* ---------- Header: B's pill nav that folds into the original section status ---------- */
.top { position: fixed; z-index: 60; inset: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem var(--gutter); pointer-events: none; background: var(--bg); transition: background-color .6s var(--ease), box-shadow .4s; }
/* A solid strip, so nothing reads through the logo and nav while scrolling; a hairline once scrolled. */
.top.is-scrolled { box-shadow: 0 1px 0 var(--line); }
.top > * { pointer-events: auto; }
.glass { background: color-mix(in srgb, var(--bg) 72%, transparent); border: 1px solid var(--line); border-radius: 99px; }
/* Wordmark from the live site: letters rise on load, folds to "n." on scroll, hover reopens. */
.logo { padding: .55rem .85rem; margin-left: -.85rem; font-weight: 600; font-size: 1.625rem; letter-spacing: -0.045em; line-height: 1; text-decoration: none; border-color: transparent; white-space: nowrap; }
.logo__m { display: inline-block; clip-path: inset(-0.3em -0.2em 0 -0.2em); }
.logo__l { display: inline-block; }
.logo__rest { display: inline-block; clip-path: inset(-0.3em 0 -0.3em 0); vertical-align: baseline; }
.logo__restin { display: inline-block; }
.logo__dot { display: inline-block; width: .15em; height: .15em; margin-left: .105em; background: var(--mark); }
@keyframes logo-rise { from { translate: 0 110%; } to { translate: 0 0; } }
@keyframes logo-settle { 0% { scale: 0; } 60% { scale: 1.35; } 100% { scale: 1; } }
.logo .logo__l { animation: logo-rise 1.1s var(--ease) both; animation-delay: calc(.3s + var(--i, 0) * .07s); }
.logo .logo__dot { animation: logo-settle .7s cubic-bezier(.34, 1.2, .64, 1) .75s both; transform-origin: 50% 100%; }
@media (prefers-reduced-motion: reduce) { .logo .logo__l, .logo .logo__dot { animation: none; } }
.pnav { position: absolute; left: 50%; translate: -50% 0; display: flex; align-items: center; padding: .3rem; }
.pnav__links { display: flex; gap: .2rem; overflow: hidden; max-width: 46rem; transition: max-width .8s var(--ease), opacity .5s; white-space: nowrap; }
.pnav__links a { padding: .55rem .9rem; border-radius: 99px; text-decoration: none; }
.pnav__links a:focus-visible { outline: 2px solid var(--teal); outline-offset: -3px; }
.pnav__links a:hover, .pnav__links a.is-active { background: var(--ink); color: var(--bg); }
.pnav__status { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: .7rem; padding: .55rem .9rem; border-radius: 99px; white-space: nowrap; overflow: hidden; max-width: 0; opacity: 0; transition: max-width .8s var(--ease), opacity .4s, padding .8s var(--ease); padding-inline: 0; }
.pnav__status:focus-visible { outline: 2px solid var(--teal); }
.pnav__text { display: inline-block; }
/* Typewriter caret (Motion's typewriter, rebuilt): blinks while idle, solid while typing. */
.tw-caret { display: inline-block; width: .5em; height: 1em; margin-left: .12em; vertical-align: -.14em; background: var(--mark); animation: tw-blink 1s steps(1) infinite; }
.is-typing > .tw-caret { animation: none; }
@keyframes tw-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .tw-caret { animation: none; } }
.pnav__menu { display: inline-flex; align-items: center; gap: .45rem; padding-left: .7rem; border-left: 1px solid var(--line); }
.pnav__text.is-empty + .pnav__menu { border-left: 0; padding-left: 0; }
.pnav__icon { display: inline-block; font-style: normal; transition: rotate .5s var(--ease); }
/* Sectioned: links fold away, the status (section + Menu) takes their place. */
.pnav.is-sectioned .pnav__links { max-width: 0; opacity: 0; }
.pnav:not(.is-sectioned) .pnav__status { visibility: hidden; }
.pnav.is-sectioned .pnav__status { max-width: 30rem; opacity: 1; padding-inline: .9rem; }
.pnav__status:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.pnav.is-sectioned.is-open .pnav__links { max-width: 46rem; opacity: 1; }
.pnav.is-open .pnav__icon { rotate: 45deg; }
.pnav.is-open .pnav__text { display: none; }
.pnav.is-open .pnav__menu { border-left: 0; padding-left: 0; }
.pill { display: inline-flex; align-items: center; gap: .6rem; padding: .95rem 1.35rem; border-radius: 99px; background: var(--ink); color: var(--bg); text-decoration: none; font: 600 .95rem/1 'Archivo'; font-stretch: 110%; white-space: nowrap; }
.pill b { display: grid; place-items: center; width: 1.4rem; height: 1.4rem; border-radius: 50%; background: var(--pink); color: var(--on-pink); font-weight: 600; transition: rotate .5s var(--ease); }
.pill:hover b { rotate: -45deg; }

@view-transition { navigation: auto; }
.hero .press .sq { view-transition-name: dot; }
::view-transition-group(dot) { animation-duration: .8s; animation-timing-function: cubic-bezier(.16, 1, .3, 1); }

/* ---------- Theme switch: sun-and-moon disc; the new theme opens as a circle from the button ---------- */
.top__end { display: flex; align-items: center; gap: .6rem; }
.theme { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; gap: .55rem; height: 2.9rem; padding: 0 1rem 0 .8rem; border: 1px solid var(--line); border-radius: 99px; background: color-mix(in srgb, var(--bg) 72%, transparent); transition: background-color .4s, color .4s; }
.theme:hover { background: var(--ink); color: var(--bg); }
.theme:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.theme__icon { position: relative; width: 1.05rem; height: 1.05rem; border-radius: 50%; background: var(--pink); overflow: hidden; transition: rotate .7s var(--ease); }
.theme__icon i { position: absolute; inset: 0; border-radius: 50%; background: currentColor; translate: 60% -40%; scale: 0; transition: scale .6s var(--ease), translate .6s var(--ease); }
:root[data-theme='dark'] .theme__icon { rotate: -30deg; }
:root[data-theme='dark'] .theme__icon i { scale: 1; translate: 38% -22%; background: var(--bg); }
.theme:hover .theme__icon i { background: var(--ink); }
:root[data-theme='dark'] .theme:hover .theme__icon i { background: var(--ink); }
.theme__label { min-width: 2.6em; }
@media (max-width: 900px) { .theme { width: 2.9rem; padding: 0; justify-content: center; } .theme__label { display: none; } .top__end { margin-left: .5rem; } }

/* ---------- Rail (original): a dash per section in the left margin ---------- */
.rail { position: fixed; z-index: 55; left: calc(var(--gutter) * .45); top: 50%; translate: -12px -50%; opacity: 0; pointer-events: none; transition: opacity .5s, translate .6s var(--ease); }
.rail.is-visible { opacity: 1; translate: 0 -50%; pointer-events: auto; }
.rail ol { display: grid; gap: .1rem; }
.rail a { display: flex; align-items: center; gap: .7rem; padding: .4rem 0; text-decoration: none; color: var(--muted); }
.rail i { display: block; width: 10px; height: 1px; background: currentColor; transition: width .5s var(--ease), background-color .3s; }
.rail a { position: relative; width: 24px; min-height: 24px; padding: .25rem 0; }
.rail span { position: absolute; left: 32px; opacity: 0; translate: -6px 0; transition: opacity .3s, translate .4s var(--ease); white-space: nowrap; pointer-events: none; }
.rail:hover span { opacity: 1; translate: 0 0; }
.rail a.is-current { color: var(--ink); }
.rail a.is-current i { width: 22px; background: var(--mark); }
.rail:hover::before { content: ''; position: absolute; inset: -1rem -11rem -1rem -2rem; z-index: -1; border-radius: 0 1rem 1rem 0; background: var(--bg); box-shadow: 0 1px 0 var(--line), 0 18px 40px -24px rgba(0,0,0,.35); }

/* ---------- Hero (B): letters swell near the cursor ---------- */
.hero { min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; padding-top: 6rem; padding-bottom: 2.2rem; }
.hero__intro { display: flex; justify-content: space-between; align-items: end; gap: 2rem; margin-bottom: 1.4rem; }
.hero__intro p { margin: 0; font-size: clamp(1.1rem, 1.6vw, 1.55rem); line-height: 1.25; max-width: 30rem; font-weight: 450; }
.hero__intro p span { color: var(--muted); }
.press { margin: 0; text-transform: uppercase; font-weight: 800; line-height: .8; letter-spacing: -.01em; white-space: nowrap; user-select: none; }
.press .ln { display: flex; justify-content: space-between; align-items: center; }
.press .ch { display: inline-block; font-variation-settings: 'wdth' 100, 'wght' 800; }
/* Letters share their line: the word keeps its width while letters swell and shrink. */
.press .t { flex: 1 1 auto; display: flex; justify-content: space-between; }
.press .m .t { flex: none; display: inline-block; }
/* Measure at the resting width, whatever the letters are doing at that moment. */
.press .m .ch { font-variation-settings: 'wdth' 100, 'wght' 800 !important; }
.is-empty > .tw-caret { display: none; }
.press .ln + .ln { margin-top: .03em; }
.press .reel { flex: none; height: .7em; aspect-ratio: 16 / 10; margin: 0 .08em; border-radius: .08em; overflow: hidden; background: var(--pink); position: relative; }
.press .reel video { width: 100%; height: 100%; object-fit: cover; }
.press .sq { flex: none; width: .2em; height: .2em; align-self: flex-end; margin-bottom: .05em; background: var(--mark); }
.hero__foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 2rem; }
.tags { display: flex; gap: .4rem; flex-wrap: wrap; }
.tag { padding: .5rem .8rem; border: 1px solid var(--line); border-radius: 99px; }
.tag--on { background: var(--ink); color: var(--bg); border-color: transparent; display: inline-flex; gap: .45rem; align-items: center; }
.tag--on::before { content: ''; width: .45rem; height: .45rem; border-radius: 50%; background: var(--pink); }

.work-label { display: flex; justify-content: space-between; padding-top: clamp(3rem, 8vh, 5rem); padding-bottom: 1rem; border-bottom: 1px solid var(--line); margin: 0 var(--gutter); padding-inline: 0; }
.reel-flyer { position: fixed; z-index: 5; left: 0; top: 0; width: 0; height: 0; will-change: transform; overflow: hidden; border-radius: .9rem; background: var(--bg-2); visibility: hidden; pointer-events: none; }
.reel-flyer img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }

/* ---------- Statement (B) ---------- */
.statement { padding: clamp(7rem, 20vh, 13rem) var(--gutter); }
.statement .mono { display: block; margin-bottom: 2rem; color: var(--teal); }
.statement p { margin: 0; font-weight: 600; font-size: clamp(2rem, 4.6vw, 4.8rem); line-height: 1.02; letter-spacing: -.035em; font-stretch: 92%; max-width: 22ch; }
.statement .w { opacity: .3; }
.statement .w.k { color: var(--pink-ink); }

/* ---------- Case study (original pinned sequence) ---------- */
.marks { position: absolute; inset: .9rem; pointer-events: none; color: #F8DBC1; z-index: 2;
  background:
    linear-gradient(currentColor, currentColor) 0 0 / 16px 1.5px, linear-gradient(currentColor, currentColor) 0 0 / 1.5px 16px,
    linear-gradient(currentColor, currentColor) 100% 0 / 16px 1.5px, linear-gradient(currentColor, currentColor) 100% 0 / 1.5px 16px,
    linear-gradient(currentColor, currentColor) 0 100% / 16px 1.5px, linear-gradient(currentColor, currentColor) 0 100% / 1.5px 16px,
    linear-gradient(currentColor, currentColor) 100% 100% / 16px 1.5px, linear-gradient(currentColor, currentColor) 100% 100% / 1.5px 16px;
  background-repeat: no-repeat; }
.case { position: relative; padding: clamp(5rem, 12vh, 9rem) var(--gutter); }
.case__frame { position: relative; display: grid; gap: 2.5rem; }
.case__top { position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding-bottom: 1rem; color: var(--muted); }
/* Links answer the pointer: an underline draws in and the arrow nudges forward. */
.ulink { background: linear-gradient(var(--mark), var(--mark)) 0 100% / 0 2px no-repeat; padding-bottom: 2px; transition: background-size .6s var(--ease); }
.ulink:hover, .ulink:focus-visible, a:hover > .ulink, a:focus-visible > .ulink { background-size: 100% 2px; }
.arr { display: inline-block; transition: translate .5s var(--ease); }
a:hover .arr, a:focus-visible .arr { translate: .35em 0; }
.case__open { color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; min-height: 2rem; }
.case__open span { color: var(--pink-ink); }
.case__open [data-tw-stage] { color: var(--ink); }
.engage { display: inline-flex; align-items: center; gap: .5rem; }
.engage::before { content: ''; width: .45rem; height: .45rem; border: 1px solid var(--mark); }
.case__steps { display: flex; gap: clamp(1rem, 2.5vw, 2.5rem); }
.case__steps li { transition: color .5s var(--ease); }
.case__steps li.is-active { color: var(--ink); }
.case__bar { position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--line); }
.case__bar-fill { display: block; height: 100%; background: var(--mark); transform-origin: left; }
.case__title { margin: 0; font-size: clamp(3.5rem, 12vw, 14rem); font-weight: 800; font-stretch: 100%; line-height: .82; letter-spacing: -.02em; text-transform: uppercase; white-space: nowrap; color: var(--pink-ink); overflow: hidden; padding: .04em 0; }
.case__title .ch { display: inline-block; }
.case__media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-2); border-radius: .9rem; clip-path: inset(0% 0% 0% 0% round .9rem); }
.case__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.case__media-link { position: absolute; inset: 0; z-index: 3; }
.case__stages { display: grid; gap: 4rem; }
.case__stage { display: grid; gap: 1.5rem; align-content: start; }
.case__stage > .label { margin: 0; color: var(--teal); }
.case__lead { margin: 0; font-size: clamp(1.9rem, 3.2vw, 3.3rem); font-weight: 600; line-height: 1.02; letter-spacing: -.03em; font-stretch: 92%; }
.case__copy { margin: 0; max-width: 42ch; color: var(--muted); font-size: 1.05rem; }
.case__facts, .case__stack { border-top: 1px solid var(--line); }
.case__facts li > span, .case__stack li > span { display: flex; justify-content: space-between; gap: 1rem; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.case__stack li > span { font-size: 1.05rem; }
.case__stack .label { align-self: center; color: var(--muted); }
.case__link { display: inline-flex; align-items: center; min-height: 2rem; gap: .5rem; text-decoration: none; color: var(--teal); font-size: 1.05rem; font-weight: 500; }
.case__next { display: none; margin: 0; }

.case.is-pinned { padding: 0; }
.case.is-pinned .case__frame { display: block; height: 100vh; overflow: hidden; }
.case.is-pinned .case__top { position: absolute; top: calc(var(--nav-h) + .5rem); left: var(--gutter); right: var(--gutter); }
.case.is-pinned .case__title { position: absolute; left: var(--gutter); bottom: calc(var(--gutter) * .6); z-index: 4; pointer-events: none; font-size: clamp(3.5rem, min(12vw, 24vh), 14rem); }
.case.is-pinned .case__media { position: absolute; top: calc(var(--nav-h) + 4.5rem); right: var(--gutter); width: min(52%, calc((100vh - var(--nav-h) - 4.5rem - var(--gutter)) * 1.6)); transform-origin: 100% 50%; }
.case.is-pinned .case__stages { position: absolute; top: calc(var(--nav-h) + 7rem); left: var(--gutter); width: 36%; }
.case.is-pinned .case__stage { position: absolute; top: 0; left: 0; width: 100%; }
.case.is-pinned .case__next { display: none !important; }
.case.is-pinned .case__next-unused { position: absolute; left: var(--gutter); bottom: var(--gutter); display: flex; flex-direction: column; color: var(--muted); }
.case.is-pinned .case__next span:last-child { color: var(--ink); }

/* ---------- More work: a swipeable stack with an index and a record panel ---------- */
.more { position: relative; z-index: 1; padding: clamp(6rem, 16vh, 10rem) var(--gutter) 0; background: var(--bg); }
.more__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 5vw, 6rem); align-items: center; }
.more__side { display: grid; gap: 2.5rem; align-content: start; }
.more__index { border-top: 1px solid var(--line); }
.more__index button { all: unset; box-sizing: border-box; cursor: pointer; width: 100%; display: grid; grid-template-columns: 3.2rem 1fr auto; align-items: baseline; padding: .85rem 0; border-bottom: 1px solid var(--line); color: var(--muted); transition: color .3s, padding .6s var(--ease); }
.more__index button { position: relative; }
.more__index button::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--mark); scale: 0 1; transform-origin: left; transition: scale .6s var(--ease); }
.more__index button > span:first-child { transition: translate .5s var(--ease); }
.more__index button:hover { color: var(--ink); }
.more__index button:hover::after, .more__index button:focus-visible::after { scale: 1 1; }
.more__index button:hover > span:first-child { translate: .5rem 0; }
.more__index .nm { transition: translate .5s var(--ease), color .3s; }
.more__index button:hover .nm { translate: .5rem 0; }
.more__index button:hover .nm { color: var(--pink-ink); }
.more__index button:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.more__index .nm { font: 700 clamp(1.3rem, 1.9vw, 1.9rem)/1 'Archivo'; text-transform: uppercase; font-stretch: 80%; letter-spacing: -.01em; }
.more__index .is-current { color: var(--ink); padding-left: .8rem; }
.more__index .is-current .nm { color: var(--pink-ink); }
.record { display: grid; grid-template-columns: auto 1fr; gap: .55rem 1.5rem; margin: 0; padding: 1.2rem 1.3rem; border-radius: .9rem; background: var(--bg-2); min-height: 11.5rem; align-content: start; }
.record dt { color: var(--muted); }
.record dd { margin: 0; }
.record__cta { grid-column: 1 / -1; }
.record a { display: inline-flex; align-items: center; min-height: 2.75rem; margin-top: .6rem; color: var(--teal); text-decoration: none; font: 500 1rem 'Archivo'; text-transform: none; letter-spacing: 0; }
.deck { position: relative; aspect-ratio: 16 / 11.5; perspective: 1400px; touch-action: pan-y; user-select: none; }
.deck__card { position: absolute; inset: 8% 10% 4% 0; display: block; border-radius: 1rem; overflow: hidden; background: var(--bg-2); box-shadow: 0 1px 0 var(--line), 0 24px 50px -28px rgba(0,0,0,.45); text-decoration: none; transform-style: preserve-3d; will-change: transform; cursor: grab; -webkit-user-drag: none; }
.deck__card:active { cursor: grabbing; }
.deck__card img { width: 100%; height: 100%; object-fit: cover; object-position: top center; pointer-events: none; -webkit-user-drag: none; }
.deck__tag { position: absolute; left: .8rem; bottom: .8rem; padding: .45rem .7rem; border-radius: 99px; background: rgba(14, 23, 24, .86); color: #F8DBC1; }
.deck__ctrl { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1rem; padding-right: 10%; }
.deck__ctrl button { all: unset; cursor: pointer; display: grid; place-items: center; width: 2.9rem; height: 2.9rem; border-radius: 50%; border: 1px solid var(--line); transition: background-color .3s, color .3s; }
.deck__ctrl button:hover { background: var(--ink); color: var(--bg); }
.deck__ctrl button:focus-visible { outline: 2px solid var(--teal); }
.deck__btns { display: flex; gap: .5rem; }
.deck__ctrl [data-count] { white-space: nowrap; }
@media (max-width: 600px) { .deck__ctrl .muted { display: none; } }

.bubble { position: fixed; z-index: 80; left: 0; top: 0; width: 6.5rem; height: 6.5rem; margin: -3.25rem 0 0 -3.25rem; border-radius: 50%; background: var(--pink); color: var(--on-pink); display: grid; place-items: center; font: 600 .78rem 'Geist Mono'; letter-spacing: .06em; text-transform: uppercase; pointer-events: none; scale: 0; }
/* ---------- Services, concepts, contact (B) ---------- */
.h2s { margin: 0; font-weight: 800; font-size: clamp(3rem, 9vw, 10rem); line-height: .8; text-transform: uppercase; font-stretch: 62%; }
.svc { padding: clamp(6rem, 16vh, 10rem) var(--gutter) 0; }
.svc__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 2rem; }
.svc__item { padding: 1.5rem; border-radius: 1rem; background: var(--bg-2); min-height: 22rem; display: flex; flex-direction: column; justify-content: space-between; transition: background-color .5s var(--ease), color .5s var(--ease), translate .6s var(--ease); }
    .svc__item h3 { margin: 0 0 .8rem; font-weight: 800; font-size: clamp(1.8rem, 2.6vw, 2.8rem); line-height: .9; text-transform: uppercase; font-stretch: 70%; }
.svc__item p { margin: 0; line-height: 1.4; opacity: .8; }
/* Each card acts out its service on hover (touch: when centred). */
.svc__item { gap: 1.2rem; justify-content: flex-start; min-height: 0; padding: 1.1rem; }
.svc__item > div:last-child { margin-top: auto; }
.svc__item.is-on { background: var(--ink); color: var(--bg); translate: 0 -.5rem; }
/* Stage: a little browser window the scene plays in. Sizes scale with its width (cqw). */
.stage { position: relative; aspect-ratio: 16 / 11; border-radius: .7rem; overflow: hidden; background: #FBEBDD; color: #0E1718; container-type: inline-size; box-shadow: inset 0 0 0 1px rgba(27,20,17,.1); }
:root[data-theme='dark'] .stage { background: #18282A; color: #F8DBC1; box-shadow: inset 0 0 0 1px rgba(248,219,193,.12); }
.stage__bar { position: absolute; z-index: 9; inset: 0 0 auto; height: 7cqw; display: flex; align-items: center; gap: 1.2cqw; padding: 0 2.6cqw; background: rgba(27,20,17,.06); }
:root[data-theme='dark'] .stage__bar { background: rgba(248,219,193,.06); }
.stage__bar i { width: 1.6cqw; height: 1.6cqw; border-radius: 50%; background: currentColor; opacity: .25; }
.view { position: absolute; inset: 7cqw 0 0; overflow: hidden; }

/* A mini homepage, positioned the same way in every style so pieces can swap one for one. */
.mp { position: absolute; inset: 0; font-size: 2.4cqw; }
.mp > * { position: absolute; display: flex; align-items: center; }
.p-logo { left: 6%; top: 7%; width: 18%; height: 9%; }
.p-nav { right: 6%; top: 7%; width: 44%; height: 9%; justify-content: flex-end; gap: 3cqw; }
.p-h { left: 6%; top: 25%; width: 50%; height: 30%; align-items: flex-start; }
.p-txt { left: 6%; top: 57%; width: 46%; height: 12%; align-items: flex-start; }
.p-btn { left: 6%; top: 73%; width: 30%; height: 13%; justify-content: center; }
.p-img { right: 6%; top: 25%; width: 34%; height: 61%; overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; }
.mp-bg { position: absolute; inset: 0; }

/* wire: grey placeholders */
.v-wire .ph { background: rgba(127,127,127,.22); border-radius: 1cqw; }
.v-wire .p-nav span { width: 8cqw; height: 1.8cqw; }
.v-wire .p-h { flex-direction: column; gap: 2cqw; } .v-wire .p-h span { width: 100%; height: 5cqw; } .v-wire .p-h span:last-child { width: 70%; }
.v-wire .p-txt { flex-direction: column; gap: 1.4cqw; } .v-wire .p-txt span { width: 100%; height: 1.6cqw; } .v-wire .p-txt span:last-child { width: 60%; }
.v-wire .p-img { background: rgba(127,127,127,.22); border-radius: 1cqw; } .v-wire .p-img::before, .v-wire .p-img::after { content: ''; position: absolute; left: 50%; top: 50%; width: 140%; height: 1px; background: rgba(127,127,127,.5); rotate: 58deg; translate: -50% 0; } .v-wire .p-img::after { rotate: -58deg; }
.v-wire .p-logo { background: rgba(127,127,127,.22); border-radius: 1cqw; } .v-wire .p-btn { background: rgba(127,127,127,.22); border-radius: 99px; }

/* fin: the finished, current look */
.v-fin .mp-bg { background: #F8DBC1; } :root[data-theme='dark'] .v-fin .mp-bg { background: #0E1718; }
.v-fin { color: #0E1718; } :root[data-theme='dark'] .v-fin { color: #F8DBC1; }
.v-fin .p-logo { font-weight: 800; font-size: 3.6cqw; letter-spacing: -.04em; } .v-fin .p-logo i { display: inline-block; width: .17em; height: .17em; margin-left: .06em; background: #944810; align-self: flex-end; margin-bottom: .3em; }
.v-fin .p-nav { font: 1.7cqw 'Geist Mono'; text-transform: uppercase; letter-spacing: .06em; }
.v-fin .p-h { font-weight: 800; font-size: 6.4cqw; line-height: .88; text-transform: uppercase; font-stretch: 75%; }
.v-fin .p-txt { font-size: 1.9cqw; line-height: 1.35; opacity: .7; }
.v-fin .p-btn { background: #F2A65A; color: #0E1718; border-radius: 99px; font-weight: 600; font-size: 2cqw; }
.v-fin .p-img { border-radius: 1.6cqw; }

/* old: a dated homepage */
.v-old .mp-bg { background: #C8C8C8; }
.v-old { color: #000; font-family: 'Times New Roman', Times, serif; }
.v-old .p-logo { font-size: 3.4cqw; font-weight: 700; font-style: italic; color: #800000; }
.v-old .p-nav { font-size: 2cqw; color: #0000EE; text-decoration: underline; gap: 1.2cqw; }
.v-old .p-h { font-size: 4.6cqw; line-height: 1.05; justify-content: center; text-align: center; color: #000080; }
.v-old .p-txt { font-size: 2cqw; justify-content: center; text-align: center; font-style: italic; }
.v-old .p-btn { background: #DDD; border: .5cqw outset #EEE; font-size: 2.2cqw; font-family: Arial, sans-serif; }
.v-old .p-img { border: .7cqw ridge #888; } .v-old .p-img img { filter: saturate(.25) contrast(.8) blur(.3px); image-rendering: pixelated; }

/* brut: loud mono */
.v-brut .mp-bg { background: #fff; } .v-brut { color: #000; font-family: 'Geist Mono', monospace; }
.v-brut .p-logo { font-size: 3cqw; font-weight: 700; border: .4cqw solid #000; justify-content: center; }
.v-brut .p-nav { font-size: 1.8cqw; text-transform: uppercase; }
.v-brut .p-h { font-size: 5.6cqw; line-height: .95; text-transform: uppercase; }
.v-brut .p-txt { font-size: 1.8cqw; }
.v-brut .p-btn { background: #000; color: #fff; font-size: 2cqw; text-transform: uppercase; }
.v-brut .p-img { border: .4cqw solid #000; } .v-brut .p-img img { filter: grayscale(1) contrast(1.6); }

/* soft: rounded pastel */
.v-soft .mp-bg { background: #DDEBE8; } .v-soft { color: #1D646C; }
.v-soft .p-logo { font-size: 3.2cqw; font-weight: 600; font-style: italic; }
.v-soft .p-nav { font-size: 1.9cqw; }
.v-soft .p-h { font-size: 5cqw; line-height: 1; font-weight: 300; letter-spacing: -.03em; }
.v-soft .p-txt { font-size: 1.9cqw; opacity: .8; }
.v-soft .p-btn { background: #fff; border-radius: 99px; font-size: 2cqw; box-shadow: 0 1cqw 2cqw rgba(29,100,108,.2); }
.v-soft .p-img { border-radius: 50% 50% 2cqw 2cqw; } .v-soft .p-img img { filter: saturate(.7) brightness(1.08); }

.layer { position: absolute; inset: 0; }

/* 3A / 3B: code panes */
.code { position: absolute; left: 5%; top: 8%; width: 52%; margin: 0; padding: 3cqw; border-radius: 1.6cqw; background: #0E1718; color: #F8DBC1; font: 2.1cqw/1.75 'Geist Mono', monospace; white-space: pre; overflow: hidden; }
.code .ln { display: block; padding: 0 1cqw; margin: 0 -1cqw; border-radius: .6cqw; transition: background-color .3s, color .3s; }
.code .ln.is-run { background: rgba(248,219,193,.14); }
.code .k { color: #5FB3BA; } .code .s { color: #F59AAD; } .code .v { color: #F2C27B; }
.comp { position: absolute; right: 7%; top: 22%; width: 28%; aspect-ratio: 3 / 4; border-radius: 2cqw; background: #fff; box-shadow: 0 2cqw 4cqw -2cqw rgba(0,0,0,.35); overflow: hidden; display: flex; flex-direction: column; }
.comp img { width: 100%; height: 62%; object-fit: cover; }
.comp b { display: block; margin: 1.6cqw 1.6cqw .6cqw; height: 1.8cqw; width: 70%; background: #0E1718; border-radius: .6cqw; opacity: .8; }
.comp b + b { margin-top: 0; width: 45%; opacity: .3; }
.comp-sel { position: absolute; inset: -1.2cqw; border: .3cqw dashed #1D646C; border-radius: 3cqw; opacity: 0; }
.knobs { position: absolute; left: 5%; bottom: 7%; font: 1.6cqw 'Geist Mono'; opacity: .7; text-transform: uppercase; }

/* 4B: versions */
.ver { position: absolute; width: 74%; height: 74%; container-type: inline-size; border-radius: 1.6cqw; overflow: hidden; box-shadow: 0 2cqw 5cqw -2cqw rgba(0,0,0,.4); }
.ver__tag { position: absolute; z-index: 5; right: 2cqw; top: 2cqw; padding: .5cqw 1.2cqw; border-radius: 99px; background: #0E1718; color: #F8DBC1; font: 1.6cqw 'Geist Mono'; }


.svc__item > .mono { color: var(--teal); }
.svc__item.is-on > .mono { color: var(--pink-ink); }
.cps { padding: clamp(6rem, 16vh, 10rem) var(--gutter) 0; }
.cps__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 2rem; perspective: 900px; }
.cps__grid a { text-decoration: none; transform-style: preserve-3d; }
.cps__grid .im { aspect-ratio: 4 / 5; border-radius: 1rem; overflow: hidden; }
.cps__grid img { width: 100%; height: 100%; object-fit: cover; }
.cps__grid .mono { display: flex; justify-content: space-between; padding-top: .8rem; }
.cta { margin-top: clamp(7rem, 18vh, 12rem); background: var(--ink); color: var(--bg); border-radius: 2rem 2rem 0 0; padding: clamp(4rem, 12vh, 8rem) var(--gutter) 5rem; }
.cta__row { display: flex; justify-content: space-between; align-items: end; gap: 2rem; margin-top: 3rem; }
.cta__row p { margin: 0; max-width: 28rem; font-size: 1.2rem; line-height: 1.35; }
.cta .pill { background: var(--pink); color: var(--on-pink); font-size: 1.15rem; padding: 1.3rem 1.8rem; }
.cta .pill b { background: var(--bg); color: var(--ink); }
.foot { display: flex; justify-content: space-between; gap: 1rem; margin-top: 5rem; padding-top: 1.2rem; border-top: 1px solid color-mix(in srgb, var(--bg) 25%, transparent); }


/* ---------- Experience: the original timeline (line fills, years roll back, points count up) ---------- */
.xp { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); padding: clamp(6rem, 16vh, 10rem) var(--gutter) 0; }
.xp__head { grid-column: 1 / 5; align-self: start; position: sticky; top: calc(var(--nav-h) + 2rem); display: grid; gap: 1.5rem; justify-items: start; }
.xp__resume { display: inline-flex; align-items: center; gap: .6rem; padding: .95rem 1.35rem; border-radius: 99px; background: var(--pink); color: var(--on-pink); text-decoration: none; font: 600 .95rem/1 'Archivo'; }
.xp__resume b { display: grid; place-items: center; width: 1.4rem; height: 1.4rem; border-radius: 50%; background: var(--ink); color: var(--bg); font-weight: 600; transition: rotate .5s var(--ease); }
.xp__resume:hover b { rotate: 45deg; }
.timeline__track { position: relative; grid-column: 6 / 13; padding-left: clamp(2rem, 4vw, 3.5rem); }
.timeline__list { list-style: none; margin: 0; padding: 0; }
.timeline__line { position: absolute; top: 0; bottom: 0; left: 0; width: 1px; background: var(--line); }
.timeline__fill { position: absolute; inset: 0; background: var(--mark); transform-origin: top; }
.tl { position: relative; display: grid; grid-template-columns: minmax(6rem, 10rem) 1fr; gap: 2rem; padding: clamp(2.5rem, 7vh, 4.5rem) 0; border-bottom: 1px solid var(--line); }
.tl__dot { position: absolute; top: calc(clamp(2.5rem, 7vh, 4.5rem) + .9rem); left: calc(-1 * clamp(2rem, 4vw, 3.5rem) - 5px); width: 11px; height: 11px; border: 1px solid var(--muted); border-radius: 50%; background: var(--bg); transition: background-color .5s var(--ease), border-color .5s var(--ease), transform .5s var(--ease); }
.tl.is-active .tl__dot { border-color: var(--mark); background: var(--mark); transform: scale(1.3); }
.tl__when { display: grid; gap: .75rem; align-content: start; }
.tl__year { font-weight: 800; font-size: clamp(2.6rem, 4.4vw, 4.6rem); line-height: 1; font-stretch: 75%; font-variant-numeric: tabular-nums; }
.tl__range { font-family: 'Geist Mono', monospace; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.tl__body { display: grid; gap: .6rem; align-content: start; }
.tl__company { margin: 0; font-weight: 800; font-size: clamp(1.6rem, 2.4vw, 2.5rem); line-height: .95; text-transform: uppercase; font-stretch: 80%; }
.tl__role { margin: 0; font-family: 'Geist Mono', monospace; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--teal); }
.tl__desc { margin: .5rem 0 0; max-width: 44ch; color: var(--muted); }
.tl__points { display: grid; gap: .5rem; max-width: 52ch; margin: .75rem 0 0; padding: 1rem 0 0; list-style: none; border-top: 1px solid var(--line); font-size: .98rem; }
.tl__points li { position: relative; padding-left: 1.5em; }
.tl__dash { position: absolute; top: .78em; left: 0; width: .85em; height: 1px; background: var(--muted); transform-origin: left; transition: width .45s var(--ease), background-color .45s var(--ease); }
.tl__points li > span { transition: translate .45s var(--ease); }
@media (hover: hover) { .tl__points li:hover .tl__dash { width: 1.15em; background: var(--mark); } .tl__points li:hover > span { translate: .3em 0; } }
.tl__num { font-weight: 700; color: var(--pink-ink); font-variant-numeric: tabular-nums; }
.odo { display: inline-flex; } .odo__col { display: inline-block; height: 1em; overflow: hidden; }
.odo__strip { display: flex; flex-direction: column; position: relative; top: var(--odo-top, 0); } .odo__strip > span { display: block; height: 1em; line-height: 1; }
@media (max-width: 1023px) { .xp__head { grid-column: 1 / -1; position: static; margin-bottom: 3rem; } .timeline__track { grid-column: 1 / -1; } }
@media (max-width: 767px) { .tl { grid-template-columns: 1fr; gap: 1rem; } .tl__when { grid-auto-flow: column; justify-content: start; align-items: baseline; gap: 1rem; } }
@media (max-width: 1023px) { .rail { display: none; } }
@media (max-width: 900px) {
  .hero { min-height: 0; padding-top: 8rem; }
  .hero__intro, .hero__foot, .cta__row, .work__head { flex-direction: column; align-items: start; }
  .case__steps { display: none; }
  .more__grid { grid-template-columns: 1fr; gap: 2rem; } .more__side { display: contents; } .more__side .h2s { order: 0; } .more__grid > div:last-child { order: 1; } .record { order: 2; } .more__index { order: 3; } .deck__card { inset: 6% 8% 4% 0; } .deck__ctrl { padding-right: 8%; }
  .svc__grid, .cps__grid { grid-template-columns: 1fr 1fr; }
  .top .pill { display: none; }
}
/* Below 1280px the six links and the buttons no longer fit side by side: the nav becomes the Menu pill. */
@media (max-width: 1279px) {
  .pnav { position: static; translate: none; margin-left: auto; margin-right: .6rem; }
  .pnav__links { display: none; }
  .pnav .pnav__status, .pnav:not(.is-sectioned) .pnav__status { max-width: 30rem; opacity: 1; padding-inline: .9rem; visibility: visible; }
  .pnav.is-open .pnav__links { display: flex; position: absolute; top: calc(100% + .5rem); right: 0; flex-direction: column; padding: .4rem; max-width: none; opacity: 1; background: var(--bg); border: 1px solid var(--line); border-radius: 1.2rem; }
}
@media (max-width: 900px) { .pnav { margin-right: 0; } }
@media (max-width: 600px) { .svc__grid { grid-template-columns: 1fr; } .more, .svc, .cps, .xp { padding-top: 4.5rem; } .statement { padding-block: 4.5rem; } .case { padding-block: 3rem 1rem; } .cta { margin-top: 2.5rem; } .pnav__text.is-empty + .pnav__menu { font-size: inherit; gap: .45rem; } .xp__head { margin-bottom: 1.5rem; } .pnav__text { max-width: 7.5rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .pnav__menu { font-size: 0; gap: 0; } .pnav__menu .pnav__icon { font-size: .9rem; } .tl__points { font-family: 'Archivo', sans-serif; text-transform: none; letter-spacing: 0; font-size: 1rem; } .foot { flex-direction: column; gap: .6rem; } }

/* ---------- Loader (first visit per session; js/home.js) ----------
   Two background halves split apart to reveal the hero. The logo and the word sit above them, exactly
   over the header logo and the hero's first line, so they're simply removed once the halves are open. */
.loader { display: none; }
.has-loader .loader { display: block; position: fixed; inset: 0; z-index: 9999; color: var(--ink); animation: loader-failsafe .4s ease 4.5s forwards; touch-action: none; }
@keyframes loader-failsafe { to { opacity: 0; visibility: hidden; } }
.has-loader .logo .logo__l, .has-loader .logo .logo__dot { animation: none; }
.loader__half { position: absolute; left: 0; right: 0; height: 50.5%; background: var(--bg); will-change: transform; }
.loader__half--top { top: 0; }
.loader__half--bottom { bottom: 0; }
.loader__logo { position: absolute; left: var(--gutter); top: 1.55rem; font-weight: 600; font-size: 1.625rem; letter-spacing: -0.045em; line-height: 1; white-space: nowrap; }
.loader__logo i { display: inline-block; width: .15em; height: .15em; margin-left: .105em; background: var(--mark); }
.loader__label { position: absolute; right: var(--gutter); top: 1.9rem; color: var(--muted); }
.loader__mask { position: absolute; left: var(--gutter); right: var(--gutter); top: 42%; height: 1em; font-size: clamp(3rem, 15vw, 14rem); clip-path: inset(-.1em -.2em -.04em -.2em); }
.loader__mask .press { position: absolute; inset: 0 0 auto; }
.loader__mask .ln { will-change: transform; }
.loader__note { position: absolute; left: var(--gutter); bottom: calc(var(--gutter) + 1.6rem); margin: 0; color: var(--muted); max-width: 70vw; }
.loader__progress { position: absolute; left: var(--gutter); right: var(--gutter); bottom: var(--gutter); display: flex; align-items: center; gap: 1rem; }
.loader__bar { flex: 1; height: 1px; background: var(--line); overflow: hidden; }
.loader__bar i { display: block; height: 100%; background: var(--mark); transform: scaleX(0); transform-origin: 0 50%; }
.loader__count { min-width: 4ch; text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 600px) { .loader__logo { top: 1.4rem; } .loader__label { top: 1.75rem; } }
