/* ==========================================================================
   kodali.pro
   Dark-only and deliberately quiet: one reading column, hairlines, a flat
   background. Tokens, then base, then components in page order.
   ========================================================================== */

:root {
  --bg: #08090a;
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .14);
  --text: #f4f4f5;
  --text-soft: #d2d2d7;
  --text-2: #a1a1aa;
  --text-3: #82838c;
  --accent: #6ee7b7;
  --accent-strong: #34d399;
  --accent-teal: #5eead4;
  --gold: #d6b06b;

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

  --container: 800px; /* the reading column */
  --wide: 1120px;     /* the project showcase breaks out to this */
  --gutter: clamp(20px, 4.5vw, 40px);
  --space: clamp(64px, 8vw, 100px);
  --strip-gap: clamp(32px, 3.6vw, 40px); /* above and below the proof strip */
  --label: 176px;     /* label column inside the reading column */
  --rail: 28px;       /* the experience timeline's offset from its text */
  --nav-h: 64px;
  --radius: 22px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

/* Base ------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  color-scheme: dark;
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: clip;
  background: var(--bg);
  color: var(--text-2);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; }

::selection { background: rgba(110, 231, 183, .3); color: #fff; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}
.container.wide { width: min(100% - 2 * var(--gutter), var(--wide)); }

.i { width: 18px; height: 18px; flex: none; }

.nb { white-space: nowrap; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--text);
  color: #0a0b0c;
  font-weight: 500;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform .2s var(--ease);
}
.skip:focus { transform: none; }

/* Headings & shared type ------------------------------------------------- */

h1, h2, h3, h4, h5 { color: var(--text); font-weight: 500; }

/* Section headings stay small on purpose: the page is meant to be skimmed. */
h2,
.work-title {
  margin: 0;
  font-size: clamp(22px, 1rem + .7vw, 26px);
  line-height: 1.12;
  letter-spacing: -.036em;
  text-wrap: balance;
}

/* The serif-italic accent word used in headlines. */
h2 em,
.work-title em,
.flow-end {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.1em;
  letter-spacing: -.01em;
  padding: 0 .1em 0 .02em;
  margin: 0 -.1em 0 -.02em;
  background: linear-gradient(100deg, #ffffff 0%, var(--accent) 52%, var(--accent-teal) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* Section label: a short accent tick, then the word. */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 8px;
  color: var(--text-3);
  font: 500 11.5px/1 var(--font-mono);
  letter-spacing: .14em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--accent);
  transform-origin: left;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--text-3);
  font: 500 12px/1.3 var(--font-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
}

.link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -.01em;
  text-decoration: none;
}
.link .i { width: 16px; height: 16px; transition: transform .35s var(--ease); }
a.link:hover .i,
.work:hover .link .i { transform: translate(2px, -2px); }

/* Status dot (the hero line, the current role and the Lumesce kicker). */
.dot {
  position: relative;
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-strong);
  box-shadow: 0 0 10px rgba(52, 211, 153, .8);
}
.dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid var(--accent-strong);
  border-radius: inherit;
  animation: ping 2.4s var(--ease-out) infinite;
}
.dot-gold { background: var(--gold); box-shadow: 0 0 10px rgba(214, 176, 107, .7); }
.dot-gold::after { border-color: var(--gold); }

@keyframes ping {
  from { transform: scale(1); opacity: .9; }
  to { transform: scale(3.2); opacity: 0; }
}

/* Buttons ---------------------------------------------------------------- */

.btn {
  --h: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: var(--h);
  padding: 0 21px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: none;
  color: var(--text);
  font: 500 15px/1 var(--font-sans);
  letter-spacing: -.01em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
}
.btn:focus-visible { border-radius: 999px; }
.btn:active { transform: scale(.98); }
.btn .i { width: 17px; height: 17px; transition: transform .3s var(--ease); }

.btn-light {
  background: var(--text);
  color: #0a0b0c;
}
.btn-light:hover {
  background: #fff;
  transform: translateY(-1px);
}
.btn-light:hover .i-dl { transform: translateY(2px); }

.btn-ghost { border-color: var(--line-strong); }
.btn-ghost:hover {
  border-color: rgba(255, 255, 255, .28);
  background: rgba(255, 255, 255, .05);
}

