/* ==========================================================================
   Tokens
   ========================================================================== */
:root {
  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "Inter Tight", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --max: 1120px;
  --gutter: clamp(16px, 5vw, 48px);
  --radius: 10px;
  --ease: cubic-bezier(.2, .7, .1, 1);

  /* light */
  --bg: #f4f2ee;
  --bg-2: #ebe8e2;
  --fg: #141414;
  --fg-2: #4a4945;
  --mut: #7c7a74;
  --line: rgba(20, 20, 20, .12);
  --acc: #c94b1c;
  --acc-soft: rgba(201, 75, 28, .1);
  --crit: #b4232a;
  --high: #c2620a;
  --med: #8a7a12;
}

:root[data-theme="dark"] {
  --bg: #0c0c0d;
  --bg-2: #141416;
  --fg: #ecebe7;
  --fg-2: #b3b1ab;
  --mut: #77756f;
  --line: rgba(236, 235, 231, .1);
  --acc: #ff7a45;
  --acc-soft: rgba(255, 122, 69, .12);
  --crit: #ff6b6b;
  --high: #ffa94d;
  --med: #e6d36b;
}

/* ==========================================================================
   Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color .4s var(--ease), color .4s var(--ease);
}
::selection { background: var(--acc); color: var(--bg); }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 400; }
p { margin: 0; }
ul, ol { list-style: none; margin: 0; padding: 0; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; border-radius: 4px; }

.mono { font-family: var(--mono); font-size: .78rem; letter-spacing: .01em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; top: -100px; left: 16px; z-index: 100; padding: 8px 14px; background: var(--fg); color: var(--bg); border-radius: 6px; }
.skip:focus { top: 16px; }

.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 1; opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

main, .footer { position: relative; z-index: 2; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ==========================================================================
   Nav
   ========================================================================== */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: var(--max); margin: 0 auto; padding: 18px var(--gutter);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
}
.nav::after {
  content: ""; position: absolute; left: var(--gutter); right: var(--gutter); bottom: 0;
  height: 1px; background: var(--line); opacity: 0; transition: opacity .3s;
}
.nav.is-scrolled::after { opacity: 1; }
.nav__mark { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.nav__mark .mono { font-size: .9rem; }
.nav__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--acc); }
.nav__links { display: flex; gap: 28px; }
.nav__links a {
  position: relative; font-size: .9rem; color: var(--fg-2); transition: color .2s;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px;
  background: var(--fg); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease);
}
.nav__links a:hover, .nav__links a.is-active { color: var(--fg); }
.nav__links a.is-active::after, .nav__links a:hover::after { transform: scaleX(1); }
.nav__actions { display: flex; align-items: center; gap: 8px; }
.kbd-btn, .icon-btn {
  display: inline-grid; place-items: center; height: 32px; min-width: 32px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 8px; color: var(--fg-2);
  transition: border-color .2s, color .2s, background .2s;
}
.kbd-btn:hover, .icon-btn:hover { color: var(--fg); border-color: var(--fg-2); background: var(--bg-2); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero { padding: clamp(56px, 12vh, 140px) 0 clamp(48px, 8vh, 96px); }
.hero__meta {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  color: var(--mut); margin-bottom: clamp(32px, 6vh, 64px);
}
.status { display: inline-flex; align-items: center; gap: 10px; color: var(--fg-2); }
.status__pulse { position: relative; width: 7px; height: 7px; border-radius: 50%; background: var(--acc); }
.status__pulse::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--acc);
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse { 0% { transform: scale(1); opacity: .6; } 100% { transform: scale(3.2); opacity: 0; } }

.hero__title {
  font-family: var(--serif);
  font-size: clamp(2.7rem, 8.4vw, 6.6rem);
  line-height: .98; letter-spacing: -.02em;
  max-width: 14ch;
}
.hero__title em { font-style: italic; color: var(--acc); }

.hero__grid {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(28px, 5vw, 72px);
  align-items: end; margin-top: clamp(36px, 6vh, 64px);
}
.hero__lede { font-size: clamp(1.02rem, 1.4vw, 1.15rem); color: var(--fg-2); max-width: 46ch; }

.term {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-2); overflow: hidden;
}
.term__bar { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.term__bar > span:not(.term__title) { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.term__title { margin-left: auto; color: var(--mut); font-size: .7rem; }
.term__body { margin: 0; padding: 16px 18px 18px; line-height: 1.75; color: var(--fg-2); white-space: pre; overflow-x: auto; }
.c-mut { color: var(--mut); }
.c-hi { color: var(--fg); }
.c-acc { color: var(--acc); }
.caret { display: inline-block; width: .55em; height: 1.05em; vertical-align: -.18em; background: var(--fg); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(36px, 6vh, 56px); }
.btn {
  display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 20px;
  border: 1px solid var(--line); border-radius: 999px; font-size: .92rem; font-weight: 500;
  transition: transform .3s var(--ease), background .25s, border-color .25s, color .25s;
}
.btn:hover { border-color: var(--fg); transform: translateY(-1px); }
.btn--solid { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.btn--solid:hover { background: var(--acc); border-color: var(--acc); color: #fff; }

/* ==========================================================================
   Ticker
   ========================================================================== */
.ticker {
  position: relative; overflow: hidden; border-block: 1px solid var(--line);
  padding: 14px 0; color: var(--mut); text-transform: uppercase; letter-spacing: .12em;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.ticker__track { display: flex; width: max-content; gap: 48px; animation: ticker 40s linear infinite; }
.ticker__track span::before { content: "◇"; margin-right: 48px; color: var(--acc); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ==========================================================================
   Sections
   ========================================================================== */
.section { padding: clamp(72px, 14vh, 140px) 0 0; scroll-margin-top: 64px; }
.section__head {
  display: grid; grid-template-columns: 64px 1fr; align-items: baseline;
  column-gap: 16px; row-gap: 10px; margin-bottom: clamp(32px, 6vh, 56px);
}
.section__num { color: var(--acc); }
.section h2 { font-family: var(--serif); font-size: clamp(2rem, 4.6vw, 3.4rem); line-height: 1.05; letter-spacing: -.015em; }
.section__sub { grid-column: 2; color: var(--mut); max-width: 56ch; }

/* About */
.about { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(32px, 6vw, 88px); padding-left: 80px; }
.about__text p + p { margin-top: 1.1em; }
.about__text p { color: var(--fg-2); }
.about__text .lead { font-size: clamp(1.2rem, 2vw, 1.45rem); line-height: 1.45; color: var(--fg); }
.facts { margin: 0; }
.facts > div { padding: 16px 0; border-top: 1px solid var(--line); }
.facts > div:last-child { border-bottom: 1px solid var(--line); }
.facts dt { color: var(--mut); margin-bottom: 4px; }
.facts dd { margin: 0; }

/* Projects */
.projects { border-top: 1px solid var(--line); }
.project {
  position: relative; display: grid; grid-template-columns: 64px 1fr auto; gap: 16px 24px;
  padding: clamp(28px, 4vw, 44px) 0; border-bottom: 1px solid var(--line);
  isolation: isolate;
}
.project::before {
  content: ""; position: absolute; inset: 0 calc(var(--gutter) * -0.5); z-index: -1;
  border-radius: 14px; opacity: 0; transition: opacity .4s var(--ease);
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), var(--acc-soft), transparent 70%);
}
.project:hover::before { opacity: 1; }
.project__idx { color: var(--mut); padding-top: .55em; }
.project__title {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
  font-family: var(--serif); font-size: clamp(1.8rem, 3.4vw, 2.6rem); line-height: 1.1;
}
.tag { font-family: var(--mono); font-size: .68rem; padding: 3px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--fg-2); letter-spacing: .04em; }
.project__desc { margin-top: 12px; color: var(--fg-2); max-width: 60ch; }
.project__case { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 24px 0 0; }
.project__case dt { color: var(--acc); margin-bottom: 4px; }
.project__case dd { margin: 0; font-size: .92rem; color: var(--fg-2); }
.stack { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 22px; color: var(--mut); }
.stack li::before { content: "/ "; opacity: .5; }
.project__links { display: flex; flex-direction: column; gap: 10px; align-items: flex-end; padding-top: .6em; white-space: nowrap; }
.link-arrow { font-size: .9rem; color: var(--fg-2); transition: color .2s; }
.link-arrow span { display: inline-block; transition: transform .3s var(--ease); }
.link-arrow:hover { color: var(--acc); }
.link-arrow:hover span { transform: translate(2px, -2px); }

/* Research */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-block: 1px solid var(--line); margin-bottom: 40px; }
.stats > div { padding: 28px 20px; display: flex; flex-direction: column; gap: 6px; }
.stats > div + div { border-left: 1px solid var(--line); }
.stats__n { font-family: var(--serif); font-size: clamp(2.4rem, 5vw, 3.8rem); line-height: 1; font-variant-numeric: tabular-nums; }
.stats__l { color: var(--mut); }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.disclosures { width: 100%; border-collapse: collapse; font-size: .94rem; min-width: 680px; }
.disclosures th {
  text-align: left; font: 400 .72rem var(--mono); color: var(--mut); text-transform: uppercase;
  letter-spacing: .08em; padding: 0 16px 12px 0; border-bottom: 1px solid var(--line);
}
.disclosures td { padding: 18px 16px 18px 0; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--fg-2); }
.disclosures td:nth-child(2) { color: var(--fg); }
.disclosures tbody tr { transition: background .2s; }
.disclosures tbody tr:hover { background: var(--bg-2); }
.sev { display: inline-flex; align-items: center; gap: 8px; font: 500 .74rem var(--mono); white-space: nowrap; }
.sev::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.sev--crit { color: var(--crit); }
.sev--high { color: var(--high); }
.sev--med { color: var(--med); }
.fineprint { margin-top: 20px; color: var(--mut); }

/* Timeline */
.timeline { border-top: 1px solid var(--line); }
.timeline li {
  display: grid; grid-template-columns: 180px 1fr; gap: 24px;
  padding: 28px 0; border-bottom: 1px solid var(--line);
}
.timeline__when { color: var(--mut); padding-top: .3em; }
.timeline h3 { font-size: 1.15rem; font-weight: 500; }
.timeline .at { color: var(--mut); font-weight: 400; }
.timeline p { margin-top: 8px; color: var(--fg-2); max-width: 62ch; }

/* Writing */
.posts { border-top: 1px solid var(--line); }
.posts a {
  display: grid; grid-template-columns: 120px 1fr auto; gap: 24px; align-items: baseline;
  padding: 22px 0; border-bottom: 1px solid var(--line); transition: padding .35s var(--ease), color .2s;
}
.posts time, .posts__k { color: var(--mut); }
.posts__t { font-size: clamp(1.05rem, 1.8vw, 1.3rem); }
.posts a:hover { padding-left: 12px; }
.posts a:hover .posts__t { color: var(--acc); }

/* Toolkit */
.toolkit { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.toolkit > div { background: var(--bg); padding: 24px; }
.toolkit h3 { color: var(--acc); margin-bottom: 10px; }
.toolkit p { color: var(--fg-2); font-size: .94rem; }

/* Contact */
.contact { padding-bottom: clamp(72px, 12vh, 120px); }
.contact__title {
  margin-top: 16px; font-size: clamp(2.6rem, 7.4vw, 5.8rem) !important; line-height: 1 !important; max-width: 16ch;
}
.contact__title em { font-style: italic; color: var(--acc); }
.contact__row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 32px; margin-top: 48px; }
.email { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; }
.email__addr {
  font-size: clamp(1.3rem, 3vw, 2rem); background: linear-gradient(var(--acc), var(--acc)) 0 100% / 0 1px no-repeat;
  transition: background-size .45s var(--ease); padding-bottom: 2px;
}
.email:hover .email__addr { background-size: 100% 1px; }
.email__hint { color: var(--mut); }
.socials { display: flex; flex-wrap: wrap; gap: 20px; }
.socials a { color: var(--fg-2); transition: color .2s; }
.socials a:hover { color: var(--acc); }

/* Footer */
.footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  padding-top: 28px; padding-bottom: 40px; border-top: 1px solid var(--line); color: var(--mut);
}
.footer a:hover { color: var(--fg); }

