/* ==========================================================================
   Yooch Wan — portfolio redesign (draft v0.1)
   Mobile-first. Light + dark. Neon is an ACCENT (lines, glows, charts), never body text.
   ========================================================================== */

:root {
  color-scheme: light;
  --bg: #fbfbfd;
  --bg-2: #f1f2f7;
  --portrait-bg: #f7f8fc;      /* About-page portrait panel: light grey-lilac in light mode */
  --surface: rgba(255, 255, 255, .72);
  --surface-solid: #ffffff;
  --text: #333333;
  --heading: #444444;
  --muted: #5a5e70;
  --faint: #686c80;
  --line: rgba(20, 22, 50, .11);
  --line-strong: rgba(20, 22, 50, .2);
  --accent: #4a3ff0;          /* text-safe accent on light (≈6.6:1) */
  --accent-soft: rgba(74, 63, 240, .09);
  --g1: #4190ff;              /* gradient stops, light theme */
  --g2: #a377ff;
  --g3: #e76399;
  --g3-text: #e96198;          /* pink end of gradient text (headlines, big numbers) */
  --g3-bar: #ea6099;           /* pink end of horizontal bars only: a touch lighter */
  --grad-h: linear-gradient(270deg, var(--g1) 0%, var(--g2) 80%, var(--g3-bar) 100%);
  --grad-d: linear-gradient(135deg, var(--g1) 0%, var(--g2) 80%, var(--g3) 100%);
  /* horizontal bars and lines: magenta only in the last ~10% */
  --neon: #18c8ee;            /* decorative only */
  --good: #007c49;             /* light theme green: vivid, 5.3:1 on white (AA needs 4.5) */
  --good-number: #007c49;      /* same green for the Impact percentages and before/after figures */
  --pulse: #22d38a;            /* pulsing dot only (not text), lighter and brighter in light mode */
  --shadow: 0 1px 0 rgba(255,255,255,.8) inset, 0 12px 40px -16px rgba(30, 30, 80, .18);
  --aurora-a: rgba(42, 130, 255, .22);
  --aurora-b: rgba(138, 82, 255, .20);
  --aurora-c: rgba(229, 84, 143, .16);
  --grid: rgba(20, 22, 50, .06);
  --radius: 22px;
  --radius-sm: 14px;
  --max: 1160px;
  --gutter: clamp(18px, 5vw, 36px);
  --header-h: 64px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Segoe UI",
          system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #06070c;
  --bg-2: #0c0e16; --portrait-bg: #0f111a;
  --surface: rgba(22, 25, 38, .58);
  --surface-solid: #11141e;
  --text: #f4f5f9;
  --heading: #f4f5f9;
  --muted: #a3a7ba;
  --faint: #8087a0;
  --line: rgba(255, 255, 255, .09);
  --line-strong: rgba(255, 255, 255, .18);
  --accent: #6fe6ff;
  --accent-soft: rgba(111, 230, 255, .09);
  --g1: #84e4ff;
  --g2: #b09cff;
  --g3: #ff94c8;
  --g3-bar: #ff94c8;
  --g3-text: #ff94c8;
  --neon: #37e6ff;
  --good: #52f0b0;
  --good-number: #52f0b0;
  --pulse: #52f0b0;
  --shadow: 0 1px 0 rgba(255,255,255,.05) inset, 0 20px 60px -24px rgba(0, 0, 0, .8);
  --aurora-a: rgba(132, 228, 255, .16);
  --aurora-b: rgba(176, 156, 255, .20);
  --aurora-c: rgba(255, 148, 200, .13);
  --grid: rgba(255, 255, 255, .055);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --bg: #06070c; --bg-2: #0c0e16; --portrait-bg: #0f111a; --surface: rgba(22,25,38,.58); --surface-solid: #11141e;
    --text: #f4f5f9; --heading: #f4f5f9; --muted: #a3a7ba; --faint: #8087a0; --line: rgba(255,255,255,.09);
    --line-strong: rgba(255,255,255,.18); --accent: #6fe6ff; --accent-soft: rgba(111,230,255,.09);
    --g1: #84e4ff; --g2: #b09cff; --g3: #ff94c8; --g3-bar: #ff94c8; --g3-text: #ff94c8; --neon: #37e6ff; --good: #52f0b0; --good-number: #52f0b0; --pulse: #52f0b0;
    --shadow: 0 1px 0 rgba(255,255,255,.05) inset, 0 20px 60px -24px rgba(0,0,0,.8);
    --aurora-a: rgba(132,228,255,.16); --aurora-b: rgba(176,156,255,.20); --aurora-c: rgba(255,148,200,.13);
    --grid: rgba(255,255,255,.055);
  }
}

/* ---------- reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 20px); }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 1.0625rem; line-height: 1.65;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; text-underline-offset: 3px; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { color: var(--heading); line-height: 1.12; letter-spacing: -.025em; margin: 0 0 .5em; font-weight: 650; }
h1 { font-size: clamp(2.35rem, 7.4vw, 4.6rem); letter-spacing: -.04em; font-weight: 680; }
h2 { font-size: clamp(1.7rem, 4.4vw, 2.75rem); letter-spacing: -.035em; }
h3 { font-size: clamp(1.15rem, 2.4vw, 1.4rem); }
h4 { font-size: 1.02rem; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  background: var(--text);
  color: var(--bg);
  padding: 10px 16px;
  border-radius: 10px;
  z-index: 200;
}
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: calc(var(--max) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 760px; }
/* single-column grids must not grow to their widest child (tables, long words) */
.grid, .layout-toc, .comparison, .about-grid, .hero-grid, .foot-grid { grid-template-columns: minmax(0, 1fr); }
.prose, .card { min-width: 0; }
.section { padding-block: clamp(56px, 10vw, 112px); position: relative; }
.section.tight { padding-block: clamp(36px, 6vw, 64px); }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.grad-text {
  background: linear-gradient(95deg, var(--g1) 0%, var(--g2) 80%, var(--g3-text) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.eyebrow {
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--grad-h); }
.lede { font-size: clamp(1.1rem, 2.4vw, 1.35rem); line-height: 1.5; color: var(--muted); max-width: 40em; }
.lede strong { color: var(--text); font-weight: 600; }
.hero .lede { font-size: clamp(1rem, 2.1vw, 1.2rem); }
.section-head { max-width: 46rem; margin-bottom: clamp(28px, 5vw, 52px); }
.section-head p { color: var(--muted); font-size: 1.12rem; margin: 0; }

/* ---------- header / nav ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
/* blur lives on a pseudo-element: backdrop-filter on the header itself would trap the fixed mobile menu inside it */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0 0 -1px 0;
  z-index: -1;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
}
.progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 2px;
  width: 100%;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: var(--grad-h);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand {
  white-space: nowrap;
  color: var(--text);
  font-weight: 700;
  letter-spacing: -.03em;
  font-size: 1.12rem;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: conic-gradient(from var(--brand-angle), var(--g1) 0%, var(--g2) 70%, var(--g3) 92%, var(--g1) 100%);
  position: relative;
  box-shadow: 0 0 18px -2px var(--g2);
}
.brand-mark::after { content: ""; position: absolute; inset: 4px; border-radius: 4px; background: var(--bg); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  font: inherit;
}
.icon-btn:hover { border-color: var(--line-strong); }
.icon-btn svg { width: 19px; height: 19px; }
.theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .theme-toggle .sun { display: block; }
  :root:not([data-theme]) .theme-toggle .moon { display: none; }
}
.site-nav {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  background: var(--bg);
  padding: 24px var(--gutter) 40px;
  display: none;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}
.nav-open .site-nav { display: flex; animation: fade .2s ease; }
.site-nav a {
  color: var(--text);
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: -.03em;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.site-nav a:hover { text-decoration: none; color: var(--accent); }
.site-nav a[aria-current="page"] { color: var(--accent); }
.site-nav .nav-cta { margin-top: 18px; border: 0; }
.menu-btn .close { display: none; }
.nav-open .menu-btn .close { display: block; }
.nav-open .menu-btn .open { display: none; }
.btn.header-cta { display: none; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

@media (min-width: 900px) {
  .menu-btn { display: none; }
  .site-nav {
    position: static;
    display: flex !important;
    flex-direction: row;
    padding: 0;
    background: none;
    overflow: visible;
    gap: 2px;
    animation: none !important;
  }
  .site-nav a {
    font-size: .93rem;
    font-weight: 500;
    letter-spacing: 0;
    padding: 8px 14px;
    border: 0;
    border-radius: 999px;
    color: var(--muted);
  }
  .site-nav a:hover { color: var(--text); background: var(--accent-soft); }
  .site-nav a[aria-current="page"] { color: var(--text); background: var(--accent-soft); }
  .site-nav .nav-cta { display: none; }
  .btn.header-cta { display: inline-flex; }
}

/* ---------- buttons / chips ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  font-size: .98rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s;
  min-height: 46px;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--text); color: var(--bg); box-shadow: 0 8px 30px -10px var(--g2); }
.btn-primary:hover { box-shadow: 0 10px 36px -8px var(--g2); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--line-strong); backdrop-filter: blur(10px); }
.btn-ghost:hover { border-color: var(--accent); }
.btn-sm { padding: 8px 16px; min-height: 38px; font-size: .9rem; }
.btn svg { width: 17px; height: 17px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-size: .8rem;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-weight: 500;
  white-space: nowrap;
}
.chip.on, button.chip[aria-pressed="true"] { color: var(--bg); background: var(--text); border-color: var(--text); }
button.chip { cursor: pointer; font-family: inherit; min-height: 36px; padding-inline: 14px; }
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 14px 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: .84rem;
  color: var(--muted);
  backdrop-filter: blur(10px);
}
.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pulse);
  box-shadow: 0 0 0 0 var(--pulse);
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--pulse) 60%, transparent);
  }
  70%, 100% {
    box-shadow: 0 0 0 10px transparent;
  }
}

/* ---------- cards ---------- */
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(20px, 3.6vw, 30px);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  overflow: hidden;
  isolation: isolate;
}
.card.spot::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  transition: opacity .3s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--g2) 16%, transparent), transparent 60%);
}
.card.spot:hover::before { opacity: 1; }
.card.glow::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--grad-d);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}
.card.glow:hover::after { opacity: .9; }
a.card { color: inherit; display: block; }
a.card:hover { text-decoration: none; }
.grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) {
  .grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .grid.cols-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding-top: max(calc(var(--header-h) + 24px), calc(var(--header-h) + clamp(40px, 9vw, 96px) - 3.75rem));
  padding-bottom: clamp(8px, calc(8vw - 40px), 56px); /* was clamp(48px, 8vw, 96px); 40px less gap above the stat panel */
  overflow: hidden;
}
.aurora { position: absolute; inset: 0; z-index: -2; pointer-events: none; overflow: hidden; }
.aurora i { position: absolute; border-radius: 50%; filter: blur(70px); animation: drift 22s ease-in-out infinite alternate; }
.aurora i:nth-child(1) {
  width: 58vw;
  height: 58vw;
  max-width: 720px;
  max-height: 720px;
  left: -12%;
  top: -22%;
  background: var(--aurora-a);
}
.aurora i:nth-child(2) {
  width: 52vw;
  height: 52vw;
  max-width: 640px;
  max-height: 640px;
  right: -14%;
  top: -8%;
  background: var(--aurora-b);
  animation-delay: -7s;
}
.aurora i:nth-child(3) {
  width: 40vw;
  height: 40vw;
  max-width: 520px;
  max-height: 520px;
  left: 30%;
  top: 38%;
  background: var(--aurora-c);
  animation-delay: -13s;
}
@keyframes drift { to { transform: translate3d(5%, 7%, 0) scale(1.12); } }
.grid-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 25%, #000 25%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 25%, #000 25%, transparent 75%);
}
/* One-time shimmer on page load: a diagonal band sweeps over the grid, lighting the lines and a glow at every crossing.
   It sits inside .grid-bg, so it shares the same edge fade; sizes are in px (same 56px grid) so desktop and mobile line up. */