.btn-icon { width: var(--h); padding: 0; }
.btn-sm { --h: 36px; padding: 0 15px; font-size: 14px; }
.btn-lg { --h: 52px; padding: 0 24px; font-size: 16px; }

/* Nav -------------------------------------------------------------------- */

/* Nothing but the mark and the links at the top of the page; once it scrolls, a
   backdrop fades in and a hairline draws across underneath. */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--nav-h);
}
.nav::before,
.nav::after {
  content: "";
  position: absolute;
  z-index: -1;
}
.nav::before {
  inset: 0;
  background: rgba(8, 9, 10, .88);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  opacity: 0;
  transition: opacity .5s var(--ease);
}
.nav::after {
  inset: auto 0 0;
  height: 1px;
  background: var(--line);
  transform: scaleX(0);
  transition: transform 1s var(--ease-out);
}
.nav.is-scrolled::before,
html:not(.js) .nav::before { opacity: 1; }
.nav.is-scrolled::after,
html:not(.js) .nav::after { transform: none; }

.nav-bar {
  --nav-gap: clamp(18px, 2.6vw, 28px);
  display: flex;
  align-items: center;
  gap: var(--nav-gap);
  height: 100%;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  border-radius: 10px;
  color: var(--text);
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: -.01em;
  text-decoration: none;
  white-space: nowrap;
}
.mark { width: 28px; height: 28px; flex: none; }

.nav-links {
  display: flex;
  gap: var(--nav-gap);
}
.nav-links a {
  position: relative;
  padding: 8px 0;
  color: var(--text-2);
  font-size: 14px;
  text-decoration: none;
  transition: color .25s;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 3px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .55s var(--ease-out);
}
.nav-links a:hover,
.nav-links a[aria-current] { color: var(--text); }
.nav-links a:hover::after,
.nav-links a[aria-current]::after {
  transform: scaleX(1);
  transform-origin: left;
}
.nav-links a[aria-current]::after { background: var(--accent); }

/* The hero introduces him, so at the top the nav holds back its own name and
   button. Once the hero's buttons have scrolled away (.is-docked), the name fades
   in beside the mark, the links move over and the button fades in where they
   were. The button's slot is a grid column that opens from 0fr to 1fr; its gap to
   the links lives inside the slot (hence the negative margin), so while it's
   closed the links end flush with the column. */
.nav-name { transition: opacity .6s var(--ease), transform .8s var(--ease-out); }
.nav-cta {
  display: grid;
  grid-template-columns: 1fr;
  margin-left: calc(var(--nav-gap) * -1);
  transition: grid-template-columns .8s var(--ease-out);
}
.nav-cta > span {
  display: flex;
  min-width: 0;
}
.nav-cta .btn {
  flex: none;
  margin-left: var(--nav-gap);
  transition: background-color .25s var(--ease), transform .25s var(--ease), opacity .5s var(--ease) .3s, visibility 0s;
}
.js .nav:not(.is-docked) .nav-brand:not(:focus-visible) .nav-name {
  opacity: 0;
  transform: translateX(-6px);
}
.js .nav:not(.is-docked) .nav-cta { grid-template-columns: 0fr; }
.js .nav:not(.is-docked) .nav-cta .btn {
  opacity: 0;
  visibility: hidden;
  transition: background-color .25s var(--ease), transform .25s var(--ease), opacity .3s var(--ease), visibility 0s .3s;
}

/* Hero ------------------------------------------------------------------- */

/* One quiet block: the status line, then the name and the headline at the same
   reading size, the buttons and a compact proof strip. Hierarchy comes from
   colour and weight rather than size, and grouping from spacing: the name and
   the headline sit close as a pair, and the status line stands apart above them
   by the same step as the buttons below. */
.hero {
  --intro: clamp(16px, 1rem + .12vw, 18px);
  padding-top: calc(var(--nav-h) + clamp(36px, 7.5vh, 72px));
}

.status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin: 0;
  color: var(--text-2);
  font-size: 13.5px;
  line-height: 1.25;
}
.status strong { color: var(--text); font-weight: 500; }
.status-sep {
  width: 1px;
  height: 12px;
  background: var(--line-strong);
}

