:root {
  --bg: #070b16;
  --bg-2: #0b1122;
  --surface: #0f1629;
  --surface-2: #131c34;
  --line: rgba(148, 170, 230, .14);
  --line-strong: rgba(148, 170, 230, .28);
  --text: #e9eefb;
  --muted: #93a0c0;
  --faint: #5d6a8c;
  --cyan: #4fd1ff;
  --violet: #8b7bff;
  --amber: #ffb547;
  --grad: linear-gradient(120deg, var(--cyan), var(--violet));
  --radius: 18px;
  --max: 1200px;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ---------- header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  transition: background .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(7, 11, 22, .78);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: .2px; }
.logo svg { width: 30px; height: 30px; }
.menu { display: flex; gap: 32px; font-size: 14.5px; color: var(--muted); }
.menu a { position: relative; padding: 4px 0; transition: color .2s; }
.menu a:hover, .menu a.active { color: var(--text); }
.menu a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px;
  background: var(--grad); border-radius: 2px;
}

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 24px; border-radius: 12px; border: 0; cursor: pointer;
  font-weight: 600; font-size: 15px; white-space: nowrap;
  transition: transform .15s, box-shadow .2s, border-color .2s, background .2s;
}
.btn-primary { background: var(--grad); color: #060914; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 30px rgba(79, 209, 255, .25); }
.btn-ghost { border: 1px solid var(--line-strong); background: rgba(255, 255, 255, .02); }
.btn-ghost:hover { border-color: var(--cyan); }
.btn svg { width: 16px; height: 16px; }
.nav .btn { padding: 10px 18px; font-size: 14px; }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center; padding: 110px 0 60px; overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(900px 600px at 75% 45%, rgba(139, 123, 255, .13), transparent 70%),
    radial-gradient(700px 500px at 60% 70%, rgba(79, 209, 255, .08), transparent 70%);
}
.hero-grid {
  position: relative; width: 100%;
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 24px; align-items: center;
}
.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font: 500 12.5px/1 var(--mono); letter-spacing: 1.5px; text-transform: uppercase; color: var(--cyan);
  margin-bottom: 26px;
}
.kicker .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); animation: blink 2.4s infinite; }
@keyframes blink { 50% { opacity: .3; } }
h1 {
  font-size: clamp(36px, 4.4vw, 60px); line-height: 1.06; font-weight: 750; letter-spacing: -.035em;
}
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { margin: 26px 0 38px; font-size: clamp(17px, 1.6vw, 19px); color: var(--muted); max-width: 540px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }

.brain-stage { position: relative; aspect-ratio: 1 / .9; width: 100%; }
#brain { position: absolute; inset: -8% -12%; width: 124%; height: 116%; cursor: grab; touch-action: pan-y; }
#brain.dragging { cursor: grabbing; }
.stage-hint {
  position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%);
  display: flex; gap: 18px; white-space: nowrap;
  font: 12px/1 var(--mono); color: var(--faint); letter-spacing: .5px;
}
.stage-hint span { display: inline-flex; align-items: center; gap: 7px; }
.stage-hint svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.stage-readout {
  position: absolute; top: 4%; right: 0;
  font: 11.5px/1.7 var(--mono); color: var(--faint); text-align: right; letter-spacing: .4px;
}
.stage-readout b { color: var(--cyan); font-weight: 500; }

.hero-foot { position: absolute; left: 0; right: 0; bottom: 28px; }
.disciplines {
  display: flex; gap: 12px 36px; flex-wrap: wrap;
  font: 12px/1 var(--mono); color: var(--faint); letter-spacing: 1.2px; text-transform: uppercase;
}