.grid-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background-image:
    radial-gradient(circle at 50% 50%, var(--g1) 0, color-mix(in srgb, var(--g2) 55%, transparent) 4px, transparent 11px),
    linear-gradient(color-mix(in srgb, var(--g2) 45%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--g2) 45%, transparent) 1px, transparent 1px);
  background-size: 56px 56px;
  /* the radial glow's tile is centred on the line crossings (tile centre at 28px + half a line) */
  background-position: 28.5px 28.5px, 0 0, 0 0;
  -webkit-mask-image: linear-gradient(120deg, transparent 0 43%, #000 50%, transparent 57% 100%);
  mask-image: linear-gradient(120deg, transparent 0 43%, #000 50%, transparent 57% 100%);
  -webkit-mask-size: 300% 100%;
  mask-size: 300% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  animation: grid-shimmer 5s ease-in-out .5s 1 both;
}
@keyframes grid-shimmer {
  0% { opacity: 0; -webkit-mask-position: 100% 0; mask-position: 100% 0; }
  15% { opacity: .14; }
  85% { opacity: .14; }
  100% { opacity: 0; -webkit-mask-position: 0 0; mask-position: 0 0; }
}
.hero-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1.25fr .9fr; gap: 56px; } }
.hero h1 { margin-bottom: 20px; font-size: clamp(2.1rem, 6vw, 3.8rem); }
.hero .status-pill { margin-bottom: 26px; }
.hero .btn-row { margin-top: 30px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 52px; color: var(--muted); font-size: .9rem; }
.hero-meta span::before {
  content: "";
  display: inline-block;
  width: 13px;
  height: 13px;
  margin-right: 7px;
  vertical-align: -1px;
  background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12h15M13 5.5 19.5 12 13 18.5'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12h15M13 5.5 19.5 12 13 18.5'/%3E%3C/svg%3E") center / contain no-repeat; }

.signal { padding: 22px 22px 18px; }
.signal-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 4px; }
.signal-head .label { font-family: var(--mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.signal-big { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.signal-big b { font-size: clamp(2.3rem, 6vw, 3.1rem); letter-spacing: -.04em; line-height: 1; }
.signal-big span { color: var(--muted); font-size: .95rem; }
.signal svg { width: 100%; height: auto; overflow: visible; margin-top: 8px; }
.signal .line {
  stroke-dasharray: 700;
  stroke-dashoffset: 700;
  animation: draw 2.2s .3s cubic-bezier(.4,0,.2,1) forwards;
  filter: drop-shadow(0 0 6px color-mix(in srgb, var(--g2) 70%, transparent));
}
.signal .signal-area { opacity: 0; animation: fadein 1.2s 1.6s forwards; }
.signal .signal-end { opacity: 0; animation: fadein .4s 2.3s forwards; }
.signal .signal-end circle:last-child { animation: ping 2s 2.4s infinite; transform-origin: center; transform-box: fill-box; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadein { to { opacity: 1; } }
@keyframes ping { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(3.2); opacity: 0; } }
.signal-foot {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--faint);
  margin-top: 2px;
}
.signal-note {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: .86rem;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---------- stat strip ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
@media (min-width: 760px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--bg); padding: 22px clamp(16px, 3vw, 28px); }
.stat > b {
  display: block;
  font-size: clamp(1.9rem, 5vw, 2.8rem);
  letter-spacing: -.04em;
  line-height: 1.05;
  font-weight: 680;
  font-variant-numeric: tabular-nums;
}
.stat > span { display: block; color: var(--muted); font-size: .88rem; margin-top: 6px; line-height: 1.4; }

/* ---------- marquee ---------- */
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track { display: flex; gap: 0; width: max-content; animation: scroll 38s linear infinite; padding-block: 14px; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track .brand {
  padding-right: clamp(36px, 7vw, 72px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  white-space: nowrap;
}
.marquee-track .brand img {
  height: calc(34px * var(--s, 1));
  width: auto;
  max-width: calc(150px * var(--s, 1));
  object-fit: contain;
  display: block;
  margin-block: calc(17px * (1 - var(--s, 1)));
}
/* a scaled-down logo stays centred in the 34px logo slot */
.marquee-track .brand b { font-weight: 600; letter-spacing: -.01em; font-size: .8rem; color: var(--faint); }
.logo-d { display: none !important; }
:root[data-theme="dark"] .logo-l { display: none !important; }
:root[data-theme="dark"] .logo-d { display: block !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .logo-l { display: none !important; }
  :root:not([data-theme]) .logo-d { display: block !important; }
}
@keyframes scroll { to { transform: translateX(-50%); } }
.logos-label {
  font-family: var(--mono);
  font-size: .74rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 24px;
  text-align: center;
}

/* ---------- impact chart (before → after) ---------- */
.before-after { display: grid; gap: 22px; }
.before-after-row { display: grid; gap: 8px; }
/* hairline divider between the rows (22px of space either side, from the grid gap + padding) */
.before-after-row + .before-after-row { border-top: 1px solid var(--line); padding-top: 22px; }
.before-after-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.before-after-top h3 { font-size: 1rem; margin: 0; letter-spacing: -.01em; font-weight: 600; }
.before-after-top small { color: var(--faint); font-size: .8rem; }
.before-after-delta { font-family: var(--mono); font-weight: 600; font-size: .95rem; color: var(--good-number); }
.bar { height: 8px; border-radius: 99px; background: var(--bg-2); position: relative; overflow: hidden; }
.bar > i { position: absolute; inset: 0 auto 0 0; border-radius: 99px; width: var(--w); }
.js .bar > i { width: 0; transition: width 1.3s cubic-bezier(.2,.7,.2,1); }
.bar.before > i { background: color-mix(in srgb, var(--faint) 60%, transparent); }
.bar.after > i { background: var(--grad-h); box-shadow: 0 0 14px color-mix(in srgb, var(--g2) 55%, transparent); transition-delay: .25s; }
.js .in .bar > i, .js .bar.in > i { width: var(--w); }
/* company name, top right of each Impact row (same look the legend text had) */
.before-after-client { font-family: var(--font); font-size: .78rem; color: var(--muted); }
.before-after-legend { display: flex; justify-content: space-between; align-items: baseline; font-size: .78rem; color: var(--muted); font-family: var(--mono); }
.before-after-legend em { font-style: normal; color: var(--text); }

.kpis { display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 900px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.kpi { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.kpi b { font-size: clamp(1.6rem, 4vw, 2.2rem); letter-spacing: -.04em; display: block; line-height: 1.1; }
.kpi p { margin: 6px 0 0; font-size: .86rem; color: var(--muted); line-height: 1.4; }
.kpi small {
  display: block;
  margin-top: 10px;
  font-family: var(--mono);
  font-size: .7rem;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: .08em;
}
.ring {
  --p: 98;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  /* same pink > purple > blue stops as the gradient text and bars (reversed), running round the filled arc */
  background: conic-gradient(
    var(--g3) 0,
    var(--g2) calc(var(--p) * .2%),
    var(--g1) calc(var(--p) * 1%),
    var(--bg-2) 0
  );
  display: grid;
  place-items: center;
  margin-bottom: 12px;
}
.ring::after { content: ""; width: 50px; height: 50px; border-radius: 50%; background: var(--surface-solid); }

/* ---------- work cards ---------- */
.work-card { display: flex; flex-direction: column; gap: 14px; flex: 1; }
.card.work-card-link { display: flex; flex-direction: column; gap: 6px; }
.work-card .meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--mono);
  font-size: .74rem;
  color: var(--muted);
  letter-spacing: .06em;
  text-transform: uppercase;
}
.work-card h3 { font-size: clamp(1.3rem, 3vw, 1.7rem); margin: 0; }
.work-card p { color: var(--muted); margin: 0; font-size: 1rem; }
.work-card .metric {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  margin-top: auto;
}
.work-card .metric b { font-size: 2rem; letter-spacing: -.04em; line-height: 1; }
.work-card .metric span { color: var(--muted); font-size: .88rem; line-height: 1.3; }
.work-card .card-cta { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-weight: 600; font-size: .94rem; }
.work-card .card-cta svg { width: 16px; transition: transform .2s; }
.work-card:hover .card-cta svg { transform: translateX(4px); }
.thumb {
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  overflow: hidden;
  position: relative;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.thumb.thumb-art { display: grid; place-items: center; }
.thumb.thumb-art svg { width: 100%; height: 100%; }
@media (min-width: 960px) {
  .card.feature {
    grid-column: span 2;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 32px;
    align-items: center;
  }
}
.thumb.thumb-art svg { max-height: 100%; }
.row-list { border-top: 1px solid var(--line); }
.row-item { display: grid; gap: 4px 16px; padding: 18px 4px; border-bottom: 1px solid var(--line); color: inherit; }
.row-item:hover { text-decoration: none; background: color-mix(in srgb, var(--accent-soft) 50%, transparent); }
:root[data-theme="dark"] .row-item:hover { background: color-mix(in srgb, var(--accent-soft) 75%, transparent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme]) .row-item:hover { background: color-mix(in srgb, var(--accent-soft) 75%, transparent); } }
.row-item h3 { margin: 0; font-size: 1.1rem; letter-spacing: -.015em; }
.row-item p { margin: 0; color: var(--muted); font-size: .95rem; }
.row-item .year { font-family: var(--mono); font-size: .78rem; color: var(--faint); }
@media (min-width: 760px) {
  .row-item {
    grid-template-columns: 64px 1fr 1.2fr auto;
    column-gap: 28px;
    align-items: center;
    padding-inline: 14px;
  }
}
/* year column sized to its text; one even 28px gap between all columns */

/* ---------- quotes ---------- */
.quote { display: flex; flex-direction: column; gap: 18px; height: 100%; }
.quote blockquote { margin: 0; font-size: 1.08rem; line-height: 1.55; letter-spacing: -.01em; }
.quote blockquote::before {
  content: "“";
  display: block;
  font-size: 3rem;
  line-height: .6;
  height: 24px;
  color: var(--g2);
  font-family: Georgia, serif;
}
.quote.quote-large blockquote { font-size: clamp(1.3rem, 3.2vw, 1.9rem); line-height: 1.35; letter-spacing: -.025em; font-weight: 550; }
.quote-author { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: .78rem;
  font-weight: 700;
  color: var(--text);
  background: linear-gradient(135deg, color-mix(in srgb, var(--g1) 30%, transparent) 0%, color-mix(in srgb, var(--g2) 30%, transparent) 80%, color-mix(in srgb, var(--g3) 30%, transparent) 100%);
  border: 1px solid var(--line-strong);
  flex: none;
}
.quote-author b { display: block; font-size: .94rem; line-height: 1.2; }
.quote-author span:not(.avatar) { color: var(--muted); font-size: .82rem; line-height: 1.3; display: block; margin-top: 1px; }
.quote-author .avatar { flex: none; line-height: 1; }
.verify { font-size: .8rem; }

/* ---------- CTA band ---------- */
.cta {
  text-align: center;
  padding: clamp(36px, 7vw, 72px) clamp(20px, 5vw, 56px);
  border-radius: calc(var(--radius) + 6px);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
}
.cta::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto;
  height: 120%;
  z-index: -1;
  background: radial-gradient(60% 60% at 50% 0%, color-mix(in srgb, var(--g2) 22%, transparent), transparent 70%);
}
.cta h2 { max-width: 16em; margin-inline: auto; }
.cta p { color: var(--muted); max-width: 36em; margin: 0 auto 26px; }
.cta .btn-row { justify-content: center; }

/* ---------- page hero (inner pages) ---------- */
.page-hero {
  padding-top: calc(var(--header-h) + clamp(36px, 7vw, 80px) - 1.25rem);
  padding-bottom: calc(clamp(24px, 5vw, 56px) + 10px);
  position: relative;
  overflow: hidden;
}
.page-hero h1 { font-size: clamp(2.1rem, 6vw, 3.8rem); max-width: 16em; }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 22px; display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); }
.crumbs span[aria-hidden] { color: var(--faint); }

/* ---------- case study ---------- */
.facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-top: 34px;
}
@media (min-width: 860px) { .facts { grid-template-columns: repeat(4, 1fr); } }
.facts > div { background: var(--bg); padding: 16px 18px 20px; }
.facts dt {
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 4px;
}
.facts dd { margin: 0; font-size: .95rem; line-height: 1.4; }
.layout-toc { display: grid; gap: 32px; }
@media (min-width: 1000px) { .layout-toc { grid-template-columns: 210px minmax(0, 1fr); gap: 64px; } }
.toc { display: none; }
@media (min-width: 1000px) { .toc { display: block; position: sticky; top: calc(var(--header-h) + 28px); align-self: start; } }
.toc p {
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 12px;
}
.toc a { display: block; padding: 7px 0 7px 14px; color: var(--muted); font-size: .92rem; border-left: 1px solid var(--line); }
.toc a:hover { color: var(--text); text-decoration: none; }
.toc a.active { color: var(--text); border-left-color: var(--g2); box-shadow: -1px 0 0 var(--g2); }
.prose { max-width: 700px; }
.prose h2 { margin-top: clamp(44px, 7vw, 72px); font-size: clamp(1.55rem, 3.6vw, 2.1rem); }
.prose > h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.8em; }
.prose p, .prose li { color: color-mix(in srgb, var(--text) 86%, var(--muted)); }
.prose ul.bullet-list { display: grid; gap: 10px; margin: 0 0 1.2em; }
.prose ul.bullet-list li { position: relative; padding-left: 22px; }
.prose ul.bullet-list li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: .72em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--grad-d);
}
.callout {
  border: 1px solid var(--line);
  border-left: 3px solid var(--g2);
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  margin: 1.6em 0;
}
.callout b { display: block; margin-bottom: 4px; }
.callout p:last-child { margin: 0; }
.callout.todo { border-left-color: #f5a524; border-style: dashed; border-left-style: solid; }
.callout.todo b { color: #b86e00; }
:root[data-theme="dark"] .callout.todo b { color: #ffc561; }
@media (prefers-color-scheme: dark) { :root:not([data-theme]) .callout.todo b { color: #ffc561; } }
.outcome { display: grid; gap: 14px; margin: 1.4em 0; }
@media (min-width: 640px) { .outcome { grid-template-columns: repeat(3, 1fr); } }
.outcome .card { padding: 20px; }
.outcome-strip .card { padding: 20px 20px 25px; }  /* metrics panel under the facts panel at the top of each case study */
.outcome b.number { display: block; font-size: 2.2rem; letter-spacing: -.045em; line-height: 1; margin-bottom: 8px; }
.outcome p { margin: 0; font-size: .92rem; color: var(--muted); line-height: 1.45; }
.figure { margin: 2em 0; }
.figure figcaption { font-size: .84rem; color: var(--muted); margin-top: 10px; }
.figure .frame {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-2);
  box-shadow: var(--shadow);
}
.figure img { width: 100%; height: auto; }
.shots { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; margin: 2em 0; }
@media (min-width: 760px) { .shots { grid-template-columns: repeat(3, 1fr); } }
.shots figure { margin: 0; }
.shots .frame { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; aspect-ratio: 16/10; background: var(--bg-2); }
.shots img { width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.shots figcaption { font-size: .76rem; color: var(--muted); margin-top: 6px; line-height: 1.3; }
.steps { counter-reset: s; display: grid; gap: 12px; margin: 1.4em 0; padding: 0; list-style: none; }
.steps li {
  counter-increment: s;
  position: relative;
  padding: 16px 18px 16px 62px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.steps li::before {
  content: counter(s, decimal-leading-zero);
  position: absolute;
  left: 18px;
  top: 16px;
  font-family: var(--mono);
  font-size: .85rem;
  color: var(--accent);
}
.steps li b { display: block; }
.steps li span { color: var(--muted); font-size: .94rem; }
a.card.next-case { display: flex; justify-content: space-between; gap: 28px 48px; flex-wrap: wrap; align-items: center; }
.next-case small {
  font-family: var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--faint);
  font-size: .72rem;
  display: block;
  margin-bottom: 4px;
}
.next-case h3 { margin: 0; font-size: clamp(1.3rem, 3.4vw, 1.9rem); }

/* data table */
.table-wrap {
  overflow-x: auto;
  margin: 1.4em 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  -webkit-overflow-scrolling: touch;
}
table { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 520px; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th {
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 500;
  background: var(--bg-2);
}
tr:last-child td { border-bottom: 0; }
td.number { font-variant-numeric: tabular-nums; font-family: var(--mono); }

/* paired bars chart (legacy vs new) */
.pairs { display: grid; gap: 16px; margin: 1.6em 0; }
.pair { display: grid; grid-template-columns: 1fr; gap: 6px; }
@media (min-width: 640px) { .pair { grid-template-columns: 150px 1fr 76px; align-items: center; gap: 16px; } }
.pair .name { font-size: .92rem; font-weight: 550; }
.pair .tracks { display: grid; gap: 5px; }
.pair .delta { font-family: var(--mono); font-size: .88rem; text-align: right; font-weight: 600; }
.pair .delta.delta-up { color: var(--good); }
.pair .delta.delta-down { color: #d6453d; }
.legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: .8rem; color: var(--muted); margin-bottom: 8px; }
.legend i { display: inline-block; width: 22px; height: 6px; border-radius: 4px; margin-right: 8px; vertical-align: 1px; }

/* ---------- experience ---------- */
.skill-grid { display: grid; gap: 12px; }
@media (min-width: 700px) { .skill-grid { grid-template-columns: 1fr 1fr; gap: 12px 40px; } }
.skill { display: grid; gap: 7px; padding: 10px 0; align-content: start; }  /* keep the gaps fixed when a neighbour makes the row taller */
.skill div { display: flex; justify-content: space-between; gap: 10px; font-size: .96rem; }
.skill small { color: var(--faint); font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }
.timeline { position: relative; display: grid; gap: 0; }
.role { display: grid; gap: 6px 28px; padding: 24px 0; border-top: 1px solid var(--line); }
@media (min-width: 800px) { .role { grid-template-columns: 200px 1fr; } }
.role .role-dates { font-family: var(--mono); font-size: .8rem; color: var(--muted); }
.role h3 { margin: 0 0 2px; }
.role .title { color: var(--muted); font-size: .96rem; margin-bottom: 10px; }
.role .role-highlights { display: grid; gap: 6px; margin: 10px 0 0; }
.role .role-highlights li {
  position: relative;
  padding-left: 20px;
  font-size: .97rem;
  color: color-mix(in srgb, var(--text) 86%, var(--muted));
}
.role .role-highlights li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .7em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--grad-d);
}
details.more { margin-top: 12px; }
details.more summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: .92rem; list-style: none; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::after { content: " +"; }
details.more[open] summary::after { content: " –"; }
.career-chart { width: 100%; height: auto; }
.career-chart text { font-family: var(--mono); font-size: 11px; fill: var(--muted); }
.career-chart .bar-r { fill: url(#gc); opacity: .85; }
.career-chart .grid-l { stroke: var(--line); stroke-width: 1; }

/* ---------- process / diamond ---------- */
.diamond { width: 100%; height: auto; }
.diamond path { fill: none; stroke: var(--line-strong); stroke-width: 1.5; }
.diamond .glow-p { stroke: url(#gd); stroke-width: 2.5; stroke-dasharray: 1400; stroke-dashoffset: 0; }
.js .diamond .glow-p { stroke-dashoffset: 1400; transition: stroke-dashoffset 2.4s ease; }
.js .diamond.in .glow-p { stroke-dashoffset: 0; }
.diamond text { font-family: var(--font); fill: var(--text); font-size: 15px; font-weight: 600; }
.diamond .diamond-subtitle { fill: var(--muted); font-size: 12px; font-weight: 400; }
.meter { display: grid; gap: 14px; margin: 1.4em 0; }
.meter-row { display: grid; gap: 6px; }
.meter-row > div:first-child { display: flex; justify-content: space-between; font-size: .95rem; font-weight: 550; gap: 10px; }
.meter-row small { color: var(--muted); font-weight: 400; font-size: .84rem; }

/* ---------- AI / lab ---------- */
.tool-row { display: flex; flex-wrap: wrap; gap: 8px; }
.costar { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin: 1.2em 0; }
.costar div { text-align: center; padding: 14px 4px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.costar b {
  display: block;
  font-size: 1.5rem;
  background: var(--grad-d);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.1;
}
.costar span { font-size: .66rem; color: var(--muted); font-family: var(--mono); text-transform: uppercase; letter-spacing: .04em; }
@media (min-width: 640px) { .costar span { font-size: .75rem; } }
.lab-card h3 { margin-bottom: 6px; }
.lab-card .tag { display: block; margin-bottom: 12px; font-size: .8rem; font-weight: 500; line-height: 1.45; color: var(--faint); }  /* chip-style label: body font, not mono */
.term {
  font-family: var(--mono);
  font-size: .8rem;
  background: #0b0d14;
  color: #cfe8ff;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  padding: 16px 18px;
  overflow-x: auto;
  line-height: 1.7;
}
.term .p { color: #37e6ff; } .term .k { color: #ff6fb5; } .term .d { color: #7d8299; }

/* ---------- about ---------- */
.about-grid { display: grid; gap: 32px; }
@media (min-width: 900px) { .about-grid { grid-template-columns: 1fr 340px; gap: 64px; } }
.portrait {
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  border: 1px dashed var(--line-strong);
  display: grid;
  place-items: center;
  color: var(--faint);
  text-align: center;
  font-size: .85rem;
  padding: 20px;
  background: repeating-linear-gradient(135deg, transparent 0 14px, var(--grid) 14px 15px);
}
/* about-page portrait: transparent PNG; the panel colour follows the theme (--portrait-bg) */
.portrait-photo {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--portrait-bg);
  border: 1px solid var(--line);
}
.portrait-photo { position: relative; isolation: isolate; }
.portrait-photo img { display: block; width: 100%; height: auto; position: relative; z-index: 1; opacity: .6; mix-blend-mode: var(--img-blend); }
:root[data-theme="dark"] .portrait-photo img { opacity: .55; }
@media (prefers-color-scheme: dark) { :root:not([data-theme]) .portrait-photo img { opacity: .55; } }
/* hovering the portrait fades the image up to 75% in both themes (mouse/trackpad only) */
.portrait-photo img { transition: opacity 1.2s ease; }
@media (hover: hover) {
  :root .portrait-photo img:hover { opacity: .75; }
  :root[data-theme="dark"] .portrait-photo img:hover { opacity: .7; }
}
@media (hover: hover) and (prefers-color-scheme: dark) { :root:not([data-theme]) .portrait-photo img:hover { opacity: .7; } }
@media (prefers-reduced-motion: reduce) { .portrait-photo img { transition: none; } }
/* hovering the portrait: the same blue-purple-pink ring as the header logo spins once around the border and the box glows (mouse/trackpad only) */
.portrait-photo { transition: box-shadow .6s ease; }
.portrait-photo::after {
  content: ""; position: absolute; inset: 0; z-index: 2; border-radius: inherit; padding: 2px; pointer-events: none;
  background: conic-gradient(from var(--brand-angle), var(--g1) 0%, var(--g2) 70%, var(--g3) 92%, var(--g1) 100%);
  -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);
  opacity: 0; transition: opacity .6s ease;
}
@keyframes portrait-ring-spin { from { --brand-angle: 200deg; } to { --brand-angle: 560deg; } }
/* ring strength and glow: fainter in light mode, full strength in dark mode */
.portrait-photo { --ring-opacity: .25; --ring-glow: 0 0 22px -4px color-mix(in srgb, var(--g2) 25%, transparent); }
:root[data-theme="dark"] .portrait-photo { --ring-opacity: 1; --ring-glow: 0 0 24px -2px var(--g2); }
@media (prefers-color-scheme: dark) { :root:not([data-theme]) .portrait-photo { --ring-opacity: 1; --ring-glow: 0 0 24px -2px var(--g2); } }
@media (hover: hover) {
  .portrait-photo:hover { box-shadow: var(--ring-glow); }
  .portrait-photo:hover::after { opacity: var(--ring-opacity); animation: portrait-ring-spin 1.8s ease-in-out both; }
}
@media (prefers-reduced-motion: reduce) { .portrait-photo:hover::after { animation: none; } }
/* three soft colour blobs (blue, purple, pink) drifting independently underneath the portrait.
   --blob-opacity is the strength of each one; they overlap and blend with each other. */
.portrait-photo { --blob-opacity: .25; --blob-blur: 42px; --img-blend: multiply; }  /* blur = how far the soft halo spreads; image blend: light multiply, dark screen */
:root[data-theme="dark"] .portrait-photo { --img-blend: screen; --blob-opacity: .25; }
@media (prefers-color-scheme: dark) { :root:not([data-theme]) .portrait-photo { --img-blend: screen; --blob-opacity: .25; } }
.portrait-blob {
  position: absolute;
  z-index: 0;
  width: 85%;
  aspect-ratio: 1;
  border-radius: 50%;
  opacity: var(--blob-opacity);
  pointer-events: none;
  /* left/top are the blob's CENTRE as a % of the box, so each path can reach every edge and corner */
  transform: translate(-50%, -50%);
  filter: blur(var(--blob-blur));
}
.portrait-blob-1 {
  left: 0%;
  top: 0%;
  background: radial-gradient(circle, var(--g1) 0, transparent 68%);
  animation: blob-drift-1 20s ease-in-out infinite alternate;
}
.portrait-blob-2 {
  left: 100%;
  top: 100%;
  background: radial-gradient(circle, var(--g2) 0, transparent 68%);
  animation: blob-drift-2 24s ease-in-out infinite alternate;
}
.portrait-blob-3 {
  left: 0%;
  top: 100%;
  background: radial-gradient(circle, var(--g3) 0, transparent 68%);
  animation: blob-drift-3 28s ease-in-out infinite alternate;
}
.portrait-blob-4 {
  left: 100%;
  top: 0%;
  /* orange: not one of the site's gradient stops, so a fixed value that works in both themes */
  background: radial-gradient(circle, #ff8a3d 0, transparent 68%);
  animation: blob-drift-4 22s ease-in-out infinite alternate;
}
/* each path visits all four corners and the middle in a different order, so together they cover the whole box */
@keyframes blob-drift-1 {
  0% { left: 0%; top: 0%; transform: translate(-50%, -50%) scale(1); }
  25% { left: 100%; top: 30%; transform: translate(-50%, -50%) scale(1.2); }
  50% { left: 20%; top: 100%; transform: translate(-50%, -50%) scale(.9); }
  75% { left: 85%; top: 70%; transform: translate(-50%, -50%) scale(1.15); }
  100% { left: 50%; top: 50%; transform: translate(-50%, -50%) scale(1); }
}
@keyframes blob-drift-2 {
  0% { left: 100%; top: 100%; transform: translate(-50%, -50%) scale(1.1); }
  25% { left: 0%; top: 55%; transform: translate(-50%, -50%) scale(.9); }
  50% { left: 100%; top: 10%; transform: translate(-50%, -50%) scale(1.2); }
  75% { left: 40%; top: 0%; transform: translate(-50%, -50%) scale(1); }
  100% { left: 55%; top: 50%; transform: translate(-50%, -50%) scale(1.1); }
}
@keyframes blob-drift-3 {
  0% { left: 0%; top: 100%; transform: translate(-50%, -50%) scale(.9); }
  25% { left: 90%; top: 65%; transform: translate(-50%, -50%) scale(1.2); }
  50% { left: 10%; top: 20%; transform: translate(-50%, -50%) scale(1); }
  75% { left: 100%; top: 0%; transform: translate(-50%, -50%) scale(1.1); }
  100% { left: 45%; top: 45%; transform: translate(-50%, -50%) scale(.95); }
}
@keyframes blob-drift-4 {
  0% { left: 100%; top: 0%; transform: translate(-50%, -50%) scale(1); }
  25% { left: 15%; top: 45%; transform: translate(-50%, -50%) scale(1.15); }
  50% { left: 90%; top: 100%; transform: translate(-50%, -50%) scale(.9); }
  75% { left: 0%; top: 90%; transform: translate(-50%, -50%) scale(1.2); }
  100% { left: 50%; top: 55%; transform: translate(-50%, -50%) scale(1); }
}
.story-arc { display: grid; gap: 14px; margin: 1.4em 0; }
.story-arc li { display: grid; grid-template-columns: 74px 1fr; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.story-arc li b { font-family: var(--mono); font-size: .8rem; color: var(--accent); font-weight: 500; padding-top: 3px; }

/* ---------- recruiters ---------- */
.avail { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
@media (min-width: 760px) { .avail { grid-template-columns: repeat(4, 1fr); } }
.avail > div { background: var(--bg); padding: 20px; }
.avail small {
  font-family: var(--mono);
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--faint);
  display: block;
  margin-bottom: 6px;
}
.avail b { font-size: 1.12rem; letter-spacing: -.02em; line-height: 1.25; display: block; }
.avail span { color: var(--muted); font-size: .86rem; display: block; line-height: 1.4; }
.check li { position: relative; padding: 12px 0 12px 34px; border-bottom: 1px solid var(--line); font-size: 1.02rem; }
.check li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 16px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--grad-d);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3L13 4.5' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 48px 36px; margin-top: 40px; background: var(--bg); }
.foot-grid { display: grid; gap: 32px; }
@media (min-width: 760px) { .foot-grid { grid-template-columns: 1.4fr repeat(3, 1fr); } }
@media (min-width: 760px) { .foot-grid > :first-child { padding-right: 40px; } }   /* air between the name block and the nav columns */
.site-footer h4, .site-footer .foot-title {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 500;
  margin-bottom: 14px;
}
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: var(--muted); font-size: .95rem; }
.site-footer a:hover { color: var(--text); }
.foot-note {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: .82rem;
  color: var(--faint);
}

/* ---------- reveal (progressive enhancement) ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal.delay-1 {
  transition-delay: .08s;
}
.js .reveal.delay-2 {
  transition-delay: .16s;
}
.js .reveal.delay-3 {
  transition-delay: .24s;
}

/* ---------- analysis page extras ---------- */
.severity { font-family: var(--mono); font-size: .72rem; padding: 3px 9px; border-radius: 99px; border: 1px solid; white-space: nowrap; }
.severity.severity-high { color: #d6453d; border-color: color-mix(in srgb, #d6453d 50%, transparent); }
.severity.severity-medium { color: #b86e00; border-color: color-mix(in srgb, #f5a524 60%, transparent); }
.severity.severity-low { color: var(--muted); border-color: var(--line-strong); }
:root[data-theme="dark"] .severity.severity-medium { color: #ffc561; }
.sitemap { display: grid; gap: 10px; }
.sitemap .node { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--surface); font-size: .94rem; }
.sitemap .node b { display: block; }
.sitemap .node small { color: var(--muted); }
.comparison { display: grid; gap: 16px; }
@media (min-width: 900px) { .comparison { grid-template-columns: 1fr 1fr; } }
.comparison h3 { font-size: 1.1rem; }
.pillbar { display: flex; height: 12px; border-radius: 99px; overflow: hidden; background: var(--bg-2); }
.pillbar i { display: block; height: 100%; }

@media print { .site-header, .site-footer, .aurora, .grid-bg { display: none; } body { background: #fff; color: #000; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .signal .line { stroke-dashoffset: 0; }
  .signal .signal-area, .signal .signal-end { opacity: 1; }
  .marquee-track { animation: none; }
  .grid-bg::after { display: none; }
  .portrait-blob { animation: none; }
}

/* ---------- gantt (career) ---------- */
.gantt { display: grid; gap: 10px; }
.gantt-row { display: grid; gap: 4px; }
@media (min-width: 700px) {
  .gantt-row {
    grid-template-columns: 396px minmax(0, 1fr);
    align-items: center;
    gap: 16px;
  }
  .gantt-row .timeline-name {
    white-space: nowrap;
  }
}
.gantt-row .timeline-name { font-size: .88rem; font-weight: 550; line-height: 1.25; }
.gantt-row .timeline-name small { display: block; color: var(--faint); font-weight: 400; font-family: var(--mono); font-size: .7rem; }
.gantt-track { position: relative; height: 10px; border-radius: 99px; background: var(--bg-2); }
.gantt-track i {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--l);
  width: var(--w);
  border-radius: 99px;
  background: var(--grad-h);
  box-shadow: 0 0 12px -2px color-mix(in srgb, var(--g2) 60%, transparent);
  transform-origin: left;
}
.js .gantt-track i { transform: scaleX(0); transition: transform 1.1s cubic-bezier(.2,.7,.2,1); }
.gantt-track i.early { background: color-mix(in srgb, var(--faint) 55%, transparent); box-shadow: none; }
.js .gantt.in .gantt-track i { transform: scaleX(1); }
.gantt-axis { position: relative; height: 18px; font-family: var(--mono); font-size: .7rem; color: var(--faint); margin-top: 8px; }
.gantt-axis span { position: absolute; top: 0; transform: translateX(-50%); }
.gantt-axis span:first-child { transform: none; }
@media (min-width: 700px) { .gantt-axis { margin-left: 412px; } }

/* ---------- analysis helpers ---------- */
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.swatch { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface-solid); font-size: .8rem; }
.swatch i { display: block; height: 52px; }
.swatch div { padding: 8px 10px; line-height: 1.35; }
.swatch code, code { font-family: var(--mono); font-size: .76rem; color: var(--muted); }
.horizontal-bar-row { display: grid; grid-template-columns: 1fr; gap: 4px; }
@media (min-width: 640px) { .horizontal-bar-row { grid-template-columns: 210px 1fr 64px; align-items: center; gap: 14px; } }
.horizontal-bar-row .horizontal-bar-name { font-size: .88rem; }
.horizontal-bar-row .horizontal-bar-value { font-family: var(--mono); font-size: .82rem; color: var(--muted); text-align: right; }
.horizontal-bars { display: grid; gap: 12px; margin: 1.2em 0; }
.num-card b { font-size: 2.4rem; letter-spacing: -.045em; line-height: 1; display: block; margin-bottom: 8px; }
/* Breakpoints "Key findings": the figures (e.g. 1442×801) are wide, and the gradient only paints inside the heading's box, so a heading
   wider than the card gets its last digit cut off. Size the figure to the card so it always fits, the same size in all three cards. */
.findings-grid .num-card { container-type: inline-size; }
.findings-grid .num-card b { font-size: 2.1rem; font-size: min(2.4rem, 20cqw); white-space: nowrap; }
.tag-nda {
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--faint);
  border: 1px dashed var(--line-strong);
  border-radius: 99px;
  padding: 2px 9px;
}

/* ---------- brand logos on cards, case headers, experience ---------- */
.company-logo { display: inline-flex; align-items: center; gap: 14px; }
.company-logo img { height: 30px; width: auto; max-width: 130px; object-fit: contain; display: block; }
.company-logo.logo-large { margin-top: 26px; }
.company-logo.logo-large img { height: 34px; max-width: 170px; }
.work-card .meta .client-logos { min-height: 30px; display: inline-flex; align-items: center; text-transform: none; }
.client-row { margin-top: 4px; }
.company-logo.logo-role { margin-bottom: 18px; }
.company-logo.logo-role img { height: 31.2px; max-width: 156px; }
.gantt-row .timeline-name { display: flex; align-items: center; gap: 28px; }  /* space between the logo and the company name + dates */
.gantt-row .timeline-name .company-logo { width: 76px; flex: none; justify-content: flex-start; }
.gantt-row .timeline-name .company-logo img { height: 22px; max-width: 76px; }
.gantt-row .timeline-name-text small { display: block; }
@media (max-width: 699px) {
  .gantt-row .timeline-name .company-logo {
    width: auto;
  }
  .gantt-row .timeline-name .company-logo:empty {
    display: none;
  }
}
.work-card .meta .client-logos { gap: 10px; min-width: 0; flex-wrap: wrap; }
.work-card .meta .client-logos em { font-style: normal; letter-spacing: .02em; font-size: .72rem; line-height: 1.3; }
.work-card .meta > span:last-child { white-space: nowrap; flex: none; }
/* header: "For recruiters" button and the icon buttons share one height */
.header-actions .icon-btn { width: 32px; height: 32px; border-radius: 10px; }
.header-actions .icon-btn svg { width: 18px; height: 18px; }
.header-actions .btn.header-cta { height: 32px; min-height: 0; box-sizing: border-box; padding: 0 16px; font-size: .82rem; line-height: 1; }
/* all heroes, both modes: fainter background blobs */
.hero .aurora, .page-hero .aurora { opacity: .5; }

/* ---------- source note for the 13.5M users figure ---------- */
.info-btn {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-left: 6px;
  vertical-align: middle;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--muted);
  font: italic 700 .75rem/1 Georgia, "Times New Roman", serif;
  cursor: pointer;
  padding: 0;
  position: relative;
}
.info-btn::after { content: ""; position: absolute; inset: -9px; }
.info-btn:hover, .info-btn:focus-visible { color: var(--text); border-color: var(--accent); }
.info-fallback { display: none; font-size: .85rem; color: var(--muted); }
.no-popover .info-btn { display: none; }
.no-popover .info-fallback { display: inline; }
.info-pop {
  margin: auto;
  width: min(92vw, 440px);
  padding: 24px 24px 20px;
  border-radius: 18px;
  border: 1px solid var(--line-strong);
  background: var(--surface-solid);
  color: var(--text);
  box-shadow: 0 24px 70px -20px rgba(0,0,0,.45);
  font-size: .95rem;
  line-height: 1.5;
  text-align: left;
  font-weight: 400;
  letter-spacing: 0;
}
.info-pop::backdrop { background: rgba(6, 7, 12, .5); backdrop-filter: blur(3px); }
.info-pop h3 { margin: 0 0 10px; font-size: 1.1rem; }
.info-pop p { margin: 0 0 12px; color: var(--muted); }
.info-pop ul { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.info-pop li { display: grid; padding: 10px 12px; border-radius: 12px; background: var(--bg-2); }
.info-pop li b { font-weight: 600; }
.info-pop li span { color: var(--muted); font-size: .86rem; margin: 0; display: block; }
.info-pop .small { font-size: .82rem; color: var(--faint); }

/* unit/suffix characters in the stats (+ M % /5) sit slightly back */
.stat > b .suffix { font-style: normal; opacity: .6; }
.suffix { font-style: normal; }


.muted .info-btn { margin-left: 5px; margin-right: 2px; }

/* ---------- visuals at the top of the Impact KPI panels ---------- */
.kpi-visual { height: 64px; margin-bottom: 12px; display: flex; align-items: center; }
.kpi-visual svg { max-width: 100%; height: 64px; width: auto; display: block; }
.kpi-visual-bars { flex-direction: column; justify-content: center; align-items: stretch; gap: 9px; max-width: 150px; }
.kpi-visual-bars .kpi-bar { display: grid; gap: 3px; }
.kpi-visual-bars .kpi-bar span {
  font-family: var(--mono);
  font-size: .62rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--faint);
  line-height: 1;
}
.kpi-visual-bars .bar { height: 8px; }
.js .kpi-visual .draw { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.1s cubic-bezier(.2,.7,.2,1); }
.js .kpi-visual .draw.delay-2 { transition-delay: .5s; }
.js .kpi-visual .fade { opacity: 0; transition: opacity .9s ease; }
.js .kpi.in .kpi-visual .draw { stroke-dashoffset: 0; }
.js .kpi.in .kpi-visual .fade { opacity: var(--o, 1); }
@media (prefers-reduced-motion: reduce) { .js .kpi-visual .draw, .js .kpi-visual .fade { transition: none; } }

/* symbols in the Impact KPI panels (£ + % / 5) sit back */
.kpi > b .suffix { opacity: .6; }

/* "Principal" set as an overline above the home hero headline */
.h1-eyebrow { display: flex; width: fit-content; margin-bottom: 0; font-weight: 600; line-height: 1.2; }
.h1-eyebrow::before { display: none; }

.eyebrow.no-rule::before { display: none; }
/* dark mode: hero blobs a bit brighter than light mode */
:root[data-theme="dark"] .hero .aurora, :root[data-theme="dark"] .page-hero .aurora { opacity: .75; }
@media (prefers-color-scheme: dark) { :root:not([data-theme]) .hero .aurora, :root:not([data-theme]) .page-hero .aurora { opacity: .75; } }

/* Experience: Industries / Product types panels, a little more air between heading and tags */
.card.range h3 { margin-bottom: calc(.5em + 10px); }

/* Recommendations: seven recruiter themes, filterable quotes, "check it yourself" row */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.quote[hidden] { display: none; }
.themes .theme { display: flex; flex-direction: column; align-items: flex-start; gap: 0; }
.themes .theme h3 { margin-bottom: .5em; }
.themes .theme p { margin: 0 0 16px; font-size: .95rem; }
.themes .theme-go { margin-top: auto; cursor: pointer; font-family: inherit; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.filter-chips .chip, .theme-go { cursor: pointer; font-family: inherit; }
.filter-count { font-size: .85rem; margin: 0 0 20px; }
.verify h2 { font-size: clamp(1.3rem, 3vw, 1.8rem); margin: 0 0 .5em; max-width: 26ch; }
.verify > p.muted { max-width: 62ch; margin: 0 0 20px; }
.verify .ai-tool-link { gap: 10px; }
.verify .ai-tool-link img { width: 20px; height: 20px; flex: none; }
.verify .logo-l, .verify .logo-d { object-fit: contain; }
.prompt { margin-top: 22px; font-size: .9rem; }
.prompt summary { cursor: pointer; color: var(--muted); }
.prompt p {
  margin: 12px 0;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--bg-2);
  color: var(--muted);
  font-family: var(--mono);
  font-size: .8rem;
  line-height: 1.6;
}
.copy-prompt { display: none; }
.js .copy-prompt { display: inline-flex; }

/* Recommendations: full set, long quotes collapse to a lead paragraph */
.quotes { align-items: start; }
.quote blockquote p { margin: 0 0 .8em; }
.quote blockquote p:last-child { margin-bottom: 0; }
.quote blockquote { font-size: 1rem; }
.quote .more { margin-top: .8em; }
.quote .more summary { cursor: pointer; color: var(--accent); font-size: .9rem; font-weight: 500; }
.quote .more[open] summary { margin-bottom: .8em; }
.qmeta { display: block; margin-top: 2px; font-size: .78rem; color: var(--faint); }
.quote { height: auto; }

/* Recommendation source badge: LinkedIn recommendation / internal employee feedback */
.quote .source-badge {
  align-self: flex-start;
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line-strong);
  border-radius: 99px;
  padding: 3px 10px 3px 8px;
  background: var(--surface);
}
.quote .source-badge::before { content: ""; flex: 0 0 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--g1); }   /* flex: 0 0 6px stops the dot being squashed when the text wraps */
.quote .source-badge { max-width: 100%; }
.quote .source-badge-internal::before { background: var(--g3); }

/* Recommendations on phones: swipeable theme cards, sticky one-line filter bar, "show all" button */
#quotes { scroll-margin-top: var(--header-h); }
.show-all-wrap { margin: 24px 0 0; text-align: center; }
.show-all[hidden] { display: none; }
/* Filter bar: pinned under the header from the first quote until the last one scrolls past */
.filter-bar { position: sticky; top: var(--header-h); z-index: 50; isolation: isolate; padding: 12px 0 14px; margin-bottom: 20px; }
.filter-bar::before { content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; left: calc(50% - 50vw); right: calc(50% - 50vw);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.filter-bar .filter-chips { margin-bottom: 8px; }
.filter-bar .filter-count { margin: 0; font-size: .8rem; }
@media (max-width: 639px) {
  .themes { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
    margin-inline: calc(var(--gutter) * -1); padding: 4px var(--gutter) 14px; scroll-padding-inline: var(--gutter); scrollbar-width: none; }
  .themes::-webkit-scrollbar { display: none; }
  .themes .theme { flex: 0 0 78%; max-width: 300px; scroll-snap-align: start; }
  .filter-bar .filter-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin: 0 calc(var(--gutter) * -1) 6px;
    padding: 0 var(--gutter) 4px;
    scrollbar-width: none;
    scroll-padding-inline: var(--gutter);
  }
  .filter-bar .filter-chips::-webkit-scrollbar { display: none; }
  .filter-bar .filter-count { margin: 0; font-size: .78rem; }
}

/* recommendations: CSS columns so cards pack tightly (no row gaps). Reads down each column. */
.quotes { display: block; column-count: 1; column-gap: 16px; }
@media (min-width: 700px) { .quotes { column-count: 2; column-gap: 20px; } }
@media (min-width: 1100px) { .quotes { column-count: 3; } }
.quotes > .quote { break-inside: avoid; margin: 0 0 16px; }
@media (min-width: 700px) { .quotes > .quote { margin-bottom: 20px; } }
.cta .eyebrow { margin: 0 0 18px; color: var(--muted); }

/* amber warning-triangle bullets (process.html "The reality") */
:root { --amber: #cc800e; }
:root[data-theme="dark"] { --amber: #ffb84a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --amber: #ffb84a; } }
ul.bullet-list.warn { list-style: none; padding: 0; margin: 0 0 2em; }
ul.bullet-list.warn li { position: relative; padding-left: 32px; }
ul.bullet-list.warn li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .22em;
  width: 20px;
  height: 20px;
  border-radius: 0;
  background: var(--amber);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M10.6 3.4a1.6 1.6 0 0 1 2.8 0l8.6 15a1.6 1.6 0 0 1-1.4 2.4H3.4A1.6 1.6 0 0 1 2 18.4zM11 9v5h2V9zm0 7v2h2v-2z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M10.6 3.4a1.6 1.6 0 0 1 2.8 0l8.6 15a1.6 1.6 0 0 1-1.4 2.4H3.4A1.6 1.6 0 0 1 2 18.4zM11 9v5h2V9zm0 7v2h2v-2z'/%3E%3C/svg%3E") center / contain no-repeat; }
ul.bullet-list.warn { margin-bottom: 2em; }
@media (min-width: 760px) {
  .avail.avail3 > div:last-child {
    grid-column: span 2;
  }
}
/* same 4-column grid as the panel above, so the dividers line up */

/* extra 6px after a headline full stop (inline span, so the margin sits between the stop and the normal space) */
.headline-stop { margin-right: 6px; }

/* separator dot between inline links: a little larger, with 6px padding each side (on top of the normal spaces) */
.separator-dot {
  font-size: 1.5em;
  line-height: 0;
  padding: 0 6px 0 calc(6px + .2em);
  vertical-align: -.08em;
}
/* no space before the dot, so it can never start a line; .2em stands in for that space */
span.separator-dot {
  display: inline !important;
  font-size: 1.5em !important;
  line-height: 0 !important;
  color: inherit !important;
}
/* beats rules like ".quote-author span" that would make it a block */
.eyebrow .separator-dot, .status-pill .separator-dot { padding: 0; }  /* these are flex rows: their own gap already spaces the dot */
@media (max-width: 639px) { .verify-wrap { text-align: center; } }  /* recommendations: centre the LinkedIn button on phones only */
.next-case > div { position: relative; top: -2px; }  /* "Next case study" label and name sit 2px higher; the View button stays put */
.btn:not(.btn-sm):not(.header-cta) {
  padding-block: 8px;
  min-height: 44px;
}
/* standard buttons: 44px tall (one line); long labels that wrap still grow */

/* dates and company names: the site's sans (system UI) with tabular numbers, instead of monospace */
.work-card .meta,
.row-item .year,
.role .role-dates,
.kpi small,
.signal-head .label,
.signal-foot,
.before-after-legend,
.career-chart text,
.gantt-axis {
  font-family: var(--font);
  font-variant-numeric: tabular-nums;
}
.separator-dot .dot-space {
  letter-spacing: 0 !important;
  display: inline !important;
  font-size: 0 !important;
  width: auto !important;
  height: auto !important;
  background: none !important;
  padding: 0;
  margin: 0;
}
/* invisible non-breaking space inside the dot: copy and paste keeps the space before it */
.status-pill .separator-dot {
  position: relative;
  top: 2.5px;
}
/* the dot is centred on the pill, but its glyph sits high; nudge it to the middle of the text */
.site-header .brand, .site-footer .brand { position: relative; top: -1px; }  /* header and footer logo + site name sit 1px higher */

/* Logo scroller company names.
   Default: hidden. Wider screens with a mouse: hovering a logo swaps it for its name (the scroller already pauses on hover).
   Phones, tablets and touch screens never show the names. Add class "names-on" to .marquee (SHOW_LOGO_NAMES = True in pages_a.py) to show them all the time under the logos. */
.marquee-track .brand b { display: none; }
.marquee.names-on .brand b { display: block; }
@media (hover: hover) and (min-width: 760px) {
  .marquee:not(.names-on) .brand { position: relative; }
  .marquee:not(.names-on) .brand img { transition: opacity .2s ease; }
  .marquee:not(.names-on) .brand b {
    display: flex; align-items: center; justify-content: center; text-align: center; white-space: normal; line-height: 1.2;
    position: absolute;
    top: 0;
    bottom: 0;
    left: calc(clamp(36px, 7vw, 72px) / -2);
    width: 100%;
    /* centred on the logo itself, a little wider than it */
    font-size: .9rem; font-weight: 600; letter-spacing: -.01em; color: var(--text);
    opacity: 0; pointer-events: none; transition: opacity .2s ease;
  }
  .marquee:not(.names-on) .brand:hover img { opacity: 0; }
  .marquee:not(.names-on) .brand:hover b { opacity: 1; }
}

/* standard call-to-action buttons: 6px more space between the last word and a trailing arrow icon (the 8px button gap plus this margin) */
.btn:not(.btn-sm) .arrow-icon { margin-left: 6px; }
.btn:not(.btn-sm) .button-arrow-glyph {
  margin-left: 1.9px;
}
/* text arrows (↗): the old space was 3.9px; the button gap is now 8px, so 8 + 1.9 = old space + 6px */

/* arrows in blue text links sit 1px lower: text arrows (→ ↗, wrapped in .link-arrow by the build) and the drawn arrow in "Read case study" links */
.link-arrow { position: relative; top: 1px; }
.work-card .card-cta svg { position: relative; top: 1px; }
.no-wrap { white-space: nowrap; }  /* keeps "BNY Investments" on one line */

.skill .skill-evidence { margin: 0; font-size: .82rem; line-height: 1.4; color: var(--muted); }  /* one-line evidence under each skill */
.skill small {
  position: relative;
  top: 3px;
  text-align: right;
}
/* level label (Expert / Advanced) sits 3px lower, closer to the skill name baseline */
.gantt-row .timeline-name small {
  font-family: var(--font);
  font-variant-numeric: tabular-nums;
}
/* career timeline dates: system sans, like the other dates and company names */
.muted-at { color: var(--faint); font-weight: 400; }  /* muted "@" in the career timeline name "PwC @ Financial Conduct Authority" */
@media (max-width: 639px) {
  .filter-count [data-note] {
    display: none;
  }
}
/* phones: the chip already says "Current role (BNY)"; keep the pinned bar to one count line */

/* Header logo shimmer (decorative only): every 30s the colours spin once around the rounded-square outline, the logo flashes a soft glow
   that fades, and the colours land back where they started. The first run plays 3s after the page loads. Off for reduced-motion users. */
@property --brand-angle { syntax: "<angle>"; inherits: false; initial-value: 200deg; }
@keyframes logo-shimmer {
  0%    { --brand-angle: 200deg; box-shadow: 0 0 18px -2px var(--g2); animation-timing-function: ease-in-out; }
  6% {
    --brand-angle: 560deg;
    box-shadow: 0 0 18px -2px var(--g2);
    animation-timing-function: ease-out;
  }
  /* 1.8s: one full turn, back where it started */
  8% {
    --brand-angle: 560deg;
    box-shadow: 0 0 20px 3px color-mix(in srgb, var(--g2) 80%, #fff);
    animation-timing-function: ease-in-out;
  }
  /* glow flash */
  15%   { --brand-angle: 560deg; box-shadow: 0 0 18px -2px var(--g2); }                                    /* glow fades by about 4.5s */
  100%  { --brand-angle: 560deg; box-shadow: 0 0 18px -2px var(--g2); }
}
.site-header .brand-mark { animation: logo-shimmer 30s infinite 3s; }
@media (prefers-reduced-motion: reduce) { .site-header .brand-mark { animation: none; } }
.chip-muted { opacity: .6; }  /* muted "(BNY)" in the "Current role" chip; works in both normal and pressed states */

/* Case studies: collapsed "Evidence" block holding a long document (LSEG handover) */
.evidence-body {
  font-size: .92rem; line-height: 1.5; margin-top: 16px;
  background: var(--bg-2); border: 1px solid var(--line); border-left: 3px solid var(--g2);   /* same inset look as the callouts and prompt boxes */
  border-radius: var(--radius-sm); padding: 0 clamp(16px, 3vw, 28px) 26px;
  max-height: min(70vh, 640px); overflow-y: auto; -webkit-overflow-scrolling: touch;   /* scrolls inside, so the page stays short */
}
.evidence-body:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.evidence-body .evidence-label {
  font-family: var(--mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--faint);
  margin: 0 0 18px; padding: 16px 0 12px; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 1; background: var(--bg-2);   /* label stays visible while scrolling */
}
.evidence-body h4 { margin: 28px 0 8px; font-size: 1.05rem; letter-spacing: -.01em; }
.evidence-body h4:first-child { margin-top: 0; }
.evidence-body h5 { margin: 20px 0 6px; font-size: .95rem; }
.evidence-body ul { margin: .35em 0; padding-left: 1.2em; list-style: disc; }
.evidence-body ul ul { list-style: circle; }
.evidence-body li { margin: .25em 0; color: var(--muted); }
.evidence-body li > p, .evidence-body p { margin: 0; color: var(--text); }
.evidence-body li > ul { margin-top: .2em; }

/* supplemental file info inside a download link, e.g. "(March 2017, PDF, 5.4 MB)": same link colour, 60% opacity */
.file-meta { opacity: .6; }

/* Click-to-enlarge images (figure.zoomable) and 2-up figure grids */
article.prose img { cursor: zoom-in; }
.figure-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 1.4em 0; }
.figure-grid .figure { margin: 0; }
@media (max-width: 720px) { .figure-grid { grid-template-columns: 1fr; } }
.zoom-overlay {
  position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center;
  padding: 24px; background: rgba(5, 6, 12, .88); cursor: zoom-out;
}
.zoom-overlay[hidden] { display: none; }
.zoom-overlay img { max-width: 100%; max-height: 100%; width: auto; height: auto; border-radius: 8px; background: #fff; }
.zoom-close {
  position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,.3);
  background: rgba(255,255,255,.1); color: #fff; font-size: 18px; cursor: pointer;
}
body.zoom-open { overflow: hidden; }

/* Panels inside case-study text: no extra top gap above the first heading; optional secondary heading under the main one */
.prose .card > h3:first-child { margin-top: 0; }
.card-sub { margin: 4px 0 14px; font-size: 1rem; font-weight: 500; color: var(--muted); }

/* a plain note box with an amber side border (the Star Trek fan-project disclaimer) */
.callout.amber { border-left-color: var(--amber); padding: 14px 18px; margin: 1.2em 0; max-width: 68ch; }
.callout.amber p { margin: 0; font-size: .9rem; color: var(--muted); line-height: 1.5; }

/* a prompt quoted on a case study: the callout look, with a small label above each quote */
.callout.prompt-ex .prompt-label { margin: 10px 0 2px; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.callout.prompt-ex .prompt-text { margin: 4px 0 12px; font-size: .95rem; line-height: 1.55; }
.callout.prompt-ex .prompt-label + .prompt-text { margin-top: 2px; }

/* narrower figure for a tool or HUD screenshot inside running text */
.figure.compact { max-width: 560px; }
/* the "what this shows" summary at the top of a case study */
.callout.shows-box { margin: 0 0 2em; }
.callout.shows-box li { margin: 4px 0; }

/* a row of gameplay screenshots near the top of a case study */
.shot-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0 0 2em; }
.shot-strip figure { margin: 0; }
.shot-strip img { display: block; width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--line); }
.shot-strip figcaption { margin-top: 6px; font-size: .78rem; color: var(--muted); }
@media (max-width: 720px) { .shot-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.shot-strip img { cursor: zoom-in; }
.page-hero .shot-strip { margin: 26px 0 0; }
/* a page hero that carries a gameplay strip: tighter top and bottom padding, so the strip stays above the fold */
.page-hero:has(.shot-strip) { padding-top: calc(var(--header-h) + 24px); padding-bottom: 28px; }
.page-hero:has(.shot-strip) .crumbs { margin-bottom: 14px; }

/* Back to top: a small round button, bottom right, that appears once you have scrolled down.
   Added by js/main.js. The ring uses the site's gradient colours and is drawn as a gradient border (not a mask),
   which keeps its edges smooth; everything else stays quiet. */
@property --to-top-ring { syntax: "<percentage>"; inherits: false; initial-value: 70%; }
.to-top {
  --to-top-ring: 70%;
  position: fixed; right: 20px; bottom: 20px; z-index: 90;
  width: 44px; height: 44px; padding: 0; border: 1.5px solid transparent; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  color: var(--muted);
  background: color-mix(in srgb, var(--bg-2) 68%, transparent);
  box-shadow: 0 6px 18px -8px rgba(10, 12, 30, .35);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .25s ease, transform .25s ease, visibility 0s linear .25s, color .2s ease, box-shadow .25s ease, --to-top-ring .25s ease;
}
/* gradient ring drawn on its own layer and cut to a ring with a soft radial mask, so the fill above can be see-through */
.to-top::before {
  --to-top-ring: 70%;
  content: ""; position: absolute; inset: -1.5px; border-radius: 50%; pointer-events: none;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--g1) var(--to-top-ring), transparent),
    color-mix(in srgb, var(--g2) var(--to-top-ring), transparent) 55%,
    color-mix(in srgb, var(--g3) var(--to-top-ring), transparent));
  -webkit-mask: radial-gradient(circle closest-side, transparent calc(100% - 2.3px), #000 calc(100% - 1.3px));
          mask: radial-gradient(circle closest-side, transparent calc(100% - 2.3px), #000 calc(100% - 1.3px));
  transition: --to-top-ring .25s ease;
}
.to-top svg { width: 18px; height: 18px; display: block; transition: transform .25s ease; }
.to-top.show { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.to-top:hover::before, .to-top:focus-visible::before { --to-top-ring: 100%; }
.to-top:hover, .to-top:focus-visible { color: var(--text); box-shadow: 0 8px 22px -8px color-mix(in srgb, var(--g2) 55%, transparent); }
.to-top:hover svg { transform: translateY(-2px); }
@media (max-width: 640px) { .to-top { right: 14px; bottom: 14px; width: 40px; height: 40px; } }
@media (prefers-reduced-motion: reduce) { .to-top, .to-top svg { transition: none; } }
@media print { .to-top { display: none; } }

/* the "at a glance" panel under the portrait on the About page */
.card.glance h3 { margin-bottom: 10px; }
.card.glance p.muted { margin: 0 0 8px; font-size: .94rem; line-height: 1.45; }
.card.glance .glance-sub { color: var(--faint); font-size: .84rem; }

/* a row of text links that wraps cleanly, with no separators left dangling at a line end */
.link-row { display: flex; flex-wrap: wrap; gap: 4px 22px; margin-top: 0; }

/* compact "at a glance" strip: only where the full panel has dropped to the bottom of the page */
.glance-bar-wrap { margin: calc(-1 * clamp(36px, 6vw, 64px) - 24px) 0 28px; } /* cancels the section's top padding so the strip sits close under the hero */
.glance-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px;
  padding: 14px 16px; border: 1px solid var(--line, rgba(128,128,128,.25)); border-radius: 14px; background: var(--bg-2); }
.glance-bar p { margin: 0; display: grid; gap: 2px; font-size: .94rem; line-height: 1.4; color: var(--muted); }
.glance-bar .glance-sub { display: block; color: var(--faint); font-size: .84rem; }
@media (min-width: 900px) { .glance-bar-wrap { display: none; } }
.glance-bar .glance-badge { flex: 1 1 100%; font-size: .94rem; line-height: 1.4; color: var(--muted); }
/* the full panel under the portrait is replaced by the strip above the text on small screens */
@media (max-width: 899px) { .card.glance { display: none; } }

/* a video in a case study: same frame as the screenshots, full width, never loads until played */
.figure .frame video { display: block; width: 100%; height: auto; background: #05050f; }
.figure.video-figure { margin-bottom: 28px; }

/* Buttons in one paragraph: 8px gap whether side by side or stacked */
.btn-gap{display:flex;flex-wrap:wrap;gap:8px}
.btn-note{opacity:.6;font-weight:400}

.lab-card .lab-thumb { display: block; width: 100%; aspect-ratio: 20 / 13; object-fit: cover; object-position: top; border-radius: 10px; border: 1px solid var(--line); margin-bottom: 26px; }

/* Card with two links: the first stretches over the whole card, the second sits above it */
.card-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 14px 0 0; font-weight: 600; font-size: 15px; }
.card-links a { color: var(--accent); }
.card-stretch::after { content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: 0; }
.card-link-top { position: relative; z-index: 1; }

/* Bulleted lists inside the three AI pillar cards (the site's bullet style only applies inside .prose) */
ul.bullet-list.pillar-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
ul.bullet-list.pillar-list li { position: relative; padding-left: 22px; }
ul.bullet-list.pillar-list li::before { content: ""; position: absolute; left: 3px; top: .72em; width: 6px; height: 6px; border-radius: 50%; background: var(--grad-d); }
.pillar-lead + ul.bullet-list.pillar-list { margin-top: 14px; }

@media (min-width: 760px) { .stats.stats-3 { grid-template-columns: repeat(3, 1fr); } }  /* three-stat strip: three columns on desktop */
@media (max-width: 759px) { .stats.stats-3 .stat:last-child { grid-column: 1 / -1; } }  /* on phones the third tile spans the row */
a.stat-link { display: block; color: inherit; text-decoration: none; transition: background .2s; }
a.stat-link:hover { background: var(--bg-2); text-decoration: none; }
a.stat-link .stat-arrow { color: var(--accent); }

/* Sub-headings that split the home page's Selected work into professional work and the passion project */
.work-subhead { margin: 0 0 18px; font-weight: 400; }
.work-subhead-2 { margin-top: 56px; }

.role .org-note { margin: -2px 0 4px; font-size: .8rem; color: var(--faint); }  /* e.g. "(formerly Insight Investment)" under the company name */

/* The "Earlier career" bar fades out to the left, so it reads as "continues before the scale starts" */
.gantt-track i.early.fade-left { -webkit-mask-image: linear-gradient(to right, transparent, #000 85%); mask-image: linear-gradient(to right, transparent, #000 85%); }

/* Career timeline (desktop): wider logo column, same name column width, shorter bars, taller rows.
   Columns: logo 120px + gap 28px + name 292px = 440px (was 76 + 28 + 292 = 396px). */
@media (min-width: 700px) {
  .gantt-row { grid-template-columns: 440px minmax(0, 1fr); min-height: 56px; }
  .gantt-row .timeline-name .company-logo { width: 120px; }
  .gantt-row .timeline-name .company-logo img { max-width: 120px; }
  .gantt-axis { margin-left: 456px; }   /* 440px column + 16px gap, so the year labels still line up with the bars */
}

/* Career timeline: LSEG logo 15% larger than the 22px standard (25.3px), then 5% more (26.57px), then 5% more again (27.9px) */
.gantt-row .timeline-logo img[src*="logo-lseg"] { height: 27.9px; }

/* Career timeline: Lloyds logo 30% larger than the 22px standard (28.6px), then 15% more (32.9px) */
.gantt-row .timeline-logo img[src*="logo-lbg"] { height: 34.5px; }

/* Career timeline: Thomson Reuters logo 20% larger (its box was capped at 120px wide; now 144px) and a wider logo column.
   Desktop columns: logo 144px + gap 28px + name 292px = 464px (the name column is unchanged; the bars give up the extra 24px). */
@media (min-width: 700px) {
  .gantt-row { grid-template-columns: 464px minmax(0, 1fr); }
  .gantt-row .timeline-name .company-logo { width: 144px; }
  .gantt-row .timeline-name .company-logo img { max-width: 144px; }
  .gantt-axis { margin-left: 480px; }   /* 464px column + 16px gap */
}
@media (max-width: 699px) {
  .gantt-row .timeline-logo img[src*="logo-thomson"] { max-width: 91px; }   /* 76px x 1.2 */
}

/* Career timeline: Pitney Bowes logo 20% larger than the 22px standard (26.4px) */
.gantt-row .timeline-logo img[src*="logo-pitney"] { height: 27.7px; }

/* Career timeline: HSBC logo 15% larger than the 22px standard (25.3px), then 15% more (29.1px), then 5% less (27.6px) */
.gantt-row .timeline-logo img[src*="logo-hsbc"] { height: 27.6px; }

/* Career timeline: UBS logo 15% larger than the 22px standard (25.3px) */
.gantt-row .timeline-logo img[src*="logo-ubs"] { height: 25.3px; }

/* Career timeline: BNY logo 10% smaller than the 22px standard (19.8px), then 10% smaller again (17.8px) */
.gantt-row .timeline-logo img[src*="logo-bny"] { height: 17.3px; }

/* Career timeline: Thomson Reuters logo another 10% larger (158.4px wide, 22.7px tall) and a wider logo column.
   Desktop columns: logo 160px + gap 28px + name 292px = 480px (the name column is unchanged; the bars give up the extra 16px). */
@media (min-width: 700px) {
  .gantt-row { grid-template-columns: 458px minmax(0, 1fr); }
  .gantt-row .timeline-name .company-logo { width: 168px; }
  .gantt-row .timeline-name .company-logo img { max-width: 168px; }
  .gantt-row .timeline-logo img[src*="logo-thomson"] { height: 23.8px; max-width: 166.3px; }
  .gantt-axis { margin-left: 474px; }   /* 458px column + 16px gap; bars start 30px further left than originally */
}
@media (max-width: 699px) {
  .gantt-row .timeline-logo img[src*="logo-thomson"] { max-width: 100px; }   /* 91px x 1.1 */
}

/* Career timeline: PwC logo 15% larger than the 22px standard (25.3px) */
.gantt-row .timeline-logo img[src*="logo-pwc"] { height: 25.3px; }

/* Career timeline rows: minimum height 48px (was 56px) */
@media (min-width: 700px) {
  .gantt-row { min-height: 48px; }
}

/* Career timeline: muted "(formerly …)" line under the company name, like the role entries */
.gantt-row .timeline-name-text .tl-note { display: block; font-weight: 400; font-size: .76rem; line-height: 1.25; color: var(--faint); }
/* mobile only: hide the logo column in the career timeline */
@media (max-width: 699px) {
  .gantt-row .timeline-name .company-logo { display: none; }
}
/* phone only: "@ Financial Conduct Authority" and "Global Banking & Markets" on their own muted, smaller line */
@media (max-width: 699px) {
  .gantt-row .timeline-name-text .tl-sub { display: block; font-weight: 400; font-size: .76rem; line-height: 1.25; color: var(--faint); }
  .gantt-row .timeline-name-text .tl-sub .muted-at { margin-left: 0; }
}
/* phone only: LSEG heading above a muted, smaller full name; muted "Earlier career" */
.gantt-row .timeline-name-text .tl-pre { display: none; }
@media (max-width: 699px) {
  .gantt-row .timeline-name-text .tl-pre { display: block; }
  .gantt-row .timeline-name-text .tl-fullname { display: block; font-weight: 400; font-size: .76rem; line-height: 1.25; color: var(--faint); }
}
/* "Earlier career" muted on every screen size */
.gantt-row .timeline-name-text .tl-early-name { color: var(--faint); }
/* phone only: timeline bars half height */
@media (max-width: 699px) {
  .gantt-track { height: 5px; }
}
/* skills: group headings */
.skill-group-title { margin: 44px 0 6px; font-weight: 400; }
.section-head + .skill-group-title { margin-top: 28px; }
/* keep "a 60-second" together on one line in the recruiters heading, at every screen size */
.nowrap-desktop { white-space: nowrap; }

/* Photography page: trips as sections, photographs in a column-flow gallery (original proportions, no cropping) */
.photo-group { margin-top: 56px; }
.photo-group:first-of-type { margin-top: 40px; }
.photo-group-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin-bottom: 18px; }
.photo-group-head h2 { margin: 0; }
.photo-gallery { column-count: 2; column-gap: 10px; }
@media (min-width: 700px) { .photo-gallery { column-count: auto; column-width: 250px; column-gap: 14px; } }
.photo-gallery figure { margin: 0 0 14px; break-inside: avoid; }
.photo-gallery img { display: block; width: 100%; height: auto; border-radius: var(--radius-sm); background: var(--bg-2); cursor: zoom-in; }
.photo-gallery figcaption { margin-top: 6px; font-size: .76rem; line-height: 1.3; color: var(--faint); }
.photo-group { scroll-margin-top: 90px; }

/* About page: four photographs in two justified rows (same height within a row), linking to the photography page */
.photo-strip { margin-top: 28px; display: grid; gap: 10px; }
.photo-strip-row { display: flex; gap: 10px; }
.photo-strip a { display: block; flex: var(--a) var(--a) 0; min-width: 0; }
.photo-strip img { display: block; width: 100%; height: auto; border-radius: var(--radius-sm); background: var(--bg-2); }
.photo-strip-link { margin: 12px 0 0; font-size: .92rem; }

/* Trading experience article: wide trade-history table; numbers right-aligned, no wrapping inside a cell */
.trade-table table { min-width: 960px; }
.trade-table th.num, .trade-table td.num { text-align: right; }
.trade-table td { white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Trade history grid (AG Grid Community, self-hosted in assets/vendor): themed from the site's colour tokens, so light and dark follow the page */
.trade-grid-host { margin: 1.4em 0; }
.trade-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-bottom: 12px; }
.trade-search { flex: 1 1 260px; max-width: 420px; }
.trade-search input {
  width: 100%; padding: 10px 14px; font: inherit; font-size: .95rem; color: var(--text);
  background: var(--surface-solid); border: 1px solid var(--line-strong); border-radius: 999px;
}
.trade-search input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.trade-count { margin: 0 0 0 auto; font-size: .85rem; }
.trade-hint { margin: 12px 0 0; font-size: .82rem; }
.trade-grid.ag-theme-quartz {   /* two classes, so these values beat AG Grid's own theme file whatever the load order */
  height: 860px; width: 100%;
  --ag-font-family: var(--font); --ag-font-size: 14px;
  --ag-background-color: var(--bg); --ag-foreground-color: var(--text);
  --ag-header-background-color: var(--bg-2); --ag-header-foreground-color: var(--faint);
  --ag-odd-row-background-color: var(--bg); --ag-row-hover-color: var(--accent-soft);
  --ag-border-color: var(--line); --ag-secondary-border-color: var(--line);
  --ag-border-radius: var(--radius-sm); --ag-wrapper-border-radius: var(--radius-sm);
  --ag-active-color: var(--accent); --ag-input-focus-border-color: var(--accent);
  --ag-icon-font-color: var(--muted); --ag-subheader-background-color: var(--bg-2);
  --ag-menu-background-color: var(--surface-solid); --ag-panel-background-color: var(--surface-solid);
  --ag-control-panel-background-color: var(--surface-solid);
  --ag-header-column-resize-handle-color: var(--line-strong);
  --ag-checkbox-checked-color: var(--accent);
  --ag-popup-shadow: var(--shadow); --ag-input-border-color: var(--line-strong);
}
.trade-grid .ag-header-cell-text { font-family: var(--font); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; }
.trade-grid .ag-cell { font-variant-numeric: tabular-nums; }
@media (max-width: 699px) { .trade-grid.ag-theme-quartz { height: 680px; } .trade-count { margin-left: 0; flex-basis: 100%; } }

/* Recommendations, with JS: cards run in date order across the columns; each column stacks them with an even gap */
.quotes.quotes-cols { display: flex; column-count: auto; gap: 16px; align-items: flex-start; }
.quotes-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.quotes-col > .quote { margin: 0; }
@media (min-width: 700px) { .quotes.quotes-cols { gap: 20px; } .quotes-col { gap: 20px; } }

/* Recommendations: keyword search above the filter bar, and match highlighting */
.quote-search { margin: 0 0 14px; max-width: 540px; }
.quote-search input {
  width: 100%; padding: 11px 16px; font: inherit; font-size: .95rem; color: var(--text);
  background: var(--surface-solid); border: 1px solid var(--line-strong); border-radius: 999px;
}
.quote-search input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.quote mark {
  background: color-mix(in srgb, var(--accent) 26%, transparent); color: inherit; border-radius: 3px; padding: 0 2px;
}
.quotes-empty { margin: 8px 0 0; font-size: .95rem; }
.quotes-empty[hidden] { display: none; }

/* the search box is the first row of the pinned filter bar, so pinning starts at the search field */
.filter-bar .quote-search { margin: 0 0 10px; }

/* Work page: "up to" in the headline metric sits back; a row with two links (the whole row opens the first) */
.metric b .suffix { opacity: .6; font-size: .55em; font-weight: 500; letter-spacing: 0; }
.row-item-two { position: relative; cursor: pointer; }
.row-links { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: .95rem; }
.row-links a { color: var(--accent); }
/* Work page rows: one fixed width for the link column, so the columns line up in every row (including the two-link row) */
@media (min-width: 760px) {
  .row-item { grid-template-columns: 64px 1fr 1.2fr 11.5rem; }
  .row-item > .card-cta, .row-links { justify-self: end; text-align: right; }
  .row-links { align-items: flex-end; }
}
.row-links a { white-space: nowrap; }

/* The filters hide cards with the hidden attribute. Class rules such as .card.work-card-link { display: flex } would otherwise
   beat the browser's own [hidden] rule, leaving "hidden" cards on screen. */
[hidden] { display: none !important; }

/* Case-study outcome figures: the unit or qualifier ("up to", "millions") sits back, as on the home page stats */
.outcome b.number .suffix { opacity: .6; }

/* Case study: collapsible extra data tables */
.prose details.data-more { margin: 1.2em 0; }
.prose details.data-more > summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.prose details.data-more[open] > summary { margin-bottom: 8px; }

/* Grouped "On this page" entries: a non-link group label with indented sub-items */
.toc .toc-group { display: block; padding: 9px 0 3px 14px; color: var(--muted); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; border-left: 1px solid var(--line); opacity: .8; }
.toc a.toc-sub { padding-left: 28px; font-size: .88rem; }

/* Small third-party screenshots (UBS iOS) shown at roughly their own size, with a footnote */
.ios-shots { display: flex; flex-wrap: wrap; gap: 16px; margin: 14px 0 6px; }
.ios-shots figure { margin: 0; }
.ios-shots img { display: block; width: 183px; max-width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line); }
.ios-shots figcaption { font-size: .82rem; color: var(--muted); margin-top: 6px; }
.ios-shots-note { font-size: .84rem; margin: 6px 0 20px; }

/* Tile figures use gradient text, which is painted only inside the line box, so descenders (g, y, p) were clipped.
   4px of extra padding below each figure gives them room and adds a little visible space under the figure. */
.outcome b.number, .stat > b, .kpi > b, .work-card .metric b { padding-bottom: 4px; }

/* Calendar for the trade-table date filters (flatpickr), in the site's own look. It uses the same colour variables as the
   rest of the site, so it follows light and dark mode. The calendar is attached to the page body, so these rules are global. */
.flatpickr-calendar.trade-calendar { background: var(--surface-solid); color: var(--text); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); box-shadow: var(--shadow); font-family: var(--font); font-size: 14px; width: 288px; padding: 6px; }
.flatpickr-calendar.trade-calendar::before, .flatpickr-calendar.trade-calendar::after { display: none; }
.trade-calendar .flatpickr-months { align-items: center; padding: 4px 2px 0; }
.trade-calendar .flatpickr-months .flatpickr-prev-month, .trade-calendar .flatpickr-months .flatpickr-next-month { position: static; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border-radius: 10px; color: var(--muted); fill: var(--muted); font-size: 20px; line-height: 1; }
.trade-calendar .flatpickr-months .flatpickr-prev-month:hover, .trade-calendar .flatpickr-months .flatpickr-next-month:hover { background: var(--accent-soft); color: var(--text); }
.trade-calendar .flatpickr-current-month { position: static; flex: 1; width: auto; height: auto; padding: 0; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--heading); }
.trade-calendar .flatpickr-current-month .flatpickr-monthDropdown-months, .trade-calendar .flatpickr-current-month input.cur-year { font: inherit; color: var(--heading); background: transparent; border-radius: 8px; height: auto; padding: 2px 4px; box-shadow: none; }
.trade-calendar .flatpickr-current-month .flatpickr-monthDropdown-months:hover, .trade-calendar .flatpickr-current-month input.cur-year:hover { background: var(--accent-soft); }
.trade-calendar .flatpickr-monthDropdown-months .flatpickr-monthDropdown-month { background: var(--surface-solid); color: var(--text); }
.trade-calendar .numInputWrapper span { display: none; }
.trade-calendar .flatpickr-weekdays { height: 28px; margin-top: 4px; }
.trade-calendar span.flatpickr-weekday { color: var(--faint); font-family: var(--mono); font-size: 11px; font-weight: 500; background: transparent; }
.trade-calendar .flatpickr-innerContainer, .trade-calendar .flatpickr-rContainer, .trade-calendar .flatpickr-days, .trade-calendar .dayContainer { width: 100%; min-width: 0; max-width: none; }
.trade-calendar .dayContainer { padding: 2px 0; }
.trade-calendar .flatpickr-day { color: var(--text); border: 1px solid transparent; border-radius: 10px; max-width: none; width: 14.2857%; height: 36px; line-height: 34px; }
.trade-calendar .flatpickr-day:hover, .trade-calendar .flatpickr-day:focus { background: var(--accent-soft); border-color: transparent; }
.trade-calendar .flatpickr-day.prevMonthDay, .trade-calendar .flatpickr-day.nextMonthDay, .trade-calendar .flatpickr-day.flatpickr-disabled { color: var(--faint); opacity: .55; }
.trade-calendar .flatpickr-day.today { border-color: var(--accent); }
.trade-calendar .flatpickr-day.today:hover { background: var(--accent-soft); color: var(--text); border-color: var(--accent); }
.trade-calendar .flatpickr-day.selected, .trade-calendar .flatpickr-day.selected:hover, .trade-calendar .flatpickr-day.selected:focus { background: var(--text); border-color: var(--text); color: var(--bg); font-weight: 600; opacity: 1; }
.trade-date { display: block; width: 100%; }
.trade-date input { width: 100%; }

/* The column filter menus are AG Grid popups with their own theme wrapper, which reset the variables above (so they came up
   white in dark mode). Re-declare the same site colours on the popup wrapper. */
.trade-grid .ag-theme-quartz.ag-popup {
  --ag-font-family: var(--font); --ag-font-size: 14px;
  --ag-background-color: var(--surface-solid); --ag-foreground-color: var(--text);
  --ag-border-color: var(--line); --ag-secondary-border-color: var(--line);
  --ag-border-radius: var(--radius-sm); --ag-wrapper-border-radius: var(--radius-sm);
  --ag-active-color: var(--accent); --ag-input-focus-border-color: var(--accent);
  --ag-icon-font-color: var(--muted); --ag-subheader-background-color: var(--bg-2);
  --ag-menu-background-color: var(--surface-solid); --ag-panel-background-color: var(--surface-solid);
  --ag-control-panel-background-color: var(--surface-solid);
  --ag-popup-shadow: var(--shadow); --ag-input-border-color: var(--line-strong);
}
.trade-grid .ag-popup .ag-menu { background: var(--surface-solid); color: var(--text); border: 1px solid var(--line-strong); }
.trade-grid .ag-popup .ag-picker-field-wrapper, .trade-grid .ag-popup input[class^=ag-][type=text] { background: var(--bg); color: var(--text); }

/* Trade table: 4px of space either side of the sort arrow in a column heading (hidden arrows take no space) */
.trade-grid .ag-sort-indicator-icon:not(.ag-hidden) { padding: 0 4px; }

/* Trade table: slimmer filter boxes in the sub-header row (24px instead of 32px) */
.trade-grid .ag-floating-filter-body .ag-input-field-input, .trade-grid .ag-floating-filter-input .ag-input-field-input, .trade-grid .ag-floating-filter .ag-input-field-input { height: 24px; min-height: 24px; font-size: 13px; border-radius: 12px; padding-top: 0; padding-bottom: 0; }
.trade-grid .ag-floating-filter .ag-input-wrapper, .trade-grid .ag-floating-filter .ag-labeled, .trade-grid .ag-floating-filter .ag-wrapper { height: 24px; min-height: 24px; }
.trade-grid .ag-floating-filter { --ag-input-height: 24px; --ag-border-radius: 12px; }
.trade-grid .ag-floating-filter .ag-input-field-input { min-height: 24px; height: 24px; border-radius: 12px; }
/* AG Grid's own input rule is more specific than the ones above, so repeat the height with matching specificity */
.trade-grid.ag-theme-quartz .ag-floating-filter input[class^="ag-"] { min-height: 24px; height: 24px; }

/* Duration filter: the menu panel and the invalid state */
.trade-duration-filter { padding: 12px; display: grid; gap: 8px; min-width: 240px; }
.trade-duration-label { display: grid; gap: 6px; font-size: .8rem; color: var(--faint); }
.trade-duration-hint { margin: 0; font-size: .78rem; line-height: 1.4; color: var(--muted); }
.trade-duration-filter .btn { justify-self: start; }
.trade-grid .ag-input-field-input.is-invalid { border-color: var(--g3); box-shadow: 0 0 0 1px var(--g3); }

/* Trade table: column separators (which are also the resize handles) and filter icons sit back until you point at them.
   A filter that is switched on keeps its icon fully visible, so you can see which columns are filtered. */
.trade-grid .ag-header-cell-resize::after { opacity: .35; transition: opacity .18s ease; }
.trade-grid .ag-header-cell:hover > .ag-header-cell-resize::after,
.trade-grid .ag-header-cell-resize:hover::after { opacity: 1; }
.trade-grid .ag-floating-filter-button-button { opacity: .4; transition: opacity .18s ease; }
.trade-grid .ag-floating-filter:hover .ag-floating-filter-button-button,
.trade-grid .ag-floating-filter-button-button:hover,
.trade-grid .ag-floating-filter-button-button:focus-visible,
.trade-grid .ag-floating-filter-button-button.ag-filter-active { opacity: 1; }

/* Trade table rows: 12px text (.75rem) with 4px above and below. Row height in the grid options is 29px: 18px line + 8px padding + the cell's own 1px borders and the row line. */
.trade-grid .ag-cell { font-size: .75rem; line-height: 18px; padding-top: 4px; padding-bottom: 4px; }

/* Trade table: the search bar sticks just below the site header while the table is in view, and moves off with the end of the table */
.trade-sticky-zone { position: relative; }
.trade-tools { position: sticky; top: var(--header-h); z-index: 50; isolation: isolate; margin-bottom: 0; padding: 12px 0; }
.trade-tools::before { content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; left: calc(50% - 50vw); right: calc(50% - 50vw);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line); }

/* Trade table, page-height layout: the table is as tall as its rows, the page scrolls, and the column headings (with their filter row)
   stick under the search bar. Sticking needs the grid's own wrappers not to clip, so they are set to overflow: visible. */
.trade-grid.ag-theme-quartz { height: auto; }
@media (max-width: 699px) { .trade-grid.ag-theme-quartz { height: auto; } }
.trade-grid .ag-root-wrapper, .trade-grid .ag-root-wrapper-body, .trade-grid .ag-root, .trade-grid .ag-layout-auto-height { overflow: visible; }
.trade-grid .ag-header { position: sticky; top: calc(var(--header-h) + var(--trade-bar-h, 71px) - 1px); z-index: 40; border-top-left-radius: var(--radius-sm); border-top-right-radius: var(--radius-sm); }
.trade-grid.ag-theme-quartz .ag-root-wrapper, .trade-grid.ag-theme-quartz .ag-root-wrapper-body, .trade-grid.ag-theme-quartz .ag-root,
.trade-grid.ag-theme-quartz .ag-root.ag-layout-auto-height { overflow: visible !important; }
/* The sideways scrollbar sits at the bottom of the table, which can be well below the screen; keep it stuck to the bottom of the window while the table is in view. */
.trade-grid .ag-body-horizontal-scroll { position: sticky; bottom: 0; z-index: 41; background: var(--bg); }
.trade-grid.ag-theme-quartz .ag-body-horizontal-scroll { position: sticky !important; bottom: 0 !important; top: auto !important; }
/* Phones: keep the pinned search bar compact (search and Reset on one line, count underneath) */
@media (max-width: 699px) {
  .trade-tools { padding: 8px 0; gap: 4px 10px; }
  .trade-search { flex: 1 1 0; min-width: 0; max-width: none; }
  .trade-count { flex-basis: 100%; margin: 0; font-size: .78rem; }
}

/* Stuck under the search bar: square corners, and 1px tucked under the bar (which sits above it) so no gap can show on any screen */
.trade-grid.is-stuck .ag-header { border-top-left-radius: 0; border-top-right-radius: 0; }

/* The section after the trades table starts a new prose block, which cancelled its heading's top margin; give it the same gap as every other h2 */
.prose.trade-tips > h2:first-child { margin-top: clamp(44px, 7vw, 72px); }

/* Recommendation badge for the four that were once on LinkedIn and no longer appear there: a hollow dot instead of a filled one */
.quote .source-badge-gone::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--faint); }
.quote .source-badge-gone { align-items: flex-start; border-radius: 16px; }   /* long label: wraps onto a second line, dot stays beside the first line */
.quote .source-badge-gone::before { margin-top: calc((1.65em - 6px) / 2); }   /* centres the dot on the first line, using the same line height as the other badges */

/* work page experiment: company name in text form sits above the case study heading */
.work-card p.card-org { margin: 24px 0 -6px; font-size: .78rem; font-weight: 400; letter-spacing: .02em; color: var(--muted); opacity: .75; line-height: 1.3; }
/* work cards: four logos 20% larger (30px -> 36px, then +10% -> 39.6px; Thomson Reuters max width 171.6px) */
.work-card .meta .client-logos { min-height: 39.6px; }
.work-card .meta .company-logo img[src*="logo-insight-bny"],
.work-card .meta .company-logo img[src*="logo-lbg"],
.work-card .meta .company-logo img[src*="logo-thomson"],
.work-card .meta .company-logo img[src*="logo-university-of-cambridge"] { height: 39.6px; max-width: 171.6px; }
/* work page cards: 24px more space above the line over the metric (the metric itself is pinned to the card bottom) */
.work-card p.card-org ~ .chips { margin: 24px 0; }   /* 24px above the tags too */
/* work page cards: logos at 50% opacity */
.work-card:has(.card-org) .meta .company-logo { opacity: .5; }
/* work page cards: "up to" matches the metric label (size, weight, colour) */
.work-card:has(.card-org) .metric b .suffix { font-size: .88rem; font-weight: 400; color: var(--muted); opacity: 1; line-height: 1.3; }
/* work page metrics: stacked and left-aligned: "up to" (if any) / number / label */
.work-card:has(.card-org) .metric { flex-direction: column; align-items: flex-start; gap: 4px; }
.work-card:has(.card-org) .metric b { display: block; }
.work-card:has(.card-org) .metric b .suffix { display: block; margin: 0 0 4px; }
/* work page metrics: symbols and unit letters (− ~ % k) keep the figure's size and colour, at the 60% opacity used for suffixes elsewhere */
.work-card .metric b .sym { font-size: inherit; line-height: inherit; font-weight: inherit; letter-spacing: inherit; color: inherit; opacity: .6; }
/* work page: each card is two rows of the page grid (content / metric + link), so the lines above the metrics align across a row of cards */
.work-card-link .work-card:has(.card-org) { display: contents; }   /* (the home page feature card keeps its own two-column layout) */
.work-card .wc-top, .work-card .wc-bottom { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.work-card .wc-bottom { justify-content: flex-start; }
.grid.cols-3 > .work-card-link:has(.card-org):not([hidden]) { display: grid; grid-row: span 2; grid-template-rows: subgrid; row-gap: 14px; }
.work-card .wc-bottom .metric { margin-top: 0; }
/* work cards: Cambridge logo a further 7% larger (39.6px -> 42.4px) */
.work-card .meta .company-logo img[src*="logo-university-of-cambridge"] { height: 42.4px; max-width: 183.6px; }
/* work card headings: 15% smaller (was clamp(1.3rem, 3vw, 1.7rem)) */
.work-card h3 { font-size: clamp(1.105rem, 2.55vw, 1.445rem); }
/* work page: the extra "Trading article" link in the shorter-projects list is not bold */
.row-links .card-link-top { font-weight: 400; opacity: .5; }
/* more work rows: title and description share one line height (title was 19.7px, description 25.1px) */
.row-item h3, .row-item p { line-height: 23px; }
/* work cards: the logo row is as tall as the tallest logo (Cambridge, 42.4px) on every card, so headings line up across a row */
.work-card:has(.card-org) .meta .client-logos { min-height: 42.4px; }

.card.glance ul.glance-list { display: grid; gap: 10px; margin: 0 0 8px; padding: 0; list-style: none; }
.card.glance ul.glance-list li { position: relative; padding-left: 22px; margin: 0; font-size: .94rem; line-height: 1.45; color: var(--muted); }
.card.glance ul.glance-list li::before { content: ""; position: absolute; left: 3px; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--grad-d); }

.card.glance ul.glance-list li { padding-left: 21px; }
.card.glance ul.glance-list li::before { left: 0; top: .5em; width: 13px; height: 13px; border-radius: 0; background: var(--g2);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12h15M13 5.5 19.5 12 13 18.5'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12h15M13 5.5 19.5 12 13 18.5'/%3E%3C/svg%3E") center / contain no-repeat; }

/* logo scroller waits (paused at the start) until main.js adds .run when it reaches the top third of the screen */
.js .marquee:not(.run) .marquee-track { animation-play-state: paused; }

/* Personal hub cards: link text pinned to the bottom, and the list of articles inside the Writing card */
.hub-card { display: flex; flex-direction: column; }
.hub-card .hub-cta { margin: 14px 0 0; padding-top: 4px; color: var(--accent); font-weight: 600; margin-top: auto; }
.hub-card p.muted { margin-bottom: 18px !important; }
.hub-list { display: grid; margin: 0 0 22px; padding: 0; list-style: none; }
.hub-list li { display: grid; gap: 2px; padding: 12px 0; border-top: 1px solid var(--line); }
.hub-list li b { font-weight: 600; color: var(--text); }
.hub-list li span { font-size: .85rem; color: var(--faint); }

/* home page selected work: same card layout as the work page. Each card is three rows of the grid (picture / content / metric + link), so the lines above the metrics align across a row */
.grid.cols-2 > .work-card-link:has(.card-org):not([hidden]) { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 14px; }

/* case study outcome figures: a symbol or unit that stays at the figure's size but sits back at 60% (as on the work cards) */
.outcome b.number .sym { opacity: .6; }

/* three-panel case study: each result is a live copy of the prototype, framed */
.proto-label { margin: 18px 0 8px; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.proto-frame { display: block; width: 100%; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.proto-open { margin: 8px 0 0; font-size: .9rem; }
.prose h3[id^="iteration-"] { margin-top: 2.4em; }

/* panel cards: a text arrow between two values ("2 → 1", "16 days → 1–2 days") is a lighter weight, at the same size.
   (the build wraps these arrows as .arr; arrows in running text and in role titles are left as they are) */
.card .arr.arr, .before-after .arr.arr, .skill .arr.arr, .role .title .arr.arr { font-weight: 300; font-size: inherit; line-height: inherit; letter-spacing: inherit; color: inherit; }
/* (the extra inherit lines stop rules like ".signal-big span" from shrinking the wrapped arrow) */

/* Breadcrumb: short title on phones */
.crumbs .crumb-short{display:none}
@media (max-width: 699px){.crumbs .crumb-long{display:none}.crumbs .crumb-short{display:inline}}

/* Approach page: AI acceleration values in the gradient blue */
.meter-row small .ai-level{color:#2468d8}  /* light theme: darker blue, 5.2:1 on white */
:root[data-theme="dark"] .meter-row small .ai-level{color:var(--g1)}
@media (prefers-color-scheme: dark){:root:not([data-theme]) .meter-row small .ai-level{color:var(--g1)}}

/* Click-to-enlarge images outside case-study bodies (AI page) */
.zoom-figure img { cursor: zoom-in; }

/* Work page > More work: every "Read →" link has the same size and weight (single-link rows were 17px regular, the two-link row 15.2px semibold) */
.row-item > .card-cta, .row-links a.card-stretch { font-size: .95rem; font-weight: 600; line-height: 23px; color: var(--accent); }

/* Work cards: dates in proportional (not fixed-width) numerals, in the same sans font as the rest of the card */
.work-card .meta { font-variant-numeric: normal; }

/* Two-column checkmark list */
.prose ul.check-grid { list-style: none; padding: 0; margin: 1em 0 2em; display: grid; gap: 12px 32px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .prose ul.check-grid { grid-template-columns: 1fr 1fr; } }
.prose ul.check-grid li { position: relative; padding-left: 32px; font-size: 1.02rem; line-height: 1.45; }
.prose ul.check-grid li::before {
  content: ""; position: absolute; left: 2px; top: .2em; width: 18px; height: 18px;
  background: var(--grad-d);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3L13 4.5' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3L13 4.5' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Risk levels in the Position Explorer risk table */
.risk { font-weight: 600; }
.risk-low { color: var(--good); }
.risk-medium { color: #a85f00; }       /* darker than the severity amber (#b86e00) for 4.9:1 on white */
.risk-high { color: #d6453d; }         /* same red as the negative deltas */
.risk-xhigh { color: #a8201a; font-weight: 700; }
:root[data-theme="dark"] .risk-medium { color: var(--amber); }
:root[data-theme="dark"] .risk-high { color: #e4756d; }
:root[data-theme="dark"] .risk-xhigh { color: #ff3b30; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .risk-medium { color: var(--amber); }
  :root:not([data-theme]) .risk-high { color: #e4756d; }
  :root:not([data-theme]) .risk-xhigh { color: #ff3b30; }
}
.risk-cell-legacy .risk, td:nth-child(2) > .risk { font-weight: 400; }

/* Risk table column widths: wider Legacy column, narrower Benefit */
.risk-table { table-layout: fixed; }
.risk-table th:nth-child(1) { width: 20%; }
.risk-table th:nth-child(2) { width: 24%; }
.risk-table th:nth-child(3) { width: 17%; }
.risk-table th { font-family: inherit; }

/* Grey arrow before each "after" value (decorative; not on the dash row) */
.risk-table td.risk-after::before { content: "→"; color: var(--faint); margin-right: .6em; font-weight: 400; }

/* Score tables in the collapsed section: value columns right-aligned, headers included */
.data-more table th:nth-child(n+2), .data-more table td:nth-child(n+2) { text-align: right; }

.data-more h4:not(:first-of-type) { margin-top: 2.4em; }

/* Launch (June 2024) score table: bold "new" and "change" columns, headers included */
.launch-table th:nth-child(n+3), .launch-table td:nth-child(n+3) { font-weight: 700; }

/* Case-study hero: company logo sits directly under the breadcrumb, 50% larger; facts sit closer to the intro */
.company-logo.logo-large { margin-top: 0; }
.company-logo.logo-large img { height: 51px; max-width: 255px; }
.client-row { margin: 0 0 34px; }
.page-hero .lede + .facts { margin-top: 26px; }
.company-logo.logo-large { flex-wrap: wrap; row-gap: 14px; }
/* Cambridge logo in the case-study hero: 50% larger than the other logos */
.company-logo.logo-large img[src*="logo-university-of-cambridge"] { height: 76.5px; max-width: min(382px, 100%); }

/* Status label (Shipped / Delivered / Prototype / Coursework / Personal project) */
.status-chip { display: inline-block; font-size: .68rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  line-height: 1; padding: 5px 9px; border-radius: 99px; border: 1px solid var(--line-strong); color: var(--muted); margin-right: 10px; vertical-align: middle; white-space: nowrap; }
.status-shipped { color: var(--good); border-color: color-mix(in srgb, var(--good) 45%, transparent); }
.client-row { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 16px; }
.client-row .status-chip { margin-right: 0; }
.work-card .cta-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.work-card .cta-row .status-chip { margin-right: 0; }

/* Work page rows: status label in its own second column */
.row-item .row-status .status-chip { margin-right: 0; }
.row-item .row-status:empty { display: none; }
@media (min-width: 760px) {
  .row-item { grid-template-columns: 64px 6rem 1fr 1.2fr 11.5rem; }
  .row-item .row-status:empty { display: block; }
}

/* Arrow-bullet list (blue from the gradient palette) */
.arrow-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.arrow-list li { position: relative; padding-left: 30px; }
.arrow-list li::before {
  content: ""; position: absolute; left: 0; top: .28em; width: 18px; height: 18px; background: var(--g1);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Status chips: filled with the chip colour at 20% (change --chip-fill to adjust); Delivered uses the palette violet */
.status-chip { --chip: var(--muted); --chip-fill: 20%; color: var(--chip);
  border-color: color-mix(in srgb, var(--chip) 45%, transparent); background: color-mix(in srgb, var(--chip) var(--chip-fill), transparent); }
.status-shipped { --chip: var(--good); }
.status-delivered { --chip: var(--g2); color: color-mix(in srgb, var(--g2) 70%, #000); }  /* light theme: text a little darker for contrast */
:root[data-theme="dark"] .status-delivered { color: var(--g2); }
@media (prefers-color-scheme: dark) { :root:not([data-theme]) .status-delivered { color: var(--g2); } }

/* Light theme: a brighter, more saturated green that still passes WCAG AA (4.6:1 on its own tint) with a 10% fill;
   dark theme keeps the 20% fill and the palette green */
.status-chip { --chip-fill: 10%; }
.status-shipped { --chip: #007c49; }
:root[data-theme="dark"] .status-chip { --chip-fill: 20%; }
:root[data-theme="dark"] .status-shipped { --chip: var(--good); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .status-chip { --chip-fill: 20%; }
  :root:not([data-theme]) .status-shipped { --chip: var(--good); }
}

/* Case-study links under a role's highlights */
.role .role-links { margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .9rem; }
.role .role-links a { color: var(--g2); font-weight: 600; }

/* keep the right-hand footer text clear of the floating back-to-top button */
.foot-note { padding-right: 64px; }

@media (min-width: 760px) { .stats.stats-3 { grid-template-columns: repeat(3, 1fr); } }

/* Safari fix: a child with opacity inside gradient text (background-clip: text) is painted on its own layer in Safari, so it lost the
   parent's gradient and showed as transparent. Suffixes and symbols now use an explicit solid colour instead of opacity. */
.grad-text .suffix, .grad-text .sym, .stat > b .suffix, .kpi > b .suffix, .metric b .suffix, .work-card .metric b .sym, .outcome b.number .suffix, .outcome b.number .sym {
  opacity: 1;
  color: var(--muted);
  -webkit-text-fill-color: var(--muted);
}

/* Phone: the horizontally scrolling rows (recurring themes, filter chips) scroll sideways only. Setting overflow-x alone makes
   overflow-y "auto" too, and the row is a few pixels taller than its box, so Safari let it be dragged up and down. */
@media (max-width: 639px) {
  .themes, .filter-bar .filter-chips { overflow-y: hidden; overscroll-behavior-x: contain; }
}

/* Recommendation cards: the former employer name after "BNY Investments" sits back */
.quote-author span.org-note:not(.avatar) { display: inline; margin: 0; opacity: .6; white-space: nowrap; }