.hero-name {
  margin: 23px 0 10px;
  color: var(--text-2);
  font-size: var(--intro);
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: -.01em;
}
.hero-name strong { color: var(--text); font-weight: 500; }

/* The headline flow, goals → plans → delivery → results, read as a sentence.
   Words and arrows are all in place from the start; the only motion is a light
   that runs down the arrows every few seconds, each arrowhead brightening as
   it arrives. The two halves never break apart, so a narrow screen wraps it
   only between them. */
.flow {
  margin: 0;
  color: var(--text);
  font-size: var(--intro);
  font-weight: 450;
  line-height: 1.4;
  letter-spacing: -.01em;
}
.flow-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .15em .5em;
}
.flow-part {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}
.flow-lead { margin-right: .3em; color: var(--text-2); }
.flow-end { font-size: 1.12em; line-height: 1; }

.flow-link {
  --len: 1.3em;
  --beam: calc(var(--len) * .7); /* the length of the light */
  position: relative;
  flex: none;
  width: var(--len);
  height: 1px;
  margin: .1em .5em 0;
  background: linear-gradient(90deg, rgba(110, 231, 183, .14), rgba(110, 231, 183, .8));
}
/* The second half starts with an arrow; on a wrapped line it sits flush left. */
.flow-part + .flow-part > .flow-link:first-child { margin-left: 0; }
/* Arrowhead: a fine chevron with round ends, its tip on the end of the line. */
.flow-link::after {
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 5 8'%3E%3Cpath d='M1 1l3 3-3 3' fill='none' stroke='%23000' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  content: "";
  position: absolute;
  top: 50%;
  right: -1px;
  width: 5px;
  height: 8px;
  margin-top: -4px;
  background: rgba(110, 231, 183, .9);
  -webkit-mask: var(--chevron) center / 100% 100% no-repeat;
  mask: var(--chevron) center / 100% 100% no-repeat;
  animation: flow-tip 9s ease-out calc(3.4s + var(--k) * .75s) infinite;
}
/* The light: a bright filament with a soft mint bloom just ahead of it, both
   moved along the arrow as backgrounds and faded out towards its two ends, so
   it rises out of the line and sinks into the arrowhead without an edge. */
.flow-link::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 9px;
  margin-top: -4.5px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .95) 78%, rgba(255, 255, 255, 0)) 0 50% / var(--beam) 1px no-repeat,
    radial-gradient(closest-side, rgba(110, 231, 183, .45), rgba(110, 231, 183, 0)) 0 50% / var(--beam) 100% no-repeat;
  background-position: calc(var(--beam) * -1) 50%, calc(var(--beam) * -1) 50%;
  -webkit-mask: linear-gradient(90deg, transparent, #000 30%, #000 80%, transparent);
  mask: linear-gradient(90deg, transparent, #000 30%, #000 80%, transparent);
  animation: flow-beam 9s cubic-bezier(.45, 0, .55, 1) calc(3.4s + var(--k) * .75s) infinite;
}

/* One wave every 9s: the beam runs along each arrow in turn, then its head brightens. */
@keyframes flow-beam {
  0% { background-position: calc(var(--beam) * -1) 50%, calc(var(--beam) * -.75) 50%; }
  6.5%, 100% { background-position: var(--len) 50%, calc(var(--len) + var(--beam) * .25) 50%; }
}
@keyframes flow-tip {
  0%, 3.5% { background-color: rgba(110, 231, 183, .9); }
  5% { background-color: #ecfdf5; }
  10%, 100% { background-color: rgba(110, 231, 183, .9); }
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}
.hero-cta .btn {
  --h: 42px;
  padding: 0 19px;
  font-size: 14.5px;
}
.hero-cta .btn-icon { padding: 0; }

/* Proof strip: four numbers, each with one line of caption, between two
   hairlines. Kept small so it backs up the hero rather than outshouting it. */
.stats {
  position: relative;
  display: grid;
  /* The first caption is the longest, so its column gets more room. */
  grid-template-columns: 1.3fr repeat(3, minmax(0, 1fr));
  column-gap: 16px;
  margin: var(--strip-gap) 0 0;
  padding: 17px 0 16px;
  list-style: none;
}
.stats::before,
.stats::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: var(--line);
  transform-origin: left;
}
.stats::after { inset: auto 0 0; }
.stats > li {
  display: flex;
  flex-direction: column;
}
.stats p { margin: 0; }

.stat-num {
  display: flex;
  align-items: baseline;
  color: var(--text);
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.035em;
  font-variant-numeric: tabular-nums;
}
.stat-num [data-count] {
  display: inline-block;
  text-align: right;
}
.stat-num .sign,
.stat-num .unit {
  color: var(--accent);
  font-size: .7em;
  letter-spacing: 0;
}
.stat-num .sign { margin-right: .05em; }
.stat-num [data-count] + .sign { margin: 0 0 0 .04em; }
.stat-num .unit-word {
  margin-left: .35em;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
}
.stat-label {
  margin-top: 5px !important;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.35;
}

/* Sections --------------------------------------------------------------- */

.section { padding-top: var(--space); }
/* The proof strip sits midway between the hero's buttons and the first section
   (less 2px, because the label's capitals start that far inside its line box). */
.hero + .section { padding-top: calc(var(--strip-gap) - 2px); }

.section-head { margin-bottom: clamp(22px, 2.6vw, 26px); }
.section-lede {
  max-width: 58ch;
  margin: 4px 0 0;
  font-size: 15.5px;
  line-height: 1.55;
  text-wrap: pretty;
}

/* Rows that share the reading column's label grid draw their top hairline in
   from the left; the last row of a section's final list closes it with a bottom one. */
.step,
.kit,
.edu li { position: relative; }
.step::before,
.kit::before,
.edu li::before,
.kit:last-child::after,
.edu li:last-child::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: var(--line);
  transform-origin: left;
}
.kit:last-child::after,
.edu li:last-child::after { inset: auto 0 0; }