/* ==========================================================================
   Command palette
   ========================================================================== */
.cmdk {
  position: fixed; inset: 0; z-index: 90; display: grid; place-items: start center; padding: 14vh 16px 16px;
  background: color-mix(in srgb, var(--bg) 60%, transparent); backdrop-filter: blur(6px);
  animation: fade .2s var(--ease);
}
.cmdk[hidden] { display: none; }
.cmdk__panel {
  width: min(560px, 100%); background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.45); overflow: hidden; animation: rise .25s var(--ease);
}
.cmdk__input { width: 100%; padding: 18px 20px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--fg); font: inherit; font-size: 1rem; outline: none; }
.cmdk__list { max-height: 320px; overflow-y: auto; padding: 8px; }
.cmdk__list li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 8px; cursor: pointer; color: var(--fg-2); }
.cmdk__list li[aria-selected="true"] { background: var(--bg); color: var(--fg); }
.cmdk__list li .mono { color: var(--mut); }
.cmdk__list .empty { cursor: default; color: var(--mut); }
.cmdk__foot { display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--line); color: var(--mut); font-size: .7rem; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px) scale(.98); } }

/* ==========================================================================
   Reveal
   ========================================================================== */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
  .nav__links { display: none; }
  .hero__grid, .about { grid-template-columns: 1fr; }
  .about { padding-left: 0; }
  .toolkit { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats > div:nth-child(3) { border-left: 0; }
  .stats > div:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 640px) {
  .section__head { grid-template-columns: 1fr; }
  .section__sub { grid-column: 1; }
  .project { grid-template-columns: 1fr; }
  .project__links { flex-direction: row; align-items: flex-start; padding-top: 0; }
  .project__case { grid-template-columns: 1fr; gap: 14px; }
  .timeline li { grid-template-columns: 1fr; gap: 6px; }
  .posts a { grid-template-columns: 1fr; gap: 4px; }
  .posts__k { display: none; }
  .toolkit { grid-template-columns: 1fr; }
  .term__body { font-size: .72rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ==========================================================================
   FX layer — 3D, motion & pointer interactions
   ========================================================================== */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

#gl {
  position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none;
  opacity: 0; transition: opacity 2s var(--ease);
}
#gl.is-ready { opacity: 1; }

/* Progress bar */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60; background: var(--acc); transform-origin: left; transform: scaleX(0); }

/* Nav hide on scroll down */
.nav { transition: transform .6s var(--ease); }
.nav.is-hidden { transform: translateY(-110%); }

/* Loader */
.loader {
  position: fixed; inset: 0; z-index: 200; display: none; flex-direction: column; justify-content: flex-end;
  padding: var(--gutter); background: var(--bg);
  clip-path: inset(0 0 0 0); transition: clip-path 1.1s cubic-bezier(.76, 0, .24, 1);
  animation: loader-failsafe 0s 6s forwards;
}
.js .loader { display: flex; }
.is-loaded .loader { clip-path: inset(0 0 100% 0); }
@keyframes loader-failsafe { to { visibility: hidden; } }
.loader__inner { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; color: var(--mut); }
.loader__count { font-family: var(--serif); font-size: clamp(4.5rem, 16vw, 12rem); line-height: .82; color: var(--fg); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.loader__bar { height: 1px; background: var(--line); margin-top: 22px; }
.loader__bar span { display: block; height: 100%; background: var(--acc); transform-origin: left; transform: scaleX(0); }

/* Split-word reveals */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0 .06em .1em 0; margin: 0 -.06em -.1em 0; }
.w > span {
  display: inline-block; transform: translate3d(0, 110%, 0) rotate(4deg); transform-origin: left top;
  transition: transform 1.2s cubic-bezier(.16, 1, .3, 1); transition-delay: calc(var(--i) * 55ms);
}
.split.is-in .w > span { transform: none; }
.hero__title { will-change: transform, opacity; }
.hero__title em:hover .w > span { animation: glitch .45s steps(2) 1; }
@keyframes glitch {
  0%   { text-shadow: 3px 0 var(--fg-2), -3px 0 var(--acc); transform: translateX(2px); }
  33%  { text-shadow: -3px 1px var(--fg-2), 3px -1px var(--acc); transform: translateX(-2px) skewX(-6deg); }
  66%  { text-shadow: 2px -1px var(--fg-2), -2px 1px var(--acc); transform: translateX(1px); }
  100% { text-shadow: none; transform: none; }
}

/* Terminal: glass + typed lines */
.term { background: color-mix(in srgb, var(--bg-2) 62%, transparent); backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%); }
.tl { display: inline-block; clip-path: inset(0 100% 0 0); }
.tl.on { clip-path: inset(0 0 0 0); transition: clip-path .5s steps(22, end); }

