:root {
  --bg: oklch(0.135 0.012 250);
  --bg-elev: oklch(0.165 0.013 250);
  --surface: oklch(0.185 0.014 250);
  --surface-2: oklch(0.215 0.014 250);
  --border: oklch(0.28 0.015 250 / 0.55);
  --border-soft: oklch(0.28 0.015 250 / 0.28);
  --text: oklch(0.97 0.005 250);
  --text-muted: oklch(0.68 0.012 250);
  --text-dim: oklch(0.5 0.012 250);

  --accent: oklch(0.78 0.11 232);
  --accent-soft: oklch(0.78 0.11 232 / 0.14);
  --accent-line: oklch(0.78 0.11 232 / 0.35);

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --font-sans:
    "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "ss03", "cv11";
  line-height: 1.5;
  overflow-x: hidden;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(
      60% 50% at 50% -10%,
      oklch(0.78 0.11 232 / 0.18),
      transparent 60%
    ),
    radial-gradient(
      40% 30% at 85% 10%,
      oklch(0.78 0.11 232 / 0.06),
      transparent 70%
    ),
    radial-gradient(
      50% 40% at 10% 40%,
      oklch(0.78 0.11 232 / 0.05),
      transparent 70%
    );
}
.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image:
    linear-gradient(to right, oklch(1 0 0 / 0.025) 1px, transparent 1px),
    linear-gradient(to bottom, oklch(1 0 0 / 0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(
    ellipse 60% 50% at 50% 30%,
    #000 30%,
    transparent 75%
  );
  -webkit-mask-image: radial-gradient(
    ellipse 60% 50% at 50% 30%,
    #000 30%,
    transparent 75%
  );
}
.noise {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ─── layout ─── */
.page {
  position: relative;
  z-index: 1;
}
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
@media (min-width: 768px) {
  .container {
    padding: 0 40px;
  }
}

/* ─── nav ─── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  background: oklch(0.135 0.012 250 / 0.65);
  border-bottom: 1px solid var(--border-soft);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  letter-spacing: -0.01em;
  font-size: 15px;
}
.brand .mark {
  width: 22px;
  height: 22px;
}
.nav-links {
  display: none;
  gap: 28px;
}
.nav-links a {
  font-size: 14px;
  color: var(--text-muted);
  transition: color 0.2s var(--ease);
}
.nav-links a:hover {
  color: var(--text);
}
.nav-cta {
  display: flex;
  align-items: center;
  gap: 10px;
}
@media (min-width: 880px) {
  .nav-links {
    display: flex;
  }
}

/* ─── buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s var(--ease);
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn-primary {
  background: var(--text);
  color: var(--bg);
}
.btn-primary:hover {
  background: oklch(1 0 0);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px -8px oklch(1 0 0 / 0.2);
}
.btn-ghost {
  color: var(--text);
  border-color: var(--border);
  background: oklch(1 0 0 / 0.02);
}
.btn-ghost:hover {
  border-color: oklch(1 0 0 / 0.25);
  background: oklch(1 0 0 / 0.04);
}
.btn-sm {
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
}

/* ─── hero ─── */
.hero {
  position: relative;
  padding: 72px 0 64px;
  text-align: center;
}
@media (min-width: 768px) {
  .hero {
    padding: 104px 0 88px;
  }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 6px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: oklch(1 0 0 / 0.025);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 32px;
}
.eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px oklch(0.78 0.11 232 / 0.18);
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 4px oklch(0.78 0.11 232 / 0.18);
  }
  50% {
    box-shadow: 0 0 0 7px oklch(0.78 0.11 232 / 0);
  }
}
.eyebrow .sep {
  width: 1px;
  height: 12px;
  background: var(--border);
}
.eyebrow .mono {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-dim);
}