/* Cards ------------------------------------------------------------------ */

.card {
  position: relative;
  isolation: isolate;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, .034), rgba(255, 255, 255, .012));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

/* Pointer spotlight: a glowing border ring plus a faint inner wash. */
.card::before,
.card::after {
  content: "";
  position: absolute;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity .45s var(--ease);
}
.card::before {
  inset: -1px;
  z-index: 2;
  padding: 1px;
  background: radial-gradient(300px circle at var(--mx, -999px) var(--my, -999px), rgba(110, 231, 183, .6), transparent 65%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.card::after {
  inset: 0;
  z-index: -1;
  background: radial-gradient(520px circle at var(--mx, -999px) var(--my, -999px), rgba(255, 255, 255, .045), transparent 60%);
}
[data-spotlight]:hover .card::before,
[data-spotlight]:hover .card::after { opacity: 1; }

/* Experience ------------------------------------------------------------- */

/* A timeline: a line down the left of the reading column with a node per role.
   Each role's stretch of it runs from the middle of its node to the middle of the
   next one, so the stretches can be drawn one after another (see main.js). */
.roles { margin: 0; padding: 0; list-style: none; }

.role-row {
  position: relative;
  padding: 0 0 32px var(--rail);
}
.role:last-child .role-row { padding-bottom: 0; }

.role-row::before {
  content: "";
  position: absolute;
  top: 12px;
  bottom: -12px;
  left: 4px;
  width: 1px;
  background: var(--line-strong);
  transform-origin: top;
}
.role:last-child .role-row::before { content: none; }
/* The line lets go before the project showcase and picks up again after it. */
.role.has-work .role-row::before {
  bottom: 0;
  background: linear-gradient(var(--line-strong) calc(100% - 44px), transparent);
}

.role-node {
  position: absolute;
  top: 7px;
  left: 0;
  width: 9px;
  height: 9px;
  border: 1.5px solid rgba(255, 255, 255, .42);
  border-radius: 50%;
  background: var(--bg);
  transition: background-color .3s, border-color .3s;
}
.role-row:hover .role-node,
.role.is-open .role-node {
  border-color: var(--text);
  background: var(--text);
}
/* The current role's node is live. */
.role.is-current .role-node {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
  box-shadow: 0 0 10px rgba(52, 211, 153, .7);
}
.role.is-current .role-node::after {
  content: "";
  position: absolute;
  inset: -1.5px;
  border: 1px solid var(--accent-strong);
  border-radius: inherit;
  animation: ping 2.4s var(--ease-out) infinite;
}

.role-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 26px;
  grid-template-areas:
    "title dates toggle"
    "place place place";
  column-gap: 16px;
  align-items: baseline;
}
.role-head,
.role-summary { cursor: pointer; }

.role-title {
  grid-area: title;
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: -.018em;
}
.role-title button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-align: left;
  cursor: pointer;
}
.role-org {
  color: var(--text-2);
  font-weight: 400;
}
.role-org::before {
  content: "·";
  margin: 0 .5em;
  color: var(--text-3);
}
/* A company with its own site (Futurenative) links out: quiet like the other
   company names, with an outlink arrow that nudges on hover. */