/* Custom cursor */
.cursor, .cursor-ring {
  position: fixed; top: 0; left: 0; z-index: 150; pointer-events: none; border-radius: 50%;
  opacity: 0; transition: opacity .3s;
}
.has-cursor .cursor, .has-cursor .cursor-ring { opacity: 1; }
.cursor { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: var(--acc); }
.cursor-ring {
  width: 40px; height: 40px; margin: -20px 0 0 -20px; display: grid; place-items: center;
  border: 1px solid color-mix(in srgb, var(--fg) 35%, transparent);
  transition: opacity .3s, width .45s var(--ease), height .45s var(--ease), margin .45s var(--ease), background .3s, border-color .3s;
}
.cursor-ring.is-hover { width: 64px; height: 64px; margin: -32px 0 0 -32px; background: var(--acc-soft); border-color: var(--acc); }
.cursor-ring.is-label { width: 88px; height: 88px; margin: -44px 0 0 -44px; background: var(--acc); border-color: var(--acc); }
.cursor-ring__label { font: 500 .68rem var(--mono); color: #fff; text-transform: uppercase; letter-spacing: .1em; opacity: 0; transition: opacity .2s; }
.cursor-ring.is-label .cursor-ring__label { opacity: 1; }
@media (hover: hover) and (pointer: fine) {
  .has-cursor, .has-cursor a, .has-cursor button { cursor: none; }
  .has-cursor input { cursor: text; }
}
@media not ((hover: hover) and (pointer: fine)) { .cursor, .cursor-ring { display: none; } }

/* Project hover preview */
.preview {
  position: fixed; top: 0; left: 0; z-index: 40; width: 300px; height: 200px; pointer-events: none;
  border-radius: 14px; overflow: hidden; opacity: 0; border: 1px solid var(--line);
  box-shadow: 0 30px 80px -24px rgba(0, 0, 0, .55);
}
.preview__art {
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,.06) 0 1px, transparent 1px 22px),
    repeating-linear-gradient(90deg, rgba(255,255,255,.06) 0 1px, transparent 1px 22px),
    radial-gradient(120% 90% at 20% 15%, var(--pa), transparent 55%),
    radial-gradient(120% 120% at 90% 100%, var(--pb), #0b0b0c 70%);
  animation: drift 8s ease-in-out infinite alternate;
  background-size: auto, auto, 140% 140%, 140% 140%;
}
@keyframes drift { to { background-position: 0 0, 0 0, 30% 20%, 70% 80%; } }
.preview__code { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 14px 16px; color: #f3f1ec; font-size: .7rem; line-height: 1.7; background: linear-gradient(transparent, rgba(0,0,0,.6)); white-space: pre; }

/* Project micro-motion */
.project__title { transition: transform .6s var(--ease); }
.project:hover .project__title { transform: translateX(10px); }
.project__idx { transition: color .3s; }
.project:hover .project__idx { color: var(--acc); }

/* Magnetic */
.magnetic { transition: transform .7s cubic-bezier(.2, 1.7, .4, 1), background .25s, border-color .25s, color .25s !important; will-change: transform; }

/* 3D tilt + glare */
[data-tilt] { position: relative; transform-style: preserve-3d; transition: transform .7s var(--ease), opacity .9s var(--ease) !important; will-change: transform; }
[data-tilt].is-tilting { transition: transform .12s linear, opacity .9s var(--ease) !important; }
[data-tilt]::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: radial-gradient(360px circle at var(--gx, 50%) var(--gy, 50%), color-mix(in srgb, var(--fg) 12%, transparent), transparent 50%);
}
[data-tilt]:hover::after { opacity: 1; }

/* Toolkit as floating cards */
.toolkit { gap: 12px; background: none; border: 0; border-radius: 0; overflow: visible; }
.toolkit > div { border: 1px solid var(--line); border-radius: var(--radius); background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.stats > div { background: color-mix(in srgb, var(--bg) 55%, transparent); }

/* Timeline progress line */
.timeline { position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 1px; background: var(--acc);
  transform-origin: top; transform: scaleY(var(--tl, 0));
}
.timeline li { padding-left: 24px; }

/* Velocity marquee */
.mega { position: relative; overflow: hidden; margin-inline: calc(50% - 50vw); padding-top: clamp(96px, 16vh, 180px); }
.mega__track {
  display: flex; width: max-content; white-space: nowrap; will-change: transform;
  font-family: var(--serif); font-size: clamp(4.5rem, 15vw, 13rem); line-height: 1.05; letter-spacing: -.03em;
}
.mega__track span { padding-right: .4em; }
.mega__track span::after { content: "✦"; font-size: .35em; vertical-align: middle; margin-left: .55em; color: var(--acc); }
.mega__track em { color: var(--acc); }
.mega__track .o { color: transparent; -webkit-text-stroke: 1px var(--fg-2); }

/* Sections sit above the canvas with readable text */
.section, .hero { position: relative; }

@media (prefers-reduced-motion: reduce) {
  .w > span { transform: none !important; }
  .tl { clip-path: none; }
  .loader { display: none !important; }
}

/* ==========================================================================
   v3 — Hero line terrain, 3D project carousel, skills ring
   ========================================================================== */
#gl, .preview { display: none !important; }

/* Hero */
.hero { position: relative; isolation: isolate; min-height: calc(100svh - 68px); display: flex; flex-direction: column; justify-content: center; padding: clamp(40px, 8vh, 96px) 0 clamp(48px, 8vh, 88px); }
.hero > *:not(.hero__gl) { position: relative; z-index: 1; }
.hero__gl {
  position: absolute; z-index: 0; top: -68px; bottom: 0; left: calc(50% - 50vw); width: 100vw; height: calc(100% + 68px);
  pointer-events: none; opacity: 0; transition: opacity 2.2s var(--ease);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 28%, #000 82%, transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0%, #000 28%, #000 82%, transparent 100%);
}
.hero__gl.is-ready { opacity: 1; }

/* ---------- Work: pinned horizontal carousel ---------- */
.work { position: relative; margin-top: clamp(40px, 8vh, 80px); }
.work__sticky {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center;
  margin-inline: calc(50% - 50vw);
  padding-inline: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter)));
}
.work__head { margin-bottom: clamp(24px, 4vh, 40px); }
.work__meter { grid-column: 2; display: flex; align-items: center; gap: 12px; color: var(--mut); margin-top: 6px; }
.work__count { color: var(--fg); }
.work__bar { position: relative; width: 140px; height: 1px; background: var(--line); }
.work__bar > span { position: absolute; inset: 0; background: var(--acc); transform-origin: left; transform: scaleX(0); }
.work__viewport { perspective: 1800px; perspective-origin: 50% 40%; }
.work__track { display: flex; gap: clamp(18px, 2vw, 28px); width: max-content; transform-style: preserve-3d; will-change: transform; }

.card {
  flex: none; width: clamp(300px, 34vw, 500px); border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
  background: color-mix(in srgb, var(--bg-2) 88%, transparent); transform-style: preserve-3d; will-change: transform;
  transition: border-color .4s var(--ease), box-shadow .4s var(--ease);
}
.card:hover { border-color: color-mix(in srgb, var(--acc) 55%, var(--line)); box-shadow: 0 40px 90px -40px color-mix(in srgb, var(--acc) 40%, transparent); }
.card__visual {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-bottom: 1px solid var(--line);
  background:
    radial-gradient(120% 100% at 25% 0%, color-mix(in srgb, var(--acc) 16%, transparent), transparent 60%),
    var(--bg);
}
.card__visual::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 28px 28px; opacity: .55;
  -webkit-mask-image: radial-gradient(circle at 50% 40%, #000, transparent 75%); mask-image: radial-gradient(circle at 50% 40%, #000, transparent 75%);
}
.card__visual > * { transform: translateX(var(--px, 0)) scale(1.06); transition: scale .8s var(--ease); }
.card:hover .card__visual > * { scale: 1.04; }
.card__body { padding: 20px 24px 22px; }
.card__top { display: flex; justify-content: space-between; color: var(--mut); }
.card__title { font-family: var(--serif); font-size: clamp(1.9rem, 2.8vw, 2.5rem); line-height: 1.05; margin-top: 8px; transition: color .3s; }
.card:hover .card__title { color: var(--acc); }
.card__desc { margin-top: 8px; color: var(--fg-2); font-size: .94rem; line-height: 1.55; }
.card__metric { margin-top: 14px; color: var(--mut); }
.card__metric b { color: var(--fg); font-weight: 500; }
.card__metric i { font-style: normal; opacity: .4; margin: 0 4px; }
.card__foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; }
.card__foot .stack { margin-top: 0; }
@media (max-height: 820px) and (min-width: 900px) { .card__visual { aspect-ratio: 2 / 1; } .card__desc { font-size: .9rem; } }

.v-label { font-family: var(--mono); font-size: 11px; fill: var(--mut); color: var(--mut); }

/* Visual 1: taint graph */
.v-graph svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.v-graph__edges path { fill: none; stroke: color-mix(in srgb, var(--fg) 22%, transparent); stroke-width: 1; }
.v-graph__taint { fill: none; stroke: var(--acc); stroke-width: 2; stroke-dasharray: 10 12; animation: dash 1.6s linear infinite; }
.v-graph__nodes circle { fill: var(--bg); stroke: var(--fg-2); stroke-width: 1.2; }
.v-graph__nodes .hot { fill: var(--acc); stroke: var(--acc); transform-box: fill-box; transform-origin: center; animation: beat 1.8s var(--ease) infinite; }
@keyframes dash { to { stroke-dashoffset: -44; } }
@keyframes beat { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.35); } }