h1.headline {
  font-family: var(--font-sans);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.02;
  font-size: clamp(40px, 7vw, 76px);
  margin: 0 auto 24px;
  max-width: 14ch;
  text-wrap: balance;
  background: linear-gradient(
    180deg,
    oklch(1 0 0) 0%,
    oklch(0.78 0.008 250) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
h1.headline em {
  font-style: normal;
  background: linear-gradient(
    180deg,
    oklch(0.85 0.11 232),
    oklch(0.65 0.13 240)
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.sub {
  max-width: 56ch;
  margin: 0 auto 40px;
  color: var(--text-muted);
  font-size: clamp(16px, 1.5vw, 18px);
  line-height: 1.55;
  text-wrap: pretty;
}
.cta-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* hero visual under the buttons */
.hero-viz {
  margin-top: 56px;
  position: relative;
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 12px;
}
.signal-panel {
  position: relative;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background:
    linear-gradient(180deg, oklch(1 0 0 / 0.04), oklch(1 0 0 / 0.01)),
    var(--bg-elev);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  overflow: hidden;
  box-shadow:
    0 1px 0 0 oklch(1 0 0 / 0.06) inset,
    0 40px 80px -40px oklch(0 0 0 / 0.6),
    0 0 0 1px oklch(0.78 0.11 232 / 0.05);
}
.signal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-soft);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-muted);
}
.signal-head .dots {
  display: flex;
  gap: 6px;
}
.signal-head .dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: oklch(1 0 0 / 0.12);
}
.signal-body {
  padding: 22px 18px 26px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}
@media (min-width: 720px) {
  .signal-body {
    grid-template-columns: 220px 1fr;
    gap: 28px;
    padding: 28px;
  }
}
.signal-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.signal-list .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 10px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  transition: background 0.2s var(--ease);
}
.signal-list .row.active {
  background: var(--accent-soft);
  color: var(--text);
}
.signal-list .row .lvl {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: oklch(1 0 0 / 0.06);
  color: var(--text-dim);
}
.signal-list .row.active .lvl {
  background: var(--accent);
  color: var(--bg);
}

.signal-chart {
  position: relative;
  height: 220px;
}
.signal-chart svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* ─── section primitives ─── */
section {
  position: relative;
  padding: 64px 0;
}
@media (min-width: 768px) {
  section {
    padding: 88px 0;
  }
}

.section-head {
  margin-bottom: 44px;
  max-width: 680px;
}
.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-eyebrow::before {
  content: "";
  width: 14px;
  height: 1px;
  background: var(--accent-line);
}
.section-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 500;
  letter-spacing: -0.028em;
  line-height: 1.08;
  margin: 0 0 16px;
  text-wrap: balance;
}
.section-sub {
  color: var(--text-muted);
  font-size: 17px;
  max-width: 58ch;
  text-wrap: pretty;
}

/* ─── features ─── */
.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 720px) {
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.feature {
  position: relative;
  padding: 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background:
    linear-gradient(180deg, oklch(1 0 0 / 0.025), oklch(1 0 0 / 0.005)),
    var(--surface);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.3s var(--ease);
  overflow: hidden;
  min-height: 280px;
  display: flex;
  flex-direction: column;
}
.feature::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    400px 200px at var(--mx, 50%) var(--my, 0%),
    oklch(0.78 0.11 232 / 0.08),
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.3s var(--ease);
  pointer-events: none;
}
.feature:hover {
  border-color: oklch(0.78 0.11 232 / 0.35);
  transform: translateY(-2px);
}
.feature:hover::after {
  opacity: 1;
}
.feature .ic {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(180deg, oklch(1 0 0 / 0.08), oklch(1 0 0 / 0.02));
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--accent);
  margin-bottom: 22px;
}
.feature h3 {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}
.feature p {
  color: var(--text-muted);
  font-size: 14.5px;
  margin: 0;
  line-height: 1.55;
}
.feature .tag {
  margin-top: auto;
  padding-top: 24px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 8px;
}
.feature .tag::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-line);
}

/* ─── tech stack ─── */
.stack-wrap {
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background:
    linear-gradient(180deg, oklch(1 0 0 / 0.025), oklch(1 0 0 / 0.005)),
    var(--surface);
  overflow: hidden;
}
.stack-grid {
  display: grid;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .stack-grid {
    grid-template-columns: 320px 1fr;
  }
}
.stack-left {
  padding: 36px;
  border-bottom: 1px solid var(--border-soft);
}
@media (min-width: 900px) {
  .stack-left {
    border-bottom: 0;
    border-right: 1px solid var(--border-soft);
  }
}
.stack-left h3 {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}
.stack-left p {
  color: var(--text-muted);
  font-size: 14.5px;
  margin: 0 0 24px;
  line-height: 1.55;
}
.stack-layers {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border-soft);
}
.stack-layer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  background: oklch(1 0 0 / 0.02);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  cursor: default;
  transition: all 0.2s var(--ease);
}
.stack-layer .ix {
  color: var(--text-dim);
  margin-right: 12px;
}
.stack-layer.active {
  background: var(--accent-soft);
  color: var(--text);
}
.stack-layer.active .ix {
  color: var(--accent);
}