.role-org a {
  color: inherit;
  text-decoration: none;
  transition: color .25s;
}
.role-org .i {
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-left: 2px;
  vertical-align: -1px;
  transition: transform .35s var(--ease), color .25s;
}
.role-org a:hover { color: var(--text); }
.role-org a:hover .i {
  color: var(--accent);
  transform: translate(2px, -2px);
}

/* Dates sit on the title line and the place underneath; on phones the two
   join up on one line (see Responsive). */
.role-meta { display: contents; }
.role-dates {
  grid-area: dates;
  color: var(--text-2);
  font: 500 11.5px/1.3 var(--font-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.role-place {
  grid-area: place;
  color: var(--text-3);
  font-size: 14px;
  line-height: 1.45;
}

.role-summary {
  max-width: 62ch;
  margin: 6px 0 0;
  color: var(--text-soft);
  font-size: 16px;
  line-height: 1.55;
  text-wrap: pretty;
}

.role-body {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows .55s var(--ease-out);
}
.js .role:not(.is-open) .role-body { grid-template-rows: 0fr; }
.role-body > div { min-height: 0; overflow: hidden; }
.role-body ul {
  display: grid;
  gap: 9px;
  max-width: 62ch;
  margin: 0;
  padding: 16px 0 2px;
  list-style: none;
}
.role-body li {
  position: relative;
  padding-left: 22px;
  font-size: 15px;
  line-height: 1.55;
}
.role-body li::before {
  content: "";
  position: absolute;
  top: .78em;
  left: 0;
  width: 10px;
  height: 1px;
  background: var(--accent);
}

.role-toggle {
  grid-area: toggle;
  align-self: start;
  position: relative;
  width: 26px;
  height: 26px;
  margin-top: -1px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  transition: border-color .3s, background-color .3s, transform .5s var(--ease-out);
}
.role-toggle::before,
.role-toggle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 9px;
  height: 1.5px;
  margin: -.75px 0 0 -4.5px;
  border-radius: 2px;
  background: var(--text);
  transition: transform .5s var(--ease-out);
}
.role-toggle::after { transform: rotate(90deg); }
.role-row:hover .role-toggle { border-color: rgba(255, 255, 255, .34); }
.role.is-open .role-toggle {
  background: rgba(255, 255, 255, .06);
  transform: rotate(180deg);
}
.role.is-open .role-toggle::after { transform: rotate(0deg); }
html:not(.js) .role-toggle { visibility: hidden; }

/* With room in the margin the timeline hangs outside the column, so role text
   keeps the page's left edge. */
@media (min-width: 960px) {
  .role-row { padding-left: 0; }
  .role-node { left: calc(var(--rail) * -1); }
  .role-row::before { left: calc(4px - var(--rail)); }
}

/* Projects sit under the role they belong to and break out to the wide column. */
.role-work { margin-block: 0 clamp(40px, 5vw, 52px); }
.work-title { margin-bottom: 20px; }

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.work {
  display: flex;
  flex-direction: column;
  text-decoration: none;
}

.browser {
  margin: 12px 12px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #0b0b0c;
}
.browser-bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .025);
}
.browser-bar i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .13);
}
.browser-bar span {
  position: absolute;
  left: 50%;
  padding: 4px 14px;
  border-radius: 7px;
  background: rgba(255, 255, 255, .045);
  color: var(--text-3);
  font: 12px/1.2 var(--font-mono);
  translate: -50% 0;
}
.browser img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transform-origin: 50% 0;
  transition: transform 1.2s var(--ease-out);
}
.work:hover .browser img { transform: scale(1.04); }