/* Visual 2: stream */
.v-stream__bars { position: absolute; left: 6%; right: 6%; bottom: 0; height: 72%; display: flex; align-items: flex-end; gap: 5px; }
.v-stream__bars i { flex: 1; height: calc(var(--h, .5) * 100%); background: linear-gradient(to top, color-mix(in srgb, var(--fg) 6%, transparent), color-mix(in srgb, var(--fg) 22%, transparent)); border-radius: 2px 2px 0 0; transform-origin: bottom; animation: bar 2.4s ease-in-out infinite alternate; animation-delay: var(--d, 0s); }
@keyframes bar { 0% { transform: scaleY(.35); } 100% { transform: scaleY(1); } }
.v-stream svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.v-stream__line { fill: none; stroke: var(--acc); stroke-width: 2; stroke-dasharray: 600; stroke-dashoffset: 600; animation: draw 4s var(--ease) infinite; vector-effect: non-scaling-stroke; }
@keyframes draw { 60%, 100% { stroke-dashoffset: 0; } }
.v-stream__tag { position: absolute; top: 16px; left: 18px; }

/* Visual 3: identity flow */
.v-flow { display: flex; flex-direction: column; justify-content: center; gap: 22px; padding: 0 8%; }
.v-flow__row { display: flex; align-items: center; }
.v-flow__box { padding: 8px 12px; border: 1px solid color-mix(in srgb, var(--fg) 22%, transparent); border-radius: 8px; font: 500 .74rem var(--mono); background: var(--bg-2); }
.v-flow__box.hot { border-color: var(--acc); color: var(--acc); box-shadow: 0 0 0 4px var(--acc-soft); }
.v-flow__wire { position: relative; flex: 1; height: 1px; background: color-mix(in srgb, var(--fg) 20%, transparent); }
.v-flow__wire i { position: absolute; top: -2px; left: 0; width: 5px; height: 5px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 10px var(--acc); animation: packet 1.8s linear infinite; }
.v-flow__wire + .v-flow__box + .v-flow__wire i { animation-delay: .9s; }
@keyframes packet { from { left: 0; } to { left: calc(100% - 5px); } }
.v-flow__log { margin: 0; color: var(--mut); font-size: .7rem; line-height: 1.8; }

/* Visual 4: honeycomb (3D tilted hex grid) */
.v-hex { display: grid; place-items: center; }
.v-hex__grid { display: grid; grid-template-columns: repeat(8, 34px); gap: 6px 4px; transform: translateX(var(--px, 0)) perspective(600px) rotateX(52deg) rotateZ(-8deg) scale(1.25) !important; }
.v-hex__grid i { width: 34px; height: 38px; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: color-mix(in srgb, var(--fg) 10%, transparent); animation: hex 5s ease-in-out infinite; animation-delay: var(--d, 0s); }
.v-hex__grid i:nth-child(n+9):nth-child(-n+16), .v-hex__grid i:nth-child(n+25) { transform: translateX(19px); }
@keyframes hex { 0%, 78%, 100% { background: color-mix(in srgb, var(--fg) 10%, transparent); } 84% { background: var(--acc); } }
.v-hex__tag { position: absolute; top: 16px; left: 18px; color: var(--acc); }

/* Visual 5: scrolling terminal */
.v-term { -webkit-mask-image: linear-gradient(transparent, #000 25%, #000 75%, transparent); mask-image: linear-gradient(transparent, #000 25%, #000 75%, transparent); }
.v-term__scroll { position: absolute; left: 8%; top: 0; margin: 0; color: var(--fg-2); font-size: .78rem; line-height: 2; animation: tscroll 14s linear infinite; }
@keyframes tscroll { from { translate: 0 0; } to { translate: 0 -50%; } }

/* ---------- Skills: pinned 3D ring ---------- */
.skills { position: relative; margin-top: clamp(40px, 8vh, 80px); }
.skills__sticky { position: sticky; top: 0; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: 40px 0; }
.skills__stage { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(24px, 5vw, 72px); align-items: center; }
.ring { position: relative; height: clamp(360px, 52vh, 460px); perspective: 1300px; display: grid; place-items: center; }
.ring::after { content: ""; position: absolute; left: 10%; right: 10%; bottom: 4%; height: 40px; border-radius: 50%; background: radial-gradient(closest-side, var(--acc-soft), transparent); filter: blur(6px); }
.ring__inner { position: relative; width: 180px; height: 250px; transform-style: preserve-3d; transform: rotateX(-8deg); }
.ring__card {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; padding: 18px;
  border: 1px solid var(--line); border-radius: 16px; background: color-mix(in srgb, var(--bg-2) 92%, transparent);
  transform: rotateY(calc(var(--i) * 60deg)) translateZ(250px);
  transition: border-color .5s var(--ease), background .5s var(--ease), box-shadow .5s var(--ease);
}
.ring__card.is-active { border-color: var(--acc); background: color-mix(in srgb, var(--acc) 9%, var(--bg-2)); box-shadow: 0 30px 70px -30px var(--acc); }
.ring__n { font: 500 .78rem var(--mono); color: var(--acc); }
.ring__card svg { width: 46px; height: 46px; fill: none; stroke: var(--fg); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.ring__card.is-active svg { stroke: var(--acc); }
.ring__t { font-family: var(--serif); font-size: 1.6rem; line-height: 1.02; }

.skills__detail { display: grid; }
.skill-panel { grid-area: 1 / 1; opacity: 0; visibility: hidden; transform: translateY(24px); transition: opacity .5s var(--ease), transform .7s var(--ease), visibility 0s .5s; }
.skill-panel.is-active { opacity: 1; visibility: visible; transform: none; transition: opacity .6s var(--ease) .1s, transform .8s var(--ease) .1s, visibility 0s; }
.skill-panel__k { color: var(--acc); }
.skill-panel h3 { font-family: var(--serif); font-size: clamp(2rem, 3.4vw, 2.8rem); line-height: 1.05; margin-top: 10px; }
.skill-panel > p { color: var(--fg-2); margin-top: 12px; max-width: 44ch; }
.meters { margin-top: 26px; display: grid; gap: 16px; }
.meters li { display: grid; gap: 8px; font-size: .94rem; }
.meters b { position: relative; display: block; height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; }
.meters b::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, color-mix(in srgb, var(--acc) 50%, transparent), var(--acc)); transform-origin: left; transform: scaleX(0); transition: transform 1.3s var(--ease); }
.is-active .meters b::after { transform: scaleX(var(--v)); }
.meters li:nth-child(2) b::after { transition-delay: .1s; }
.meters li:nth-child(3) b::after { transition-delay: .2s; }
.meters li:nth-child(4) b::after { transition-delay: .3s; }
.skill-panel__tools { margin-top: 24px !important; color: var(--mut) !important; }

/* ---------- Mobile fallbacks ---------- */
@media (max-width: 899px) {
  .work__sticky { position: static; height: auto; overflow: visible; padding-block: clamp(72px, 12vh, 120px) 0; }
  .work__meter { display: none; }
  .work__viewport { overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: calc(var(--gutter) * -1); padding: 8px var(--gutter) 20px; scrollbar-width: none; }
  .work__viewport::-webkit-scrollbar { display: none; }
  .card { width: min(82vw, 420px); scroll-snap-align: center; }
  .skills__sticky { position: static; min-height: 0; padding-top: clamp(72px, 12vh, 120px); }
  .skills__stage { grid-template-columns: 1fr; }
  .ring { display: none; }
  .skills__detail { gap: 48px; }
  .skill-panel { grid-area: auto; opacity: 1; visibility: visible; transform: none; }
}
@media (max-width: 640px) { .work__head .section__sub { display: block; } }
.work h2, .skills h2 { font-family: var(--serif); font-size: clamp(2rem, 4.6vw, 3.4rem); line-height: 1.05; letter-spacing: -.015em; }
.work, .skills { scroll-margin-top: 0; }
.link-arrow { white-space: nowrap; }

/* ==========================================================================
   v4 — About bento grid
   ========================================================================== */
.bento {
  display: grid; gap: 16px; perspective: 1400px;
  grid-template-columns: 1fr 1.1fr 1fr 1fr;
  grid-template-areas:
    "head    head    head  contact"
    "about   project most  lab"
    "about   project stack lab"
    "learn   note    stack lab";
}
.bento__head { grid-area: head; align-self: end; padding: 0 0 12px clamp(0px, 6%, 64px); }
.bento__kicker { color: var(--fg-2); margin-top: 18px; }
.bento__head h2 { margin-top: 8px; font-size: clamp(2.6rem, 5.4vw, 4.6rem); line-height: .98; }
.bento__head h2 em { font-style: italic; color: var(--acc); }

.js .bento .reveal { transform: translateY(46px) rotateX(14deg) scale(.96); transform-origin: 50% 100%; }
.js .bento .reveal.is-in { transform: none; }

.b-card {
  position: relative; overflow: hidden; padding: 20px; border-radius: 20px;
  border: 1px solid var(--line); background: color-mix(in srgb, var(--bg-2) 92%, transparent);
  transition: border-color .4s var(--ease), box-shadow .4s var(--ease);
}
.b-card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s; z-index: 0;
  background: radial-gradient(300px circle at var(--mx, 50%) var(--my, 50%), var(--acc-soft), transparent 70%);
}
.b-card:hover { border-color: color-mix(in srgb, var(--acc) 45%, var(--line)); box-shadow: 0 30px 70px -40px color-mix(in srgb, var(--acc) 50%, transparent); }
.b-card:hover::before { opacity: 1; }
.b-card > * { position: relative; z-index: 1; }
.b-label { display: block; color: var(--mut); text-transform: uppercase; letter-spacing: .12em; font-size: .68rem; }
.b-card mark, .b-pill mark { background: none; color: var(--acc); }

