/* deebthik.com — hand-written styles, no build step. */

@font-face {
  font-family: "Geist";
  src: url("/assets/fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/assets/fonts/GeistMono-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #09090b;
  --card: #0f0f12;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --fg: #fafafa;
  --muted: #a1a1aa;
  --dim: #85858f;
  --accent: #5eead4;
  --accent-2: #2dd4bf;
  --accent-rgb: 94, 234, 212;
  --violet-rgb: 167, 139, 250;
  --s-orange: #f0673a;
  --s-mint: #5ef3a5;
  --radius: 16px;
  --container: 1120px;
  --gutter: clamp(20px, 4vw, 32px);
  --nav-h: 64px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: dark;
}

/* ───────────── Base ───────────── */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  overflow-x: clip;
}

img { display: block; max-width: 100%; height: auto; }
svg { display: inline-block; vertical-align: middle; flex-shrink: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
b, strong { font-weight: 600; }
sup { line-height: 0; }

::selection { background: rgba(var(--accent-rgb), 0.3); color: #fff; }

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

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.mono { font-family: var(--mono); }

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--fg);
  color: var(--bg);
  font-weight: 500;
  transform: translateY(-160%);
  transition: transform 0.2s;
}
.skip:focus { transform: none; }

.progress {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  height: 2px;
  pointer-events: none;
}
.progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.6);
  transform: scaleX(var(--p, 0));
  transform-origin: 0 50%;
}

/* ───────────── Navigation ───────────── */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--nav-h);
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s, border-color 0.3s;
}
.nav.is-scrolled,
.nav.is-open {
  background: rgba(9, 9, 11, 0.78);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom-color: var(--line);
}
.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.nav-logo img { border-radius: 7px; }
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links a {
  position: relative;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--muted);
  transition: color 0.2s, background-color 0.2s;
}
.nav-links a:hover { color: var(--fg); background: rgba(255, 255, 255, 0.04); }
.nav-links a.is-active { color: var(--fg); }
.nav-links a.is-active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 1px;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}
.nav-links a.nav-sentida.is-active::after { background: var(--s-orange); box-shadow: 0 0 8px var(--s-orange); }
.nav-links a.nav-cta {
  margin-left: 8px;
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--fg);
  color: var(--bg);
  font-weight: 500;
}
.nav-links a.nav-cta:hover { background: var(--accent); color: var(--bg); }
.nav-links a.nav-cta.is-active::after { display: none; }

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
}

@media (max-width: 1024px) {
  .nav-toggle { display: grid; }
  .nav-links {
    position: absolute;
    top: calc(var(--nav-h) - 2px);
    left: var(--gutter);
    right: var(--gutter);
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px;
    border: 1px solid var(--line-2);
    border-radius: 14px;
    background: #0f0f12;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.98);
    transform-origin: top center;
    transition: opacity 0.2s, transform 0.2s var(--ease), visibility 0s linear 0.2s;
  }
  .nav.is-open .nav-links {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity 0.2s, transform 0.25s var(--ease);
  }
  .nav-links a { padding: 12px 14px; font-size: 15px; }
  .nav-links a.is-active::after { left: auto; right: 16px; top: 50%; bottom: auto; margin: -2px 0 0; }
  .nav-links a.nav-cta { margin: 6px 0 0; padding: 12px 14px; text-align: center; }

  /* Without JavaScript the menu can't open, so show the links as a scrollable row */
  html:not(.js) .nav-toggle { display: none; }
  html:not(.js) .nav-logo span { display: none; }
  html:not(.js) .nav-links {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
  }
}

/* ───────────── Buttons and links ───────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--fg);
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.2s var(--ease);
}
.btn:hover { border-color: rgba(255, 255, 255, 0.28); background: rgba(255, 255, 255, 0.07); }
.btn:active { transform: translateY(1px); }
.btn-primary {
  border-color: transparent;
  background: var(--accent);
  color: #04120f;
  box-shadow: 0 10px 34px -10px rgba(var(--accent-rgb), 0.65);
}
.btn-primary:hover { border-color: transparent; background: #8af5e3; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn-ghost:hover { border-color: transparent; background: rgba(255, 255, 255, 0.05); color: var(--fg); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; }
.btn.is-copied { border-color: rgba(var(--accent-rgb), 0.5); color: var(--accent); }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 500;
}
.text-link svg { transition: transform 0.25s var(--ease); }
.text-link:hover svg { transform: translate(2px, -2px); }

/* ───────────── Hero ───────────── */

.hero {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 48px) 0 110px;
  overflow: hidden;
  background: radial-gradient(circle at 68% 45%, rgba(var(--accent-rgb), 0.085), transparent 36%);
}
.hero-canvas {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
}
.hero-fade {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 58% 62% at 20% 52%, rgba(9, 9, 11, 0.86), rgba(9, 9, 11, 0) 72%),
    linear-gradient(to bottom, rgba(9, 9, 11, 0) 62%, var(--bg));
}
.hero-inner { position: relative; }
/* Pure CSS entrance so the hero paints without waiting for JavaScript */
.hero-inner > * { animation: rise 0.9s var(--ease) both; }
.hero-inner > :nth-child(2) { animation-delay: 0.06s; }
.hero-inner > :nth-child(3) { animation-delay: 0.14s; }
.hero-inner > :nth-child(4) { animation-delay: 0.2s; }
.hero-inner > :nth-child(5) { animation-delay: 0.26s; }
.hero-inner > :nth-child(6) { animation-delay: 0.32s; }
@keyframes rise { from { opacity: 0; transform: translate3d(0, 18px, 0); } }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 28px;
  padding: 6px 14px 6px 11px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: var(--muted);
  font-size: 13px;
}

.pulse-dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.55); }
  70% { box-shadow: 0 0 0 10px rgba(var(--accent-rgb), 0); }
  100% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0); }
}