.work-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 24px 28px 28px;
}
.work-body h5 {
  max-width: 34ch;
  margin: 0;
  font-size: 19px;
  line-height: 1.35;
  letter-spacing: -.015em;
}
.work-body .link { margin-top: auto; padding-top: 10px; }

/* Approach & skills ------------------------------------------------------ */

.steps { margin: 0; padding: 0; list-style: none; }
.step {
  display: grid;
  grid-template-columns: 44px calc(var(--label) - 44px) minmax(0, 1fr);
  align-items: baseline;
  padding: 17px 0;
}
.step-num {
  color: var(--text-3);
  font: 500 11.5px/1 var(--font-mono);
  letter-spacing: .1em;
  transition: color .3s;
}
.step:hover .step-num { color: var(--accent); }
.step h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.3;
  letter-spacing: -.018em;
}
.step p {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.55;
}

.toolkit { margin-top: clamp(22px, 2.8vw, 28px); }
.kit {
  display: grid;
  grid-template-columns: var(--label) minmax(0, 1fr);
  align-items: baseline;
  padding: 18px 0;
}
.kit h3 {
  margin: 0;
  color: var(--text-3);
  font: 500 11.5px/1.3 var(--font-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.chips li {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .03);
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.3;
  transition: border-color .25s, background-color .25s;
}
.chips li:hover {
  border-color: rgba(110, 231, 183, .35);
  background: rgba(110, 231, 183, .06);
}

/* Education ------------------------------------------------------------- */

.edu { margin: 0; padding: 0; list-style: none; }
.edu li {
  display: grid;
  grid-template-columns: calc(var(--label) - 16px) minmax(0, 1fr) auto;
  column-gap: 16px;
  align-items: baseline;
  padding: 16px 0;
}
.edu-kind {
  color: var(--text-3);
  font: 500 11.5px/1.3 var(--font-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.edu strong {
  color: var(--text);
  font-size: 16.5px;
  font-weight: 500;
  letter-spacing: -.012em;
}
.edu-org { font-size: 15.5px; }
.edu-org::before {
  content: "·";
  margin: 0 .5em;
  color: var(--text-3);
}
.edu-year {
  color: var(--text-2);
  font: 500 11.5px/1.3 var(--font-mono);
  letter-spacing: .08em;
}
.edu-more {
  grid-column: 2 / -1;
  font-size: 15px;
  line-height: 1.55;
  text-wrap: pretty;
}

/* Contact ---------------------------------------------------------------- */

.contact {
  padding: clamp(44px, 7vw, 68px) clamp(22px, 5vw, 56px);
  text-align: center;
}
.contact .eyebrow { justify-content: center; margin-bottom: 20px; }
.contact h2 {
  max-width: 14ch;
  margin: 0 auto;
  font-size: clamp(34px, 1rem + 3.4vw, 52px);
  line-height: 1;
  letter-spacing: -.048em;
}
.contact-lede {
  max-width: 46ch;
  margin: 22px auto 0;
  font-size: 16px;
  text-wrap: balance;
}
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 32px;
}
.btn.is-done { border-color: rgba(110, 231, 183, .45); color: var(--accent); }
.contact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 30px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}
.contact-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-2);
  font-size: 15px;
  text-decoration: none;
  transition: color .2s;
}
.contact-links a:hover { color: var(--text); }
.contact-links .i { width: 16px; height: 16px; }

.section-contact { padding-bottom: var(--space); }

/* Footer ----------------------------------------------------------------- */

.footer {
  overflow: hidden;
  padding-bottom: 28px;
}
.footer-mark {
  margin: 0 0 -.1em;
  background: linear-gradient(180deg, rgba(255, 255, 255, .12) 15%, rgba(255, 255, 255, 0) 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: clamp(72px, 21vw, 310px);
  font-weight: 600;
  line-height: .82;
  letter-spacing: -.07em;
  text-align: center;
  white-space: nowrap;
  user-select: none;
}
.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--text-3);
  font-size: 14px;
}
.footer-row p { margin: 0; }
.footer-row a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-2);
  text-decoration: none;
  transition: color .2s;
}
.footer-row a:hover { color: var(--text); }
.footer-row .i { width: 15px; height: 15px; }
.footer-clock { font-variant-numeric: tabular-nums; }
/* The clock's colon ticks. */
.footer-clock i {
  font-style: normal;
  animation: tick 2s ease-in-out infinite;
}
@keyframes tick { 50% { opacity: .3; } }