.b-arrow {
  position: absolute !important; right: 16px; bottom: 16px; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; background: var(--acc); color: var(--bg); font-weight: 600;
  transition: transform .5s var(--ease);
}
.b-card:hover .b-arrow { transform: rotate(45deg) scale(1.08); }

/* About */
.b-about { grid-area: about; min-height: 340px; display: flex; flex-direction: column; gap: 14px; }
.b-about p { font-size: 1.02rem; line-height: 1.55; color: var(--fg); }
.b-about__certs { margin-top: auto !important; color: var(--mut) !important; font-size: .74rem !important; padding-right: 48px; }

/* Featured project */
.b-project { grid-area: project; min-height: 340px; padding: 0; display: block; }
.b-project__visual { position: absolute !important; inset: 0; background: radial-gradient(120% 90% at 30% 10%, color-mix(in srgb, var(--acc) 20%, transparent), transparent 60%), var(--bg); }
.b-project__visual::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 24px 24px; opacity: .5; }
.b-project__visual svg { position: absolute; inset: 0 0 30% 0; width: 100%; height: 70%; transition: transform .9s var(--ease); }
.b-project:hover .b-project__visual svg { transform: scale(1.08) rotate(-2deg); }
.b-project__edges path { fill: none; stroke: color-mix(in srgb, var(--fg) 25%, transparent); }
.b-project__taint { fill: none; stroke: var(--acc); stroke-width: 2; stroke-dasharray: 9 11; animation: dash 1.6s linear infinite; }
.b-project__nodes circle { fill: var(--bg); stroke: var(--fg-2); stroke-width: 1.2; }
.b-project__nodes .hot { fill: var(--acc); stroke: var(--acc); transform-box: fill-box; transform-origin: center; animation: beat 1.8s var(--ease) infinite; }
.b-project__body { position: absolute !important; left: 0; right: 0; bottom: 0; padding: 60px 20px 20px; background: linear-gradient(transparent, color-mix(in srgb, var(--bg-2) 96%, transparent) 45%); }
.b-project__body h3 { font-family: var(--serif); font-size: 2rem; line-height: 1; margin-top: 6px; }
.b-project__body p { color: var(--mut); margin-top: 6px; }

/* Annotations */
.b-note { font-family: "Caveat", cursive; font-size: 1.25rem; color: var(--acc); display: inline-flex; align-items: center; gap: 4px; pointer-events: none; white-space: nowrap; }
.b-note svg { width: 56px; height: 36px; fill: none; stroke: var(--acc); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.b-note svg path { stroke-dasharray: 120; stroke-dashoffset: 120; transition: stroke-dashoffset 1.2s var(--ease) .5s; }
.is-in .b-note svg path, .b-note.is-in svg path { stroke-dashoffset: 0; }

/* Most used */
.b-most { grid-area: most; position: relative; display: flex; flex-direction: column; justify-content: flex-end; }
.b-note--most { position: absolute; right: 4px; top: -46px; flex-direction: row-reverse; }
.b-note--most svg { transform: scaleX(-1); }
.b-pill { display: flex; align-items: center; justify-content: center; gap: 18px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 16px; background: color-mix(in srgb, var(--bg-2) 92%, transparent); }

/* Icons */
.b-icons svg { width: 22px; height: 22px; fill: var(--fg-2); transition: fill .3s, transform .4s var(--ease); }
.b-icons li:hover svg { fill: var(--acc); transform: translateY(-2px) scale(1.12); }
.b-icons--grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 16px; }
.b-icons--grid li { aspect-ratio: 1; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); transition: border-color .3s, transform .4s var(--ease); }
.b-icons--grid li:hover { border-color: var(--acc); transform: translateY(-3px); }
.js .b-icons--grid li { opacity: 0; transform: scale(.6); }
.b-stack.is-in .b-icons--grid li { opacity: 1; transform: none; transition: opacity .5s var(--ease), transform .6s cubic-bezier(.3, 1.6, .5, 1), border-color .3s; transition-delay: calc(var(--i, 0) * 45ms + .25s); }
.b-stack.is-in .b-icons--grid li:hover { transform: translateY(-3px); transition-delay: 0s; }

/* Stack */
.b-stack { grid-area: stack; }

/* Contact */
.b-contact { grid-area: contact; display: flex; flex-direction: column; gap: 14px; }
.b-icons--contact { display: flex; gap: 10px; }
.b-icons--contact a { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg); transition: border-color .3s; }
.b-icons--contact a:hover { border-color: var(--acc); }
.b-icons--contact svg { width: 22px; height: 22px; }
.b-direct { display: grid; place-items: center; height: 44px; border-radius: 12px; background: var(--acc); color: var(--bg); font-weight: 600; letter-spacing: .01em; transition: filter .3s, transform .4s var(--ease); }
.b-direct:hover { filter: brightness(1.08); }

/* Home lab */
.b-lab { grid-area: lab; min-height: 420px; display: flex; flex-direction: column; justify-content: space-between;
  background: radial-gradient(120% 60% at 70% 0%, color-mix(in srgb, var(--acc) 22%, transparent), transparent 70%), color-mix(in srgb, var(--bg-2) 92%, transparent); }
.b-lab__ridges { position: absolute !important; left: 0; right: 0; bottom: 0; width: 100%; height: 78%; z-index: 0 !important; animation: ridge-float 9s ease-in-out infinite alternate; }
.b-lab__ridges path { fill: none; stroke: color-mix(in srgb, var(--fg) 30%, transparent); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-dasharray: 400; stroke-dashoffset: 400; transition: stroke-dashoffset 1.8s var(--ease); }
.b-lab__ridges path:first-child { stroke: var(--acc); stroke-width: 1.5; }
.b-lab.is-in .b-lab__ridges path { stroke-dashoffset: 0; }
.b-lab__ridges path:nth-child(2) { transition-delay: .1s; } .b-lab__ridges path:nth-child(3) { transition-delay: .2s; }
.b-lab__ridges path:nth-child(4) { transition-delay: .3s; } .b-lab__ridges path:nth-child(5) { transition-delay: .4s; } .b-lab__ridges path:nth-child(6) { transition-delay: .5s; }
@keyframes ridge-float { to { transform: translateY(-10px) scaleY(1.04); } }
.b-lab__meta { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; color: var(--fg-2); }
.b-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #4ade80; margin-right: 8px; box-shadow: 0 0 0 0 rgba(74, 222, 128, .6); animation: live 2s infinite; }
@keyframes live { 70% { box-shadow: 0 0 0 8px rgba(74, 222, 128, 0); } 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); } }

/* Learning pill + note */
.b-learn { grid-area: learn; }
.b-learn .b-pill { justify-content: flex-start; font-size: .76rem; color: var(--fg-2); gap: 0; flex-wrap: wrap; }
.b-learn mark { margin-left: .5ch; }
.b-learn .caret { margin-left: 6px; width: .5em; height: 1em; }
.b-note--learn { grid-area: note; align-self: center; }
.b-note--learn svg { transform: scaleX(-1) rotate(180deg); width: 60px; }

/* Responsive */
@media (max-width: 1000px) {
  .bento { grid-template-columns: 1fr 1fr; grid-template-areas: "head head" "about project" "most contact" "stack lab" "learn learn"; }
  .b-note--learn { display: none; }
  .b-note--most { top: -40px; right: auto; left: 0; flex-direction: row; }
  .b-note--most svg { transform: none; }
  .b-most { margin-top: 36px; }
  .b-lab { min-height: 320px; }
}
@media (max-width: 600px) {
  .bento { grid-template-columns: 1fr; grid-template-areas: "head" "about" "project" "most" "stack" "contact" "lab" "learn"; }
  .bento__head { padding-left: 0; }
  .b-about, .b-project { min-height: 300px; }
  .b-lab { min-height: 260px; }
}
.b-lab__meta { margin: 0 -20px -20px; padding: 40px 20px 20px; background: linear-gradient(transparent, color-mix(in srgb, var(--bg-2) 94%, transparent) 55%); }
@media (max-width: 1000px) {
  .bento { grid-template-areas: "head head" "about project" "most most" "stack contact" "stack lab" "learn learn"; }
  .b-most { margin-top: 40px; }
}
@media (max-width: 600px) {
  .bento { grid-template-areas: "head" "about" "project" "most" "stack" "contact" "lab" "learn"; }
}
@media (min-width: 601px) and (max-width: 1000px) {
  .bento { grid-template-areas: "head head" "about project" "most most" "contact lab" "stack stack" "learn learn"; }
  .b-icons--grid { grid-template-columns: repeat(6, 1fr); }
  .b-lab { min-height: 220px; }
}