.stack-right {
  padding: 36px;
  min-height: 360px;
  position: relative;
  background: radial-gradient(
    50% 40% at 80% 20%,
    oklch(0.78 0.11 232 / 0.08),
    transparent 70%
  );
}
.stack-detail {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.stack-detail .label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.stack-detail h4 {
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  max-width: 22ch;
}
.stack-detail p {
  color: var(--text-muted);
  font-size: 15px;
  margin: 0 0 24px;
  line-height: 1.6;
  max-width: 52ch;
}
.stack-detail .meta {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid var(--border-soft);
}
.stack-detail .meta div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stack-detail .meta .k {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.stack-detail .meta .v {
  font-size: 15px;
  color: var(--text);
}

/* ─── about ─── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: center;
}
@media (min-width: 900px) {
  .about-grid {
    grid-template-columns: 1.1fr 1fr;
    gap: 80px;
  }
}
.about-text h2 {
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 500;
  letter-spacing: -0.025em;
  margin: 0 0 18px;
  line-height: 1.1;
}
.about-text p {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.6;
  margin: 0 0 14px;
  text-wrap: pretty;
}
.about-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}
.about-stat {
  padding: 24px;
  background: var(--surface);
}
.about-stat .v {
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  background: linear-gradient(180deg, oklch(1 0 0), oklch(0.7 0.04 232));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.about-stat .k {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ─── contact / footer ─── */
.contact {
  border-top: 1px solid var(--border-soft);
  padding: 96px 0 56px;
  position: relative;
}
.contact-card {
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background:
    radial-gradient(
      60% 100% at 50% 0%,
      oklch(0.78 0.11 232 / 0.14),
      transparent 70%
    ),
    linear-gradient(180deg, oklch(1 0 0 / 0.03), oklch(1 0 0 / 0.005)),
    var(--surface);
  padding: 56px 32px;
  text-align: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  margin-bottom: 72px;
}
@media (min-width: 768px) {
  .contact-card {
    padding: 72px 56px;
  }
}
.contact-card h2 {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 500;
  letter-spacing: -0.028em;
  margin: 0 0 14px;
  text-wrap: balance;
}
.contact-card p {
  color: var(--text-muted);
  margin: 0 auto 28px;
  max-width: 48ch;
  font-size: 16px;
}

.footer {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  padding-top: 40px;
  border-top: 1px solid var(--border-soft);
}
@media (min-width: 720px) {
  .footer {
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
  }
}
.footer-brand p {
  color: var(--text-muted);
  font-size: 13.5px;
  max-width: 30ch;
  margin: 14px 0 0;
}
.footer-col h5 {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0 0 16px;
  font-weight: 400;
}
.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-col a {
  font-size: 14px;
  color: var(--text-muted);
  transition: color 0.2s var(--ease);
}
.footer-col a:hover {
  color: var(--text);
}

.footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-dim);
}

/* ─── animations ─── */
/* Content is VISIBLE by default. Animations are an enhancement,
     played when JS adds .in. If JS, IO, or animation engine fail,
     content remains readable. */
.reveal.in {
  animation: revealUp 0.8s var(--ease) both;
}
.reveal-stagger.in > * {
  animation: revealUp 0.7s var(--ease) both;
}
.reveal-stagger.in > *:nth-child(1) {
  animation-delay: 0ms;
}
.reveal-stagger.in > *:nth-child(2) {
  animation-delay: 70ms;
}
.reveal-stagger.in > *:nth-child(3) {
  animation-delay: 140ms;
}
.reveal-stagger.in > *:nth-child(4) {
  animation-delay: 210ms;
}
.reveal-stagger.in > *:nth-child(5) {
  animation-delay: 280ms;
}
.reveal-stagger.in > *:nth-child(6) {
  animation-delay: 350ms;
}

@keyframes revealUp {
  0% {
    opacity: 0;
    transform: translateY(14px);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* signal chart line draw */
.chart-path {
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
  animation: draw 3s var(--ease) 0.4s forwards;
}
@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}
.chart-fill {
  opacity: 0;
  animation: fade 1.6s var(--ease) 2.2s forwards;
}
@keyframes fade {
  to {
    opacity: 1;
  }
}
.chart-dot {
  opacity: 0;
  animation: pop 0.4s var(--ease) forwards;
}
@keyframes pop {
  to {
    opacity: 1;
    transform: scale(1);
  }
}