/* 404 -------------------------------------------------------------------- */

.notfound {
  display: flex;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: 96px 0;
}
.notfound h1 {
  max-width: 12em;
  margin: 0 0 18px;
  font-size: clamp(34px, 1rem + 3vw, 52px);
  line-height: 1.04;
  letter-spacing: -.045em;
  text-wrap: balance;
}
.notfound h1 em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.1em;
  letter-spacing: -.01em;
  padding: 0 .1em 0 .02em;
  margin: 0 -.1em 0 -.02em;
  background: linear-gradient(100deg, #ffffff 0%, var(--accent) 52%, var(--accent-teal) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.notfound .eyebrow { margin-bottom: 14px; }
.notfound-lede {
  max-width: 35em;
  margin: 0 0 30px;
  color: var(--text-soft);
  font-size: clamp(17px, 1rem + .28vw, 19px);
  line-height: 1.5;
  letter-spacing: -.012em;
  text-wrap: balance;
}

/* Motion ----------------------------------------------------------------- */

.js .reveal {
  opacity: 0;
  transform: translate3d(0, 14px, 0);
  transition: opacity .9s var(--ease-out) var(--d, 0s), transform 1s var(--ease-out) var(--d, 0s);
}
.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

/* Hairlines draw in from the left as their block arrives. */
.js .eyebrow.reveal::before,
.js .stats::before,
.js .stats::after,
.js .step::before,
.js .kit::before,
.js .kit::after,
.js .edu li::before,
.js .edu li::after {
  transform: scaleX(0);
  transition: transform 1.3s var(--ease-out) calc(var(--d, 0s) + .15s);
}
.js .eyebrow.is-in::before,
.js .stats.is-in::before,
.js .stats.is-in::after,
.js .step.is-in::before,
.js .kit.is-in::before,
.js .kit.is-in::after,
.js .edu li.is-in::before,
.js .edu li.is-in::after { transform: none; }

/* Timeline: the row stays put because it carries the line, and its content fades
   in as it arrives. The line is drawn by main.js as one line flowing down the
   roles: it sets how much of each stretch is drawn (--drawn) and lights each node
   (.is-lit) as the line reaches it. */
.js .role-row.reveal {
  opacity: 1;
  transform: none;
}
.js .role-main {
  opacity: 0;
  transform: translate3d(0, 14px, 0);
  transition: opacity .9s var(--ease-out), transform 1s var(--ease-out);
}
.js .role-row.is-in .role-main {
  opacity: 1;
  transform: none;
}
.js .role-row::before { transform: scaleY(var(--drawn, 0)); }
.js .role-node {
  transform: scale(0);
  transition: transform .6s var(--ease-out), background-color .3s, border-color .3s;
}
.js .role-row.is-lit .role-node { transform: none; }

/* If the script never runs: after a beat, reveal everything, give the nav its
   backdrop, name and button, and open every role (their toggles would be dead
   controls, so those go). */
.js:not(.js-ready) .reveal,
.js:not(.js-ready) .reveal::before,
.js:not(.js-ready) .reveal::after,
.js:not(.js-ready) .role-main,
.js:not(.js-ready) .role-node,
.js:not(.js-ready) .nav::before,
.js:not(.js-ready) .nav::after,
.js:not(.js-ready) .nav-name,
.js:not(.js-ready) .nav-cta .btn { animation: settle 0s 2.5s forwards; }
.js:not(.js-ready) .nav-cta { animation: dock 0s 2.5s forwards; }
.js:not(.js-ready) .role-body { animation: expand 0s 2.5s forwards; }
.js:not(.js-ready) .role-toggle { animation: retire 0s 2.5s forwards; }

@keyframes settle {
  to { opacity: 1; transform: none; visibility: visible; }
}
@keyframes expand { to { grid-template-rows: 1fr; } }
@keyframes dock { to { grid-template-columns: 1fr; } }
@keyframes retire { to { visibility: hidden; } }

/* Responsive ------------------------------------------------------------- */

@media (max-width: 780px) {
  /* The proof strip becomes a list: number on the left, its caption beside it. */
  .stats {
    grid-template-columns: minmax(0, 1fr);
    padding: 0;
  }
  .stats > li {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    column-gap: 14px;
    align-items: baseline;
    padding: 12px 0 11px;
  }
  .stats > li + li { border-top: 1px solid var(--line); }
  .stat-num { font-size: 21px; }
  .stat-label { margin-top: 0 !important; font-size: 14px; }
}

@media (max-width: 760px) {
  .work-grid { grid-template-columns: minmax(0, 1fr); }

  /* The label column folds away: labels sit above their content. */
  .step {
    grid-template-columns: 34px minmax(0, 1fr);
    row-gap: 4px;
  }
  .step p { grid-column: 2; }

  .kit {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 12px;
  }

  .edu li {
    grid-template-columns: minmax(0, 1fr) auto;
    row-gap: 6px;
    padding: 15px 0;
  }
  .edu-kind { grid-column: 1 / -1; }
  .edu-more { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  .nav-links { display: none; }

  :root { --rail: 26px; }

  /* Dates and place share a line under the title. */
  .role-head {
    grid-template-columns: minmax(0, 1fr) 26px;
    grid-template-areas:
      "title toggle"
      "meta meta";
    column-gap: 12px;
  }
  .role-meta {
    grid-area: meta;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 12px;
    margin: 6px 0 0;
  }
  .role-place { margin-top: 0; font-size: 13.5px; }
}

@media (max-width: 600px) {
  .hero-role { display: block; }
  .hero-dash { display: none; }

  /* Shorter arrows, so the headline still fits one line on most phones. */
  .flow-row { column-gap: .35em; }
  .flow-link { --len: 1.1em; margin-inline: .35em; }

  .role-org { display: block; }
  .role-org::before { content: none; }

  .edu-org { display: block; font-size: 15px; }
  .edu-org::before { content: none; }

  .hero-cta { width: 100%; }
  .hero-cta .btn { --h: 44px; }
  .hero-cta .btn:not(.btn-icon) { flex: 1; padding-inline: 16px; }
  .contact-actions .btn { width: 100%; }
  .footer-mark { font-size: 30vw; }
}

@media (max-width: 420px) {
  .opt { display: none; }
}

@media (max-width: 380px) {
  /* Too narrow for three buttons in a row: the CV button takes the first row
     and the other two share the second, rather than stranding the icon. */
  .hero-cta .btn.btn-light { flex-basis: 100%; }
}

@media (max-width: 360px) {
  .status-sep { display: none; }
  .stats > li {
    grid-template-columns: 84px minmax(0, 1fr);
    column-gap: 12px;
  }
  .stat-num { font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
  }
  .flow-link::before { display: none; }
}

@media print {
  :root {
    --text: #000;
    --text-soft: #111;
    --text-2: #222;
    --text-3: #555;
    --line: #ddd;
    --line-strong: #ccc;
    --accent: #0a7a55;
    --bg: #fff;
  }
  html { color-scheme: light; }
  html, body { background: #fff; }
  .nav, .hero-cta, .browser,
  .contact-actions, .role-toggle, .footer-mark, .skip { display: none !important; }
  .card { border-color: #ddd; background: none; box-shadow: none; break-inside: avoid; }
  .js .reveal, .js .role-main, .js .role-node,
  .js .role-row::before, .js .reveal::before, .js .reveal::after {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
  }
  .role-row, .stats, .step, .kit, .edu li, .contact { break-inside: avoid; }
  .section-head, .work-title { break-after: avoid; }
  .flow-link::before { display: none; }
  .js .role:not(.is-open) .role-body { grid-template-rows: 1fr; }
  h2 em, .work-title em, .flow-end { background: none; color: #000; }
  .flow-link,
  .flow-link::after {
    background: var(--accent);
    animation: none;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .hero { padding-top: 0; }
  .section { padding-top: 28px; }
}