/* ==========================================================================
   v5 — Glass capabilities ring, skill tiles, VAPT research, field notes,
   and a calmer site-wide palette (no orange glow)
   ========================================================================== */
:root { --glass: rgba(20, 20, 22, .06); --glass-b: rgba(20, 20, 22, .10); --glass-hi: rgba(255, 255, 255, .7); --aura-a: #7c6cff; --aura-b: #2fd0c0; --aura-c: #ff9b6a; }
:root[data-theme="dark"] { --glass: rgba(255, 255, 255, .055); --glass-b: rgba(255, 255, 255, .12); --glass-hi: rgba(255, 255, 255, .22); }

/* --- Calm the glow everywhere --- */
.card:hover { border-color: color-mix(in srgb, var(--fg) 28%, transparent); box-shadow: 0 40px 80px -48px rgba(0, 0, 0, .65); }
.card__visual { background: radial-gradient(120% 100% at 25% 0%, color-mix(in srgb, var(--fg) 7%, transparent), transparent 60%), var(--bg); }
.b-card::before { background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--fg) 7%, transparent), transparent 70%); }
.b-card:hover { border-color: color-mix(in srgb, var(--fg) 26%, transparent); box-shadow: 0 30px 70px -48px rgba(0, 0, 0, .6); }
.b-project__visual { background: radial-gradient(120% 90% at 30% 10%, color-mix(in srgb, var(--fg) 8%, transparent), transparent 60%), var(--bg); }
.b-lab { background:
  radial-gradient(70% 45% at 85% 0%, color-mix(in srgb, var(--aura-a) 18%, transparent), transparent 70%),
  radial-gradient(60% 40% at 10% 10%, color-mix(in srgb, var(--aura-b) 12%, transparent), transparent 70%),
  color-mix(in srgb, var(--bg-2) 92%, transparent); }
.cursor-ring.is-hover { background: color-mix(in srgb, var(--fg) 6%, transparent); border-color: color-mix(in srgb, var(--fg) 55%, transparent); }

/* --- Capabilities: glass ring --- */
.ring::after { display: none; }
.ring { overflow: visible; }
.ring__aura { position: absolute; inset: 8% 6%; filter: blur(44px); opacity: .55; animation: aura-spin 26s linear infinite; pointer-events: none; }
:root[data-theme="light"] .ring__aura { opacity: .4; }
.ring__aura i { position: absolute; width: 46%; height: 46%; border-radius: 50%; }
.ring__aura i:nth-child(1) { left: 6%; top: 18%; background: var(--aura-a); }
.ring__aura i:nth-child(2) { right: 6%; top: 10%; background: var(--aura-b); }
.ring__aura i:nth-child(3) { left: 30%; bottom: 4%; background: var(--aura-c); opacity: .55; }
@keyframes aura-spin { to { transform: rotate(360deg); } }
.ring__floor { position: absolute; left: 50%; bottom: 2%; width: 560px; height: 560px; margin-left: -280px; border-radius: 50%; transform: rotateX(78deg); pointer-events: none;
  background: repeating-radial-gradient(circle, transparent 0 38px, color-mix(in srgb, var(--fg) 9%, transparent) 38px 39px);
  -webkit-mask-image: radial-gradient(circle, #000 30%, transparent 70%); mask-image: radial-gradient(circle, #000 30%, transparent 70%); }

.ring__card {
  overflow: hidden;
  background: linear-gradient(150deg, var(--glass-hi), transparent 42%), var(--glass);
  border: 1px solid var(--glass-b);
  -webkit-backdrop-filter: blur(16px) saturate(170%); backdrop-filter: blur(16px) saturate(170%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), inset 0 -1px 0 rgba(255, 255, 255, .04), 0 24px 50px -30px rgba(0, 0, 0, .55);
}
.ring__card.is-active {
  border-color: color-mix(in srgb, var(--fg) 35%, transparent);
  background: linear-gradient(150deg, var(--glass-hi), transparent 48%), color-mix(in srgb, var(--glass) 160%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 30px 60px -30px rgba(0, 0, 0, .6);
}
.ring__n { color: var(--fg-2); }
.ring__card.is-active .ring__n { color: var(--fg); }
.ring__card svg, .ring__card.is-active svg { stroke: var(--fg); }
.ring__sheen { position: absolute; inset: -40%; pointer-events: none; opacity: 0;
  background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, .28) 50%, transparent 60%); transform: translateX(-60%); }
.ring__card.is-active .ring__sheen { opacity: 1; animation: sheen 3.2s var(--ease) infinite; }
@keyframes sheen { 0% { transform: translateX(-60%); } 60%, 100% { transform: translateX(60%); } }
.ring__card::after { content: ""; position: absolute; left: 18px; right: 18px; bottom: 14px; height: 2px; border-radius: 2px; opacity: 0; transition: opacity .5s;
  background: linear-gradient(90deg, var(--aura-a), var(--aura-b), var(--aura-c)); }
.ring__card.is-active::after { opacity: .9; }

/* --- Skill tiles --- */
.meters { display: none; }
.chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 26px; }
.chip {
  display: flex; align-items: center; gap: 12px; min-width: 0; padding: 12px 14px; border-radius: 14px;
  border: 1px solid var(--glass-b); background: linear-gradient(150deg, var(--glass-hi), transparent 60%), var(--glass);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
  font-size: .92rem; color: var(--fg);
  opacity: 0; transform: translateY(14px) scale(.96);
  transition: opacity .5s var(--ease), transform .6s var(--ease), border-color .3s;
}
.chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip svg { flex: none; width: 20px; height: 20px; fill: var(--fg-2); transition: fill .3s, transform .4s var(--ease); }
.chip__mono { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--glass-b); font: 600 .62rem var(--mono); color: var(--fg-2); text-transform: uppercase; }
.skill-panel.is-active .chip { opacity: 1; transform: none; transition-delay: calc(var(--i) * 45ms + .15s); }
.chip:hover { border-color: color-mix(in srgb, var(--fg) 35%, transparent); }
.chip:hover svg { fill: var(--fg); transform: scale(1.12) rotate(-4deg); }
.skill-panel > p { max-width: 48ch; }

/* --- Research & VAPT --- */
.vapt { margin-bottom: 56px; }
.vapt__label { color: var(--mut); text-transform: uppercase; letter-spacing: .12em; font-size: .68rem; margin-bottom: 18px; }
.vapt__steps { position: relative; display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.vapt__steps::before { content: ""; position: absolute; left: 0; right: 0; top: 15px; height: 1px; background: var(--line); }
.vapt__steps::after { content: ""; position: absolute; left: 0; right: 0; top: 15px; height: 1px; transform-origin: left; transform: scaleX(0); transition: transform 2s var(--ease) .2s;
  background: linear-gradient(90deg, var(--aura-a), var(--aura-b), var(--acc)); }
.vapt.is-in .vapt__steps::after { transform: scaleX(1); }
.vapt__steps li { position: relative; padding-top: 44px; }
.vapt__n { position: absolute; top: 0; left: 0; display: grid; place-items: center; width: 31px; height: 31px; border-radius: 50%; background: var(--bg); border: 1px solid var(--glass-b); color: var(--fg); font-size: .7rem; z-index: 1; }
.vapt__steps h4 { font-size: 1rem; font-weight: 600; }
.vapt__steps p { margin-top: 6px; color: var(--fg-2); font-size: .88rem; line-height: 1.5; }
.vapt__std { display: inline-block; margin-top: 10px; padding: 3px 8px; border-radius: 6px; border: 1px solid var(--line); color: var(--mut); font-size: .66rem; }

.rgrid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(24px, 4vw, 56px); }
.scope { display: grid; gap: 10px; }
.scope li { padding: 16px 18px; border-radius: 14px; border: 1px solid var(--line); background: color-mix(in srgb, var(--bg-2) 60%, transparent); transition: border-color .3s, transform .4s var(--ease); }
.scope li:hover { border-color: color-mix(in srgb, var(--fg) 26%, transparent); transform: translateX(4px); }
.scope h4 { font-size: 1rem; font-weight: 600; }
.scope p { margin-top: 4px; color: var(--mut); font-size: .72rem; line-height: 1.6; }

.cases { display: grid; gap: 12px; }
.case a { position: relative; display: block; padding: 20px 22px; border-radius: 16px; border: 1px solid var(--line); overflow: hidden;
  background: linear-gradient(150deg, var(--glass-hi), transparent 35%), color-mix(in srgb, var(--bg-2) 80%, transparent);
  transition: border-color .3s, transform .5s var(--ease); }