/* ---------- sections ---------- */
section { position: relative; padding: 120px 0; }
.section-alt { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { display: grid; grid-template-columns: 220px 1fr; gap: 32px; margin-bottom: 56px; }
.label {
  font: 500 12.5px/1.8 var(--mono); color: var(--muted); letter-spacing: 1.5px; text-transform: uppercase;
  padding-top: 10px; border-top: 1px solid var(--line-strong); align-self: start;
}
.label b { color: var(--cyan); font-weight: 500; margin-right: 8px; }
h2 { font-size: clamp(30px, 3.6vw, 46px); line-height: 1.12; font-weight: 700; letter-spacing: -.025em; max-width: 780px; }
.sub { margin-top: 18px; color: var(--muted); font-size: 17.5px; max-width: 640px; }

/* statement */
.statement { padding: 100px 0; }
.statement p {
  font-size: clamp(24px, 3vw, 38px); line-height: 1.3; font-weight: 500; letter-spacing: -.02em;
  max-width: 980px; color: var(--muted);
}
.statement p em { font-style: normal; color: var(--text); }

/* research cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.card {
  position: relative; padding: 36px 32px 40px;
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  transition: background .3s;
  overflow: hidden;
}
.card::before {
  content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .35s; pointer-events: none;
  background: radial-gradient(400px 220px at var(--mx, 50%) var(--my, 0%), rgba(79, 209, 255, .09), transparent 70%);
}
.card:hover::before { opacity: 1; }
.card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 44px; }
.card-num { font: 12.5px var(--mono); color: var(--faint); }
.card-icon { width: 30px; height: 30px; stroke: var(--cyan); fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { font-size: 20px; font-weight: 650; letter-spacing: -.01em; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 15px; }

/* ---------- synapse lab ---------- */
.lab {
  display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  background: var(--surface);
}
.lab-view { position: relative; min-height: 520px; background: radial-gradient(ellipse at 50% 45%, #111a33 0%, #0a0f1f 75%); border-right: 1px solid var(--line); }
#synapse { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.lab-tag {
  position: absolute; font: 11px/1 var(--mono); color: var(--faint); letter-spacing: 1px; text-transform: uppercase; pointer-events: none;
}
.lab-tag.t1 { top: 18px; left: 20px; }
.lab-tag.t2 { bottom: 18px; left: 20px; }
.lab-tag.t3 { top: 50%; right: 20px; transform: translateY(-50%); }

.lab-panel { display: flex; flex-direction: column; padding: 28px; gap: 22px; }
.lab-controls { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.lab-controls .btn { padding: 11px 18px; font-size: 14px; }
.switch { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); cursor: pointer; user-select: none; }
.switch input { appearance: none; width: 36px; height: 20px; border-radius: 20px; background: var(--surface-2); border: 1px solid var(--line-strong); position: relative; cursor: pointer; transition: background .2s; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--muted); transition: transform .2s, background .2s; }
.switch input:checked { background: rgba(79, 209, 255, .2); border-color: var(--cyan); }
.switch input:checked::after { transform: translateX(16px); background: var(--cyan); }

.slider { display: grid; gap: 8px; }
.slider-row { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--muted); }
.slider-row output { font-family: var(--mono); color: var(--text); }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 4px; border-radius: 4px; background: var(--surface-2); outline-offset: 6px; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 4px rgba(79, 209, 255, .2); cursor: pointer; }
input[type=range]::-moz-range-thumb { width: 16px; height: 16px; border: 0; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 4px rgba(79, 209, 255, .2); cursor: pointer; }

.stages { list-style: none; display: grid; gap: 4px; }
.stages li {
  display: grid; grid-template-columns: 28px 1fr; gap: 12px; padding: 12px 14px; border-radius: 12px;
  transition: background .3s, opacity .3s; opacity: .5;
}
.stages li.on { background: var(--surface-2); opacity: 1; }
.stages li.done { opacity: .8; }
.stages .n { font: 12px/22px var(--mono); color: var(--faint); }
.stages li.on .n { color: var(--amber); }
.stages h4 { font-size: 15px; font-weight: 600; line-height: 22px; }
.stages p { font-size: 13.5px; color: var(--muted); line-height: 1.5; margin-top: 3px; display: none; }
.stages li.on p { display: block; }

