/* ============================================================
   Charles Severson — Portfolio · v2
   Mirrors stripe.com: white surfaces, #0a2540 ink, #635bff
   accent, one vivid animated gradient ribbon confined to the
   angled hero band. Gradients never sit under body text.
   ============================================================ */
:root {
  --ink: #0a2540;          /* headings — Stripe navy */
  --body: #425466;         /* body text */
  --muted: #6b7c93;
  --surface: #ffffff;
  --soft: #f6f9fc;         /* Stripe's light section blue */
  --line: #e6ebf1;
  --accent: #635bff;       /* Stripe blurple */
  --accent-dark: #0a2540;
  --cyan: #80e9ff;
  /* ribbon gradient colors — Stripe canvas family */
  --g1: #7a5af8;  /* violet */
  --g2: #635bff;  /* blurple */
  --g3: #4f9cf9;  /* sky    */
  --g4: #7de3ff;  /* cyan   */
  --shadow-sm: 0 2px 5px -1px rgba(50,50,93,.14), 0 1px 3px -1px rgba(0,0,0,.10);
  --shadow-md: 0 13px 27px -5px rgba(50,50,93,.18), 0 8px 16px -8px rgba(0,0,0,.18);
  --shadow-lg: 0 30px 60px -12px rgba(50,50,93,.22), 0 18px 36px -18px rgba(0,0,0,.24);
  --radius: 8px;
  --maxw: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Ubuntu, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
:root { --card: #ffffff; }
:root[data-theme="dark"] {
  --ink: #eef3f9; --body: #b9c5d4; --muted: #8fa0b3;
  --surface: #0b1424; --soft: #0e1a2e; --line: #22304a; --card: #101d33;
  --accent: #7b74ff;
  --shadow-sm: 0 2px 5px -1px rgba(0,0,0,.5), 0 1px 3px -1px rgba(0,0,0,.4);
  --shadow-md: 0 13px 27px -5px rgba(0,0,0,.55), 0 8px 16px -8px rgba(0,0,0,.5);
  --shadow-lg: 0 30px 60px -12px rgba(0,0,0,.6), 0 18px 36px -18px rgba(0,0,0,.55);
}
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font); color: var(--body); background: var(--surface);
  font-size: 18px; line-height: 1.55; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  transition: background .25s ease, color .25s ease;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
h1, h2, h3 { color: var(--ink); line-height: 1.1; letter-spacing: -0.022em; }
h2 { font-size: clamp(28px, 4vw, 40px); margin-bottom: 12px; }
.lead { font-size: clamp(17px, 1.9vw, 19px); color: var(--body); max-width: 58ch; }
.eyebrow {
  display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 12px;
}

/* ---------- accessibility ---------- */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.skip-link {
  position: absolute; left: -9999px; top: 12px; z-index: 100; background: #0a2540; color: #fff;
  padding: 8px 16px; border-radius: 999px; font-weight: 600; font-size: 14px;
}
.skip-link:focus { left: 12px; }
.marquee:focus-within .marquee-track { animation-play-state: paused; }

/* ---------- motion primitives ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .55s cubic-bezier(.2,.6,.2,1), transform .55s cubic-bezier(.2,.6,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .07s; } .reveal.d2 { transition-delay: .14s; } .reveal.d3 { transition-delay: .21s; }
/* directional slide-ins for case studies */
.case.reveal { opacity: 1; transform: none; }
.case.reveal .case-media { opacity: 0; transform: translateX(-30px); transition: opacity .65s cubic-bezier(.2,.6,.2,1) .05s, transform .65s cubic-bezier(.2,.6,.2,1) .05s; }
.case.reveal.flip .case-media { transform: translateX(30px); }
.case.reveal .case-body { opacity: 0; transform: translateY(18px); transition: opacity .6s cubic-bezier(.2,.6,.2,1) .16s, transform .6s cubic-bezier(.2,.6,.2,1) .16s; }
.case.reveal.in .case-media, .case.reveal.in .case-body { opacity: 1; transform: none; }
/* staggered timeline */
.t-item { opacity: 0; transform: translateX(16px); transition: opacity .5s ease, transform .5s cubic-bezier(.2,.6,.2,1); }
.t-item.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .case .case-media, .case .case-body, .t-item { opacity: 1 !important; transform: none !important; transition: none !important; }
  .ribbon i, .marquee-track { animation: none !important; }
  .ribbon-canvas { display: none; }
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ---------- buttons & links (Stripe style) ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  padding: 9px 18px; border-radius: 999px; font-weight: 600; font-size: 15.5px; line-height: 1.5;
  border: 0; cursor: pointer; transition: background .15s ease, transform .15s ease, box-shadow .15s ease, color .15s ease;
}
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-dark); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn-navy { background: #0a2540; color: #fff; }
.btn-navy:hover { background: #2a4a6e; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1px var(--muted); transform: translateY(-1px); }
.btn .chev { transition: transform .15s ease; font-weight: 700; }
.btn:hover .chev { transform: translateX(3px); }
.link {
  font-weight: 600; font-size: 15.5px; color: var(--accent); display: inline-flex; align-items: center; gap: 4px;
}
.link .chev { transition: transform .15s ease; }
.link:hover .chev { transform: translateX(3px); }
.link:hover { color: var(--accent-dark); }

.grad-text {
  background: linear-gradient(92deg, #635bff 0%, #7a5af8 45%, #0ea5e9 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
/* legacy alias used by generated archive pages */
.btn-primary { background: #0a2540; color: #fff; }
.btn-primary:hover { background: #2a4a6e; transform: translateY(-1px); }
.nav-links a.btn-primary, .nav-links a.btn-primary:hover { color: #fff; padding: 7px 15px; font-size: 14px; }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60; height: 60px;
  background: transparent; transition: box-shadow .25s ease, background .25s ease;
}
.nav.scrolled {
  background: rgba(255,255,255,.88); backdrop-filter: saturate(1.8) blur(10px);
  box-shadow: 0 1px 0 var(--line), 0 6px 18px -12px rgba(50,50,93,.25);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { display: flex; align-items: center; gap: 11px; font-weight: 700; font-size: 17px; letter-spacing: -.015em; color: var(--ink); }
.logo svg { display: block; border-radius: 10px; box-shadow: var(--shadow-sm); }
.logo svg rect, .logo svg text { transition: fill .25s ease; }
.browser { transition: transform .25s ease; will-change: transform; }
.nav-links { display: flex; gap: 24px; align-items: center; }
.nav-links a { color: var(--body); font-weight: 500; font-size: 15px; transition: color .12s; }
.nav-links a:hover { color: var(--ink); }
.nav-links a.btn-navy, .nav-links a.btn-navy:hover { color: #fff; padding: 7px 15px; font-size: 14px; }
@media (max-width: 780px) { .nav-links a.hide-m { display: none; } }

/* ---------- hero with angled animated ribbon (Stripe canvas) ----------
   Gradient is CONFINED to the top band via a diagonal clip-path:
   shallow on the left (where text lives, on white), deep on the right. */
.hero { position: relative; padding: 236px 0 56px; background: var(--surface); overflow: clip; }
.ribbon {
  position: absolute; top: 0; left: 0; right: 0; height: 520px;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 34%);
  background: linear-gradient(100deg, var(--g2) 0%, var(--g1) 34%, var(--g3) 64%, var(--g4) 100%);
}
.ribbon i { content: ""; position: absolute; inset: -40%; display: block; filter: blur(48px); opacity: .85; }
.ribbon i:nth-child(1) {
  background: radial-gradient(34% 42% at 24% 60%, var(--g4) 0%, transparent 70%),
              radial-gradient(30% 46% at 78% 36%, var(--g2) 0%, transparent 70%);
  animation: swirlA 14s ease-in-out infinite alternate;
}
.ribbon i:nth-child(2) {
  background: radial-gradient(30% 42% at 62% 66%, var(--g1) 0%, transparent 72%),
              radial-gradient(26% 38% at 40% 30%, var(--g3) 0%, transparent 72%);
  animation: swirlB 18s ease-in-out infinite alternate;
}
@keyframes swirlA { from { transform: translate3d(-1.5%, -1%, 0); } to { transform: translate3d(2%, 1.5%, 0); } }
@keyframes swirlB { from { transform: translate3d(1.5%, 1%, 0); } to { transform: translate3d(-2%, -1.5%, 0); } }
.ribbon i:nth-child(1) { animation-duration: 42s; }
.ribbon i:nth-child(2) { animation-duration: 56s; }
/* readability veil: the band fades toward white where it meets content,
   so headline text always sits on a near-white surface */
.ribbon::after {
  content: ""; position: absolute; inset: 0; z-index: 3;
  background: linear-gradient(183deg, rgba(255,255,255,0) 38%, rgba(255,255,255,.55) 66%, rgba(255,255,255,.96) 92%);
}
/* Stripe-style animated canvas (injected by JS); CSS layers remain as the
   no-JS / reduced-motion fallback */
.ribbon-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; }
.ribbon.has-canvas i { display: none; }
.ribbon { will-change: transform; }
.hero-inner { position: relative; }
.hero-pill {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 22px;
  background: #f0f4ff; color: var(--accent); border: 1px solid #dfe6ff;
  font-size: 13.5px; font-weight: 600; padding: 5px 14px; border-radius: 999px;
}
.hero-pill b { font-weight: 800; letter-spacing: .02em; }
.hero h1 { font-size: clamp(40px, 6.6vw, 66px); font-weight: 800; max-width: 15ch; margin-bottom: 18px; }
.hero h1 .grad-text {
  background: linear-gradient(92deg, #635bff 0%, #7a5af8 45%, #0ea5e9 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .lead { max-width: 52ch; margin-bottom: 30px; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.hero-logos { margin-top: 58px; }
.hero-logos .label { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.logo-row { display: flex; gap: 10px 30px; flex-wrap: wrap; align-items: baseline; }
.logo-row span { font-weight: 800; font-size: 18px; letter-spacing: -.02em; color: #6b7c93; }
@media (max-width: 640px) {
  .hero { padding-top: 196px; }
  .ribbon { height: 400px; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 40%); }
}

/* ---------- stat band with counters ---------- */
.stats { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); }
.stats-inner { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 26px 14px; text-align: center; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat b { display: block; font-size: clamp(26px, 3vw, 34px); letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat b span { font-size: inherit; color: inherit; }
.stat > span { font-size: 13.5px; color: var(--muted); }
@media (max-width: 720px) {
  .stats-inner { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* ---------- launch marquee (scrolling element) ---------- */
.marquee-wrap { background: var(--soft); border-bottom: 1px solid var(--line); padding: 18px 0; }
.marquee-label { text-align: center; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.marquee { overflow: hidden; position: relative; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: 14px; width: max-content; animation: scrollx 46s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes scrollx { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.mq-item {
  flex: none; display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 16px; font-size: 14px; font-weight: 600; color: var(--ink); box-shadow: var(--shadow-sm);
}
.mq-item em { font-style: normal; font-size: 11.5px; font-weight: 700; letter-spacing: .04em; color: var(--muted); text-transform: uppercase; }

/* ---------- sections ---------- */
section { padding: 88px 0; }
section.soft { background: var(--soft); }
.sec-head { max-width: 680px; margin-bottom: 44px; }

/* ---------- case studies ---------- */
.case { display: grid; grid-template-columns: 1fr 1fr; gap: 52px; align-items: center; padding: 40px 0; }
.case + .case { border-top: 1px solid var(--line); }
.case.flip .case-media { order: 2; }
@media (max-width: 880px) { .case { grid-template-columns: 1fr; gap: 26px; } .case.flip .case-media { order: 0; } }
.browser { border-radius: 10px; overflow: hidden; box-shadow: var(--shadow-lg); border: 1px solid var(--line); background: #fff; }
.browser-bar { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; background: var(--soft); border-bottom: 1px solid var(--line); }
.browser-bar .dot { width: 9px; height: 9px; border-radius: 50%; background: #d5dce6; }
.browser-bar .addr { flex: 1; margin-left: 8px; height: 16px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: 10px; color: var(--muted); display: flex; align-items: center; padding: 0 10px; overflow: hidden; white-space: nowrap; }
.browser img { width: 100%; aspect-ratio: 16 / 9.6; object-fit: cover; object-position: top; }
.case-media { position: relative; }
.case-media .float-chip {
  position: absolute; right: -10px; bottom: -14px; background: #0a2540; color: #fff;
  font-size: 13px; font-weight: 700; padding: 8px 14px; border-radius: 999px; box-shadow: var(--shadow-md);
}
.case-media .float-chip b { color: var(--cyan); }
.case-co { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.co-chip { font-size: 12px; font-weight: 700; letter-spacing: .04em; padding: 4px 12px; border-radius: 999px; color: #fff; }
.co-visa { background: #1434cb; } .co-quicknode { background: #0a8f6b; } .co-alchemy { background: #363ff9; }
.co-securitize { background: #0f7d98; } .co-voyager { background: #6b3df0; } .co-readyset { background: #d64500; } .co-multi { background: #0a2540; }
.case-role { font-size: 13px; color: var(--muted); font-weight: 600; }
.case h3 { font-size: clamp(23px, 2.8vw, 28px); margin-bottom: 10px; max-width: 24ch; }
.case p { margin-bottom: 8px; max-width: 52ch; }
.case-metrics { display: flex; gap: 8px; margin: 18px 0 18px; flex-wrap: wrap; }
.metric {
  background: var(--soft); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; min-width: 118px;
}
.metric b { display: block; font-size: 20px; letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.metric span { font-size: 12px; color: var(--muted); line-height: 1.35; display: block; }
.case-links { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }

/* ---------- selected-work mosaic (Stripe flexible-solutions pattern) ---------- */
.mosaic-head { font-size: clamp(26px, 3.4vw, 38px); line-height: 1.22; letter-spacing: -.02em; max-width: 62%; margin-bottom: 34px; }
.mosaic-head span { display: block; font-size: clamp(14.5px, 1.35vw, 16.5px); font-weight: 500; color: var(--muted); letter-spacing: -.004em; line-height: 1.55; margin-top: 12px; max-width: 58ch; }
@media (max-width: 880px) { .mosaic-head { max-width: 100%; } }
.mosaic { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.mcard.w2 { grid-column: span 2; } .mcard.w3 { grid-column: span 3; } .mcard.w4 { grid-column: span 4; }
@media (max-width: 880px) { .mcard.w2, .mcard.w3, .mcard.w4 { grid-column: span 6; } }
.mcard {
  position: relative; display: flex; flex-direction: column; text-align: left; cursor: pointer;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  padding: 0; font-family: var(--font); min-height: 320px;
  transition: transform .18s ease, box-shadow .18s ease;
}
.mcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.mcard-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; padding: 26px 26px 14px; }
.mcard-title { font-size: clamp(19px, 1.9vw, 23px); font-weight: 700; letter-spacing: -.018em; color: var(--ink); line-height: 1.25; max-width: 30ch; }
.mcard-expand {
  flex: none; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  background: var(--soft); border: 1px solid var(--line); color: var(--accent);
  transition: background .15s ease, transform .15s ease;
}
.mcard:hover .mcard-expand { background: #e9e7ff; transform: scale(1.06); }
[data-theme="dark"] .mcard:hover .mcard-expand { background: #232f52; }
.mcard-art { flex: 1; display: block; padding: 8px 26px 0; min-height: 0; }
.mcard-art img { width: 100%; height: 100%; min-height: 200px; object-fit: cover; object-position: top center; border-radius: 10px 10px 0 0; border: 1px solid var(--line); border-bottom: 0; box-shadow: var(--shadow-sm); }
.mcard-art img.art-left { object-position: left top; }

/* ---------- mosaic card tints + value visualizations ---------- */
.mcard { --vz-accent: var(--accent); }
.mcard:hover { border-color: color-mix(in srgb, var(--vz-accent) 38%, var(--line)); }
.mc-visa { background: linear-gradient(160deg, #0a2540 0%, #16337d 58%, #2b50c8 130%); border-color: #23407c; --vz-accent: #7de3ff; }
.mc-visa .mcard-title { color: #fff; }
.mc-visa .mcard-expand { background: rgba(255,255,255,.14); color: #d5e3ff; }
.mc-visa:hover .mcard-expand { background: rgba(255,255,255,.24); }
.mc-qn { background: linear-gradient(180deg, #f0faf3, #e3f5ea); border-color: #d3ecdc; --vz-accent: #0a9e6b; }
.mc-al { background: linear-gradient(180deg, #eff3ff, #e4ebff); border-color: #d8e1fb; --vz-accent: #4c6fff; }
.mc-en { background: linear-gradient(180deg, #fff6ec, #ffedd8); border-color: #f8e0c0; --vz-accent: #ea7317; }
.mc-vy { background: linear-gradient(180deg, #f7f1ff, #efe4ff) ; border-color: #e6d8fa; --vz-accent: #8b5cf6; }
.mc-rs { background: linear-gradient(180deg, #ecf8ff, #ddf1fe); border-color: #cbe7fa; --vz-accent: #0f8fd4; }
.mc-qn .mcard-expand, .mc-al .mcard-expand, .mc-en .mcard-expand, .mc-vy .mcard-expand, .mc-rs .mcard-expand { background: rgba(255,255,255,.78); color: var(--vz-accent); }
.mc-qn:hover .mcard-expand, .mc-al:hover .mcard-expand, .mc-en:hover .mcard-expand, .mc-vy:hover .mcard-expand, .mc-rs:hover .mcard-expand { background: #fff; }
[data-theme="dark"] .mc-visa { border-color: #2c4a8f; }
[data-theme="dark"] .mc-qn { background: linear-gradient(180deg, #12261d, #0e1f17); border-color: #1e3b2c; --vz-accent: #4ade80; }
[data-theme="dark"] .mc-al { background: linear-gradient(180deg, #171f38, #121a30); border-color: #26325c; --vz-accent: #8aa4ff; }
[data-theme="dark"] .mc-en { background: linear-gradient(180deg, #261e14, #1d1811); border-color: #45331c; --vz-accent: #fb923c; }
[data-theme="dark"] .mc-vy { background: linear-gradient(180deg, #221a36, #1b142c); border-color: #3a2d5e; --vz-accent: #a78bfa; }
[data-theme="dark"] .mc-rs { background: linear-gradient(180deg, #10222e, #0d1c27); border-color: #1e3a4e; --vz-accent: #38bdf8; }
[data-theme="dark"] .mc-qn .mcard-expand, [data-theme="dark"] .mc-al .mcard-expand, [data-theme="dark"] .mc-en .mcard-expand, [data-theme="dark"] .mc-vy .mcard-expand, [data-theme="dark"] .mc-rs .mcard-expand { background: rgba(255,255,255,.08); }
[data-theme="dark"] .mc-qn:hover .mcard-expand, [data-theme="dark"] .mc-al:hover .mcard-expand, [data-theme="dark"] .mc-en:hover .mcard-expand, [data-theme="dark"] .mc-vy:hover .mcard-expand, [data-theme="dark"] .mc-rs:hover .mcard-expand { background: rgba(255,255,255,.15); }

.mcard-viz { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 18px; padding: 6px 26px 24px; min-height: 0; }
.vz-meta { display: flex; flex-direction: column; gap: 3px; }
.vz-meta b { font-size: clamp(30px, 3vw, 42px); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; color: var(--vz-accent); font-variant-numeric: tabular-nums; }
.vz-meta i { font-style: normal; }
.vz-meta span { font-size: 13.5px; font-weight: 600; color: var(--muted); }
.mc-visa .vz-meta b { color: #fff; }
.mc-visa .vz-meta span { color: #9fb3d8; }

/* Visa — agentic payment flow */
.vzf { display: flex; align-items: center; gap: 12px; margin: auto 0; }
.vzf-node { position: relative; display: flex; flex-direction: column; align-items: center; gap: 7px; color: #cdd9f6; }
.vzf-node svg { display: block; }
.vzf-node i { font-style: normal; font-size: 12px; font-weight: 600; letter-spacing: .02em; color: #aabded; white-space: nowrap; }
.vzf-core { padding: 12px 16px 9px; background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.18); border-radius: 13px; color: #fff; box-shadow: 0 0 34px rgba(99,145,255,.35); }
.vzf-core i { color: #c3d4f8; }
.vzf-rail { position: relative; flex: 1; height: 2px; min-width: 34px; background: linear-gradient(90deg, rgba(125,227,255,.16), rgba(125,227,255,.55), rgba(125,227,255,.16)); border-radius: 2px; }
.vzf-dot { position: absolute; top: -2.5px; left: 0; width: 7px; height: 7px; border-radius: 50%; background: #7de3ff; box-shadow: 0 0 10px #7de3ff, 0 0 20px rgba(125,227,255,.6); opacity: 0; }
.mcard.in .vzf-dot { animation: vzdot 2.6s linear infinite; }
.mcard.in .vzf-dot.dd2 { animation-delay: 1.3s; }
.mcard.in .vzf-dot.dd3 { animation-delay: .65s; }
@keyframes vzdot { 0% { left: 0; opacity: 0; } 10% { opacity: 1; } 88% { opacity: 1; } 100% { left: calc(100% - 7px); opacity: 0; } }
.vzf-check { position: absolute; top: -7px; right: -9px; display: grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: #22c07d; opacity: .3; transform: scale(.85); }
.mcard.in .vzf-check { animation: vzcheck 2.6s ease infinite .55s; }
@keyframes vzcheck { 0%, 74% { opacity: .3; transform: scale(.85); } 84% { opacity: 1; transform: scale(1.12); } 100% { opacity: .3; transform: scale(.85); } }

/* QuickNode — streaming blocks */
.vzq { display: flex; flex-direction: column; gap: 9px; margin: auto 0; }
.vzq-row { display: flex; align-items: center; gap: 9px; opacity: .35; }
.vzq-row b { width: 13px; height: 13px; border-radius: 4px; background: var(--vz-accent); opacity: .85; flex: none; }
.vzq-row i { height: 7px; border-radius: 4px; background: color-mix(in srgb, var(--vz-accent) 32%, transparent); }
.mcard.in .vzq-row { animation: vzstream 2.8s ease-in-out infinite; }
.mcard.in .vzq-row:nth-child(2) { animation-delay: .28s; }
.mcard.in .vzq-row:nth-child(3) { animation-delay: .56s; }
.mcard.in .vzq-row:nth-child(4) { animation-delay: .84s; }
.mcard.in .vzq-row:nth-child(5) { animation-delay: 1.12s; }
@keyframes vzstream { 0% { opacity: .3; transform: translateY(-4px); } 18% { opacity: 1; transform: none; } 42% { opacity: 1; } 62%, 100% { opacity: .3; transform: none; } }

/* Alchemy — launch cadence dots */
.vzc { display: grid; grid-template-columns: repeat(6, 15px); gap: 12px; margin: auto 0; justify-content: start; }
.vzc i { width: 15px; height: 15px; border-radius: 50%; background: color-mix(in srgb, var(--vz-accent) 16%, transparent); }
.vzc i:nth-child(odd) { background: var(--vz-accent); opacity: .8; }
.mcard.in .vzc i:nth-child(odd) { animation: vzpulse 3.6s ease infinite; }
.mcard.in .vzc i:nth-child(3) { animation-delay: .6s; } .mcard.in .vzc i:nth-child(5) { animation-delay: 1.2s; }
.mcard.in .vzc i:nth-child(7) { animation-delay: 1.8s; } .mcard.in .vzc i:nth-child(9) { animation-delay: 2.4s; }
.mcard.in .vzc i:nth-child(11) { animation-delay: 3s; }
@keyframes vzpulse { 0%, 30%, 100% { opacity: .8; transform: scale(1); box-shadow: none; } 12% { opacity: 1; transform: scale(1.28); box-shadow: 0 0 14px color-mix(in srgb, var(--vz-accent) 65%, transparent); } }

/* Enablement — battlecards + win-rate bars */
.vze { display: flex; align-items: flex-end; justify-content: space-between; gap: 26px; margin: auto 0; padding-right: 6px; }
.vze-fan { position: relative; width: 132px; height: 108px; flex: none; }
.vze-fan b { position: absolute; inset: 8px 10px; border-radius: 10px; background: var(--surface, #fff); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.vze-fan b::before, .vze-fan b::after { content: ""; position: absolute; left: 12px; height: 7px; border-radius: 4px; background: color-mix(in srgb, var(--vz-accent) 30%, transparent); }
.vze-fan b::before { top: 14px; width: 46%; background: color-mix(in srgb, var(--vz-accent) 55%, transparent); }
.vze-fan b::after { top: 29px; width: 68%; }
.vze-fan b:nth-child(1) { transform: rotate(-7deg) translate(-7px, 5px); opacity: .5; }
.vze-fan b:nth-child(2) { transform: rotate(-2deg) translate(-1px, 2px); opacity: .75; }
.vze-fan b:nth-child(3) { transform: rotate(4deg) translate(5px, 0); }
.mcard:hover .vze-fan b:nth-child(1) { transform: rotate(-10deg) translate(-11px, 6px); }
.mcard:hover .vze-fan b:nth-child(3) { transform: rotate(6.5deg) translate(9px, -1px); }
.vze-fan b { transition: transform .3s cubic-bezier(.2,.7,.2,1); }
.vze-chart { display: flex; align-items: flex-end; gap: 20px; height: 118px; }
.vze-bar { display: flex; flex-direction: column; align-items: center; gap: 7px; height: 100%; justify-content: flex-end; }
.vze-bar b { width: 34px; border-radius: 7px 7px 3px 3px; transform-origin: bottom; }
.vze-b1 { height: 44%; background: color-mix(in srgb, var(--vz-accent) 26%, transparent); }
.vze-b2 { height: 82%; background: linear-gradient(180deg, #fbbf24, var(--vz-accent)); box-shadow: 0 6px 18px color-mix(in srgb, var(--vz-accent) 38%, transparent); }
.mcard.in .vze-bar b { animation: vzgrow .9s cubic-bezier(.2,.7,.25,1) both; }
.mcard.in .vze-b2 { animation-delay: .22s; }
@keyframes vzgrow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.vze-bar i { font-style: normal; font-size: 12px; font-weight: 600; letter-spacing: .03em; color: var(--muted); }

/* Voyager — $1 → $27 multiplier */
.vzy { display: flex; align-items: flex-end; gap: 16px; margin: auto 0; padding-bottom: 4px; }
.vzy-seed { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; flex: none; background: var(--surface, #fff); border: 1.5px solid color-mix(in srgb, var(--vz-accent) 45%, transparent); color: var(--vz-accent); font-weight: 800; font-size: 15px; box-shadow: var(--shadow-sm); }
.vzy-arrow { color: color-mix(in srgb, var(--vz-accent) 65%, transparent); padding-bottom: 15px; }
.vzy-stack { display: flex; align-items: flex-end; gap: 7px; height: 108px; }
.vzy-stack b { width: 17px; border-radius: 5px; background: linear-gradient(180deg, color-mix(in srgb, var(--vz-accent) 72%, #fff), var(--vz-accent)); transform-origin: bottom; }
.vzy-stack b:nth-child(1) { height: 22%; } .vzy-stack b:nth-child(2) { height: 34%; }
.vzy-stack b:nth-child(3) { height: 47%; } .vzy-stack b:nth-child(4) { height: 62%; }
.vzy-stack b:nth-child(5) { height: 79%; } .vzy-stack b:nth-child(6) { height: 100%; box-shadow: 0 6px 18px color-mix(in srgb, var(--vz-accent) 40%, transparent); }
.mcard.in .vzy-stack b { animation: vzgrow .7s cubic-bezier(.2,.7,.25,1) both; }
.mcard.in .vzy-stack b:nth-child(2) { animation-delay: .1s; } .mcard.in .vzy-stack b:nth-child(3) { animation-delay: .2s; }
.mcard.in .vzy-stack b:nth-child(4) { animation-delay: .3s; } .mcard.in .vzy-stack b:nth-child(5) { animation-delay: .4s; }
.mcard.in .vzy-stack b:nth-child(6) { animation-delay: .5s; }
[data-theme="dark"] .vzy-seed { background: rgba(255,255,255,.07); }

/* Research — segmentation clusters */
.vzr { position: relative; height: 128px; margin: auto 0; }
.vzr i { position: absolute; width: 11px; height: 11px; border-radius: 50%; }
.vzr .c1 { background: #6366f1; } .vzr .c2 { background: #0ea5e9; } .vzr .c3 { background: #8b5cf6; }
.mcard.in .vzr i { animation: vzgather 1.05s cubic-bezier(.2,.7,.2,1) both .15s; }
@keyframes vzgather { from { transform: translate(var(--dx), var(--dy)) scale(.6); opacity: .25; filter: saturate(.2); } to { transform: none; opacity: 1; filter: none; } }
.vzr-ring { position: absolute; border: 1.5px dashed color-mix(in srgb, var(--vz-accent) 42%, transparent); border-radius: 50%; opacity: 0; }
.vzr-ring.r1 { left: 6%; top: 22%; width: 74px; height: 74px; }
.vzr-ring.r2 { left: 38%; top: 6%; width: 78px; height: 78px; }
.vzr-ring.r3 { left: 68%; top: 42%; width: 76px; height: 76px; }
.mcard.in .vzr-ring { animation: vzring .6s ease both 1s; }
@keyframes vzring { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: scale(1); } }

@media (max-width: 880px) {
  .mcard-viz { padding: 6px 22px 22px; }
  .vzc { grid-template-columns: repeat(6, 14px); }
  .vze { gap: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .mcard-viz *, .mcard-viz *::before, .mcard-viz *::after { animation: none !important; transition: none !important; }
  .vzf-dot { opacity: 0 !important; }
  .vzf-check { opacity: 1 !important; transform: none !important; }
  .vzq-row { opacity: 1 !important; }
}

/* ---------- Stripe-pattern modal ---------- */
body.modal-open { overflow: hidden; }
.smodal { position: fixed; inset: 0; z-index: 90; }
.smodal[hidden] { display: none; }
.smodal-backdrop { position: absolute; inset: 0; background: rgba(10,20,35,.42); backdrop-filter: blur(3px); opacity: 0; transition: opacity .22s ease; }
.smodal.show .smodal-backdrop { opacity: 1; }
.smodal-sheet {
  position: absolute; inset: 22px; margin: auto; max-width: 1160px; height: fit-content; max-height: calc(100% - 44px); overflow-y: auto;
  background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-lg);
  padding: 56px 60px 44px; opacity: 0; transform: translateY(14px) scale(.985);
  transition: opacity .22s ease, transform .22s cubic-bezier(.2,.6,.2,1);
}
.smodal.show .smodal-sheet { opacity: 1; transform: none; }
.smodal-close {
  position: absolute; top: 22px; right: 22px; width: 40px; height: 40px; border-radius: 10px; border: 0;
  background: #eceafd; color: var(--accent); font-size: 22px; line-height: 1; cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}
.smodal-close:hover { background: #ddd9ff; transform: scale(1.05); }
[data-theme="dark"] .smodal-close { background: #232f52; }
[data-theme="dark"] .smodal-close:hover { background: #2c3a63; }
.sm-head { display: grid; grid-template-columns: 1.25fr 1fr; gap: 48px; align-items: start; margin-bottom: 40px; }
.sm-head-l h2 { font-size: clamp(26px, 3vw, 36px); letter-spacing: -.02em; line-height: 1.18; margin-bottom: 14px; max-width: 24ch; }
.sm-head-l p { color: var(--body); font-size: 16.5px; max-width: 56ch; margin-bottom: 24px; }
.sm-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.sm-btn-primary {
  display: inline-flex; align-items: center; gap: 7px; background: var(--accent); color: #fff;
  font-weight: 600; font-size: 15.5px; padding: 11px 20px; border-radius: 8px;
  transition: background .15s ease, transform .15s ease;
}
.sm-btn-primary:hover { background: #4f46e5; transform: translateY(-1px); }
.sm-btn-secondary {
  display: inline-flex; align-items: center; background: var(--surface); color: var(--accent);
  font-weight: 600; font-size: 15.5px; padding: 11px 20px; border-radius: 8px;
  border: 1px solid #c7c2ff; transition: border-color .15s ease, transform .15s ease;
}
.sm-btn-secondary:hover { border-color: var(--accent); transform: translateY(-1px); }
[data-theme="dark"] .sm-btn-secondary { border-color: #3d477a; background: transparent; }
.sm-checks { list-style: none; display: flex; flex-direction: column; gap: 15px; padding-top: 8px; }
.sm-checks li { display: flex; gap: 11px; align-items: baseline; font-size: 16px; color: var(--ink); font-weight: 500; line-height: 1.4; }
.sm-checks .ck { flex: none; width: 17px; height: 17px; border-radius: 50%; background: #ed5f2b; display: inline-grid; place-items: center; transform: translateY(2px); }
.sm-body { display: grid; grid-template-columns: 1.55fr 1fr; gap: 20px; align-items: stretch; }
.sm-mock {
  background: linear-gradient(155deg, #f4f1ff 0%, #eef5ff 55%, #f6f0ff 100%);
  border: 1px solid var(--line); border-radius: 14px; padding: 36px; display: grid; place-items: center;
}
[data-theme="dark"] .sm-mock { background: linear-gradient(155deg, #131c38, #0f1a30); }
.sm-mock .browser, .sm-mock .doc-frame { width: 100%; max-width: 560px; margin: 0; }
.sm-mock .doc-frame { max-width: 330px; }
.sm-side { display: flex; flex-direction: column; gap: 20px; }
.sm-stat {
  flex: 1; background: var(--soft); border: 1px solid var(--line); border-radius: 14px;
  display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center;
  padding: 34px 26px; gap: 8px;
}
.sm-stat b {
  font-size: clamp(44px, 4.6vw, 60px); line-height: 1; letter-spacing: -.03em;
  background: linear-gradient(100deg, #f59e0b, #f97316 55%, #ef4444); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.sm-stat span { font-size: 15px; color: var(--body); max-width: 26ch; }
.sm-panel { flex: 1.2; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 16px 14px; display: flex; flex-direction: column; gap: 10px; }
.sm-panel-label { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.sm-panel img { width: 100%; flex: 1; min-height: 0; object-fit: cover; object-position: top; border-radius: 8px; border: 1px solid var(--line); }
@media (max-width: 880px) {
  .smodal-sheet { inset: 10px; padding: 48px 22px 26px; }
  .sm-head { grid-template-columns: 1fr; gap: 22px; margin-bottom: 24px; }
  .sm-body { grid-template-columns: 1fr; }
  .sm-mock { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .smodal-backdrop, .smodal-sheet { transition: none; }
}

/* ---------- selected-work tiles (Stripe-style) ---------- */
.tiles { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-bottom: 8px; }
@media (max-width: 980px) { .tiles { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 620px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
.tile {
  position: relative; text-align: left; background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; padding: 14px 14px 13px; cursor: pointer; font-family: var(--font);
  display: flex; flex-direction: column; gap: 7px; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.tile.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow-md); }
.tile-ico { width: 26px; height: 26px; border-radius: 7px; color: #fff; font-size: 12.5px; font-weight: 800; display: grid; place-items: center; }
.tile b { font-size: 14.5px; color: var(--ink); line-height: 1.2; }
.tile > span:not(.tile-ico) { font-size: 12px; color: var(--muted); line-height: 1.35; }
.tile-plus { position: absolute; top: 10px; right: 12px; font-style: normal; font-size: 15px; color: var(--muted); font-weight: 700; transition: transform .2s ease, color .2s ease; }
.tile.on .tile-plus { transform: rotate(45deg); color: var(--accent); }
[data-theme="dark"] .tile-ico[style*="#0a2540"] { background: #2c3a5f !important; }
.case-panel { display: none; }
.case-panel.open { display: block; animation: panelIn .4s cubic-bezier(.2,.6,.2,1); }
@keyframes panelIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
.case-panel .case { border-top: 0; padding: 30px 0 8px; }
.assets-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.assets-row figure { margin: 0; }
.assets-row img {
  width: 100%; aspect-ratio: 16/9; object-fit: cover; object-position: top;
  border-radius: 8px; border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease;
}
.assets-row img:hover { transform: scale(1.03); box-shadow: var(--shadow-md); }
.assets-row figcaption { font-size: 11.5px; color: var(--muted); margin-top: 5px; }
/* when a thumbnail row is present, dock the metric chip to the primary frame's top corner */
.case-media:has(.assets-row) .float-chip { bottom: auto; top: -12px; }
@media (prefers-reduced-motion: reduce) { .case-panel.open { animation: none; } }

/* ---------- capabilities ---------- */
.caps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 880px) { .caps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .caps { grid-template-columns: 1fr; } }
.cap {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .18s ease;
}
.cap:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.cap .ico {
  width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; margin-bottom: 12px;
  font-size: 17px; color: #fff; background: var(--accent);
}
.cap:nth-child(2) .ico { background: #e94aa2; } .cap:nth-child(3) .ico { background: #f97316; }
.cap:nth-child(4) .ico { background: #0a8f6b; } .cap:nth-child(5) .ico { background: #0ea5e9; } .cap:nth-child(6) .ico { background: #7c3aed; }
.cap h3 { font-size: 16.5px; margin-bottom: 6px; }
.cap p { font-size: 14.5px; }

/* ---------- experience ---------- */
.two-col { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: start; }
@media (max-width: 880px) { .two-col { grid-template-columns: 1fr; gap: 34px; } }
.about p { margin-bottom: 14px; max-width: 52ch; }
.timeline { position: relative; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(180deg, var(--accent), var(--g4)); border-radius: 2px; }
.t-item { position: relative; padding: 0 0 22px 32px; }
.t-item::before {
  content: ""; position: absolute; left: 0; top: 6px; width: 14px; height: 14px; border-radius: 50%;
  background: #fff; border: 3px solid var(--accent); box-shadow: 0 0 0 3px rgba(99,91,255,.13);
}
.t-item h3 { font-size: 16px; }
.t-item .t-dates { font-size: 13px; color: var(--muted); margin: 1px 0 3px; }
.t-item p { font-size: 15px; max-width: 56ch; }

/* ---------- thought leadership ---------- */
.tl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 880px) { .tl-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .tl-grid { grid-template-columns: 1fr; } }
.tl-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .18s ease; display: flex; flex-direction: column;
}
.tl-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.tl-card img { aspect-ratio: 16/9; object-fit: cover; border-bottom: 1px solid var(--line); }
.tl-card .tl-body { padding: 16px 18px 18px; }
.tl-card h3 { font-size: 15.5px; margin-bottom: 4px; }
.tl-card p { font-size: 13.5px; color: var(--muted); }

/* ---------- publications (research & writing) ---------- */
.pub-layout { display: grid; grid-template-columns: 1fr 1.1fr; gap: 22px; align-items: stretch; }
@media (max-width: 880px) { .pub-layout { grid-template-columns: 1fr; } }
.pub-feature {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  box-shadow: var(--shadow-md); display: flex; flex-direction: column; color: var(--ink);
  transition: transform .18s ease, box-shadow .18s ease;
}
.pub-feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.pub-feature img { aspect-ratio: 16 / 8.4; object-fit: cover; border-bottom: 1px solid var(--line); }
.pub-feature-body { padding: 22px 24px 24px; }
.pub-tag { font-size: 11px; font-weight: 800; letter-spacing: .12em; color: #d64500; }
.pub-feature h3 { font-size: 22px; margin: 6px 0 8px; }
.pub-feature p { font-size: 15px; color: var(--body); max-width: 52ch; }
.pub-stats { display: flex; gap: 26px; margin-top: 16px; }
.pub-stats b { display: block; font-size: 20px; color: var(--ink); letter-spacing: -.02em; }
.pub-stats span { font-size: 12px; color: var(--muted); }
.pub-list { display: flex; flex-direction: column; gap: 12px; }
.pub-row {
  display: flex; gap: 14px; align-items: center; background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px 12px 12px;
  box-shadow: var(--shadow-sm); transition: transform .15s ease, box-shadow .15s ease;
}
.pub-row:hover { transform: translateX(4px); box-shadow: var(--shadow-md); }
.pub-cover {
  flex: none; width: 52px; height: 66px; border-radius: 6px; position: relative; overflow: hidden;
  display: flex; align-items: flex-end; padding: 6px; font-size: 9.5px; font-weight: 800;
  letter-spacing: .06em; color: #fff; background: var(--pc, #0a2540); box-shadow: var(--shadow-sm);
}
.pub-cover::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--pa, var(--accent)); }
.pub-cover.imgc { padding: 0; }
.pub-cover.imgc img { width: 100%; height: 100%; object-fit: cover; }
.pub-cover.imgc::after { display: none; }
.pub-info { flex: 1; min-width: 0; }
.pub-info b { display: block; font-size: 15px; color: var(--ink); line-height: 1.3; }
.pub-info span { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.pub-meta { flex: none; font-size: 12px; font-weight: 700; color: var(--muted); text-align: right; white-space: nowrap; }
@media (max-width: 560px) { .pub-meta { display: none; } }

/* ---------- archive page stats row ---------- */
.arch-stats { display: flex; gap: 10px 26px; flex-wrap: wrap; margin-top: 20px; }
.arch-stats span { font-size: 14px; color: var(--body); }
.arch-stats b { color: var(--ink); font-size: 16px; }

/* ---------- document frame (report covers) ---------- */
.doc-frame { max-width: 420px; margin: 0 auto; border-radius: 12px; overflow: hidden;
  box-shadow: var(--shadow-lg); border: 1px solid var(--line); background: #fff;
  transition: transform .25s ease; will-change: transform; }
.doc-frame img { width: 100%; display: block; aspect-ratio: 820 / 1061; object-fit: cover; }

/* ---------- skills toolkit ---------- */
.toolkit { margin-top: 26px; display: flex; flex-direction: column; gap: 8px; }
.tk-group { display: flex; gap: 12px; align-items: baseline; }
.tk-label { flex: none; min-width: 88px; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.tk-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tk-chips i { font-style: normal; background: var(--soft); border: 1px solid var(--line); border-radius: 999px;
  padding: 3px 11px; font-size: 12.5px; font-weight: 500; color: var(--body); white-space: nowrap; }
@media (max-width: 560px) { .tk-group { flex-direction: column; gap: 6px; } }

/* ---------- archive banner ---------- */
.archive-banner {
  border-radius: 14px; padding: 46px 44px; color: #fff; background: #0a2540;
  position: relative; overflow: hidden; box-shadow: var(--shadow-lg);
}
.archive-banner::before {
  content: ""; position: absolute; top: -70%; right: -22%; width: 62%; height: 190%;
  background: linear-gradient(160deg, var(--g2), var(--g1) 55%, var(--g3));
  transform: rotate(18deg); filter: blur(46px); opacity: .5;
}
.archive-banner > * { position: relative; }
.archive-banner h2 { color: #fff; max-width: 20ch; }
.archive-banner p { color: #c9d6e3; max-width: 52ch; margin-bottom: 24px; font-size: 16.5px; }
@media (max-width: 600px) { .archive-banner { padding: 34px 26px; } }

/* ---------- contact & footer ---------- */
.contact-card { text-align: center; max-width: 620px; margin: 0 auto; }
.contact-card .lead { margin: 0 auto; }
.contact-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 26px; }
footer { border-top: 1px solid var(--line); padding: 30px 0 38px; background: var(--soft); }
.foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }
.foot small { color: var(--muted); font-size: 13px; }
.foot .flinks { display: flex; gap: 18px; }
.foot .flinks a { color: var(--body); font-size: 13.5px; font-weight: 500; }
.foot .flinks a:hover { color: var(--ink); }

/* ---------- dark mode targeted overrides ---------- */
[data-theme="dark"] .nav.scrolled { background: rgba(11,20,36,.86); box-shadow: 0 1px 0 var(--line), 0 6px 18px -12px rgba(0,0,0,.6); }
[data-theme="dark"] .ribbon::after { background: linear-gradient(183deg, rgba(11,20,36,0) 38%, rgba(11,20,36,.55) 66%, rgba(11,20,36,.97) 92%); }
[data-theme="dark"] .page-head .ribbon::after { background: linear-gradient(183deg, rgba(11,20,36,0) 22%, rgba(11,20,36,.7) 54%, #0b1424 88%); }
[data-theme="dark"] .hero-pill { background: #17223c; border-color: #2c3a5f; color: #a7a2ff; }
[data-theme="dark"] .browser, [data-theme="dark"] .doc-frame { background: var(--card); }
[data-theme="dark"] .browser-bar .addr { background: var(--card); color: var(--muted); }
[data-theme="dark"] .btn-navy { background: #22304a; } [data-theme="dark"] .btn-navy:hover { background: #2c3d5e; }
[data-theme="dark"] .btn-accent:hover { background: #8d87ff; }
[data-theme="dark"] .link:hover { color: #b9b4ff; }
[data-theme="dark"] .logo-row span { color: #93a5b8; }
[data-theme="dark"] .archive-banner { background: #101d33; }
[data-theme="dark"] .float-chip { background: #17223c; }
[data-theme="dark"] .arch-note, [data-theme="dark"] .arch-foot-note { background: #152036; border-color: #2c3a5f; }
[data-theme="dark"] .skip-link { background: #22304a; }
[data-theme="dark"] .searchbox { background: var(--card); color: var(--ink); }
[data-theme="dark"] .btn-primary { background: #22304a; } [data-theme="dark"] .btn-primary:hover { background: #2c3d5e; }
[data-theme="dark"] .co-multi { background: #2c3a5f; }
[data-theme="dark"] .t-item::before { background: var(--surface); }
[data-theme="dark"] .arch-cat { filter: brightness(1.55); }
[data-theme="dark"] .arch-sum { color: var(--body); }
[data-theme="dark"] .pub-tag { color: #ff8a4d; }
[data-theme="dark"] .browser-bar { background: #0e1a2e; }
[data-theme="dark"] .browser-bar .dot { background: #2c3a5f; }

/* ---------- theme toggle ---------- */
.theme-btn {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface); color: var(--body); cursor: pointer; font-size: 15px; line-height: 1;
  display: grid; place-items: center; transition: transform .15s ease, border-color .15s ease, background .25s ease;
}
.theme-btn:hover { transform: translateY(-1px) rotate(-12deg); border-color: var(--muted); }
.theme-btn .ic-sun { display: none; }
[data-theme="dark"] .theme-btn .ic-sun { display: block; }
[data-theme="dark"] .theme-btn .ic-moon { display: none; }

/* ---------- expanded hover states ---------- */
.stat { transition: background .18s ease; }
.stat:hover { background: var(--soft); }
.stat:hover b { color: var(--accent); }
.stat b { transition: color .18s ease; }
.mq-item { transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease; }
.mq-item:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: var(--shadow-md); }
.metric { transition: transform .15s ease, border-color .15s ease; }
.metric:hover { transform: translateY(-2px); border-color: var(--accent); }
.t-item { cursor: default; }
.t-item:hover::before { box-shadow: 0 0 0 5px rgba(99,91,255,.22); background: var(--accent); }
.t-item::before { transition: box-shadow .18s ease, background .18s ease; }
.t-item h3 { transition: color .15s ease; }
.t-item:hover h3 { color: var(--accent); }
.hero-pill { transition: border-color .15s ease, transform .15s ease; }
.hero-pill:hover { border-color: var(--accent); transform: translateY(-1px); }
.doc-frame:hover { transform: translateY(-4px) rotate(-0.5deg); box-shadow: var(--shadow-lg); }
.case-media:hover .browser { box-shadow: var(--shadow-lg); }
.logo svg { transition: transform .2s ease; }
.logo:hover svg { transform: rotate(-6deg) scale(1.06); }
.tk-chips i { transition: border-color .15s ease, color .15s ease, transform .15s ease; }
.tk-chips i:hover { border-color: var(--accent); color: var(--ink); transform: translateY(-1px); }
.wcard .links a { transition: color .15s ease; }
.wcard .links a:hover { color: var(--accent-dark); }
[data-theme="dark"] .wcard .links a:hover { color: #b9b4ff; }
.arch-stats span { transition: color .15s ease; }
.arch-stats span:hover b { color: var(--accent); }
.arch-stats b { transition: color .15s ease; }

/* ============================================================
   work.html — archive explorer
   ============================================================ */
.page-head { position: relative; padding: 168px 0 36px; overflow: clip; background: var(--surface); }
.page-head .ribbon { height: 340px; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 36%); }
/* stronger fade on the archive header so the headline zone reads on near-white */
.page-head .ribbon::after {
  background: linear-gradient(183deg, rgba(255,255,255,0) 22%, rgba(255,255,255,.7) 54%, #fff 88%);
}
.page-head h1 { margin-bottom: 14px; }
.arch-lead { font-size: clamp(18px, 2vw, 21px); max-width: 54ch; line-height: 1.55; color: var(--ink-soft, var(--body)); }
.arch-sub { margin-top: 8px; font-size: 15px; color: var(--muted); }
.arch-stats { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 26px; }
.arch-stats span { display: inline-flex; align-items: baseline; gap: 6px; }
.arch-stats span + span { border-left: 1px solid var(--line); padding-left: 26px; }
@media (max-width: 640px) {
  .page-head { padding-top: 140px; } .page-head .ribbon { height: 260px; }
  .arch-stats span + span { border-left: 0; padding-left: 0; }
}
.page-head h1 { font-size: clamp(32px, 5vw, 48px); font-weight: 800; margin-bottom: 10px; }
.filters { display: flex; flex-direction: column; gap: 12px; margin: 6px 0 22px; }
.chiprow { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chiprow .label { font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); min-width: 72px; }
.fchip {
  border: 1px solid var(--line); background: var(--surface); color: var(--body);
  border-radius: 999px; padding: 8px 15px; font-size: 14px; font-weight: 600; cursor: pointer;
  transition: all .13s ease; font-family: var(--font);
}
.fchip:hover { border-color: var(--muted); color: var(--ink); transform: translateY(-1px); }
.fchip.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.searchbox {
  width: 100%; max-width: 400px; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line);
  font-size: 15px; font-family: var(--font); color: var(--ink); background: var(--surface); box-shadow: var(--shadow-sm);
}
.searchbox:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.result-count { font-size: 13.5px; color: var(--muted); margin-bottom: 16px; }
.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding-bottom: 80px; }
@media (max-width: 980px) { .work-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .work-grid { grid-template-columns: 1fr; } }
.wcard {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 9px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.wcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.wcard .top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.wcard .cat { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.wcard h3 { font-size: 15.5px; line-height: 1.3; }
.wcard p { font-size: 14px; flex: 1; color: var(--body); }
.wcard .links { display: flex; gap: 14px; font-size: 13px; font-weight: 600; }
.wcard .links .dead { color: var(--muted); font-weight: 500; }
.co-chip.sm { font-size: 10.5px; padding: 3px 10px; }

/* ============================================================
   archived copy pages
   ============================================================ */
.arch-note {
  background: #f0f4ff; border: 1px solid #dfe6ff; border-radius: var(--radius);
  padding: 13px 16px; font-size: 14px; color: var(--body); margin: 96px 0 30px;
}
.arch-body { max-width: 740px; margin: 0 auto 90px; }
.arch-body h1 { font-size: clamp(27px, 4vw, 36px); margin-bottom: 8px; }
.arch-meta { color: var(--muted); font-size: 14px; margin-bottom: 26px; }
.arch-text { white-space: pre-wrap; font-size: 16px; color: var(--body); line-height: 1.7; }