.case a::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: linear-gradient(var(--aura-a), var(--aura-b)); transform: scaleY(0); transform-origin: top; transition: transform .5s var(--ease); }
.case a:hover { border-color: color-mix(in srgb, var(--fg) 28%, transparent); transform: translateY(-3px); }
.case a:hover::before { transform: scaleY(1); }
.case__bar { display: flex; flex-wrap: wrap; gap: 8px 16px; color: var(--mut); align-items: center; }
.case h3 { font-family: var(--serif); font-size: clamp(1.4rem, 2.2vw, 1.75rem); line-height: 1.1; margin-top: 10px; }
.case p { margin-top: 6px; color: var(--fg-2); font-size: .92rem; }
.case__go { display: inline-block; margin-top: 12px; color: var(--fg-2); transition: color .2s, transform .3s var(--ease); }
.case a:hover .case__go { color: var(--fg); transform: translateX(4px); }

/* --- Experience tags --- */
.tl-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tl-tags li { padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--mut); font-size: .68rem; }

/* --- Field notes list --- */
.posts a { grid-template-columns: 120px 1fr auto; }
.posts__t { display: flex; flex-direction: column; gap: 6px; }
.posts__t small { font-size: .9rem; color: var(--mut); line-height: 1.5; max-height: 0; overflow: hidden; opacity: 0; transition: max-height .5s var(--ease), opacity .4s; }
.posts a:hover .posts__t small, .posts a:focus-visible .posts__t small { max-height: 80px; opacity: 1; }
.posts a:hover .posts__t { color: var(--fg); }
.posts a:hover .posts__t > :first-child { color: var(--fg); }
.section__sub .link-arrow { margin-left: 8px; color: var(--fg); }

@media (max-width: 1000px) {
  .vapt__steps { grid-template-columns: repeat(3, 1fr); row-gap: 28px; }
  .vapt__steps::before, .vapt__steps::after { display: none; }
  .rgrid { grid-template-columns: 1fr; }
}
@media (max-width: 899px) {
  .chip { opacity: 1; transform: none; }
  .skill-panel { padding: 22px; border-radius: 20px; border: 1px solid var(--glass-b); background: linear-gradient(150deg, var(--glass-hi), transparent 40%), var(--glass); }
}
@media (max-width: 600px) {
  .vapt__steps { grid-template-columns: 1fr 1fr; }
  .chips { grid-template-columns: 1fr 1fr; gap: 8px; }
  .chip { padding: 10px 11px; gap: 9px; font-size: .84rem; }
  .posts__t small { max-height: none; opacity: 1; }
}
h4 { margin: 0; font-weight: 600; }
.ring__aura { opacity: .34; filter: blur(60px); }
:root[data-theme="light"] .ring__aura { opacity: .26; }
.cursor-ring.is-label { background: color-mix(in srgb, var(--fg) 92%, transparent); border-color: transparent; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.cursor-ring__label { color: var(--bg); }
.cursor { background: var(--fg); }
@media (max-width: 899px) { .only-wide { display: none; } }

/* ==========================================================================
   v6 — Neutral terminal-style glass, custom project SVGs, more builds,
   certifications & recognition
   ========================================================================== */
/* --- Glass like the hero terminal: neutral, frosted, no colour --- */
.ring__aura { display: none; }
.ring::before { content: ""; position: absolute; inset: 10% 15%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--fg) 7%, transparent), transparent); filter: blur(10px); }
.ring__card, .ring__card.is-active {
  background: color-mix(in srgb, var(--bg-2) 62%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid var(--line);
  box-shadow: 0 24px 50px -32px rgba(0, 0, 0, .5);
}
.ring__card.is-active { border-color: color-mix(in srgb, var(--fg) 30%, transparent); box-shadow: inset 0 1px 0 color-mix(in srgb, var(--fg) 8%, transparent), 0 30px 60px -34px rgba(0, 0, 0, .6); }
.ring__card::after { display: none; }
.ring__sheen { display: none; }
.ring__card .ring__n { color: var(--mut); }
.ring__card.is-active .ring__n { color: var(--acc); }
.chip, .skill-panel, .case a, .scope li, .cert, .awards li, .mp {
  background: color-mix(in srgb, var(--bg-2) 62%, transparent) !important;
  -webkit-backdrop-filter: blur(12px) saturate(140%); backdrop-filter: blur(12px) saturate(140%);
  border: 1px solid var(--line);
  box-shadow: none;
}
.chip { border-radius: 12px; }
.chip:hover, .case a:hover, .scope li:hover, .mp:hover { border-color: color-mix(in srgb, var(--fg) 26%, transparent); }
@media (min-width: 900px) { .skill-panel { background: none !important; border: 0; -webkit-backdrop-filter: none; backdrop-filter: none; } }
.vapt__steps::after { background: color-mix(in srgb, var(--fg) 45%, transparent); }
.case a::before { background: var(--fg-2); }
.chips { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* --- Custom project SVGs --- */
.pv-wrap { display: grid; place-items: center; }
.pv-wrap > svg.pv { position: absolute; inset: 0; width: 100%; height: 100%; }
.pv { font-family: var(--mono); }
.pv-t { font-size: 10px; fill: var(--mut); }
.pv-c { text-anchor: middle; }
.pv-r { text-anchor: end; }
.pv-hi { fill: var(--fg); }
.pv-red { fill: #ff6b6b; }
.pv-dim { fill: var(--mut); opacity: .7; }
.pv-ok { fill: #4ade80; }
.pv-box rect, .pv-chain rect, .pv-photo rect, .pv-stk rect, .pv-panel rect, .pv-bub-in rect, .pv-block rect { fill: var(--bg-2); stroke: color-mix(in srgb, var(--fg) 20%, transparent); }
.pv-box .pv-bad { stroke: rgba(255, 107, 107, .6); }
.pv-block rect { stroke: rgba(255, 107, 107, .7); }
.pv-bub-out rect { fill: color-mix(in srgb, var(--fg) 10%, var(--bg-2)); stroke: color-mix(in srgb, var(--fg) 25%, transparent); }
.pv-bub-out text { fill: var(--fg); }
.pv-dash { stroke: color-mix(in srgb, var(--fg) 25%, transparent); stroke-dasharray: 4 6; fill: none; }
.pv-acc-s { fill: none; stroke: var(--acc); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.pv-acc-f { fill: var(--acc); }
.pv-red-f { fill: #ff6b6b; }
.pv-ev circle { fill: var(--fg-2); }
.pv-edge path, .pv-lines path { fill: none; stroke: color-mix(in srgb, var(--fg) 22%, transparent); stroke-width: 1.2; }
.pv-path { fill: none; stroke: var(--acc); stroke-width: 2; stroke-dasharray: 8 10; animation: dash 1.4s linear infinite; }
.pv-node circle { fill: var(--bg); stroke: var(--fg-2); stroke-width: 1.3; }
.pv-node .pv-acc-f { fill: var(--acc); stroke: var(--acc); }
.pv-ring { fill: none; stroke: #ff6b6b; stroke-width: 1.5; }
.pv-arrow { fill: none; stroke: var(--fg-2); stroke-width: 1.2; }
.pv-track { fill: var(--line); }
.pv-phone { fill: color-mix(in srgb, var(--bg-2) 70%, transparent); stroke: color-mix(in srgb, var(--fg) 18%, transparent); }
.pv-dots circle { fill: var(--fg-2); }
.pv-face circle { fill: color-mix(in srgb, var(--fg) 14%, transparent); }
.pv-match { fill: none; stroke: var(--acc); stroke-width: 1.5; }
.pv-scan { fill: var(--acc); opacity: .55; }
.pv-book { fill: color-mix(in srgb, var(--bg-2) 80%, transparent); stroke: color-mix(in srgb, var(--fg) 25%, transparent); }
.pv-wave rect { fill: var(--fg-2); }
.pv-bars rect { fill: color-mix(in srgb, var(--fg) 22%, transparent); }
.pv-bars .pv-acc-f { fill: var(--acc); }
.b-project__visual .pv { position: absolute; inset: 0 0 26% 0; width: 100%; height: 74%; }

/* --- Bento recognition card --- */
.b-lab { background: color-mix(in srgb, var(--bg-2) 92%, transparent); }
.b-lab__hof { position: relative; z-index: 1; margin-top: 18px; }
.b-lab__hof svg { width: 46px; height: 46px; fill: var(--fg); }
.b-lab__hof p { font-family: var(--serif); font-size: clamp(1.7rem, 2.4vw, 2.2rem); line-height: 1; margin-top: 14px; }
.b-lab__hof em { font-style: italic; color: var(--acc); }
.b-lab__hof span { display: block; margin-top: 8px; color: var(--mut); }
.b-icons--contact { gap: 8px; }
.b-icons--contact a { width: 46px; height: 46px; border-radius: 12px; }

/* --- More builds --- */
.mps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.mp { display: flex; flex-direction: column; gap: 10px; padding: 22px; border-radius: 16px; transition: border-color .3s, transform .5s var(--ease); }
.mp:hover { transform: translateY(-4px); }
.mp__tag { color: var(--acc); }
.mp h3 { font-family: var(--serif); font-size: 1.6rem; line-height: 1.08; }
.mp p { color: var(--fg-2); font-size: .92rem; }
.mp__tech { margin-top: auto; padding-top: 8px; color: var(--mut); font-size: .7rem; line-height: 1.6; }

/* --- Certifications & recognition --- */
.recog { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 56px); margin-top: 56px; }
.certs, .awards { display: grid; gap: 12px; }
.cert { display: flex; gap: 16px; align-items: flex-start; padding: 18px; border-radius: 16px; }
.cert__badge { flex: none; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--fg) 22%, transparent); color: var(--fg); font-weight: 600; letter-spacing: .04em; background: var(--bg); }
.cert h4, .awards h4 { font-size: 1rem; line-height: 1.3; }
.cert p { margin-top: 4px; color: var(--fg-2); font-size: .88rem; }
.cert span.mono { display: block; margin-top: 6px; color: var(--mut); font-size: .68rem; word-break: break-all; }
.awards li { display: flex; gap: 14px; align-items: center; padding: 16px 18px; border-radius: 16px; }
.awards svg { flex: none; width: 30px; height: 30px; fill: var(--fg); }
.awards .chip__mono { width: 30px; height: 30px; }
.awards p { margin-top: 4px; color: var(--mut); font-size: .7rem; }

@media (max-width: 1000px) { .mps { grid-template-columns: 1fr 1fr; } .recog { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .mps { grid-template-columns: 1fr; } }
.cert span.cert__badge.mono { display: grid; margin-top: 0; font-size: .74rem; color: var(--fg); word-break: normal; }
.b-lab__ridges { height: 46%; }
.b-lab__meta { flex-direction: column; gap: 4px; }

/* ==========================================================================
   v7 — tag fix, CV cue, PGP highlight & fingerprint block
   ========================================================================== */
/* Experience tags were inheriting the timeline row grid */
.timeline .tl-tags li { display: inline-flex; grid-template-columns: none; gap: 0; padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; }
.timeline .tl-tags { flex-wrap: wrap; }
.timeline p strong { color: var(--fg); font-weight: 600; }

/* Hero CV cue (from the footer CV button) */
.hero__cta.is-cue .btn--cv { animation: cv-cue 1.1s var(--ease) 3; border-color: var(--fg); }
@keyframes cv-cue {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--fg) 30%, transparent); }
  50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--fg) 0%, transparent); transform: translateY(-2px); }
}

