:root {
  --bg: #0a0a0a;
  --bg-2: #101010;
  --bg-3: #161616;
  --line: #222;
  --line-2: #2f2f2f;
  --fg: #ece9e5;
  --fg-2: #bdb8b2;
  --muted: #8c8883;
  --orange: #ff6b14;
  --orange-2: #ff8a45;
  --orange-bg: rgba(255, 107, 20, 0.1);
  --green: #3ecf8e;
  --sans: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --gutter: clamp(16px, 6vw, 96px);
  --max: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

a { color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul { padding: 0; list-style: none; }
::selection { background: var(--orange); color: #0a0a0a; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }

.skip { position: absolute; inset-inline-start: -999px; top: 8px; z-index: 100; background: var(--orange); color: #0a0a0a; padding: 8px 12px; font: 500 14px var(--mono); }
.skip:focus { inset-inline-start: 8px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.mono { font-family: var(--mono); }
.accent { color: var(--orange); }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background .3s, border-color .3s;
}
.nav.scrolled { background: rgba(10, 10, 10, .82); border-color: var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 500 15px var(--mono); }
.logo i { width: 10px; height: 10px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 4px var(--orange-bg); }
.nav-links { display: flex; gap: 4px; align-items: center; }
.nav-links a { white-space: nowrap; text-decoration: none; font: 400 14px var(--mono); color: var(--muted); padding: 8px 12px; transition: color .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--fg); }
.nav-links a.cta { color: var(--fg); border: 1px solid var(--line-2); margin-inline-start: 8px; }
.nav-links a.cta:hover { border-color: var(--orange); color: var(--orange); }
.menu-btn { display: none; background: none; border: 1px solid var(--line-2); color: var(--fg); font: 400 13px var(--mono); padding: 8px 12px; cursor: pointer; }
@media (max-width: 1100px) {
  .menu-btn { display: block; }
  .nav-links {
    position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 16px;
    display: none;
  }
  .nav.open .nav-links { display: flex; }
  .nav.open { background: var(--bg); }
  .nav-links a { padding: 12px 0; font-size: 15px; }
  .nav-links a.cta { margin: 8px 0 0; text-align: center; padding: 12px; }
}

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: crosshair; }
.hero::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(10,10,10,.92) 0%, rgba(10,10,10,.6) 42%, rgba(10,10,10,0) 72%),
    linear-gradient(0deg, rgba(10,10,10,1) 0%, rgba(10,10,10,0) 22%);
}
.hero .wrap { position: relative; z-index: 1; width: 100%; padding-top: 96px; padding-bottom: 120px; pointer-events: none; }
.hero .wrap > * { pointer-events: auto; }
.status { display: inline-flex; align-items: center; gap: 10px; font: 400 13px var(--mono); color: var(--fg-2); border: 1px solid var(--line-2); background: rgba(10,10,10,.6); padding: 6px 12px; margin-bottom: 28px; }
.status .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--green); position: relative; }
.status .pulse::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid var(--green); animation: ping 2s infinite; }
@keyframes ping { from { transform: scale(.6); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }
.hero h1 { font-size: clamp(48px, 9vw, 112px); font-weight: 600; line-height: .95; letter-spacing: -.04em; max-width: 900px; }
.hero h1 .role { display: block; color: var(--muted); font-size: .5em; letter-spacing: -.03em; line-height: 1.1; margin-top: 18px; font-weight: 500; }
.hero h1 .role em { font-style: normal; color: var(--orange); }
.hero .lead { margin-top: 28px; max-width: 560px; font-size: clamp(17px, 1.6vw, 20px); color: var(--fg-2); line-height: 1.6; }
.btns { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 36px; }
.btn { display: inline-flex; align-items: center; gap: 10px; font: 500 14px var(--mono); text-decoration: none; padding: 13px 20px; border: 1px solid var(--line-2); background: rgba(10,10,10,.6); color: var(--fg); transition: border-color .2s, color .2s, background .2s, transform .2s; cursor: pointer; }
.btn:hover { border-color: var(--orange); color: var(--orange); }
.btn.primary { background: var(--orange); border-color: var(--orange); color: #0a0a0a; }
.btn.primary:hover { background: var(--orange-2); border-color: var(--orange-2); color: #0a0a0a; }
.btn svg { width: 16px; height: 16px; }
.hud { position: absolute; z-index: 2; left: 0; right: 0; bottom: 24px; }
.hud .wrap { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; font: 400 12px var(--mono); color: var(--muted); padding-top: 0; padding-bottom: 0; }
.hud b { color: var(--fg-2); font-weight: 500; }
.hud button { font: inherit; color: var(--fg-2); background: rgba(10,10,10,.6); border: 1px solid var(--line-2); padding: 5px 10px; cursor: pointer; }
.hud button:hover { border-color: var(--orange); color: var(--orange); }
.hud .hint { margin-inline-start: 8px; }
/* Phones have no cursor to probe with, and the chat button sits here; tapping the field still reseeds. */
@media (max-width: 640px) { .hud { display: none; } }

/* ---------- sections ---------- */
section.block { padding: clamp(80px, 12vw, 140px) 0; border-bottom: 1px solid var(--line); position: relative; }
.dots { background-image: radial-gradient(rgba(255,255,255,.055) 1px, transparent 1.2px); background-size: 22px 22px; }
.eyebrow { font: 500 13px var(--mono); color: var(--orange); letter-spacing: .02em; display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.eyebrow::after { content: ''; height: 1px; width: 48px; background: var(--line-2); }
h2.title { font-size: clamp(34px, 5vw, 60px); font-weight: 600; line-height: 1.02; letter-spacing: -.035em; max-width: 880px; }
h2.title span { color: var(--muted); }
.intro { margin-top: 22px; max-width: 680px; color: var(--fg-2); font-size: clamp(17px, 1.4vw, 19px); }

/* stats */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.stat { padding: 34px 24px 30px; border-inline-end: 1px solid var(--line); }
.stat:last-child { border-inline-end: 0; }
.stat b { display: block; font-size: clamp(32px, 4vw, 48px); font-weight: 600; letter-spacing: -.03em; line-height: 1; }
.stat b small { font-size: .55em; color: var(--orange); margin-inline-start: 2px; }
.stat span { display: block; margin-top: 10px; font: 400 13px/1.5 var(--mono); color: var(--muted); }
@media (max-width: 860px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(2) { border-inline-end: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

/* ---------- Drivee feature ---------- */
.role-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px 24px; margin-top: 44px; padding: 22px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.role-head h3 { font-size: 24px; font-weight: 600; letter-spacing: -.02em; }
.role-head h3 a { text-decoration: none; }
.role-head h3 a:hover { color: var(--orange); }
.role-head .meta { font: 400 13px var(--mono); color: var(--muted); }
.feature-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 64px); margin-top: 48px; align-items: start; }
@media (max-width: 960px) { .feature-grid { grid-template-columns: minmax(0, 1fr); } }
.pillars { display: grid; gap: 28px; }
.pillar h4 { margin: 0 0 12px; font: 500 13px var(--mono); color: var(--orange); text-transform: lowercase; display: flex; align-items: center; gap: 10px; }
.pillar h4::before { content: ''; width: 6px; height: 6px; background: var(--orange); }
.pillar li { position: relative; padding-inline-start: 20px; color: var(--fg-2); margin-bottom: 10px; font-size: 16px; }
.pillar li::before { content: '→'; position: absolute; inset-inline-start: 0; color: var(--muted); font-family: var(--mono); font-size: 13px; top: 2px; }
.pillar li b { color: var(--fg); font-weight: 500; }

/* agent trace demo */
.trace { border: 1px solid var(--line-2); background: var(--bg-2); font-size: 13.5px; }
.trace.pinned { position: sticky; top: 88px; }
.trace-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); font: 400 12px var(--mono); color: var(--muted); }
.trace-top .live { display: inline-flex; align-items: center; gap: 8px; color: var(--fg-2); }
.trace-top .live i { width: 7px; height: 7px; border-radius: 50%; background: var(--orange); animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: .25; } }
.trace-body { padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.js .trace .msg, .js .trace .tool, .js .trace .evalrow { opacity: 0; transform: translateY(6px); transition: opacity .35s, transform .35s; }
.js .trace .in { opacity: 1; transform: none; }
.msg { max-width: 88%; padding: 8px 11px; line-height: 1.5; }
.msg small { display: block; font: 400 11px var(--mono); color: var(--muted); margin-bottom: 4px; }
.msg.user { background: var(--bg-3); border: 1px solid var(--line); align-self: flex-start; }
.msg.ai { background: var(--orange-bg); border: 1px solid rgba(255,107,20,.35); align-self: flex-end; }
.msg.ai small { color: var(--orange-2); }
.tool { font: 400 11.5px/1.55 var(--mono); color: var(--muted); border-inline-start: 2px solid var(--line-2); padding-block: 2px; padding-inline: 12px 0; margin-inline-start: 4px; }
.tool .fn { color: var(--fg-2); }
.tool .ok { color: var(--green); }
.trace-eval { border-top: 1px solid var(--line); padding: 12px 14px; display: grid; gap: 4px; font: 400 11.5px var(--mono); }
.trace-eval .label { color: var(--muted); margin-bottom: 4px; }
.evalrow { display: flex; justify-content: space-between; gap: 12px; color: var(--fg-2); }
.evalrow b { color: var(--green); font-weight: 500; }
.trace-note { padding: 10px 16px; border-top: 1px solid var(--line); font: 400 11px var(--mono); color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 44px; }
.chip { font: 400 12px var(--mono); color: var(--fg-2); border: 1px solid var(--line-2); padding: 6px 10px; background: var(--bg); }
.chip.hot { border-color: rgba(255,107,20,.5); color: var(--orange-2); }

/* ---------- AI-native tooling ---------- */
.tools-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 56px; }
@media (max-width: 960px) { .tools-grid { grid-template-columns: minmax(0, 1fr); } }
.term { border: 1px solid var(--line-2); background: var(--bg-2); display: flex; flex-direction: column; }
.term-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.term-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); }
.term-bar span { margin-inline-start: 8px; font: 400 12px var(--mono); color: var(--muted); }
.term pre { margin: 0; padding: 14px; font: 400 12px/1.7 var(--mono); color: var(--fg-2); white-space: pre; overflow-x: auto; border-bottom: 1px solid var(--line); }
.term pre .c { color: var(--muted); }
.term pre .p { color: var(--orange); }
.term .desc { padding: 16px 16px 20px; color: var(--fg-2); font-size: 15px; }
.term .desc h3 { color: var(--fg); font-size: 18px; font-weight: 600; margin-bottom: 8px; letter-spacing: -.01em; }