.hero-title {
  margin: 0;
  padding-bottom: 0.06em;
  font-size: clamp(3.4rem, 11.5vw, 9rem);
  font-weight: 650;
  line-height: 0.9;
  letter-spacing: -0.055em;
  background: linear-gradient(180deg, #fff 35%, #9d9da7 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-term {
  min-height: 1.7em;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: clamp(15px, 1.6vw, 18px);
}
.t-prompt { color: var(--accent); }
.t-arrow { color: var(--dim); }
.t-typed { color: var(--fg); }
.t-caret {
  display: inline-block;
  width: 0.55em;
  height: 1.1em;
  margin-left: 3px;
  vertical-align: -0.2em;
  background: var(--accent);
  animation: caret 1s steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }

.hero-lede {
  max-width: 40ch;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(1.1rem, 1.9vw, 1.4rem);
  line-height: 1.5;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin: 40px 0 0;
  color: var(--dim);
  font-size: 13px;
}
.hero-meta .sep { color: #3f3f46; }

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--dim);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transform: translateX(-50%);
}
.scroll-cue span {
  position: relative;
  width: 1px;
  height: 40px;
  overflow: hidden;
  background: var(--line-2);
}
.scroll-cue span::after {
  content: "";
  position: absolute;
  left: 0;
  top: -40%;
  width: 100%;
  height: 40%;
  background: var(--accent);
  animation: drip 1.8s var(--ease) infinite;
}
@keyframes drip { to { top: 100%; } }
@media (max-height: 680px) { .scroll-cue { display: none; } }

/* ───────────── Sections ───────────── */

.section { position: relative; padding: clamp(84px, 11vw, 140px) 0; }
.section-tight { padding-top: clamp(24px, 4vw, 48px); }

.kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.kicker span { color: var(--dim); }
.kicker::after {
  content: "";
  flex: 0 1 64px;
  height: 1px;
  background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.6), transparent);
}