/* Footer: PGP first and highlighted, single CV button */
.socials { align-items: center; }
.socials__pgp { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 999px; background: var(--fg); color: var(--bg) !important; font-weight: 500; transition: transform .4s var(--ease), opacity .2s; }
.socials__pgp svg { width: 16px; height: 16px; fill: currentColor; }
.socials__pgp:hover { transform: translateY(-2px); opacity: .92; }
.socials__cv { display: inline-flex; align-items: center; height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); }
.socials__cv:hover { border-color: var(--fg-2); }

/* Fingerprint block */
.fpr { margin-top: 40px; padding: 22px; border-radius: 18px; border: 1px solid var(--line); background: color-mix(in srgb, var(--bg-2) 62%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); max-width: 760px; }
.fpr__head { display: flex; gap: 14px; align-items: flex-start; }
.fpr__head svg { flex: none; width: 28px; height: 28px; fill: var(--fg); margin-top: 2px; }
.fpr__title { font-weight: 600; }
.fpr__sub { color: var(--fg-2); font-size: .92rem; margin-top: 2px; }
.fpr__code { display: grid; grid-template-columns: repeat(5, auto); justify-content: start; gap: 8px 14px; width: 100%; margin-top: 18px; padding: 16px 18px; border-radius: 12px; border: 1px dashed color-mix(in srgb, var(--fg) 25%, transparent); background: var(--bg); font-size: clamp(.9rem, 1.6vw, 1.1rem); letter-spacing: .08em; color: var(--fg); text-align: left; transition: border-color .3s; }
.fpr__code span:nth-child(n+6) { color: var(--fg-2); }
.fpr__code:hover { border-color: var(--fg-2); }
.fpr__code.is-copied { border-style: solid; border-color: #4ade80; }
.fpr__foot { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 14px; color: var(--mut); font-size: .72rem; }
.fpr__foot a { color: var(--fg-2); }
.fpr__foot a:hover { color: var(--fg); }
@media (max-width: 600px) { .fpr__code { grid-template-columns: repeat(5, 1fr); gap: 8px; letter-spacing: .02em; font-size: .82rem; } }

/* ==========================================================================
   v8 — auto glitch on "and break it", typed terminal, staged bento load
   ========================================================================== */
/* Hero glitch: plays on its own every few seconds after the intro */
.hero__title.is-in em .w > span { animation: glitch-auto 4.8s steps(1, end) 2.6s infinite; }
.hero__title.is-in em .w:nth-child(2) > span { animation-delay: 2.68s; }
.hero__title.is-in em .w:nth-child(3) > span { animation-delay: 2.62s; }
.hero__title em:hover .w > span { animation: glitch .45s steps(2) 1; }
@keyframes glitch-auto {
  0%, 86%, 100% { transform: none; text-shadow: none; clip-path: none; }
  87% { transform: translate(-3px, 1px) skewX(-8deg); text-shadow: 3px 0 color-mix(in srgb, var(--fg) 70%, transparent), -3px 0 #4cc9f0; clip-path: inset(8% 0 52% 0); }
  88% { transform: translate(4px, -1px); text-shadow: -4px 0 color-mix(in srgb, var(--fg) 70%, transparent), 4px 0 #4cc9f0; clip-path: inset(48% 0 12% 0); }
  89% { transform: translate(-2px, 0) skewX(6deg); text-shadow: 2px 1px var(--fg-2), -2px -1px #4cc9f0; clip-path: inset(22% 0 30% 0); }
  90% { transform: translate(1px, 0); text-shadow: -1px 0 var(--fg-2), 1px 0 #4cc9f0; clip-path: none; }
  92% { transform: translate(-5px, 0) skewX(-12deg); text-shadow: 5px 0 var(--fg-2), -5px 0 #4cc9f0; clip-path: inset(60% 0 5% 0); }
  93% { transform: none; text-shadow: none; clip-path: none; }
}

/* Terminal: commands typed character by character, output printed */
.tl.on { transition: clip-path var(--dur, .4s) steps(var(--n, 20), end); }
.tl:not(.tl--cmd).on { transition-timing-function: ease-out; }

/* About text: words fade and sharpen in sequence */
.js .b-about .bw { display: inline-block; opacity: 0; filter: blur(6px); transform: translateY(6px); transition: opacity .5s var(--ease), filter .6s var(--ease), transform .6s var(--ease); }
.b-about.is-in .bw { opacity: 1; filter: none; transform: none; transition-delay: calc(var(--i) * 32ms + .35s); }

/* Bento cards build in a slower, more visible sequence */
.js .bento .reveal { transition: opacity 1s var(--ease), transform 1.1s cubic-bezier(.16, 1, .3, 1); }
.b-stack.is-in .b-icons--grid li { transition-delay: calc(var(--i, 0) * 60ms + .45s); }
.b-pill.b-icons li { opacity: 0; transform: translateY(8px) scale(.8); transition: opacity .4s var(--ease), transform .5s cubic-bezier(.3, 1.6, .5, 1); }
.b-most.is-in .b-pill.b-icons li { opacity: 1; transform: none; }
.b-most.is-in .b-pill.b-icons li:nth-child(2) { transition-delay: .1s; }
.b-most.is-in .b-pill.b-icons li:nth-child(3) { transition-delay: .2s; }
.b-most.is-in .b-pill.b-icons li:nth-child(4) { transition-delay: .3s; }
.b-icons--contact li { opacity: 0; transform: scale(.7); transition: opacity .4s var(--ease), transform .5s cubic-bezier(.3, 1.6, .5, 1); }
.b-contact.is-in .b-icons--contact li { opacity: 1; transform: none; }
.b-contact.is-in .b-icons--contact li:nth-child(2) { transition-delay: .08s; }
.b-contact.is-in .b-icons--contact li:nth-child(3) { transition-delay: .16s; }
.b-contact.is-in .b-icons--contact li:nth-child(4) { transition-delay: .24s; }
.b-lab__hof { opacity: 0; transform: translateY(14px); transition: opacity .7s var(--ease) .3s, transform .8s var(--ease) .3s; }
.b-lab.is-in .b-lab__hof { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .hero__title.is-in em .w > span { animation: none; }
  .js .b-about .bw, .b-pill.b-icons li, .b-icons--contact li, .b-lab__hof { opacity: 1; filter: none; transform: none; }
}
