@font-face {
  font-family: 'IBM Plex Mono';
  font-weight: 400;
  font-display: swap;
  src: url(fonts/plex-mono-400.woff2) format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-weight: 500;
  font-display: swap;
  src: url(fonts/plex-mono-500.woff2) format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-weight: 700;
  font-display: swap;
  src: url(fonts/plex-mono-700.woff2) format('woff2');
}

:root {
  --ink: #000;
  --paper: #fff;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--paper); color: var(--ink); font-family: var(--mono); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }

.site-head {
  position: fixed; inset: 0 0 auto 0; z-index: 2;
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 1.75vw; font-family: var(--mono); font-size: clamp(13px, 1.05vw, 21px); line-height: 1.2;
}
.site-head nav { display: flex; gap: 2.2em; padding-top: .25em; }
.site-head nav a:hover { text-decoration: underline; text-underline-offset: .25em; }

/* One SVG holds the whole lockup. */
.stage { position: fixed; inset: 0; display: grid; place-items: center; }
.lockup { width: min(46vw, 92vh * 920 / 560); height: auto; overflow: visible; display: block; }

/* origin = centre of the C, so scaling zooms into the C and translating brings it to the middle of the window */
.lockup-wrap { position: relative; transform-origin: 71.41% 49.91%; }
.sub {
  position: absolute; top: 100%; left: 0; right: 0; margin: .9vw 0 0; text-align: center;
  font-family: var(--mono); font-size: clamp(14px, 1.15vw, 24px); letter-spacing: .02em;
}

/* Sits behind the stage so the growing C covers it. */
.hint {
  position: fixed; left: 0; right: 0; bottom: 5vh; margin: 0; text-align: center;
  font-family: var(--mono); font-size: clamp(14px, 1.15vw, 24px); letter-spacing: .02em;
  opacity: 0; pointer-events: none;   /* hides instantly: no fade-out */
}
.hint.show { opacity: 1; transition: opacity .6s ease; }

/* Shown above the lockup after a while with no scrolling. */
.nudge {
  position: fixed; left: 0; right: 0; top: 10vh; z-index: 2; margin: 0; text-align: center;
  font-family: var(--mono); font-size: clamp(14px, 1.15vw, 24px); letter-spacing: .02em;
  opacity: 0; pointer-events: none;
}
.nudge.show { opacity: 1; transition: opacity 1.6s ease; }
.ch { display: inline-block; will-change: transform; }

/* Real height is set in JS (zoom distance + content height); this is only the no-JS fallback. */
.scroll-space { height: 400vh; }

:root { --sky: #87ceeb; --blush: #f7d4d6; --gutter: 1.75vw; --small: clamp(13px, 1.05vw, 21px); }

/* Work, about and footer live in one tall column inside a fixed window; JS slides it up as you scroll.
   The bg sits behind it and takes over from the C's blue disc once the disc fills the window. */
.bg, .flow-mask { position: fixed; inset: 0; z-index: 1; opacity: 0; pointer-events: none; }
.flow-mask { overflow: hidden; -webkit-mask-image: linear-gradient(to bottom, transparent 0, transparent 5vh, #000 12vh); mask-image: linear-gradient(to bottom, transparent 0, transparent 5vh, #000 12vh); }
.flow { position: relative; will-change: transform; padding-inline: var(--gutter); }
.flow a:hover { text-decoration: underline; text-underline-offset: .25em; }
.label { margin: 0; font-weight: 700; font-size: var(--small); }
.label span { opacity: .6; font-weight: 400; }

.work { padding: 19vh 0 34vh; }
.rows { list-style: none; margin: 6vh 0 0; padding: 0; }
.row {
  display: grid; grid-template-columns: 1.5fr 1fr auto; align-items: baseline; gap: 2vw;
  padding: 3vw 0; border-top: 1px solid #000; transition: opacity .3s ease;
}
.rows li:last-child .row { border-bottom: 1px solid #000; }
.brand { font-size: clamp(22px, 4.1vw, 84px); line-height: 1; letter-spacing: -.01em; }
.role, .more { font-size: var(--small); }
.more span { display: inline-block; transition: transform .25s ease; }
.rows:hover .row { opacity: .35; }
.rows .row:hover { opacity: 1; text-decoration: none; }
.row:hover .more span { transform: translate(.2em, -.2em); }

.about { position: relative; height: 100vh; padding: 11vh 0 4vh; display: flex; flex-direction: column; justify-content: center; }
.statement { max-width: 17em; margin: 5vh 0 11vh; font-size: clamp(24px, 3.4vw, 66px); line-height: 1.1; letter-spacing: -.01em; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 3vw; max-width: 62%; font-size: var(--small); line-height: 1.7; }
.cols p { margin: 0; max-width: 30em; }

.cv { padding: 24vh 0 26vh; }
.foot { min-height: 110vh; display: flex; flex-direction: column; justify-content: space-between; padding: 12vh 0 var(--gutter); border-top: 1px solid #000; }
.hire { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 0; }
.cv .bio { max-width: 40em; margin: 6vh 0 15vh; font-size: clamp(18px, 2.1vw, 40px); line-height: 1.25; }
.stats { list-style: none; margin: 0 0 18vh; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4vw; }
.stats li { border-top: 1px solid #000; padding-top: 1.2vw; }
.stats b { display: block; font-weight: 400; font-size: clamp(34px, 5.4vw, 104px); line-height: 1; letter-spacing: -.03em; margin-bottom: .5em; }
.stats span { display: block; font-size: var(--small); line-height: 1.45; max-width: 22em; }
.cv-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4vw; font-size: var(--small); line-height: 1.75; }
.cv-cols p { margin: 0 0 2.5em; max-width: 30em; }
.cv-cols .label { margin: 0 0 1.6em; }
.cv-cols p + .label { margin-top: 4em; }
.cv-cols b { font-weight: 500; }   /* headings 700, job titles / institutions 500, what I did 400 */
.note { margin: 0; font-size: var(--small); }
.hire-link { display: inline-block; margin: 3vh 0 2.5vh; font-size: clamp(52px, 13vw, 260px); line-height: .95; letter-spacing: -.03em; }
.hire-link:hover { text-decoration: none !important; }
.hire-link span { font-size: .5em; vertical-align: top; display: inline-block; transition: transform .3s ease; }
.hire-link:hover span { transform: translate(.1em, -.1em); }
.legal { display: flex; justify-content: space-between; gap: 2vw; font-size: var(--small); padding-top: 1.2vw; border-top: 1px solid #000; }
.legal nav { display: flex; gap: 1.8em; }

@media (max-width: 860px) {
  :root { --gutter: 18px; --small: 15px; }
  .site-head { padding: 18px; }
  .row { padding: 18px 0; gap: 4px 14px; }
  .cols { grid-template-columns: 1fr; gap: 28px; max-width: none; }
  .statement { font-size: 28px; }
  .stats, .cv-cols { grid-template-columns: 1fr; gap: 28px; }
  .stats b { font-size: 48px; }
  .legal { flex-wrap: wrap; gap: 12px 24px; padding-top: 14px; }
}

/* Reduced motion: no zoom. The content simply follows the logo as an ordinary page. */
.reduced .scroll-space, .reduced .bg { display: none; }
.reduced .flow-mask { position: relative; inset: auto; opacity: 1; pointer-events: auto; margin-top: 100vh; overflow: visible; -webkit-mask-image: none; mask-image: none; }
.reduced .stage { position: absolute; height: 100vh; }
.reduced .work, .reduced .flow-mask { background: var(--sky); }
.reduced .about { background: var(--blush); }
.reduced .cv { background: #ffd6b0; }
.reduced .foot { background: #d0eac8; }
.reduced .flow { padding-inline: 0; }
.reduced .flow > section, .reduced .flow > footer { padding-inline: var(--gutter); }

/* Top-left: the name becomes a small ZC mark once the C's ring has passed over it (class set in JS). */
.brand-mark { position: relative; display: block; }
.brand-mark .zc { position: absolute; left: 0; top: 0; height: 2.4em; width: auto; overflow: visible; visibility: hidden; }
.swapped .brand-mark .txt { visibility: hidden; }
.swapped .brand-mark .zc { visibility: visible; }

/* Row thumbnails: only where there is no hover cursor to show the logo */
.thumb { display: none; width: 56px; height: 56px; object-fit: contain; object-position: left center; }

/* The plain scrolling page (phones, tablets, reduced motion) */
.static .site-head { position: absolute; }
.static .stage { height: 100vh; height: 100svh; }
.static .flow-mask { margin-top: 100vh; margin-top: 100svh; }
.static .work { padding: 12vh 0 14vh; }
.static .about { height: auto; padding: 14vh 0; }
.static .statement { margin: 4vh 0 8vh; }
.static .cv { padding: 14vh 0; }
.static .foot { min-height: 80vh; min-height: 80svh; }
.static .rows:hover .row { opacity: 1; }
@media (hover: none) { .thumb { display: block; } .row { grid-template-columns: auto 1fr auto; } }
@media (max-width: 860px) {
  .row { grid-template-columns: auto 1fr; align-items: center; }
  .thumb { grid-row: 1 / span 2; width: 48px; height: 48px; }
  .brand { grid-column: 2; font-size: 26px; }
  .role { grid-column: 2; }
  .more { display: none; }
  .lockup { width: 88vw; }
  .static .cv-cols p { margin-bottom: 1.6em; }
  .static .cv-cols p + .label { margin-top: 2em; }
  .static .stats { margin-bottom: 8vh; }
  .static .cv .bio { margin: 4vh 0 8vh; }
  .hire-link { font-size: 17vw; }
  .site-head nav { gap: .9em; }
}
.note.email { margin: 0 0 1.2em; }

/* Wrapper has no box of its own on desktop */
.hero-wrap { display: contents; }

/* Phones and tablets: the C zooms while the stage is pinned, then the page scrolls normally over one fixed colour layer
   whose colour fades from section to section (see initLite). */
.lite .hero-wrap { display: block; position: relative; z-index: 1; height: 200vh; height: 200svh; }
.lite .stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.lite .lockup-wrap { will-change: transform; }
.lite .scroll-space { display: none; }
.lite .bg { position: fixed; inset: 0; z-index: 0; opacity: 0; }
.lite .flow-mask { position: relative; inset: auto; z-index: 1; margin-top: -100vh; margin-top: -100svh; opacity: 1; pointer-events: auto; overflow: visible; -webkit-mask-image: none; mask-image: none; }
.lite .work { padding-top: 6vh; }

/* Portrait: fills the whole right side of the about section, edge to edge */
.portrait { position: absolute; top: 0; bottom: 0; right: calc(-1 * var(--gutter)); width: 33%; margin: 0; background: #111; }
.portrait img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.static .portrait { position: static; width: min(100%, 520px); aspect-ratio: 4 / 5; margin: 8vh 0 0; }
@media (max-width: 860px) { .static .portrait { width: 100%; } }
.static .cols { max-width: none; }
