:root {
  /* Base: near-black navy */
  --bg: #05070d;
  --bg-2: #0a0e1a;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.15);
  --text: #eef1f8;
  --muted: #a3aabd;
  --dim: #7a8196;

  /* Accents: dark blue, burgundy, dark orange */
  --blue: #7f9be6;
  --blue-rgb: 111, 143, 227;
  --navy-rgb: 30, 58, 138;
  --wine: #c04a55;
  --wine-rgb: 127, 29, 58;
  --ember: #e0782f;
  --ember-rgb: 224, 120, 47;
  --amber: #e9a35c;
  --green: #4ade80;

  --grad: linear-gradient(100deg, #c04a55 0%, #d4623c 50%, #e8893a 100%);
  --grad-deep: linear-gradient(100deg, #7f1d3a 0%, #a33a26 55%, #b8501a 100%);
  --grad-brand: linear-gradient(135deg, #1e3a8a 0%, #7f1d3a 60%, #b8501a 100%);

  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", ui-serif, Georgia, serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --radius: 22px;
  --max: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: dark;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

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

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

code, .mono { font-family: var(--mono); font-size: 0.86em; }

code {
  padding: 0.1em 0.4em;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
  color: #dfe5f5;
}

.dim { color: var(--dim); }

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
svg.fill { fill: currentColor; stroke: none; }

em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
  background: var(--grad);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-right: 0.08em;
  animation: shimmer 8s ease-in-out infinite alternate;
}

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 500;
}

@keyframes shimmer { to { background-position: 100% 0; } }

/* ---------- Background ---------- */

.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }

.orb { position: absolute; width: 70vmax; height: 70vmax; border-radius: 50%; will-change: transform; }

.orb-1 {
  top: -38vmax; left: -22vmax;
  background: radial-gradient(circle, rgba(var(--navy-rgb), 0.55), transparent 62%);
  animation: drift-a 26s ease-in-out infinite alternate;
}

.orb-2 {
  top: -30vmax; right: -30vmax;
  background: radial-gradient(circle, rgba(var(--wine-rgb), 0.42), transparent 62%);
  animation: drift-b 32s ease-in-out infinite alternate;
}

.orb-3 {
  bottom: -45vmax; left: 10vw;
  background: radial-gradient(circle, rgba(180, 70, 20, 0.16), transparent 62%);
  animation: drift-a 38s ease-in-out infinite alternate-reverse;
}

@keyframes drift-a { to { transform: translate3d(8vmax, 6vmax, 0) scale(1.08); } }
@keyframes drift-b { to { transform: translate3d(-10vmax, 8vmax, 0) scale(0.94); } }

.grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(150, 175, 240, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(150, 175, 240, 0.045) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(ellipse 70% 55% at 50% 0%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 55% at 50% 0%, #000 20%, transparent 75%);
}

.grain {
  position: absolute; inset: 0;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

.nav {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
}

.nav.scrolled {
  background: rgba(5, 7, 13, 0.74);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
  border-bottom-color: var(--line);
}

.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 72px; }

.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 600; letter-spacing: -0.01em; }

.mark {
  display: grid; place-items: center;
  width: 36px; height: 36px;
  border-radius: 11px;
  background: var(--grad-brand);
  color: #fff;
  font-size: 17px; font-weight: 800;
  box-shadow: 0 6px 24px -6px rgba(var(--wine-rgb), 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.nav-links { display: flex; gap: 6px; }

.nav-links a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 15px;
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover { color: var(--text); background: var(--surface-2); }

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

.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 50px; padding: 0 24px;
  border-radius: 999px;
  font-size: 15.5px; font-weight: 550;
  white-space: nowrap;
  transition: transform 0.25s var(--ease), box-shadow 0.25s, background 0.25s, border-color 0.25s;
}

.btn svg { transition: transform 0.25s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn[download]:hover svg { transform: translateY(2px); }

.btn-primary {
  background: var(--grad-deep);
  color: #fff;
  box-shadow: 0 10px 40px -12px rgba(184, 80, 26, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 50px -12px rgba(184, 80, 26, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.2); }

.btn-ghost { border: 1px solid var(--line-2); background: var(--surface); color: var(--text); }
.btn-ghost:hover { border-color: rgba(255, 255, 255, 0.3); background: var(--surface-2); transform: translateY(-2px); }

.btn-sm { height: 40px; padding: 0 16px; font-size: 14px; }

.icon-btn {
  display: grid; place-items: center;
  width: 50px; height: 50px;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  transition: color 0.2s, border-color 0.2s, transform 0.25s var(--ease), background 0.2s;
}

.icon-btn:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.3); background: var(--surface-2); transform: translateY(-2px); }

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

.hero { padding: clamp(40px, 8vw, 96px) 0 clamp(56px, 8vw, 88px); }

.pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 14px 7px 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 14px;
  transition: border-color 0.2s, color 0.2s;
}

.pill:hover { border-color: rgba(255, 255, 255, 0.3); color: var(--text); }
.pill svg { width: 15px; height: 15px; }

.pulse {
  position: relative;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px var(--green);
}

.pulse::after {
  content: ""; position: absolute; inset: 0;
  border-radius: 50%;
  background: var(--green);
  animation: ping 2s ease-out infinite;
}

@keyframes ping { to { transform: scale(3); opacity: 0; } }

.name {
  margin: 28px 0 0;
  font-size: clamp(3.4rem, 12.5vw, 10.5rem);
  font-weight: 650;
  line-height: 0.92;
  letter-spacing: -0.055em;
}

.name .first {
  background: linear-gradient(180deg, #ffffff 30%, #b6c0da 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.name .last {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.07em;
  letter-spacing: -0.03em;
  padding-right: 0.1em;
  background: var(--grad);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 7s ease-in-out infinite alternate;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
  margin-top: clamp(28px, 4vw, 48px);
}

.role {
  margin: 0;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.role i { font-style: normal; color: var(--ember); margin: 0 0.35em; }

.tagline {
  margin: 14px 0 0;
  font-size: clamp(1.75rem, 3.4vw, 2.6rem);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.tagline em { font-size: 1.08em; }

.lead { max-width: 560px; margin: 20px 0 0; color: var(--muted); font-size: 17.5px; line-height: 1.65; }

.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 32px; }

.socials { display: flex; gap: 10px; }

.meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px;
  margin: 28px 0 0;
  color: var(--dim);
  font-size: 14.5px;
}

.meta-item { display: inline-flex; align-items: center; gap: 8px; }
.meta svg { width: 16px; height: 16px; color: var(--ember); }
.meta .sep { width: 4px; height: 4px; border-radius: 50%; background: var(--dim); }

/* Pipeline illustration */

.pipe {
  position: relative;
  margin: 0;
  padding: 0 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background:
    linear-gradient(160deg, rgba(13, 18, 34, 0.94), rgba(7, 9, 18, 0.94)) padding-box,
    linear-gradient(140deg, rgba(90, 120, 220, 0.6), rgba(var(--wine-rgb), 0.45) 40%, rgba(255, 255, 255, 0.06) 70%, rgba(var(--ember-rgb), 0.5)) border-box;
  box-shadow: 0 40px 100px -30px rgba(var(--navy-rgb), 0.6), 0 0 0 1px rgba(0, 0, 0, 0.4);
  font-family: var(--mono);
  font-size: 12.5px;
}

.pipe-top { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }

.dots { display: flex; gap: 6px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, 0.14); }
.dots i:first-child { background: #ff5f57; }
.dots i:nth-child(2) { background: #febc2e; }
.dots i:nth-child(3) { background: #28c840; }

.file { color: var(--muted); }

.kale {
  margin-left: auto;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(var(--blue-rgb), 0.14);
  color: var(--blue);
  font-size: 11.5px;
}

.cells { display: grid; gap: 8px; padding: 16px 18px 6px; }

.cell {
  display: flex; align-items: center; gap: 12px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-left: 2px solid rgba(var(--blue-rgb), 0.7);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
}

.cell.is-nb { border-left-color: var(--ember); background: rgba(var(--ember-rgb), 0.06); }

.cell code { padding: 0; border: 0; background: none; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.ctag { flex: none; padding: 2px 8px; border-radius: 6px; font-size: 11.5px; }
.ctag.step { background: rgba(var(--blue-rgb), 0.13); color: var(--blue); }
.ctag.nb { background: rgba(var(--ember-rgb), 0.14); color: #ec914f; }

.compile {
  display: flex; align-items: center; gap: 12px;
  margin: 14px 18px;
  color: var(--dim);
  font-size: 11.5px;
  letter-spacing: 0.04em;
}

.compile::before, .compile::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--line-2), transparent); }

.dag { display: grid; justify-items: center; padding: 0 18px; }

.node {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  width: min(100%, 300px);
  padding: 10px 14px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  animation: glow 4.5s ease-in-out infinite;
}

.node:nth-child(3) { animation-delay: 1.5s; }
.node:nth-child(5) { animation-delay: 3s; }

.node b { font-weight: 500; color: var(--text); }

.node .kind { color: var(--dim); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em; }

.node.is-sub {
  border-color: rgba(var(--ember-rgb), 0.5);
  background: linear-gradient(120deg, rgba(var(--wine-rgb), 0.22), rgba(var(--ember-rgb), 0.1));
}

.node.is-sub .kind { color: var(--ember); }

.inner { display: flex; gap: 4px; margin-left: auto; }
.inner i { width: 7px; height: 7px; border-radius: 2px; background: rgba(var(--ember-rgb), 0.65); }

@keyframes glow {
  0%, 60%, 100% { box-shadow: none; }
  15% { box-shadow: 0 0 0 1px rgba(var(--blue-rgb), 0.55), 0 0 28px -4px rgba(var(--blue-rgb), 0.6); }
}

.edge { position: relative; width: min(100%, 300px); height: 34px; }

.edge::before {
  content: ""; position: absolute; left: 50%; top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(var(--blue), var(--ember));
  opacity: 0.6;
}

.edge::after {
  content: ""; position: absolute; left: calc(50% - 3px); top: 0;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 12px var(--ember), 0 0 4px #fff;
  animation: travel 4.5s linear infinite;
}

.edge:nth-child(4)::after { animation-delay: 2.25s; }

@keyframes travel {
  0% { top: -4px; opacity: 0; }
  8% { opacity: 1; }
  30% { top: calc(100% - 4px); opacity: 1; }
  36%, 100% { top: calc(100% - 4px); opacity: 0; }
}

.edge span {
  position: absolute; left: calc(50% + 14px); top: 50%;
  transform: translateY(-50%);
  color: var(--dim);
  font-size: 11px;
  white-space: nowrap;
}

.pipe figcaption {
  margin: 16px 18px 0;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  color: var(--dim);
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.5;
}

/* ---------- Marquee ---------- */

.marquee {
  overflow: hidden;
  padding: 22px 0;
  border-block: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.015);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.track { display: flex; width: max-content; animation: marquee 48s linear infinite; }

.track span {
  display: inline-flex; align-items: center;
  padding: 0 28px;
  color: var(--muted);
  font-size: clamp(18px, 2.2vw, 24px);
  font-weight: 500;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.track span::after { content: "✦"; margin-left: 56px; color: var(--ember); font-size: 0.6em; opacity: 0.75; }

@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Stats ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  padding-top: clamp(56px, 8vw, 96px);
}

.stat {
  padding: 26px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.stat b {
  display: inline-block;
  font-size: clamp(2.8rem, 5vw, 4rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.05em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-variant-numeric: tabular-nums;
}

.stat span { display: block; margin-top: 12px; color: var(--muted); font-size: 15px; line-height: 1.45; }

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

.section { padding: clamp(80px, 11vw, 140px) 0 0; }

.sec-head { margin-bottom: clamp(32px, 5vw, 56px); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow::before { content: ""; width: 22px; height: 1px; background: linear-gradient(90deg, var(--blue), var(--wine), var(--ember)); }

.sec-head h2, .contact h2 {
  margin: 14px 0 0;
  font-size: clamp(2.3rem, 5.6vw, 4.4rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.sec-head h2 em, .contact h2 em { font-size: 1.08em; }

/* Spotlight hover for cards */
.spot { position: relative; isolation: isolate; }

.spot::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  border-radius: inherit;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, -30%), rgba(var(--blue-rgb), 0.13), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
}

.spot:hover::before { opacity: 1; }

/* Feature (GSoC) */

.feature {
  padding: clamp(24px, 4vw, 44px);
  border: 1px solid transparent;
  border-radius: 28px;
  background:
    linear-gradient(170deg, rgba(12, 16, 30, 0.95), rgba(7, 9, 17, 0.95)) padding-box,
    linear-gradient(130deg, rgba(90, 120, 220, 0.55), rgba(255, 255, 255, 0.07) 35%, rgba(255, 255, 255, 0.05) 65%, rgba(var(--ember-rgb), 0.45)) border-box;
  box-shadow: 0 50px 120px -50px rgba(var(--navy-rgb), 0.6);
}

.feature-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 16px; }

.org { display: flex; align-items: flex-start; gap: 16px; }

.org h3 { margin: 0; font-size: clamp(1.25rem, 2.4vw, 1.6rem); font-weight: 600; letter-spacing: -0.025em; line-height: 1.25; }

.org p { margin: 6px 0 0; color: var(--muted); font-size: 15px; }

.org p a { color: var(--text); border-bottom: 1px solid var(--line-2); transition: border-color 0.2s; }
.org p a:hover { border-color: var(--ember); }

.org-badge {
  display: grid; place-items: center; flex: none;
  width: 52px; height: 52px;
  border-radius: 15px;
  background: linear-gradient(135deg, #1e3a8a, #7f1d3a);
  color: #fff;
  font-weight: 700; font-size: 16px; letter-spacing: 0.02em;
  box-shadow: 0 10px 30px -10px rgba(var(--wine-rgb), 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.org-badge.sm { width: 44px; height: 44px; border-radius: 13px; font-size: 14px; }
.org-badge.kornia { background: linear-gradient(135deg, #2c52c9, #172a6b); box-shadow: 0 10px 30px -10px rgba(44, 82, 201, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.2); }
.org-badge.hf { background: linear-gradient(135deg, #c2410c, #7c2d12); box-shadow: 0 10px 30px -10px rgba(194, 65, 12, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.2); }
.org-badge.qdrant { background: linear-gradient(135deg, #9f1239, #4c0d1f); box-shadow: 0 10px 30px -10px rgba(159, 18, 57, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.2); }

.when {
  flex: none;
  padding: 6px 14px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 13px;
}

.feature-intro { max-width: 760px; margin: 24px 0 0; color: var(--muted); font-size: 17px; }
.feature-intro a { color: var(--text); border-bottom: 1px solid var(--line-2); }
.feature-intro a:hover { border-color: var(--ember); }

.flagship {
  margin-top: 32px;
  padding: clamp(22px, 3vw, 32px);
  border: 1px solid rgba(192, 74, 85, 0.35);
  border-radius: 20px;
  background: linear-gradient(120deg, rgba(var(--navy-rgb), 0.28), rgba(var(--wine-rgb), 0.16) 55%, rgba(184, 80, 26, 0.08));
}

.flagship-top { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

.flagship h4 {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  margin: 16px 0 0;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.kep {
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(var(--blue-rgb), 0.14);
  color: var(--blue);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
}

.flagship p { max-width: 760px; margin: 12px 0 0; color: var(--muted); }

.links { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 20px; }

.links a {
  color: var(--text);
  font-size: 15px; font-weight: 500;
  border-bottom: 1px solid rgba(var(--ember-rgb), 0.5);
  transition: border-color 0.2s, color 0.2s;
}

.links a:hover { color: var(--ember); border-color: var(--ember); }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
}

.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-merged { background: rgba(var(--blue-rgb), 0.14); color: #a3b7ef; }
.badge-review { background: rgba(233, 163, 92, 0.12); color: var(--amber); }

.bento {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.tile {
  grid-column: span 2;
  display: flex; flex-direction: column;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  transition: border-color 0.3s, transform 0.4s var(--ease);
}

.tile:nth-child(4), .tile:nth-child(5) { grid-column: span 3; }

.tile:hover { border-color: var(--line-2); transform: translateY(-3px); }

.tile-n { font-family: var(--mono); font-size: 12px; color: var(--ember); }

.tile h5 { margin: 12px 0 0; font-size: 18.5px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.3; }

.tile p { flex: 1; margin: 10px 0 0; color: var(--muted); font-size: 15px; line-height: 1.6; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }

.tags span {
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11.5px;
}

.prs { margin-top: 36px; }

.prs-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 10px; }

.prs h4 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -0.02em; }

.prs ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; margin: 0; padding: 0; list-style: none; }

.prs li a {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
  transition: background 0.2s, padding 0.3s var(--ease);
}

.prs li a:hover { padding-left: 10px; background: linear-gradient(90deg, rgba(var(--blue-rgb), 0.09), transparent); }

.pr-n { flex: none; width: 46px; color: var(--dim); font-family: var(--mono); font-size: 13px; }

.pr-t { flex: 1; min-width: 0; font-size: 15.5px; }

/* Open source */

.os-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.os-kornia { grid-column: 1 / -1; }

.os-kornia .items { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 32px; }

.card {
  padding: clamp(22px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(10, 13, 24, 0.72);
  transition: border-color 0.3s;
}

.card:hover { border-color: var(--line-2); }

.card-head { display: flex; align-items: center; gap: 14px; }

.card-head h3 { margin: 0; font-size: 21px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }

.card-head p { margin: 4px 0 0; color: var(--muted); font-size: 14.5px; }

.card-intro { margin: 20px 0 0; color: var(--muted); font-size: 15.5px; }

.items { display: grid; gap: 4px; margin: 20px 0 0; padding: 0; list-style: none; }

.items li { padding: 18px 0; border-top: 1px solid var(--line); }

.item-title {
  display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px;
  font-weight: 550;
  font-size: 16.5px;
  letter-spacing: -0.01em;
  transition: color 0.2s;
}

.item-title:hover { color: var(--ember); }

.item-title code { font-size: 0.82em; }

.items p { margin: 8px 0 0; color: var(--muted); font-size: 15px; }

.models { display: grid; gap: 8px; margin: 20px 0 0; padding: 0; list-style: none; }

.models a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  transition: border-color 0.2s, background 0.2s, transform 0.3s var(--ease);
}

.models a:hover { border-color: rgba(var(--ember-rgb), 0.5); background: rgba(var(--ember-rgb), 0.06); transform: translateX(3px); }

.models span { min-width: 0; font-family: var(--mono); font-size: 13px; overflow-wrap: anywhere; }

.models em {
  flex: none;
  font-family: var(--mono); font-style: normal; font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(var(--ember-rgb), 0.13);
  color: #ec914f;
  animation: none;
}

/* Skills */

.skills {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(10, 13, 24, 0.62);
  overflow: hidden;
}

.skill-row { padding: 24px 28px; border-bottom: 1px solid var(--line); }

.skill-row:nth-child(odd) { border-right: 1px solid var(--line); }
.skill-row:nth-last-child(-n + 2) { border-bottom: 0; }

.skill-row h3 {
  margin: 0;
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
}

.skill-row ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }

.skill-row li {
  padding: 6px 13px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 14.5px;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.skill-row li:hover { border-color: rgba(var(--ember-rgb), 0.55); background: rgba(var(--wine-rgb), 0.2); }

.edu {
  margin-top: 16px;
  padding: 26px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(10, 13, 24, 0.62);
}

.edu-body { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 16px; }

.edu h3 { margin: 0; font-size: clamp(1.2rem, 2.4vw, 1.5rem); font-weight: 600; letter-spacing: -0.025em; }

.edu p { margin: 4px 0 0; color: var(--muted); }

/* Contact */

.contact-section { padding-bottom: clamp(80px, 10vw, 120px); }

.contact {
  position: relative;
  overflow: hidden;
  padding: clamp(36px, 7vw, 88px) clamp(24px, 6vw, 72px);
  border: 1px solid transparent;
  border-radius: 32px;
  text-align: center;
  background:
    radial-gradient(80% 120% at 50% 0%, rgba(var(--navy-rgb), 0.45), transparent 60%) padding-box,
    radial-gradient(60% 100% at 100% 100%, rgba(var(--wine-rgb), 0.35), transparent 60%) padding-box,
    radial-gradient(50% 80% at 0% 100%, rgba(184, 80, 26, 0.12), transparent 60%) padding-box,
    linear-gradient(rgba(8, 11, 21, 0.97), rgba(8, 11, 21, 0.97)) padding-box,
    var(--grad-brand) border-box;
}

.contact .eyebrow { justify-content: center; }

.contact p { max-width: 540px; margin: 18px auto 0; color: var(--muted); font-size: 18px; }

.mail-link {
  display: inline-block;
  margin-top: 26px;
  font-size: clamp(1.3rem, 3.6vw, 2.2rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  border-bottom: 2px solid rgba(var(--ember-rgb), 0.5);
  transition: color 0.2s, border-color 0.2s;
  overflow-wrap: anywhere;
}

.mail-link:hover { color: var(--ember); border-color: var(--ember); }

.contact .cta { justify-content: center; }

/* Footer */

.footer { border-top: 1px solid var(--line); }

.footer-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  padding-top: 28px; padding-bottom: 36px;
  color: var(--dim);
  font-size: 14px;
}

.footer p { margin: 0; }
.footer a:hover { color: var(--text); }

/* ---------- Link tooltips ---------- */

.tip {
  position: fixed; top: 0; left: 0; z-index: 100;
  display: grid; gap: 3px;
  max-width: min(320px, calc(100vw - 16px));
  padding: 9px 13px 10px;
  border: 1px solid var(--line-2);
  border-radius: 11px;
  background: rgba(11, 15, 28, 0.97);
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.85), 0 0 24px -8px rgba(var(--navy-rgb), 0.7);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity 0.16s, transform 0.22s var(--ease), visibility 0.16s;
}

.tip.below { transform: translateY(-4px); }
.tip.on { opacity: 1; visibility: visible; transform: none; }

.tip-title { font-size: 13.5px; font-weight: 550; line-height: 1.35; color: var(--text); }

.tip[data-kind="ext"] .tip-title::after { content: "↗"; margin-left: 6px; color: var(--ember); }
.tip[data-kind="dl"] .tip-title::after { content: "↓"; margin-left: 6px; color: var(--ember); }

.tip-sub { font-family: var(--mono); font-size: 11.5px; line-height: 1.4; color: var(--dim); overflow-wrap: anywhere; }

.tip::after {
  content: ""; position: absolute; left: var(--arrow-x, 50%); bottom: -6px;
  width: 10px; height: 10px;
  background: rgb(11, 15, 28);
  border-right: 1px solid var(--line-2);
  border-bottom: 1px solid var(--line-2);
  transform: translateX(-50%) rotate(45deg);
}

.tip.below::after { bottom: auto; top: -6px; transform: translateX(-50%) rotate(-135deg); }

/* ---------- Reveal on scroll ---------- */

.js .reveal {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  filter: blur(6px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease), filter 0.9s var(--ease);
  transition-delay: calc(var(--d, 0) * 90ms);
}

.js .reveal.in { opacity: 1; transform: none; filter: none; }

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

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .pipe { max-width: 560px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile, .tile:nth-child(4), .tile:nth-child(5) { grid-column: span 1; }
  .tile:nth-child(5) { grid-column: span 2; }
  .os-grid { grid-template-columns: 1fr; }
  .os-kornia .items { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .nav-links { display: none; }
  .prs ul { grid-template-columns: 1fr; }
  .skills { grid-template-columns: 1fr; }
  .skill-row:nth-child(odd) { border-right: 0; }
  .skill-row:nth-last-child(2) { border-bottom: 1px solid var(--line); }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .container { padding: 0 16px; }
  .brand-name { display: none; }
  .name { font-size: 22vw; line-height: 0.88; }
  .name .last { display: block; }
  .role { font-size: 11.5px; letter-spacing: 0.08em; }
  .meta { flex-direction: column; align-items: flex-start; }
  .meta .sep { display: none; }
  .models a { flex-wrap: wrap; }
  .models span { font-size: 12px; }
  .stats { gap: 10px; }
  .stat { padding: 20px 18px; }
  .stat span { font-size: 13.5px; }
  .bento { grid-template-columns: 1fr; }
  .tile, .tile:nth-child(4), .tile:nth-child(5) { grid-column: auto; }
  .pr-t { font-size: 14.5px; }
  .cta .btn { flex: 1 1 auto; }
  .socials { width: 100%; }
  .skill-row { padding: 20px; }
  .edu { padding: 22px 20px; }
  .pipe { font-size: 11.5px; }
  .cells { padding: 14px 14px 4px; }
  .dag { padding: 0 14px; }
  .compile, .pipe figcaption { margin-left: 14px; margin-right: 14px; }
  .cell { gap: 8px; padding: 9px 10px; }
}

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