.loop-title { margin-top: 64px; font: 500 13px var(--mono); color: var(--muted); }
.loop { margin: 16px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-inline-start: 1px solid var(--line); counter-reset: step; }
.loop li { counter-increment: step; padding: 18px 18px 20px; border-inline-end: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--fg-2); font-size: 15px; line-height: 1.45; }
.loop li::before { content: counter(step, decimal-leading-zero); display: block; font: 500 12px var(--mono); color: var(--orange); margin-bottom: 8px; }
@media (max-width: 860px) { .loop { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- experience timeline ---------- */
.timeline { margin-top: 56px; border-top: 1px solid var(--line); }
.job { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 32px; padding: 34px 0; border-bottom: 1px solid var(--line); }
@media (max-width: 760px) { .job { grid-template-columns: minmax(0, 1fr); gap: 10px; } }
.job .when { font: 400 13px var(--mono); color: var(--muted); padding-top: 6px; }
.job .when b { display: block; color: var(--orange); font-weight: 500; margin-bottom: 4px; }
.job h3 { font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.job h3 span { color: var(--muted); font-weight: 500; }
.job p { margin-top: 10px; color: var(--fg-2); max-width: 760px; }
.job ul { margin-top: 12px; display: grid; gap: 8px; max-width: 760px; }
.job li { position: relative; padding-inline-start: 20px; color: var(--fg-2); font-size: 16px; }
.job li::before { content: '—'; position: absolute; inset-inline-start: 0; color: var(--muted); }
.job .chips { margin-top: 16px; }

/* ---------- projects ---------- */
.proj-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 56px; }
@media (max-width: 860px) { .proj-grid { grid-template-columns: minmax(0, 1fr); } }
.proj { border: 1px solid var(--line-2); background: var(--bg-2); padding: 26px 26px 24px; display: flex; flex-direction: column; gap: 14px; transition: border-color .25s, transform .25s; position: relative; }
.proj:hover { border-color: rgba(255,107,20,.55); transform: translateY(-2px); }
.proj.wide { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.proj-text { display: flex; flex-direction: column; gap: 14px; }
.proj-media img { width: 100%; height: auto; border: 1px solid var(--line-2); }
@media (max-width: 960px) { .proj.wide { grid-template-columns: minmax(0, 1fr); } }
.proj li b { color: var(--fg); font-weight: 500; }
.shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.shots img { width: 100%; height: 300px; object-fit: cover; object-position: top; border: 1px solid var(--line-2); }
.proj .credit { font: 400 12px var(--mono); color: var(--muted); }
.proj .top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 12px; font: 400 12px var(--mono); color: var(--muted); }
.proj .tag { white-space: nowrap; color: var(--orange-2); border: 1px solid rgba(255,107,20,.35); padding: 3px 8px; }
.proj h3 { font-size: 24px; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; }
.proj p { color: var(--fg-2); font-size: 16px; }
.proj ul { display: grid; gap: 6px; }
.proj li { position: relative; padding-inline-start: 18px; color: var(--fg-2); font-size: 15px; }
.proj li::before { content: '›'; position: absolute; inset-inline-start: 2px; color: var(--orange); font-family: var(--mono); }
.proj .chips { margin-top: auto; padding-top: 8px; }
.proj .links { display: flex; gap: 16px; flex-wrap: wrap; font: 400 13px var(--mono); }
.proj .links a { color: var(--fg-2); text-decoration: none; border-bottom: 1px solid var(--line-2); }
.proj .links a:hover { color: var(--orange); border-color: var(--orange); }
.proj .links .link-btn { font: inherit; color: var(--orange-2); background: none; border: 0; border-bottom: 1px solid rgba(255,107,20,.5); padding: 0; cursor: pointer; }
.proj .links .link-btn:hover { color: var(--orange); border-color: var(--orange); }
.proj code { font: 400 13px var(--mono); color: var(--fg); background: var(--bg-3); padding: 1px 5px; }
.more { margin-top: 28px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 860px) { .more { grid-template-columns: minmax(0, 1fr); } }
.mini { border: 1px solid var(--line); padding: 18px 18px 16px; text-decoration: none; display: block; transition: border-color .2s; }
.mini:hover { border-color: var(--line-2); }
a.mini:hover h4 { color: var(--orange); }
.mini h4 { margin: 0 0 6px; font-size: 16px; font-weight: 600; }
.mini p { font-size: 14px; color: var(--muted); line-height: 1.5; }

/* ---------- research & talks ---------- */
.stage { display: grid; gap: 16px; margin-top: 56px; }
/* The stage reel: footage plays forward, then rewinds with an eased speed ramp; main.js drives the HUD. */
.reel { position: relative; border: 1px solid var(--line-2); background: var(--bg-2); overflow: hidden; aspect-ratio: 16 / 9; }
.reel video { display: block; width: 100%; height: 100%; object-fit: cover; }
.reel::before {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(10,10,10,.55) 0%, rgba(10,10,10,0) 18%, rgba(10,10,10,0) 78%, rgba(10,10,10,.65) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
  background-size: 100% 100%, 160px 160px;
  mix-blend-mode: overlay; opacity: .9;
  animation: grain .9s steps(6) infinite;
}
@keyframes grain { to { background-position: 0 0, 160px 96px; } }
/* Viewfinder corners. */
.reel::after {
  content: ''; position: absolute; inset: 14px; z-index: 2; pointer-events: none;
  --c: var(--orange); --l: 22px;
  background:
    linear-gradient(var(--c), var(--c)) top left / var(--l) 2px, linear-gradient(var(--c), var(--c)) top left / 2px var(--l),
    linear-gradient(var(--c), var(--c)) top right / var(--l) 2px, linear-gradient(var(--c), var(--c)) top right / 2px var(--l),
    linear-gradient(var(--c), var(--c)) bottom left / var(--l) 2px, linear-gradient(var(--c), var(--c)) bottom left / 2px var(--l),
    linear-gradient(var(--c), var(--c)) bottom right / var(--l) 2px, linear-gradient(var(--c), var(--c)) bottom right / 2px var(--l);
  background-repeat: no-repeat;
}
.reel-hud {
  position: absolute; inset: 26px 30px; z-index: 3; pointer-events: none;
  display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto 1fr auto; align-items: start;
  font: 400 12px var(--mono); color: var(--fg); text-transform: uppercase; letter-spacing: .08em; text-shadow: 0 1px 6px rgba(0,0,0,.6);
}
.reel-hud .rec { display: inline-flex; align-items: center; gap: 8px; }
.reel-hud .rec i { width: 9px; height: 9px; border-radius: 50%; background: var(--orange); animation: blink 1.4s infinite; }
.reel-hud .tc { justify-self: end; font-variant-numeric: tabular-nums; }
.reel-hud .where { grid-row: 3; align-self: end; color: var(--fg-2); }
.reel-hud .mode { grid-row: 3; justify-self: end; align-self: end; transition: color .2s; }
.reel.rewind .reel-hud .mode { color: var(--orange); }
/* A VHS tracking line rolls through while it rewinds. */
.reel-scan { position: absolute; inset-inline: 0; top: -12%; height: 10%; z-index: 1; pointer-events: none; opacity: 0; background: linear-gradient(180deg, transparent, rgba(236,233,229,.14) 45%, rgba(236,233,229,.3) 50%, rgba(236,233,229,.14) 55%, transparent); mix-blend-mode: screen; }
.reel.rewind .reel-scan { opacity: 1; animation: scan 1.1s linear infinite; }
@keyframes scan { to { top: 102%; } }
.reel-toggle { position: absolute; z-index: 4; inset-inline-end: 30px; top: 50%; transform: translateY(-50%); font: 400 12px var(--mono); color: var(--fg-2); background: rgba(10,10,10,.6); border: 1px solid var(--line-2); padding: 5px 10px; cursor: pointer; opacity: 0; transition: opacity .2s, border-color .2s, color .2s; }
.reel:hover .reel-toggle, .reel-toggle:focus-visible, .reel.paused .reel-toggle { opacity: 1; }
.reel-toggle:hover { border-color: var(--orange); color: var(--orange); }
.reel-toggle[hidden] { display: none; }
.reel.paused .reel-hud .rec i { animation: none; opacity: .35; }
.reel.paused .reel-scan, .reel.paused::before { animation-play-state: paused; }
@media (max-width: 640px) {
  .reel::after { inset: 8px; --l: 14px; }
  .reel-hud { inset: 16px 18px; font-size: 10px; letter-spacing: .04em; }
  .reel-hud .where { display: none; }
  .reel-toggle { opacity: 1; top: auto; bottom: 12px; left: 50%; right: auto; transform: translateX(-50%); font-size: 11px; padding: 3px 8px; }
}
/* Photo and certificate share one height: columns sized by their aspect ratios. */
.stage-row { display: grid; grid-template-columns: minmax(0, 1.775fr) minmax(0, 1.412fr); gap: 16px; align-items: start; }
@media (max-width: 640px) { .stage-row { grid-template-columns: minmax(0, 1fr); } }
.still, .cert { border: 1px solid var(--line-2); background: var(--bg-2); display: block; text-decoration: none; }
.still img, .cert > img { width: 100%; height: auto; }
.still figcaption, .cert > span { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--line-2); font: 400 12px var(--mono); color: var(--muted); }
.cert { transition: border-color .2s; }
.cert > img { filter: brightness(.88); transition: filter .2s; }
.cert:hover { border-color: var(--orange); }
.cert:hover > img { filter: none; }
.cert:hover > span { color: var(--orange); }

/* Home showcase: the paper's title page beside the links out. */
.talk-cta { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
@media (max-width: 860px) { .talk-cta { grid-template-columns: minmax(0, 1fr); } }
.paper { display: flex; flex-direction: column; border: 1px solid var(--line-2); background: var(--bg-2); text-decoration: none; transition: border-color .2s; }
.paper-sheet { flex: 1; display: grid; place-items: center; padding: clamp(14px, 3vw, 28px); background: #fff; filter: brightness(.88); transition: filter .2s; }
.paper-sheet img { width: 100%; height: auto; }
.paper-cap { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--line-2); font: 400 12px var(--mono); color: var(--muted); }
.paper:hover { border-color: var(--orange); }
.paper:hover .paper-sheet { filter: none; }
.paper:hover .paper-cap { color: var(--orange); }
.talk-side { display: flex; flex-direction: column; justify-content: center; gap: 20px; padding: clamp(20px, 3vw, 28px); border: 1px solid var(--line-2); background: var(--bg-2); }
.talk-side p { color: var(--fg-2); font-size: 16px; }
.talk-side p b { display: block; margin-bottom: 6px; font: 500 12px var(--mono); color: var(--orange-2); }
.talk-side .btns { margin-top: 0; flex-direction: column; align-items: stretch; }
.talk-side .btn { justify-content: center; }
/* The bright one: the company site. */
.btn.site { justify-content: center; font: 600 16px var(--mono); padding: 16px 22px; background: var(--orange); border-color: var(--orange); color: #0a0a0a; animation: beacon 2.6s infinite; }
.btn.site svg { width: 20px; height: 20px; }
.btn.site:hover, .btn.site:focus-visible { background: var(--orange-2); border-color: var(--orange-2); color: #0a0a0a; transform: translateY(-2px); }
@keyframes beacon { 0% { box-shadow: 0 0 0 0 rgba(255,107,20,.55); } 70%, 100% { box-shadow: 0 0 0 16px rgba(255,107,20,0); } }

.trace .bad { color: var(--orange); }
.msg.drop { align-self: flex-end; background: transparent; border: 1px dashed var(--line-2); color: var(--muted); }
.msg.drop small { color: var(--orange); }
.trace-eval .evalrow b { text-transform: lowercase; }

.talk-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 56px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.talk-stats .stat { padding-inline: 0 20px; }
.talk-stats .stat + .stat { padding-inline-start: 20px; }
@media (max-width: 860px) {
  .talk-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .talk-stats .stat:nth-child(2) { border-inline-end: 0; }
  .talk-stats .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .talk-stats .stat:nth-child(3) { padding-inline-start: 0; }
}

.talk-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 64px); margin-top: 56px; align-items: start; }
@media (max-width: 960px) { .talk-grid { grid-template-columns: minmax(0, 1fr); } }
.talk-grid .loop-title { margin: 0 0 16px; }

/* Product map: drawn in HTML so it follows the theme. */
.pmap-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-areas: "k k d o" "a a s s" "c c c c"; gap: 30px 10px; }
.pm { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1px solid var(--line-2); background: var(--bg-2); }
.pm b { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.pm span { font-size: 13.5px; line-height: 1.45; color: var(--fg-2); }
.pm small { margin-top: auto; padding-top: 4px; font: 400 11.5px/1.5 var(--mono); color: var(--muted); }
.pm.planned { border-style: dashed; background: transparent; }
.pm.core { border-color: var(--orange); background: var(--orange-bg); }
.pm.core small { color: var(--orange-2); }
.pm-d { grid-area: d; } .pm-o { grid-area: o; } .pm-a { grid-area: a; } .pm-s { grid-area: s; } .pm-c { grid-area: c; }
/* Arrows down to whatever each box is built on. */
.pm:not(.core)::after { content: '↓'; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); height: 30px; width: 12px; display: grid; place-items: end center; font: 400 12px/1 var(--mono); color: var(--muted); background: linear-gradient(var(--line-2), var(--line-2)) center top / 1px calc(100% - 10px) no-repeat; }
.pm.planned::after { background: repeating-linear-gradient(180deg, var(--line-2) 0 3px, transparent 3px 6px) center top / 1px calc(100% - 10px) no-repeat; }
.pmap-key { grid-area: k; display: flex; flex-direction: column; gap: 8px; font: 400 11.5px var(--mono); color: var(--muted); }
.pmap-key span { display: inline-flex; align-items: center; gap: 10px; }
.pmap-key b { width: 18px; text-align: center; font-weight: 400; }
.pmap-key i { width: 18px; height: 10px; border: 1px solid var(--line-2); }
.pmap-key i.dash { border-style: dashed; }
@media (max-width: 520px) {
  /* Agatha and AshaSwarm side by side; the designed tools say in words what they connect to. */
  .pmap-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "d o" "a s" "c c" "k k"; gap: 12px 10px; }
  .pmap-grid .pm-a, .pmap-grid .pm-s { margin-top: 18px; }
  .pm.planned::after { display: none; }
  .pmap-key { flex-direction: row; flex-wrap: wrap; gap: 6px 16px; }
}