.section-title {
  margin: 0 0 26px;
  font-size: clamp(2.2rem, 5.4vw, 4rem);
  font-weight: 600;
  line-height: 1.03;
  letter-spacing: -0.04em;
}
.section-lede {
  max-width: 62ch;
  margin: 0 0 48px;
  color: var(--muted);
  font-size: clamp(1.02rem, 1.4vw, 1.15rem);
}
.sub-title {
  margin: 80px 0 24px;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* ───────────── Cards and spotlight ───────────── */

.card {
  position: relative;
  isolation: isolate;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012));
}
[data-spotlight] { --mx: 50%; --my: 50%; }
[data-spotlight]::before,
[data-spotlight]::after {
  content: "";
  position: absolute;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s;
}
[data-spotlight]::before {
  inset: 0;
  z-index: -1;
  background: radial-gradient(520px circle at var(--mx) var(--my), rgba(var(--accent-rgb), 0.07), transparent 45%);
}
[data-spotlight]::after {
  inset: 0;
  padding: 1px;
  background: radial-gradient(340px circle at var(--mx) var(--my), rgba(var(--accent-rgb), 0.55), transparent 42%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
[data-spotlight]:hover::before,
[data-spotlight]:hover::after { opacity: 1; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.chips span {
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  white-space: nowrap;
}

/* ───────────── About ───────────── */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.about-text p { margin: 0 0 1.2em; color: var(--muted); font-size: 1.075rem; }
.about-text p:last-child { margin-bottom: 0; }
.about-text strong { color: var(--fg); font-weight: 500; }

.now { padding: 26px; }
.now-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.now-list { display: grid; gap: 16px; margin: 0; }
.now-list div { display: grid; gap: 2px; padding-bottom: 16px; border-bottom: 1px dashed var(--line); }
.now-list div:last-child { padding-bottom: 0; border-bottom: 0; }
.now-list dt {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.now-list dd { margin: 0; }

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: clamp(56px, 7vw, 88px) 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.stats li { display: grid; align-content: start; gap: 8px; padding: 28px 24px 0 0; }
.stats li + li { padding-left: 24px; border-left: 1px solid var(--line); }
.stat-num {
  font-size: clamp(2.2rem, 4.4vw, 3.4rem);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: -0.04em;
  background: linear-gradient(180deg, #fff, #8b8b94);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-label { max-width: 22ch; color: var(--muted); font-size: 14px; }

/* ───────────── Chain of trust ───────────── */

.chain { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.chain-node {
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.chain-node:not(:last-child)::before,
.chain-node:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 27.5px;
  top: 56px;
  bottom: -14px;
  width: 1px;
}
.chain-node:not(:last-child)::before { background: var(--line-2); }
.chain-node:not(:last-child)::after {
  background: linear-gradient(var(--accent), var(--accent-2));
  box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.6);
  transform-origin: top;
  transition: transform 0.6s var(--ease);
}
.js .chain-node:not(.is-verified)::after { transform: scaleY(0); }

.chain-icon {
  position: relative;
  z-index: 1;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(var(--accent-rgb), 0.5);
  border-radius: 16px;
  background: var(--card);
  color: var(--accent);
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.08), 0 0 24px rgba(var(--accent-rgb), 0.25);
  transition: color 0.4s, border-color 0.4s, box-shadow 0.4s;
}
.js .chain-node:not(.is-verified) .chain-icon {
  border-color: var(--line-2);
  color: var(--dim);
  box-shadow: none;
}
.chain-body {
  padding: 20px 24px;
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  transition: border-color 0.4s;
}
.js .chain-node:not(.is-verified) .chain-body { border-color: var(--line); }
.chain-stage {
  margin: 0 0 6px;
  padding-right: 150px;
  color: var(--dim);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.chain-body h3 { margin: 0 0 6px; font-size: 1.2rem; font-weight: 600; letter-spacing: -0.01em; }
.chain-body p { margin: 0; color: var(--muted); }
.chain-body .chips { margin-top: 14px; }
.chain-status { position: absolute; top: 21px; right: 24px; margin: 0; font-size: 12px; }
.chain-status .s-wait { display: none; color: var(--dim); }
.chain-status .s-ok { display: inline-flex; align-items: center; gap: 7px; color: var(--accent); }
.chain-status .s-ok::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 10px currentColor;
}
.js .chain-node:not(.is-verified) .s-wait { display: inline-flex; align-items: center; gap: 7px; }
.s-wait::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  animation: blink 1s steps(2) infinite;
}
.js .chain-node:not(.is-verified) .s-ok { display: none; }
@keyframes blink { 50% { opacity: 0.35; } }

/* ───────────── Experience ───────────── */

.timeline { display: grid; gap: 20px; }
.job { padding: clamp(22px, 3.2vw, 38px); }
.job-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px 24px;
  margin-bottom: 18px;
}
.job-title {
  margin: 0;
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.job-org { margin: 4px 0 0; color: var(--accent); font-weight: 500; }
.job-when { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; text-align: right; }
.job-when span { color: var(--dim); }
.job-summary { max-width: 75ch; margin: 0 0 24px; color: var(--muted); }

.job-highlights {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.hl {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.015);
}
.hl:last-child:nth-child(odd) { grid-column: 1 / -1; }
.hl h4 {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 600;
}
.hl h4::before {
  content: "";
  flex: none;
  margin-top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(var(--accent-rgb), 0.7);
}
.hl p { margin: 0; color: var(--muted); font-size: 15px; }
.hl .hl-name {
  display: inline-block;
  margin: 0 0 10px;
  padding: 2px 10px;
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.06);
  color: var(--accent);
  font-size: 12px;
  line-height: 1.6;
}

.job-list,
.feature-list { display: grid; gap: 10px; margin: 0 0 24px; padding: 0; list-style: none; }
.job-list li,
.feature-list li { position: relative; padding-left: 22px; color: var(--muted); }
.feature-list li { font-size: 15px; }
.job-list li::before,
.feature-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.8em;
  width: 9px;
  height: 1px;
  background: var(--accent);
}

.earlier { margin-top: 72px; }
.earlier .sub-title { margin-top: 0; }
.earlier-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.earlier-list li {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.e-when { padding-top: 2px; color: var(--accent); font-size: 13px; }
.earlier-list p { margin: 0; color: var(--muted); font-size: 15px; }
.earlier-list .e-org { margin: 0 0 4px; color: var(--fg); font-size: 16px; font-weight: 600; }
.e-org span { color: var(--dim); font-weight: 400; }

/* ───────────── Projects ───────────── */

.feature {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
  margin-bottom: 24px;
  padding: clamp(24px, 3.4vw, 44px);
  overflow: hidden;
}
.feature-flip .feature-text { order: 2; }
.feature-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.feature h3 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 650;
  line-height: 1.05;
  letter-spacing: -0.04em;
}
.feature-sub { margin: 8px 0 18px; color: #d4d4d8; font-size: 1.05rem; }
.feature-text > p:not([class]) { margin: 0; color: var(--muted); }
.feature-list { margin-top: 20px; }

.feature-art {
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 26px;
  min-height: 340px;
}

/* TPM illustration */
.tpm { position: relative; width: 188px; height: 188px; display: grid; place-items: center; }
.tpm-chip {
  position: relative;
  width: 140px;
  height: 140px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  border-radius: 14px;
  background: linear-gradient(145deg, #1b1b21, #0b0b0e);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 24px 60px -12px rgba(var(--accent-rgb), 0.3);
}
.tpm-chip::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -45%;
  height: 45%;
  background: linear-gradient(to bottom, transparent, rgba(var(--accent-rgb), 0.16), transparent);
  animation: scan 3.4s linear infinite;
}
.tpm-chip::after {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}
@keyframes scan { to { top: 100%; } }
.tpm-label {
  position: absolute;
  top: 20px;
  left: 0;
  right: 0;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-align: center;
}
.tpm-key {
  margin-top: 14px;
  color: var(--accent);
  filter: drop-shadow(0 0 8px rgba(var(--accent-rgb), 0.7));
  animation: glow 2.6s ease-in-out infinite;
}
@keyframes glow { 50% { filter: drop-shadow(0 0 2px rgba(var(--accent-rgb), 0.3)); opacity: 0.75; } }
.tpm-pins { position: absolute; }
.tpm-pins-t,
.tpm-pins-b {
  left: 32px;
  right: 32px;
  height: 18px;
  -webkit-mask: repeating-linear-gradient(90deg, #000 0 4px, transparent 4px 12px);
  mask: repeating-linear-gradient(90deg, #000 0 4px, transparent 4px 12px);
  background:
    linear-gradient(90deg, transparent, var(--accent), transparent) -100% 0 / 50% 100% no-repeat,
    rgba(255, 255, 255, 0.2);
  animation: pins-x 2.8s linear infinite;
}
.tpm-pins-l,
.tpm-pins-r {
  top: 32px;
  bottom: 32px;
  width: 18px;
  -webkit-mask: repeating-linear-gradient(180deg, #000 0 4px, transparent 4px 12px);
  mask: repeating-linear-gradient(180deg, #000 0 4px, transparent 4px 12px);
  background:
    linear-gradient(180deg, transparent, var(--accent), transparent) 0 -100% / 100% 50% no-repeat,
    rgba(255, 255, 255, 0.2);
  animation: pins-y 2.8s linear infinite 1.4s;
}
.tpm-pins-t { top: 3px; }
.tpm-pins-b { bottom: 3px; animation-direction: reverse; }
.tpm-pins-l { left: 3px; animation-direction: reverse; }
.tpm-pins-r { right: 3px; }
@keyframes pins-x { to { background-position: 200% 0, 0 0; } }
@keyframes pins-y { to { background-position: 0 200%, 0 0; } }

.tpm-log {
  width: min(100%, 340px);
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.35);
  color: var(--muted);
  font-size: 12.5px;
}
.tpm-log p { margin: 0; overflow: hidden; line-height: 1.9; white-space: nowrap; text-overflow: ellipsis; }
.tpm-log b { color: var(--accent); font-weight: 500; }

/* Illustrative diff */
.code-win {
  width: 100%;
  max-width: 440px;
  overflow: hidden;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  background: #0b0b0e;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.8);
}
.code-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 12px 14px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  color: var(--dim);
  font-size: 11.5px;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.code-bar span { flex: none; width: 10px; height: 10px; border-radius: 50%; background: #2a2a30; }
.code-bar span:nth-of-type(3) { margin-right: 8px; }
.code-bar em { color: var(--muted); font-style: normal; }
.code { padding: 14px 0; overflow-x: auto; color: #d4d4d8; font-size: 12.5px; line-height: 1.8; }
.code .ln { display: block; padding: 0 16px; white-space: pre; }
.code .del { background: rgba(244, 63, 94, 0.12); color: #fda4af; }
.code .add { background: rgba(var(--accent-rgb), 0.1); color: #99f6e4; }
.code-out {
  padding: 12px 16px 6px;
  overflow-x: auto;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}
.code-out p { margin: 0; line-height: 1.9; white-space: pre; }
.code-out b { color: var(--fg); font-weight: 500; }
.code-out .o2 { color: #fda4af; }
.code-out .ok { color: var(--accent); }
.code-note {
  margin: 0;
  padding: 4px 16px 12px;
  color: var(--dim);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-align: right;
  text-transform: uppercase;
}

/* Terminal lines in both illustrations type in once the card is revealed */
.js .tpm-log p,
.js .code-out p { opacity: 0; transform: translateX(-6px); }
.feature.in .tpm-log p,
.feature.in .code-out p { animation: line-in 0.45s var(--ease) forwards; }
.feature.in .tpm-log p:nth-child(1), .feature.in .code-out p:nth-child(1) { animation-delay: 0.5s; }
.feature.in .tpm-log p:nth-child(2), .feature.in .code-out p:nth-child(2) { animation-delay: 1.3s; }
.feature.in .tpm-log p:nth-child(3), .feature.in .code-out p:nth-child(3) { animation-delay: 2.1s; }
.feature.in .tpm-log p:nth-child(4), .feature.in .code-out p:nth-child(4) { animation-delay: 2.9s; }
@keyframes line-in { to { opacity: 1; transform: none; } }

.mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
}
.mini {
  display: flex;
  flex-direction: column;
  padding: 22px;
  transition: transform 0.3s var(--ease), border-color 0.3s;
}
a.mini:hover { transform: translateY(-3px); border-color: var(--line-2); }
.mini-meta {
  margin: 0 0 12px;
  color: var(--dim);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.mini h4 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.35;
}
.mini h4 svg { margin: -2px 0 0 4px; color: var(--dim); transition: transform 0.25s var(--ease), color 0.25s; }
a.mini:hover h4 svg { color: var(--accent); transform: translate(2px, -2px); }
.mini p:last-child { margin: 0; color: var(--muted); font-size: 14.5px; }

/* ───────────── Research ───────────── */

.papers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.paper { display: flex; flex-direction: column; }
.paper-art {
  position: relative;
  height: 180px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  border-radius: var(--radius) var(--radius) 0 0;
  background: radial-gradient(ellipse at 50% 130%, rgba(var(--accent-rgb), 0.14), transparent 70%);
}
.paper-body { display: flex; flex: 1; flex-direction: column; padding: 24px 26px 26px; }
.paper-venue {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.paper h3 { margin: 0 0 10px; font-size: 1.2rem; font-weight: 600; line-height: 1.35; letter-spacing: -0.01em; }
.paper-authors { margin: 0 0 14px; color: var(--dim); font-size: 14px; }
.paper-authors b { color: var(--fg); font-weight: 500; }
.paper-body > p:not([class]) { margin: 0 0 20px; color: var(--muted); font-size: 15px; }
.paper-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  margin: auto 0 0;
}
.paper-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}
.paper-links a:hover { color: var(--accent); }
.badge {
  padding: 3px 10px;
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.06);
  color: var(--accent);
  font-size: 12px;
}

.blocks { display: flex; align-items: center; gap: 26px; }
.blocks span {
  position: relative;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(var(--accent-rgb), 0.12), rgba(255, 255, 255, 0.02));
  animation: block 3.2s ease-in-out infinite;
}
.blocks span:nth-child(2) { animation-delay: 0.4s; }
.blocks span:nth-child(3) { animation-delay: 0.8s; }
.blocks span:nth-child(4) { animation-delay: 1.2s; }
.blocks span::before {
  content: "";
  position: absolute;
  inset: 12px 11px;
  border-radius: 2px;
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.3) 0 2px, transparent 2px 6px);
  opacity: 0.6;
}
.blocks span:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 100%;
  top: 50%;
  width: 26px;
  height: 1px;
  background: rgba(var(--accent-rgb), 0.45);
}
@keyframes block {
  0%, 30%, 100% { border-color: rgba(var(--accent-rgb), 0.3); box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0); }
  12% { border-color: var(--accent); box-shadow: 0 0 22px 2px rgba(var(--accent-rgb), 0.35); }
}

.art-hilbert svg { width: 136px; height: 136px; overflow: visible; }
.h-path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 0.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.paper.in .h-path { animation: draw 3.8s linear 0.3s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.h-cell { opacity: 0; transition: opacity 0.4s; }
.h-cell.code { fill: rgba(var(--accent-rgb), 0.22); }
.h-cell.data { fill: rgba(var(--violet-rgb), 0.3); }
.paper.in .h-cell { opacity: 1; }
.art-hilbert::before,
.art-hilbert::after {
  position: absolute;
  bottom: 12px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
}
.art-hilbert::before { content: "■ code"; left: 16px; color: rgba(var(--accent-rgb), 0.85); }
.art-hilbert::after { content: "■ data"; right: 16px; color: rgba(var(--violet-rgb), 0.95); }

.scholar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 20px;
  padding: 18px 22px;
  color: var(--muted);
}
.scholar b { color: var(--fg); }
.scholar > svg:first-child { color: var(--accent); }
.scholar .go { margin-left: auto; color: var(--dim); transition: transform 0.25s var(--ease), color 0.25s; }
.scholar:hover .go { color: var(--accent); transform: translate(2px, -2px); }

/* ───────────── SentiDA ───────────── */

.sentida {
  overflow: hidden;
  border-top: 1px solid rgba(240, 103, 58, 0.14);
  border-bottom: 1px solid rgba(94, 243, 165, 0.1);
  background: linear-gradient(180deg, #0c0a09, #0a0b0a 55%, var(--bg));
}
.sentida-glow {
  position: absolute;
  inset: -10% -10% auto;
  height: 110%;
  pointer-events: none;
  background:
    radial-gradient(38% 32% at 12% 16%, rgba(240, 103, 58, 0.17), transparent 70%),
    radial-gradient(34% 30% at 88% 46%, rgba(94, 243, 165, 0.12), transparent 70%),
    radial-gradient(30% 26% at 40% 92%, rgba(240, 103, 58, 0.08), transparent 70%);
  animation: drift 18s ease-in-out infinite alternate;
}
@keyframes drift { to { transform: translate3d(2%, 3%, 0) scale(1.05); } }
.sentida .container { position: relative; }

.kicker-s { color: var(--s-mint); }
.kicker-s::after { background: linear-gradient(90deg, rgba(94, 243, 165, 0.6), transparent); }

.s-head { display: flex; align-items: center; gap: clamp(16px, 3vw, 28px); }
.s-logo {
  width: clamp(52px, 7vw, 72px);
  height: auto;
  border-radius: 10px;
  box-shadow: 0 14px 44px -12px rgba(240, 103, 58, 0.6);
}
.s-title {
  margin: 0;
  font-size: clamp(3rem, 10vw, 7rem);
  font-weight: 750;
  line-height: 0.9;
  letter-spacing: -0.05em;
  color: var(--s-orange);
}
.s-title span { color: var(--s-mint); }
.s-tagline { max-width: 46ch; margin: 12px 0 0; color: var(--muted); font-size: clamp(1.05rem, 1.8vw, 1.3rem); }

.s-story {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(20px, 4vw, 48px);
  margin-top: 44px;
}
.s-story p { margin: 0; color: var(--muted); font-size: 1.05rem; }
.s-story em { color: var(--s-mint); font-style: normal; }

.s-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 56px 0 0;
  padding: 0;
  list-style: none;
}
.s-stats li {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 22px 22px 20px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(240, 103, 58, 0.11), rgba(255, 255, 255, 0.015) 62%);
}
.s-stats li:nth-child(even) { background: linear-gradient(160deg, rgba(94, 243, 165, 0.09), rgba(255, 255, 255, 0.015) 62%); }
.s-num {
  color: var(--s-orange);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: -0.04em;
}
.s-stats li:nth-child(even) .s-num { color: var(--s-mint); }
.s-stats li > span:last-child { color: var(--muted); font-size: 14px; }

.marquee {
  width: 100vw;
  margin: 56px 0 0 calc(50% - 50vw);
  padding: 18px 0;
  overflow: hidden;
  border-block: 1px solid rgba(255, 255, 255, 0.06);
  -webkit-mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track { display: flex; width: max-content; animation: marquee 40s linear infinite; }
.marquee-track span {
  display: inline-flex;
  align-items: center;
  color: rgba(255, 255, 255, 0.55);
  font-size: clamp(1.05rem, 2.2vw, 1.55rem);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.marquee-track span::after {
  content: "✦";
  margin: 0 clamp(20px, 3vw, 36px);
  color: var(--s-orange);
  font-size: 0.7em;
}
.marquee-track span:nth-child(even)::after { color: var(--s-mint); }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

.s-timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  margin: 56px 0 0;
  padding: 0;
  list-style: none;
}
.s-timeline::before,
.s-timeline::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 13px;
  height: 1px;
}
.s-timeline::before { background: rgba(255, 255, 255, 0.1); }
.s-timeline::after {
  background: linear-gradient(90deg, var(--s-orange), var(--s-mint));
  transform-origin: left;
  transition: transform 1.6s var(--ease) 0.2s;
}
.js .s-timeline:not(.in)::after { transform: scaleX(0); }
.s-timeline li { position: relative; padding-top: 40px; }
.s-timeline li::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 0;
  width: 13px;
  height: 13px;
  border: 2px solid var(--s-orange);
  border-radius: 50%;
  background: var(--bg);
  box-shadow: 0 0 14px rgba(240, 103, 58, 0.5);
}
.s-timeline li:nth-child(2)::before { border-color: #a8b071; box-shadow: 0 0 14px rgba(168, 176, 113, 0.45); }
.s-timeline li:nth-child(3)::before { border-color: var(--s-mint); box-shadow: 0 0 14px rgba(94, 243, 165, 0.5); }
.s-year {
  display: block;
  margin-bottom: 8px;
  font-family: var(--mono);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.s-timeline p { margin: 0; color: var(--muted); font-size: 15px; }
.s-timeline b { color: var(--fg); }

.s-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.btn-s {
  border-color: transparent;
  background: var(--s-orange);
  color: #160a05;
  box-shadow: 0 10px 34px -10px rgba(240, 103, 58, 0.7);
}
.btn-s:hover { border-color: transparent; background: #ff8259; }
.btn-s-ghost { border-color: rgba(94, 243, 165, 0.35); color: var(--s-mint); }
.btn-s-ghost:hover { border-color: var(--s-mint); background: rgba(94, 243, 165, 0.08); }

/* ───────────── Galleries (justified rows, no cropping) ───────────── */

.s-gallery,
.d-gallery { display: grid; gap: 12px; margin-top: 56px; }
.d-gallery { margin-top: 28px; }
.g-row { display: flex; align-items: flex-start; gap: 12px; }
.g-item,
.g-note { flex: var(--ar) 1 0%; min-width: 0; aspect-ratio: var(--ar); }
.ar-1 { --ar: 1; }
.ar-presence { --ar: 1.7778; }
.ar-batches { --ar: 4.5307; }
.ar-talks { --ar: 0.7167; }
.ar-spons { --ar: 1.186; }
.ar-happy { --ar: 1.1047; }
.ar-binary { --ar: 0.7; }
.ar-apparel { --ar: 2.0772; }
.ar-mindful { --ar: 1.2834; }

.g-item {
  position: relative;
  display: block;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: #111114;
  cursor: zoom-in;
}
.g-item img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease); }
.g-item:hover img { transform: scale(1.035); }
.g-cap {
  position: absolute;
  left: 10px;
  bottom: 10px;
  max-width: calc(100% - 20px);
  padding: 5px 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 7px;
  background: rgba(9, 9, 11, 0.74);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #fff;
  font-family: var(--mono);
  font-size: 11.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s, transform 0.3s var(--ease);
}
.g-item:hover .g-cap,
.g-item:focus-visible .g-cap { opacity: 1; transform: none; }
@media (hover: none) { .g-cap { opacity: 1; transform: none; } }

.g-note {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  padding: clamp(16px, 2vw, 24px);
  border-radius: 12px;
  background: linear-gradient(150deg, #f0673a, #f0673a 45%, #b8b06a 78%, #5ef3a5);
  color: #120a06;
}
.g-note .mono { margin: 0; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.75; }
.g-note-quote { margin: 0; font-size: clamp(0.95rem, 1.35vw, 1.12rem); font-weight: 600; line-height: 1.35; letter-spacing: -0.01em; }
.g-note .text-link { color: #120a06; }

@media (max-width: 900px) {
  .g-row {
    margin: 0 calc(var(--gutter) * -1);
    padding: 0 var(--gutter);
    overflow-x: auto;
    scroll-padding: 0 var(--gutter);
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
  }
  .g-row::-webkit-scrollbar { display: none; }
  .g-item,
  .g-note {
    flex: 0 0 auto;
    width: calc(220px * var(--ar));
    height: 220px;
    scroll-snap-align: start;
  }
  .g-note { width: 280px; aspect-ratio: auto; }
}

.lightbox {
  max-width: min(94vw, 1400px);
  max-height: 94vh;
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  color: var(--fg);
}
.lightbox::backdrop {
  background: rgba(5, 5, 7, 0.88);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.lightbox[open] { animation: fade-in 0.25s var(--ease); }
@keyframes fade-in { from { opacity: 0; } }
.lightbox img {
  width: auto;
  height: auto;
  max-width: min(94vw, 1400px);
  max-height: calc(94vh - 52px);
  margin: 0 auto;
  border-radius: 12px;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.6);
}
.lb-cap { margin: 14px 0 0; color: var(--muted); font-size: 13px; text-align: center; }
.lb-close {
  position: fixed;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  background: rgba(20, 20, 24, 0.85);
  cursor: pointer;
}
.lb-close:hover { background: rgba(44, 44, 50, 0.95); }

/* ───────────── Beyond work ───────────── */

.roles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
}
.role { padding: 22px; }
.role-when { margin: 0 0 12px; color: var(--dim); font-size: 12px; }
.role h3 { margin: 0; font-size: 1.1rem; font-weight: 600; letter-spacing: -0.01em; }
.role-what { margin: 4px 0 10px; color: var(--accent); font-size: 14px; }
.role p:last-child { margin: 0; color: var(--muted); font-size: 14.5px; }

.talk-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.yt {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #000;
  cursor: pointer;
}
.yt img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.85; transition: opacity 0.3s, transform 0.6s var(--ease); }
.yt:hover img { opacity: 1; transform: scale(1.03); }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt-live { cursor: default; }
.yt-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 64px;
  height: 64px;
  margin: -32px 0 0 -32px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  background: rgba(9, 9, 11, 0.6);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #fff;
  transition: transform 0.3s var(--ease), background-color 0.3s, color 0.3s, border-color 0.3s;
}
.yt-play svg { margin-left: 3px; }
.yt:hover .yt-play,
.video:hover .yt-play { border-color: transparent; background: var(--accent); color: #04120f; transform: scale(1.08); }
.yt-len {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 12px;
}
.talk-title { margin: 14px 0 2px; font-weight: 600; }
.talk-meta { margin: 0; color: var(--dim); font-size: 12.5px; }
.talks .text-link { margin-top: 22px; }

.design-lede { max-width: 72ch; margin: 0; color: var(--muted); }

/* ───────────── Hobbies ───────────── */

.music {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px;
  gap: 32px;
  padding: clamp(24px, 3.4vw, 44px);
  overflow: hidden;
}
.music h3 {
  margin: 0 0 14px;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 650;
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.music-text > p:not([class]) { max-width: 66ch; margin: 0 0 14px; color: var(--muted); }
.music-text b { color: var(--fg); }
.music-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

.eq { display: flex; align-items: flex-end; justify-content: center; gap: 6px; min-height: 200px; }
.eq span {
  width: 8px;
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(to top, var(--accent-2), var(--accent) 60%, rgba(var(--accent-rgb), 0.15));
  opacity: 0.85;
  transform: scaleY(0.3);
  transform-origin: bottom;
  animation: eq 1.2s ease-in-out infinite alternate;
}
.eq span:nth-child(1) { animation-duration: 0.9s; }
.eq span:nth-child(2) { animation-duration: 1.3s; animation-delay: 0.2s; }
.eq span:nth-child(3) { animation-duration: 1.1s; animation-delay: 0.1s; }
.eq span:nth-child(4) { animation-duration: 0.8s; animation-delay: 0.3s; }
.eq span:nth-child(5) { animation-duration: 1.4s; animation-delay: 0.05s; }
.eq span:nth-child(6) { animation-duration: 1s; animation-delay: 0.25s; }
.eq span:nth-child(7) { animation-duration: 1.2s; animation-delay: 0.15s; }
.eq span:nth-child(8) { animation-duration: 0.95s; animation-delay: 0.35s; }
.eq span:nth-child(9) { animation-duration: 1.15s; animation-delay: 0.1s; }
.eq span:nth-child(10) { animation-duration: 1.35s; animation-delay: 0.2s; }
.eq span:nth-child(11) { animation-duration: 0.85s; animation-delay: 0.05s; }
.eq span:nth-child(12) { animation-duration: 1.25s; animation-delay: 0.3s; }
.eq.is-hit span { animation-duration: 0.26s; }
@keyframes eq {
  0% { transform: scaleY(0.15); }
  50% { transform: scaleY(0.85); }
  100% { transform: scaleY(0.4); }
}

.piano-wrap { margin-top: 30px; }
.piano-hint { margin: 0 0 12px; color: var(--dim); font-size: 12px; }
kbd {
  padding: 1px 6px;
  border: 1px solid var(--line-2);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
}
.piano {
  position: relative;
  display: flex;
  gap: 3px;
  width: min(100%, 440px);
  height: 150px;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}
.key-w,
.key-b {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 0 10px;
  border: 0;
  font-family: var(--mono);
  cursor: pointer;
}
.key-w {
  position: relative;
  flex: 1;
  border-radius: 0 0 8px 8px;
  background: linear-gradient(to bottom, #e4e4ea, #fafafa 78%, #dcdce2);
  box-shadow: inset 0 -6px 0 rgba(0, 0, 0, 0.08), 0 2px 0 #2a2a30;
  color: #63636b;
  font-size: 11px;
  transition: transform 0.06s, background 0.15s, box-shadow 0.15s;
}
.key-w.is-down {
  background: linear-gradient(to bottom, #b6f5ea, var(--accent));
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.08), 0 0 26px rgba(var(--accent-rgb), 0.6);
  color: #04120f;
  transform: translateY(2px);
}
.key-b {
  position: absolute;
  top: 0;
  z-index: 2;
  width: 8.5%;
  height: 60%;
  padding-bottom: 8px;
  border-radius: 0 0 6px 6px;
  background: linear-gradient(to bottom, #2c2c33, #0f0f12);
  box-shadow: inset 0 -4px 0 rgba(255, 255, 255, 0.07), 0 4px 10px rgba(0, 0, 0, 0.55);
  color: #a1a1aa;
  font-size: 10px;
  transform: translateX(-50%);
}
.key-b.is-down {
  background: linear-gradient(to bottom, var(--accent-2), #0d9488);
  box-shadow: 0 0 22px rgba(var(--accent-rgb), 0.7);
  color: #04120f;
}
.key-w:focus-visible,
.key-b:focus-visible { outline-offset: -4px; }

.videos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px 16px;
  margin-top: 28px;
}
.video { display: block; }
.v-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #000;
}
.v-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.video:hover .v-thumb img { transform: scale(1.04); }
.v-thumb .yt-play { width: 46px; height: 46px; margin: -23px 0 0 -23px; }
.v-title { display: block; margin: 12px 0 2px; font-size: 15px; font-weight: 600; }
.v-meta { display: block; color: var(--dim); font-size: 12px; }

.hobby-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 28px;
}
.hobby {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 28px;
  padding: clamp(22px, 3vw, 36px);
}
.cube-card { grid-column: 1 / -1; }
.cube-card .hobby-text { max-width: 68ch; }
.hobby h3 { margin: 0 0 10px; font-size: 1.6rem; font-weight: 650; letter-spacing: -0.03em; }
.hobby-text > p:not([class]) { margin: 0 0 18px; color: var(--muted); }
.hobby-text b { color: var(--fg); }
.cube-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.cube-hint { margin: 14px 0 0; color: var(--dim); font-size: 11.5px; }
html:not(.js) .cube-stage,
html:not(.js) .cube-actions button,
html:not(.js) .cube-hint { display: none; }

.cube-stage {
  width: 190px;
  height: 190px;
  display: grid;
  place-items: center;
  perspective: 700px;
  cursor: grab;
  touch-action: pan-y;
}
.cube-stage.is-dragging { cursor: grabbing; }
.cube {
  --s: 118px;
  position: relative;
  width: var(--s);
  height: var(--s);
  transform: rotateX(var(--rx, -26deg)) rotateY(var(--ry, -38deg));
  transform-style: preserve-3d;
}
.cube-face {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 5px;
  border-radius: 10px;
  background: #060608;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
.f-front { transform: translateZ(calc(var(--s) / 2)); }
.f-back { transform: rotateY(180deg) translateZ(calc(var(--s) / 2)); }
.f-right { transform: rotateY(90deg) translateZ(calc(var(--s) / 2)); }
.f-left { transform: rotateY(-90deg) translateZ(calc(var(--s) / 2)); }
.f-top { transform: rotateX(90deg) translateZ(calc(var(--s) / 2)); }
.f-bottom { transform: rotateX(-90deg) translateZ(calc(var(--s) / 2)); }
.sticker {
  border-radius: 4px;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  transition: background-color 0.45s var(--ease);
}

.hike-card,
.ball-card { grid-template-columns: 1fr; align-content: start; }
.court {
  position: relative;
  width: 100%;
  height: 180px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: radial-gradient(ellipse 70% 55% at 50% 100%, rgba(232, 116, 59, 0.18), transparent 70%);
}
.court::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -60px;
  width: 280px;
  height: 120px;
  margin-left: -140px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
}
.court::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 24px;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
}
.ball {
  position: absolute;
  left: 50%;
  bottom: 24px;
  width: 52px;
  height: 52px;
  margin-left: -26px;
  transform-origin: 50% 100%;
  animation: bounce 1.1s infinite;
}
.ball svg { width: 100%; height: 100%; animation: spin 2.4s linear infinite; }
.ball-shadow {
  position: absolute;
  left: 50%;
  bottom: 18px;
  width: 60px;
  height: 12px;
  margin-left: -30px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  filter: blur(4px);
  animation: shadow 1.1s infinite;
}
@keyframes bounce {
  0%, 100% { transform: translateY(-92px); animation-timing-function: cubic-bezier(0.33, 0, 0.66, 0); }
  45% { transform: translateY(0); animation-timing-function: linear; }
  50% { transform: translateY(0) scale(1.14, 0.84); animation-timing-function: cubic-bezier(0.33, 1, 0.66, 1); }
}
@keyframes shadow {
  0%, 100% { transform: scale(0.45); opacity: 0.35; animation-timing-function: cubic-bezier(0.33, 0, 0.66, 0); }
  45% { transform: scale(1); opacity: 0.85; animation-timing-function: linear; }
  50% { transform: scale(1.12); opacity: 0.9; animation-timing-function: cubic-bezier(0.33, 1, 0.66, 1); }
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Hiking scene. The climb itself is SMIL inside the SVG; site.js pauses it off screen. */
.trail {
  position: relative;
  width: 100%;
  height: 180px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: radial-gradient(ellipse 55% 75% at 68% 0%, rgba(var(--violet-rgb), 0.13), transparent 70%);
}
.trail svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.t-stars circle { fill: #fff; animation: twinkle 3.2s ease-in-out infinite; }
.t-stars circle:nth-child(2n) { animation-delay: -1.1s; }
.t-stars circle:nth-child(3n) { animation-delay: -2.2s; }
@keyframes twinkle { 50% { opacity: 0.2; } }
.t-moon { fill: #e4e4e7; }
.t-far,
.t-near { stroke-width: 1; stroke-linejoin: round; }
.t-far { fill: rgba(255, 255, 255, 0.035); stroke: rgba(255, 255, 255, 0.09); }
.t-near { fill: #111115; stroke: rgba(255, 255, 255, 0.18); }
.t-path,
.t-done { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.t-path { stroke: rgba(255, 255, 255, 0.24); stroke-width: 1.3; stroke-dasharray: 1.5 4; }
.t-done { stroke: var(--accent); stroke-width: 1.6; }
.t-pole { stroke: rgba(255, 255, 255, 0.7); stroke-width: 1; }
.t-flag { fill: var(--accent); }
.t-ping { fill: none; stroke: var(--accent); stroke-width: 1; }
.t-glow { fill: rgba(var(--accent-rgb), 0.28); }
.t-dot { fill: #e6fffa; }

/* ───────────── Education ───────────── */

.edu { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.edu-item { padding: 24px; }
.edu-when { margin: 0 0 14px; color: var(--dim); font-size: 12px; }
.edu-item h3 { margin: 0 0 6px; font-size: 1.15rem; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; }
.edu-degree { margin: 0 0 12px; color: #d4d4d8; font-size: 15px; }
.edu-degree b { color: var(--accent); }
.edu-detail { margin: 0; color: var(--muted); font-size: 14.5px; }
.extras { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 28px; margin-top: 40px; }
.extras-title {
  margin: 0 0 12px;
  color: var(--dim);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.extras .chips span { white-space: normal; }

/* ───────────── Contact and footer ───────────── */

.contact { overflow: hidden; }
.contact::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -320px;
  z-index: -1;
  width: 1000px;
  height: 640px;
  margin-left: -500px;
  pointer-events: none;
  background: radial-gradient(closest-side, rgba(var(--accent-rgb), 0.12), transparent);
}
.contact-title {
  margin: 0 0 24px;
  font-size: clamp(2.6rem, 7.5vw, 5.6rem);
  font-weight: 650;
  line-height: 0.98;
  letter-spacing: -0.05em;
  background: linear-gradient(180deg, #fff 40%, #8b8b94);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.contact-mail { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; margin: 8px 0 36px; }
.mail-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(1.3rem, 3vw, 2rem);
  font-weight: 500;
  letter-spacing: -0.02em;
}
.mail-link svg { color: var(--accent); }
.mail-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}
.mail-link:hover::after { transform: scaleX(1); }
.socials { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.socials a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 18px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  transition: color 0.2s, border-color 0.2s, background-color 0.2s, transform 0.2s var(--ease);
}
.socials a:hover {
  border-color: rgba(var(--accent-rgb), 0.45);
  background: rgba(var(--accent-rgb), 0.06);
  color: var(--fg);
  transform: translateY(-2px);
}

.footer { padding: 28px 0 36px; border-top: 1px solid var(--line); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; }
.footer p { margin: 0; color: var(--dim); font-size: 12.5px; }
.motto { color: var(--muted); }
.footer a {
  color: var(--muted);
  text-decoration: underline;
  text-decoration-color: var(--line-2);
  text-underline-offset: 3px;
}
.footer a:hover { color: var(--accent); }

/* ───────────── 404 ───────────── */

.nf {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 64px 0;
  background: radial-gradient(circle at 75% 40%, rgba(var(--accent-rgb), 0.08), transparent 40%);
}
.nf-logo { margin-bottom: 64px; }
.nf-title {
  margin: 0 0 32px;
  font-size: clamp(2.6rem, 8vw, 5.5rem);
  font-weight: 650;
  line-height: 0.98;
  letter-spacing: -0.05em;
}
.nf-term {
  max-width: 560px;
  padding: 16px 18px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: #0b0b0e;
  color: var(--fg);
  font-size: 13.5px;
}
.nf-term p { margin: 0; line-height: 1.9; }
.nf-err { color: #fda4af; }
.nf-dim { color: var(--dim); }

/* ───────────── Scroll reveal ───────────── */

.js [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: var(--d, 0ms);
}
.js [data-reveal].in { opacity: 1; transform: none; }

/* ───────────── Responsive ───────────── */

@media (max-width: 900px) {
  .feature { grid-template-columns: 1fr; }
  .feature-flip .feature-text { order: 0; }
  .feature-art { min-height: 0; }
  .videos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .edu { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .hero { background: radial-gradient(circle at 50% 30%, rgba(var(--accent-rgb), 0.085), transparent 50%); }
  .hero-fade {
    background:
      linear-gradient(to bottom, rgba(9, 9, 11, 0.3), rgba(9, 9, 11, 0.72) 55%, var(--bg)),
      radial-gradient(ellipse 90% 60% at 30% 60%, rgba(9, 9, 11, 0.6), transparent 75%);
  }
  .hero-meta { font-size: 12px; }
  .about-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats li,
  .stats li + li { padding: 24px 16px 24px 0; border-left: 0; }
  .stats li:nth-child(even) { padding-left: 20px; border-left: 1px solid var(--line); }
  .stats li:nth-child(n + 3) { border-top: 1px solid var(--line); }

  .chain-node { grid-template-columns: 44px minmax(0, 1fr); gap: 14px; }
  .chain-icon { width: 44px; height: 44px; border-radius: 12px; }
  .chain-icon svg { width: 19px; height: 19px; }
  .chain-node:not(:last-child)::before,
  .chain-node:not(:last-child)::after { left: 21.5px; top: 44px; }
  .chain-body { padding: 18px; }
  .chain-stage { padding-right: 0; }
  .chain-status { position: static; grid-column: 2; margin: -6px 0 0 4px; }

  .job-highlights { grid-template-columns: 1fr; }
  .job-when { text-align: left; }
  .earlier-list li { grid-template-columns: 1fr; gap: 4px; }
  .papers,
  .talk-grid,
  .s-story { grid-template-columns: 1fr; }
  .s-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .s-timeline { grid-template-columns: 1fr; gap: 24px; padding-left: 30px; }
  .s-timeline::before,
  .s-timeline::after { left: 6px; right: auto; top: 8px; bottom: 8px; width: 1px; height: auto; }
  .s-timeline::after { background: linear-gradient(180deg, var(--s-orange), var(--s-mint)); transform-origin: top; }
  .js .s-timeline:not(.in)::after { transform: scaleY(0); }
  .s-timeline li { padding-top: 0; }
  .s-timeline li::before { top: 6px; left: -30px; }
  .music { grid-template-columns: 1fr; gap: 20px; }
  .eq { order: -1; justify-content: flex-start; height: 64px; min-height: 64px; }
  .extras { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .hobby-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .eyebrow { border-radius: 14px; }
  .hero-cta .btn { flex: 1 1 auto; }
  .hero-cta .btn-ghost { flex-basis: 100%; }
  .videos {
    grid-template-columns: none;
    grid-auto-columns: 80%;
    grid-auto-flow: column;
    margin: 28px calc(var(--gutter) * -1) 0;
    padding: 0 var(--gutter) 4px;
    overflow-x: auto;
    scroll-padding: 0 var(--gutter);
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .videos::-webkit-scrollbar { display: none; }
  .video { scroll-snap-align: start; }
  .hobby { grid-template-columns: 1fr; justify-items: center; }
  .hobby-text { justify-self: stretch; }
  .feature-art { gap: 20px; }
}

/* ───────────── Motion preferences and print ───────────── */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
    animation-delay: 0s !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
  .marquee-track { flex-wrap: wrap; width: auto; justify-content: center; row-gap: 8px; }
  .marquee-track span:nth-child(n + 10) { display: none; }
}

@media print {
  .nav, .progress, .hero-canvas, .hero-fade, .scroll-cue, .lightbox, .piano-wrap,
  .cube-stage, .cube-actions, .cube-hint, .eq, .court, .trail, .marquee, .skip { display: none !important; }
  body { background: #fff; color: #000; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .hero { min-height: 0; padding: 0 0 24px; }
  .hero-title, .contact-title, .stat-num { color: #000; background: none; }
  .card { break-inside: avoid; }
}