.trace { margin-top: auto; }
.trace-head { display: flex; justify-content: space-between; font: 11.5px var(--mono); color: var(--faint); letter-spacing: .5px; margin-bottom: 8px; }
.trace-head b { color: var(--cyan); font-weight: 500; }
#trace { width: 100%; height: 90px; display: block; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); }

/* ---------- pipeline ---------- */
.pipeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; position: relative; }
.pipeline::before {
  content: ""; position: absolute; top: 23px; left: 24px; right: 24px; height: 1px;
  background: linear-gradient(90deg, var(--cyan), var(--violet), transparent);
  opacity: .5;
}
.step { position: relative; padding-right: 32px; }
.step-dot {
  position: relative; z-index: 1; width: 47px; height: 47px; border-radius: 50%;
  display: grid; place-items: center; margin-bottom: 26px;
  background: var(--bg-2); border: 1px solid var(--line-strong);
  font: 13px var(--mono); color: var(--cyan);
}
.step h3 { font-size: 18px; font-weight: 650; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 15px; }

/* ---------- principles ---------- */
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.principle {
  padding: 30px; border-radius: var(--radius); border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface), transparent);
}
.principle h3 { font-size: 18px; font-weight: 650; margin: 18px 0 8px; }
.principle p { color: var(--muted); font-size: 15px; }
.principle svg { width: 26px; height: 26px; stroke: var(--violet); fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- contact ---------- */
.contact-box {
  position: relative; overflow: hidden;
  border: 1px solid var(--line-strong); border-radius: 24px; padding: 72px 56px;
  background:
    radial-gradient(600px 300px at 85% 0%, rgba(139, 123, 255, .18), transparent 70%),
    radial-gradient(500px 300px at 0% 100%, rgba(79, 209, 255, .12), transparent 70%),
    var(--surface);
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: end;
}
.contact-box h2 { max-width: 620px; }
.contact-list { display: grid; gap: 14px; justify-items: start; }
.contact-list .mail { font: 500 15px var(--mono); color: var(--muted); }

/* ---------- footer ---------- */
footer { padding: 48px 0; color: var(--faint); font-size: 14px; }
.foot { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.foot nav { display: flex; gap: 24px; }
.foot nav a:hover { color: var(--text); }

/* ---------- reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s cubic-bezier(.2, .7, .2, 1), transform .8s cubic-bezier(.2, .7, .2, 1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; } .reveal.d2 { transition-delay: .16s; } .reveal.d3 { transition-delay: .24s; }

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

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 96px; align-items: flex-start; }
  .brain-stage { max-width: 560px; margin: 0 auto; width: 100%; }
  .hero-foot { position: static; margin-top: 56px; }
  .hero { flex-direction: column; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .lab { grid-template-columns: 1fr; }
  .lab-view { min-height: 420px; border-right: 0; border-bottom: 1px solid var(--line); }
  .pipeline { grid-template-columns: repeat(2, 1fr); gap: 40px 0; }
  .pipeline::before { display: none; }
  .principles { grid-template-columns: 1fr; }
  .contact-box { grid-template-columns: 1fr; padding: 48px 32px; }
  .section-head { grid-template-columns: 1fr; gap: 20px; }
  .label { justify-self: start; padding-right: 24px; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .menu { display: none; }
  section { padding: 80px 0; }
  .cards { grid-template-columns: 1fr; }
  .card { padding: 28px 22px 32px; }
  .card-top { margin-bottom: 28px; }
  .pipeline { grid-template-columns: 1fr; }
  .lab-view { min-height: 340px; }
  .lab-panel { padding: 20px; }
  .stage-hint { gap: 12px; font-size: 11px; }
  .stage-readout { display: none; }
  .contact-box { padding: 40px 22px; border-radius: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .kicker .dot { animation: none; }
}

.no-webgl .stage-hint, .no-webgl .stage-readout { display: none; }