/* Roadmap: the first column is the gate before anyone outside gets it. */
.road { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); border-inline-start: 1px solid var(--line); }
.road > li { position: relative; padding: 16px 14px 18px; border-inline-end: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.road > li > b { display: block; font: 500 12px var(--mono); color: var(--orange); text-transform: lowercase; }
.road > li > span { display: block; margin-top: 4px; font-size: 15px; font-weight: 600; line-height: 1.3; letter-spacing: -.01em; }
.road ul { margin-top: 12px; display: grid; gap: 8px; }
.road ul li { position: relative; padding-inline-start: 14px; font-size: 13.5px; line-height: 1.45; color: var(--fg-2); }
.road ul li::before { content: '·'; position: absolute; inset-inline-start: 2px; color: var(--orange); font-weight: 700; }
.road > li.now { background: var(--orange-bg); }
.road > li.now::after { content: ''; position: absolute; top: -6px; inset-inline-end: -6px; width: 10px; height: 10px; background: var(--orange); transform: rotate(45deg); }
@media (max-width: 960px) and (min-width: 601px) { .road { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.road-note { display: flex; align-items: center; gap: 10px; margin-top: 14px; font: 400 11.5px var(--mono); color: var(--muted); }
.road-note i { width: 8px; height: 8px; background: var(--orange); transform: rotate(45deg); }

.talk-docs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 56px; }
@media (max-width: 960px) { .talk-docs { grid-template-columns: minmax(0, 1fr); } }
/* These captions carry words, not handles, so they follow the page's label font (Arabic letters must join). */
.talk-docs .contact-card .cl small { white-space: normal; font-family: var(--mono); }

@media (prefers-reduced-motion: reduce) {
  .reel::before, .reel-hud .rec i, .reel.rewind .reel-scan, .btn.site { animation: none; }
}

/* ---------- talk pages (/talks/…) ---------- */
.talk-hero { padding: clamp(120px, 16vw, 168px) 0 clamp(64px, 9vw, 104px); border-bottom: 1px solid var(--line); background-image: radial-gradient(rgba(255,255,255,.055) 1px, transparent 1.2px); background-size: 22px 22px; }
.talk-hero h1 { font-size: clamp(40px, 7vw, 88px); font-weight: 600; line-height: .98; letter-spacing: -.04em; max-width: 1000px; }
.talk-hero h1 span { display: block; margin-top: 18px; max-width: 780px; font-size: .42em; font-weight: 500; line-height: 1.2; letter-spacing: -.02em; color: var(--muted); }
.talk-hero .intro { max-width: 720px; }
.talk-hero .btns { margin-top: 32px; }
.talk-hero .btn.site { padding: 13px 20px; font-size: 15px; }
.banner { margin-top: 56px; }
.site-band { margin-top: 56px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px; padding: clamp(20px, 3vw, 32px); border: 1px solid rgba(255,107,20,.45); background: var(--orange-bg); }
.site-band p { max-width: 620px; color: var(--fg); font-size: 17px; }
.site-band p b { display: block; margin-bottom: 6px; font: 500 12px var(--mono); color: var(--orange-2); }
@media (max-width: 600px) { .site-band .btn.site { width: 100%; } }

/* ---------- stack ---------- */
.stack-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 56px; border-top: 1px solid var(--line); border-inline-start: 1px solid var(--line); }
@media (max-width: 960px) { .stack-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .stack-grid { grid-template-columns: minmax(0, 1fr); } }
.stack { padding: 26px 24px; border-inline-end: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stack h3 { font: 500 13px var(--mono); color: var(--orange); margin-bottom: 14px; }
.stack ul { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.stack li { color: var(--fg-2); font-size: 15px; }

/* ---------- about ---------- */
.about-grid { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); margin-top: 56px; align-items: start; }
@media (max-width: 860px) { .about-grid { grid-template-columns: minmax(0, 1fr); } }
.portrait { position: relative; border: 1px solid var(--line-2); background: var(--bg-2); overflow: hidden; max-width: 300px; }
.portrait img { width: 100%; height: auto; filter: contrast(1.02); position: relative; }
.portrait::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,107,20,.28) 1px, transparent 1.4px); background-size: 12px 12px; }
.portrait figcaption { position: relative; padding: 10px 14px; border-top: 1px solid var(--line-2); font: 400 12px var(--mono); color: var(--muted); display: flex; justify-content: space-between; background: var(--bg-2); }
.bio p { color: var(--fg-2); margin-bottom: 18px; max-width: 700px; }
.bio p:first-child { color: var(--fg); font-size: clamp(19px, 1.8vw, 22px); line-height: 1.5; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin-top: 32px; border-top: 1px solid var(--line); }
@media (max-width: 600px) { .facts { grid-template-columns: minmax(0, 1fr); } }
.fact { padding: 18px 16px 18px 0; border-bottom: 1px solid var(--line); }
.fact h4 { margin: 0 0 6px; font: 500 12px var(--mono); color: var(--muted); }
.fact p { margin: 0; color: var(--fg); font-size: 15px; line-height: 1.5; }
.fact p span { color: var(--muted); }

/* ---------- contact ---------- */
.contact { text-align: start; }
.contact .big { display: block; width: fit-content; max-width: 100%; margin-top: 32px; font-size: clamp(21px, 5.6vw, 64px); font-weight: 600; letter-spacing: -.035em; text-decoration: none; border-bottom: 2px solid var(--orange); line-height: 1.15; overflow-wrap: anywhere; }
.contact .big:hover { color: var(--orange); }
.contact .phone { display: block; width: fit-content; margin-top: 18px; font: 400 clamp(18px, 2.2vw, 26px) var(--mono); color: var(--fg-2); text-decoration: none; letter-spacing: .02em; }
.contact .phone:hover { color: var(--orange); }
.email-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 32px; }
.contact .email-row .big { margin-top: 0; }
.copy-email { display: inline-flex; align-items: center; gap: 8px; font: 500 13px var(--mono); color: var(--fg-2); background: var(--bg-2); border: 1px solid var(--line-2); padding: 9px 13px; cursor: pointer; transition: border-color .2s, color .2s; }
.copy-email svg { width: 18px; height: 18px; }
.copy-email:hover, .copy-email:focus-visible { border-color: var(--orange); color: var(--orange); }
.contact-links { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 40px; }
@media (max-width: 960px) { .contact-links { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .contact-links { grid-template-columns: minmax(0, 1fr); } }
.contact-card {
  position: relative; display: flex; align-items: center; gap: 14px; padding: 16px; padding-inline-end: 40px;
  color: var(--fg); background: var(--bg-2); border: 1px solid var(--line-2); text-decoration: none; font: inherit; text-align: start; cursor: pointer;
  transition: border-color .2s, background .2s, transform .2s;
}
.contact-card:hover, .contact-card:focus-visible { border-color: var(--orange); background: var(--bg-3); transform: translateY(-2px); }
.contact-card .ci { flex: none; width: 46px; height: 46px; display: grid; place-items: center; color: var(--fg); background: var(--bg); border: 1px solid var(--line-2); transition: color .2s, background .2s, border-color .2s; }
.contact-card .ci svg { width: 24px; height: 24px; }
.contact-card:hover .ci, .contact-card:focus-visible .ci { color: #0a0a0a; background: var(--orange); border-color: var(--orange); }
.contact-card .cl { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
.contact-card .cl b { font: 600 16px/1.3 var(--sans); }
.contact-card .cl small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 400 12.5px/1.4 'JetBrains Mono', ui-monospace, monospace; color: var(--muted); }
.contact-card .ca { position: absolute; top: 10px; inset-inline-end: 12px; font: 400 13px 'JetBrains Mono', monospace; color: var(--muted); transition: color .2s; }
.contact-card:hover .ca { color: var(--orange); }
@media (prefers-reduced-motion: reduce) { .contact-card, .contact-card:hover { transform: none; } }

footer { padding: 28px 0 40px; font: 400 12px var(--mono); color: var(--muted); }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
footer a { text-decoration: none; border-bottom: 1px solid var(--line-2); }
footer a:hover { color: var(--orange); }

/* ---------- AI twin chat ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.twin-launch {
  position: fixed; inset-inline-end: 20px; bottom: 20px; z-index: 60;
  display: inline-flex; align-items: center; gap: 10px;
  font: 500 14px var(--mono); color: #0a0a0a; background: var(--orange);
  border: 0; padding: 13px 18px; cursor: pointer; box-shadow: 0 8px 30px rgba(0,0,0,.5);
  transition: background .2s, transform .2s;
}
.twin-launch:hover { background: var(--orange-2); transform: translateY(-2px); }
.twin-launch .twin-dot { width: 8px; height: 8px; border-radius: 50%; background: #0a0a0a; position: relative; }
.twin-launch .twin-dot::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid #0a0a0a; animation: ping 2s infinite; }
.twin-open .twin-launch { display: none; }

.twin {
  position: fixed; inset-inline-end: 20px; bottom: 20px; z-index: 61;
  width: min(400px, calc(100vw - 40px)); height: min(600px, calc(100vh - 100px)); height: min(600px, calc(100dvh - 100px));
  display: flex; flex-direction: column;
  background: var(--bg-2); border: 1px solid var(--line-2); box-shadow: 0 20px 60px rgba(0,0,0,.6);
}
.twin[hidden] { display: none; }
.twin-head { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; border-bottom: 1px solid var(--line); }
.twin-head img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; object-position: 50% 12%; background: var(--bg-3); border: 1px solid var(--line-2); flex: none; }
.twin-head div { flex: 1; min-width: 0; }
.twin-head h2 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; }
.twin-head h2::after { content: 'AI'; font: 500 10px var(--mono); color: var(--orange-2); border: 1px solid rgba(255,107,20,.4); padding: 1px 5px; }
.twin-head p { margin: 2px 0 0; font: 400 11px var(--mono); color: var(--muted); }
.twin-close { background: none; border: 1px solid transparent; color: var(--fg-2); font: 400 22px/1 var(--sans); width: 34px; height: 34px; cursor: pointer; }
.twin-close:hover { border-color: var(--line-2); color: var(--orange); }

.twin-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.twin-msg { margin: 0; max-width: 88%; padding: 9px 12px; font-size: 14.5px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.twin-msg.assistant { align-self: flex-start; background: var(--bg-3); border: 1px solid var(--line); color: var(--fg); }
.twin-msg.user { align-self: flex-end; background: var(--orange-bg); border: 1px solid rgba(255,107,20,.35); color: var(--fg); }
.twin-msg.error { border-color: rgba(255,107,20,.5); color: var(--fg-2); }
.twin-msg a { color: var(--orange-2); text-underline-offset: 2px; }
.twin-typing { align-self: flex-start; display: inline-flex; gap: 4px; padding: 12px 14px; background: var(--bg-3); border: 1px solid var(--line); }
.twin-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: twin-bounce 1.2s infinite; }
.twin-typing i:nth-child(2) { animation-delay: .15s; }
.twin-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes twin-bounce { 0%, 60%, 100% { opacity: .3; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }

.twin-leave { align-self: stretch; display: grid; gap: 8px; padding: 12px; border: 1px solid rgba(255,107,20,.45); background: var(--bg); }
.twin-leave-title { margin: 0; font-size: 14px; line-height: 1.5; color: var(--fg); }
.twin-leave input, .twin-leave textarea { width: 100%; padding: 9px 11px; font: 400 14px/1.4 var(--sans); color: var(--fg); background: var(--bg-2); border: 1px solid var(--line-2); outline: none; resize: none; }
.twin-leave input:focus, .twin-leave textarea:focus { border-color: var(--orange); }
.twin-leave button { justify-self: start; font: 500 13px var(--mono); color: #0a0a0a; background: var(--orange); border: 0; padding: 9px 14px; cursor: pointer; }
.twin-leave button:disabled { opacity: .6; cursor: default; }
.twin-leave-error { margin: 0; font-size: 13px; color: var(--orange-2); }
.twin-leave-error[hidden] { display: none; }
.twin-leave-error a { color: var(--orange-2); }
.twin-leave-fine { margin: 0; font: 400 11px/1.5 var(--mono); color: var(--muted); }
.twin-suggest { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 12px; }
.twin-suggest[hidden] { display: none; }
.twin-suggest button { font: 400 12px var(--mono); color: var(--fg-2); background: var(--bg); border: 1px solid var(--line-2); padding: 6px 9px; cursor: pointer; text-align: start; }
.twin-suggest button:hover { border-color: var(--orange); color: var(--orange); }

.twin-form { display: flex; align-items: flex-end; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
.twin-form textarea {
  flex: 1; resize: none; max-height: 120px; min-height: 40px; padding: 10px 12px; overflow-y: hidden;
  font: 400 15px/1.4 var(--sans); color: var(--fg); background: var(--bg); border: 1px solid var(--line-2); outline: none;
}
.twin-form textarea:focus { border-color: var(--orange); }
.twin-form button { flex: none; width: 40px; height: 40px; border: 0; background: var(--orange); color: #0a0a0a; font: 600 18px var(--sans); cursor: pointer; }
.twin-form button:disabled { opacity: .45; cursor: default; }
.twin-note { margin: 0; padding: 0 14px 10px; font: 400 11px var(--mono); color: var(--muted); }
.twin-note[hidden] { display: none; }

@media (max-width: 600px) {
  .twin-launch { inset-inline-end: 16px; bottom: 16px; padding: 12px 16px; }
  .twin { inset-inline-end: 0; bottom: 0; width: 100vw; height: 100vh; height: 100dvh; border: 0; }
  .twin-open { overflow: hidden; }
}
@media (prefers-reduced-motion: reduce) {
  .twin-launch .twin-dot::after, .twin-typing i { animation: none; }
}

/* ---------- reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.seen { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .status .pulse::after, .trace-top .live i { animation: none; }
}

/* ---------- right-to-left (Arabic) ---------- */
:root[dir="rtl"] {
  --sans: 'IBM Plex Sans Arabic', 'Space Grotesk', system-ui, sans-serif;
  /* Labels use the Arabic sans (a monospace space is too wide between Arabic words); real code stays monospace. */
  --mono: 'IBM Plex Sans Arabic', 'JetBrains Mono', ui-monospace, monospace;
}
[dir="rtl"] :is(.term pre, .term-bar span, .tool, .hud b, .contact .phone, code, .logo, .reel-hud) { font-family: 'JetBrains Mono', ui-monospace, monospace; }
/* Arabic letters join; tracking (especially negative) breaks them. */
[dir="rtl"] * { letter-spacing: normal; }
[dir="rtl"] .hero h1 { line-height: 1.2; }
[dir="rtl"] .hero h1 .role { line-height: 1.45; }
[dir="rtl"] h2.title { line-height: 1.3; }
[dir="rtl"] .job h3, [dir="rtl"] .proj h3, [dir="rtl"] .term .desc h3 { line-height: 1.45; }
[dir="rtl"] .stat b { line-height: 1.15; }
[dir="rtl"] .hero::after {
  background:
    linear-gradient(270deg, rgba(10,10,10,.92) 0%, rgba(10,10,10,.6) 42%, rgba(10,10,10,0) 72%),
    linear-gradient(0deg, rgba(10,10,10,1) 0%, rgba(10,10,10,0) 22%);
}
[dir="rtl"] .pillar li::before { content: '←'; }
/* The camera HUD on the stage reel reads left to right in every language. */
[dir="rtl"] .reel-hud { letter-spacing: .08em; }
[dir="rtl"] .talk-hero h1 { line-height: 1.25; }
[dir="rtl"] .talk-hero h1 span { line-height: 1.55; }
[dir="rtl"] .btn.site { font-family: 'JetBrains Mono', ui-monospace, monospace; }
[dir="rtl"] .proj li::before { content: '‹'; }
/* Commands, code, emails and phone numbers stay left-to-right inside Arabic text. */
[dir="rtl"] .ltr { direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] .contact .big { direction: ltr; }
.nav-links .lang-switch[lang="ar"] { font-family: 'IBM Plex Sans Arabic', var(--sans); }
.nav-links .lang-switch[lang="fa"] { font-family: 'Vazirmatn', var(--sans); }
.nav-links .lang-switch[lang="en"] { font-family: 'Space Grotesk', var(--sans); }

/* ---------- Persian ---------- */
:root[lang="fa"] {
  --sans: 'Vazirmatn', 'Space Grotesk', system-ui, sans-serif;
  --mono: 'Vazirmatn', 'JetBrains Mono', ui-monospace, monospace;
}
:root[lang="fa"] .loop li::before { content: counter(step, persian); }
