@font-face {
  font-family: "Geist";
  src: url("../fonts/geist-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: oklch(0.94 0.012 208);
  --surface: #ffffff;
  --surface-soft: oklch(0.875 0.025 208);
  --ink: oklch(0.198 0.032 210);
  --muted: oklch(0.437 0.04 210);
  --line: oklch(0.84 0.024 208);
  --accent: oklch(0.672 0.092 210);
  --accent-hover: oklch(0.6 0.1 212);
  --accent-ink: oklch(0.198 0.032 210);
  --header: oklch(0.94 0.012 208 / 86%);
  --shadow: 0 22px 70px oklch(0.198 0.032 210 / 12%);
  --radius: 14px;
  --max: 1240px;
}

[data-theme="dark"] {
  --bg: oklch(0.18 0.015 220);
  --surface: oklch(0.222 0.016 218);
  --surface-soft: oklch(0.27 0.017 216);
  --ink: oklch(0.94 0.012 208);
  --muted: oklch(0.8 0.035 208);
  --line: oklch(1 0 0 / 10%);
  --accent: oklch(0.672 0.092 210);
  --accent-hover: oklch(0.8 0.035 208);
  --accent-ink: oklch(0.198 0.032 210);
  --header: oklch(0.18 0.015 220 / 86%);
  --shadow: 0 28px 80px oklch(0.08 0.02 220 / 46%);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background:
    radial-gradient(circle at 82% 5%, color-mix(in oklch, var(--accent) 11%, transparent), transparent 28rem),
    var(--bg);
  overflow-x: clip;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 82% 5%, color-mix(in oklch, var(--accent) 11%, transparent), transparent 28rem),
    var(--bg);
  font-family: "Geist", ui-sans-serif, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  opacity: 0.34;
  background-image: radial-gradient(circle, color-mix(in oklch, var(--accent) 42%, transparent) 0 1px, transparent 1.2px);
  background-size: 26px 26px;
  mask-image: linear-gradient(to bottom, black, transparent 46%);
}

img { display: block; max-width: 100%; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  transform: translateY(-150%);
  padding: 10px 14px;
  color: var(--accent-ink);
  background: var(--accent);
  border-radius: 8px;
  text-decoration: none;
}

.skip-link:focus { transform: translateY(0); }

.shell {
  width: min(calc(100% - 40px), var(--max));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 15;
  min-height: 72px;
  border-bottom: 1px solid color-mix(in oklch, var(--line) 78%, transparent);
  background: var(--header);
  backdrop-filter: blur(18px) saturate(140%);
}

.nav {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-width: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 760;
  letter-spacing: -0.04em;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-actions { margin-left: auto; flex-shrink: 0; }

.brand-mark {
  width: 32px;
  height: 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  padding: 5px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
}

.brand-mark i { background: var(--ink); border-radius: 50%; }
.brand-mark i:last-child { background: var(--accent); }
.brand small { color: var(--muted); font-size: 0.72rem; letter-spacing: 0.02em; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a,
.theme-toggle,
.menu-toggle {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 13px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
}

.nav-links a:hover,
.theme-toggle:hover,
.menu-toggle:hover { color: var(--ink); background: var(--surface-soft); }
.nav-links .nav-cta { color: var(--accent-ink); background: var(--accent); box-shadow: 0 8px 24px color-mix(in oklch, var(--accent) 24%, transparent); }
.nav-links .nav-cta:hover { color: var(--accent-ink); background: var(--accent-hover); transform: translateY(-1px); }
.menu-toggle { display: none; }

.hero {
  min-height: calc(100dvh - 72px);
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(500px, 1.08fr);
  align-items: center;
  gap: clamp(32px, 5vw, 78px);
  padding-block: 72px 92px;
}

.hero-copy { position: relative; z-index: 2; min-width: 0; }
.eyebrow {
  margin: 0 0 18px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { text-wrap: balance; }

h1 {
  max-width: 760px;
  margin-bottom: 24px;
  font-size: clamp(3.15rem, 6.4vw, 6.7rem);
  font-weight: 660;
  letter-spacing: -0.064em;
  line-height: 0.94;
}

.hero h1 { font-size: clamp(3.25rem, 5.35vw, 5.8rem); }
.accent-text { color: var(--accent); }

.lead {
  max-width: 58ch;
  margin-bottom: 30px;
  color: var(--muted);
  font-size: clamp(1.08rem, 1.6vw, 1.28rem);
}

.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: var(--surface);
  font-weight: 650;
  text-decoration: none;
  transition: transform 160ms cubic-bezier(.16,1,.3,1), border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.button:hover { transform: translateY(-2px); border-color: var(--ink); }
.button:active { transform: translateY(0) scale(0.98); }
.button.primary { color: var(--accent-ink); border-color: var(--accent); background: var(--accent); box-shadow: 0 10px 28px color-mix(in oklch, var(--accent) 25%, transparent); }
.button.ghost { background: transparent; }
.arrow { font-size: 1.2em; line-height: 1; }

.hero-visual {
  min-width: 0;
  position: relative;
  min-height: min(70vh, 660px);
  overflow: hidden;
  border: 1px solid color-mix(in oklch, var(--line) 82%, transparent);
  border-radius: calc(var(--radius) + 8px);
  background:
    linear-gradient(color-mix(in oklch, var(--line) 38%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in oklch, var(--line) 38%, transparent) 1px, transparent 1px),
    color-mix(in oklch, var(--surface) 78%, transparent);
  background-size: 42px 42px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-visual img { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; }
.hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid color-mix(in oklch, white 65%, transparent);
  border-radius: inherit;
  pointer-events: none;
}

.hero-note {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 2;
  width: min(270px, calc(100% - 36px));
  padding: 15px;
  color: var(--ink);
  background: color-mix(in oklch, var(--surface) 82%, transparent);
  border: 1px solid var(--line);
  border-radius: 10px;
  backdrop-filter: blur(16px);
  font-size: 0.83rem;
}

.hero-note strong { display: block; margin-bottom: 4px; font-size: 0.95rem; }

.map-kicker {
  position: absolute;
  inset: 20px 22px auto;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-family: "Geist", ui-monospace, monospace;
  font-size: 0.66rem;
  font-weight: 650;
  letter-spacing: 0.1em;
}

.system-map { position: absolute; inset: 56px 24px 92px; }
.map-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.map-lines path { fill: none; stroke: color-mix(in oklch, var(--accent) 60%, var(--line)); stroke-width: 1.25; stroke-dasharray: 5 7; }
.map-lines circle { fill: var(--accent); filter: drop-shadow(0 0 7px color-mix(in oklch, var(--accent) 70%, transparent)); }

.map-node {
  position: absolute;
  min-width: 118px;
  padding: 13px 15px;
  border: 1px solid color-mix(in oklch, var(--line) 86%, transparent);
  border-radius: 11px;
  background: color-mix(in oklch, var(--surface) 88%, transparent);
  box-shadow: inset 0 1px 0 color-mix(in oklch, white 75%, transparent), 0 8px 28px color-mix(in oklch, var(--ink) 7%, transparent);
  backdrop-filter: blur(12px);
}
.map-node:not(.map-center) > span:first-child { display: block; margin-bottom: 8px; color: var(--accent-hover); font-size: 0.68rem; font-weight: 700; }
.map-node strong { display: block; font-size: 0.94rem; letter-spacing: -0.025em; }
.map-node small { color: var(--muted); font-size: 0.7rem; }
.map-center { inset: 50% auto auto 50%; z-index: 2; min-width: 164px; padding: 22px; transform: translate(-50%, -50%); border-color: var(--accent); border-radius: 18px; text-align: center; box-shadow: 0 0 0 8px color-mix(in oklch, var(--accent) 9%, transparent), 0 18px 48px color-mix(in oklch, var(--ink) 12%, transparent); }
.map-center .brand-mark { width: 36px; height: 36px; margin: 0 auto 12px; }
.map-center strong { font-size: 1.05rem; }
.map-frontend { top: 3%; left: 2%; }
.map-backend { top: 0; right: 2%; }
.map-ai { top: 48%; right: 0; }
.map-qa { right: 15%; bottom: 13%; }
.map-infra { left: 0; bottom: 6%; }

.proof-strip {
  border-block: 1px solid var(--line);
  background: color-mix(in oklch, var(--surface-soft) 42%, transparent);
}

.proof-grid {
  display: grid;
  grid-template-columns: 1.35fr repeat(3, 1fr);
}

.proof-grid > * {
  min-height: 132px;
  padding: 28px;
  border-right: 1px solid var(--line);
}

.proof-grid > *:last-child { border-right: 0; }
.proof-grid p { margin: 0; color: var(--muted); }
.proof-grid strong { display: block; margin-bottom: 6px; color: var(--ink); font-size: clamp(1.45rem, 3vw, 2.4rem); letter-spacing: -0.045em; }

/* Interactive capability lab: real mini-components, not static screenshots. */
.capability-lab {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 610px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 8px);
  background: color-mix(in oklch, var(--surface) 78%, transparent);
  box-shadow: var(--shadow);
}

.lab-tabs { padding: 18px; border-right: 1px solid var(--line); background: color-mix(in oklch, var(--surface-soft) 58%, transparent); }
.lab-tab {
  width: 100%;
  min-height: 88px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 3px;
  padding: 16px;
  border: 0;
  border-radius: 12px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease, transform 160ms cubic-bezier(.23,1,.32,1);
}
.lab-tab span { font-size: 1rem; font-weight: 680; letter-spacing: -0.02em; }
.lab-tab small { font-size: 0.78rem; }
.lab-tab.active { color: var(--ink); background: var(--surface); box-shadow: inset 3px 0 0 var(--accent), 0 8px 24px color-mix(in oklch, var(--ink) 6%, transparent); }
.lab-tab:active { transform: scale(0.98); }

.lab-stage { min-width: 0; padding: clamp(18px, 3vw, 34px); }
.demo-panel { min-height: 540px; }
.demo-panel.active { animation: panel-in 240ms cubic-bezier(.23,1,.32,1) both; }
@keyframes panel-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.demo-head { min-height: 70px; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.demo-head > div > span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 0.76rem; }
.demo-head strong { display: block; font-size: clamp(1.25rem, 2vw, 1.75rem); letter-spacing: -0.035em; }
.live-state, .model-label, .qa-total, .api-status { flex-shrink: 0; padding: 8px 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 0.72rem; }
.live-state { display: inline-flex; align-items: center; gap: 7px; }
.live-state i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: live-pulse 1.8s ease-in-out infinite; }
@keyframes live-pulse { 50% { opacity: 0.35; transform: scale(0.82); } }

.inbox-demo { min-height: 430px; display: grid; grid-template-columns: minmax(210px, 0.72fr) minmax(300px, 1.28fr); overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.demo-conversations { padding: 10px; border-right: 1px solid var(--line); background: color-mix(in oklch, var(--surface-soft) 36%, var(--surface)); }
.conversation { width: 100%; display: grid; grid-template-columns: 38px 1fr auto; gap: 10px; align-items: center; padding: 13px 11px; border: 0; border-radius: 10px; color: var(--ink); background: transparent; font: inherit; text-align: left; cursor: pointer; transition: background 140ms ease, transform 140ms cubic-bezier(.23,1,.32,1); }
.conversation.active { background: var(--surface); box-shadow: 0 5px 18px color-mix(in oklch, var(--ink) 6%, transparent); }
.conversation:active { transform: scale(0.98); }
.conversation > span:nth-child(2) { min-width: 0; }
.conversation strong, .conversation small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conversation strong { font-size: 0.85rem; }
.conversation small, .conversation time { color: var(--muted); font-size: 0.68rem; }
.avatar { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; color: var(--accent-ink); background: var(--accent); font-size: 0.72rem; font-weight: 720; }
.demo-chat { position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 12px; padding: 24px; background-image: radial-gradient(circle, color-mix(in oklch, var(--accent) 18%, transparent) 0 1px, transparent 1.2px); background-size: 22px 22px; }
.chat-context { position: absolute; inset: 18px 18px auto; padding: 11px 13px; border: 1px solid color-mix(in oklch, var(--accent) 32%, var(--line)); border-radius: 10px; background: color-mix(in oklch, var(--surface-soft) 55%, var(--surface)); }
.chat-context span, .chat-context strong { display: block; }
.chat-context span { color: var(--accent-hover); font-size: 0.67rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.chat-context strong { margin-top: 3px; font-size: 0.76rem; }
.bubble { max-width: 84%; padding: 12px 14px; border-radius: 13px; font-size: 0.84rem; }
.bubble.incoming { align-self: flex-start; background: var(--surface-soft); border-bottom-left-radius: 4px; }
.bubble.suggested { align-self: flex-end; color: var(--accent-ink); background: var(--accent); border-bottom-right-radius: 4px; box-shadow: 0 8px 24px color-mix(in oklch, var(--accent) 22%, transparent); }
.bubble small { display: block; margin-bottom: 4px; opacity: 0.7; font-size: 0.63rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.bubble.fresh { animation: message-in 280ms cubic-bezier(.23,1,.32,1) both; }
@keyframes message-in { from { opacity: 0; transform: translateY(10px) scale(0.97); } to { opacity: 1; transform: none; } }

.demo-action { width: fit-content; min-height: 42px; padding: 0 15px; border: 1px solid var(--accent); border-radius: 999px; color: var(--accent-ink); background: var(--accent); font: inherit; font-size: 0.78rem; font-weight: 680; cursor: pointer; transition: transform 140ms cubic-bezier(.23,1,.32,1), background 140ms ease; }
.demo-action:hover { background: var(--accent-hover); }
.demo-action:active { transform: scale(0.97); }
.demo-action:disabled { opacity: 0.56; cursor: wait; }
.demo-chat .demo-action { align-self: flex-end; margin-top: 4px; }

.ai-demo { min-height: 430px; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--line); }
.knowledge-map { position: relative; min-height: 430px; overflow: hidden; background: radial-gradient(circle at center, color-mix(in oklch, var(--accent) 16%, transparent), transparent 52%), var(--surface-soft); }
.knowledge-node { position: absolute; z-index: 2; min-width: 76px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: 0 8px 22px color-mix(in oklch, var(--ink) 7%, transparent); font-size: 0.72rem; text-align: center; }
.k-center { inset: 50% auto auto 50%; transform: translate(-50%, -50%); color: var(--accent-ink); border-color: var(--accent); background: var(--accent); font-weight: 720; }
.k-doc { top: 13%; left: 12%; }.k-client { top: 14%; right: 10%; }.k-order { right: 10%; bottom: 13%; }.k-history { left: 12%; bottom: 14%; }
.trace { position: absolute; z-index: 1; width: 32%; height: 1px; left: 50%; top: 50%; background: var(--accent); transform-origin: left center; opacity: 0.32; }
.t1 { transform: rotate(-142deg); }.t2 { transform: rotate(-38deg); }.t3 { transform: rotate(39deg); }.t4 { transform: rotate(141deg); }
.knowledge-map.searching .knowledge-node:not(.k-center) { animation: node-trace 650ms ease-in-out both; }
.knowledge-map.searching .knowledge-node:nth-of-type(2) { animation-delay: 80ms; }.knowledge-map.searching .knowledge-node:nth-of-type(3) { animation-delay: 160ms; }.knowledge-map.searching .knowledge-node:nth-of-type(4) { animation-delay: 240ms; }.knowledge-map.searching .knowledge-node:nth-of-type(5) { animation-delay: 320ms; }
@keyframes node-trace { 45% { color: var(--accent-ink); border-color: var(--accent); background: var(--accent); transform: translateY(-3px); } }
.ai-query { display: flex; flex-direction: column; justify-content: center; gap: 17px; padding: clamp(22px, 4vw, 42px); background: var(--surface); }
.ai-query p { margin: 0; font-size: clamp(1.15rem, 2vw, 1.55rem); font-weight: 620; letter-spacing: -0.035em; }
.ai-answer { min-height: 88px; padding: 14px; color: var(--muted); border-left: 2px solid var(--accent); background: color-mix(in oklch, var(--surface-soft) 38%, transparent); font-size: 0.82rem; }

.qa-demo { min-height: 430px; display: grid; grid-template-columns: 1fr auto; gap: 22px; align-items: end; padding: clamp(20px, 4vw, 38px); border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); }
.test-list { align-self: stretch; display: flex; flex-direction: column; justify-content: center; }
.test-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 17px 0; border-bottom: 1px solid var(--line); font-size: 0.85rem; }
.test-row:last-child { border-bottom: 0; }
.test-row b { min-width: 70px; color: var(--muted); font-size: 0.72rem; font-weight: 650; text-align: right; }
.test-row.running b { color: var(--accent-hover); }.test-row.passed b { color: var(--accent-hover); }
.test-row.passed span::before { content: "✓"; display: inline-grid; place-items: center; width: 20px; height: 20px; margin-right: 9px; color: var(--accent-ink); border-radius: 50%; background: var(--accent); font-size: 0.7rem; }

.backend-demo { min-height: 430px; display: grid; grid-template-rows: auto 1fr auto; gap: 30px; padding: clamp(22px, 4vw, 40px); border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); }
.request-card { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 15px; border-radius: 11px; background: var(--surface); }
.request-card code { font-size: 0.82rem; font-weight: 680; }.request-card small { flex: 1; color: var(--muted); }.request-card .demo-action { margin-left: auto; }
.pipeline { display: flex; align-items: center; justify-content: center; gap: 0; overflow-x: auto; }
.pipeline span { flex: 0 0 auto; min-width: 76px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 0.75rem; font-weight: 650; text-align: center; transition: color 180ms ease, border-color 180ms ease, background 180ms ease, transform 180ms cubic-bezier(.23,1,.32,1); }
.pipeline i { flex: 1 0 18px; height: 1px; background: var(--line); }
.pipeline span.active { color: var(--accent-ink); border-color: var(--accent); background: var(--accent); transform: translateY(-4px); }
.pipeline span.done { border-color: var(--accent); }
.response-card { min-height: 66px; display: flex; align-items: center; padding: 16px; border-left: 3px solid var(--accent); background: var(--surface); }
.response-card code { color: var(--muted); font-size: 0.78rem; white-space: pre-wrap; }
.api-status.success { color: var(--accent-ink); border-color: var(--accent); background: var(--accent); }

.skills-matrix { display: grid; grid-template-columns: 0.72fr 1.28fr; gap: clamp(42px, 8vw, 110px); margin-top: clamp(72px, 9vw, 120px); padding-top: 40px; border-top: 1px solid var(--line); }
.skills-intro { position: sticky; top: 112px; align-self: start; }
.skills-intro h3 { margin-bottom: 14px; font-size: clamp(1.8rem, 3vw, 3rem); line-height: 1; letter-spacing: -0.05em; }
.skills-intro p { color: var(--muted); }
.skill-band { display: grid; grid-template-columns: 190px 1fr; gap: 26px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.skill-band:first-child { padding-top: 0; }.skill-band:last-child { border-bottom: 0; }
.skill-band strong, .skill-band a { display: block; }.skill-band strong { margin-bottom: 7px; font-size: 0.92rem; }.skill-band a { color: var(--accent-hover); font-size: 0.72rem; text-underline-offset: 3px; }
.skill-band p { margin: 0; color: var(--muted); font-size: 0.9rem; line-height: 1.75; }

.section { padding-block: clamp(86px, 11vw, 150px); }
.section.compact { padding-block: clamp(64px, 8vw, 100px); }
.section-title { max-width: 880px; margin-bottom: 52px; }
.section-title h2 {
  margin-bottom: 18px;
  font-size: clamp(2.4rem, 5vw, 5.1rem);
  font-weight: 620;
  letter-spacing: -0.065em;
  line-height: 0.98;
}

.section-title p { max-width: 62ch; color: var(--muted); font-size: 1.08rem; }

.capabilities { border-top: 1px solid var(--line); }
.capability {
  display: grid;
  grid-template-columns: 80px minmax(200px, 0.75fr) 1.25fr;
  gap: 28px;
  align-items: start;
  padding-block: 30px;
  border-bottom: 1px solid var(--line);
  transition: background 160ms ease, padding-inline 160ms cubic-bezier(.16,1,.3,1);
}

.capability:hover { padding-inline: 18px; background: color-mix(in oklch, var(--surface) 42%, transparent); }

.capability .index { color: var(--accent); font-variant-numeric: tabular-nums; }
.capability h3 { margin: 0; font-size: 1.35rem; letter-spacing: -0.025em; }
.capability p { max-width: 68ch; margin: 0; color: var(--muted); }

.case-feature {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  min-height: 620px;
  overflow: hidden;
  color: var(--ink);
  background: color-mix(in oklch, var(--surface-soft) 68%, var(--surface));
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 8px);
  box-shadow: var(--shadow);
}

.case-copy { display: flex; flex-direction: column; justify-content: space-between; padding: clamp(34px, 6vw, 72px); }
.case-copy h2 { max-width: 690px; margin-bottom: 20px; font-size: clamp(2.8rem, 5vw, 5.2rem); line-height: 0.95; letter-spacing: -0.065em; }
.case-copy p { max-width: 53ch; color: var(--muted); }
.case-copy .button { width: fit-content; color: var(--accent-ink); border-color: var(--accent); background: var(--accent); }

.case-visual {
  position: relative;
  min-height: 500px;
  overflow: hidden;
  background:
    radial-gradient(circle at 65% 34%, color-mix(in oklch, var(--accent) 34%, transparent), transparent 34%),
    linear-gradient(145deg, color-mix(in oklch, var(--surface) 70%, transparent), var(--surface-soft));
}

.xendy-orbit {
  position: absolute;
  inset: 50% auto auto 50%;
  width: min(72%, 470px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border: 1px solid color-mix(in oklch, var(--accent) 36%, transparent);
  border-radius: 50%;
}

.xendy-orbit::before,
.xendy-orbit::after {
  content: "";
  position: absolute;
  inset: 12%;
  border: 1px solid color-mix(in oklch, var(--accent) 26%, transparent);
  border-radius: 50%;
}

.xendy-orbit::after { inset: 26%; background: color-mix(in oklch, var(--surface) 24%, transparent); }
.xendy-logo { position: absolute; inset: 50% auto auto 50%; z-index: 2; width: 128px; transform: translate(-50%, -50%); }

.node {
  position: absolute;
  width: 12px;
  height: 12px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 0 0 8px color-mix(in oklch, var(--accent) 12%, transparent);
}

.node.n1 { top: 17%; left: 47%; }
.node.n2 { top: 46%; right: 12%; }
.node.n3 { bottom: 14%; left: 36%; }
.node.n4 { top: 51%; left: 10%; }

.metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
}

.metric { padding: 22px; background: color-mix(in oklch, var(--surface) 74%, var(--surface-soft)); }
.metric strong { display: block; font-size: 1.55rem; letter-spacing: -0.035em; }
.metric span { color: var(--muted); font-size: 0.85rem; }

.project-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
}

.project {
  position: relative;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  background: color-mix(in oklch, var(--surface) 82%, transparent);
  box-shadow: inset 0 1px 0 color-mix(in oklch, white 65%, transparent);
  text-decoration: none;
  transition: transform 220ms ease, border-color 220ms ease;
}

.project::before,
.project::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  pointer-events: none;
  opacity: 0.58;
}
.project::before { top: -1px; left: -1px; border-top: 2px solid var(--accent); border-left: 2px solid var(--accent); border-radius: calc(var(--radius) + 4px) 0 0; }
.project::after { right: -1px; bottom: -1px; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); border-radius: 0 0 calc(var(--radius) + 4px); }

.project:hover { transform: translateY(-5px); border-color: var(--accent); }
.project:nth-child(3) { grid-column: 1 / -1; min-height: 250px; }
.project-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 0.82rem; }
.project h3 { max-width: 18ch; margin: 40px 0 14px; font-size: clamp(1.8rem, 4vw, 3.3rem); line-height: 1; letter-spacing: -0.055em; }
.project p { max-width: 56ch; margin: 0; color: var(--muted); }

.team-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.person {
  min-height: 570px;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  background: var(--surface);
}

.portrait { position: relative; display: block; min-height: 300px; aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-soft); }
.portrait::after { content: ""; position: absolute; inset: auto 0 0; height: 22%; pointer-events: none; background: linear-gradient(to top, color-mix(in oklch, var(--ink) 13%, transparent), transparent); }
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; filter: saturate(0.86) contrast(1.02); transition: filter 220ms ease, transform 420ms cubic-bezier(.23,1,.32,1); }
.person:hover .portrait img { filter: saturate(1) contrast(1.01); transform: scale(1.018); }
.portrait:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.person-copy { padding: 28px; }
.person-copy h3 { margin-bottom: 4px; font-size: 2rem; letter-spacing: -0.045em; }
.person-copy .role { margin-bottom: 18px; color: var(--accent); font-weight: 650; }
.person-copy p { color: var(--muted); }
.text-link { display: inline-flex; align-items: center; gap: 7px; color: var(--ink); font-weight: 680; text-decoration-thickness: 1px; text-underline-offset: 4px; }

.process { display: grid; grid-template-columns: repeat(5, 1fr); border-block: 1px solid var(--line); }
.process-step { min-height: 220px; padding: 28px 22px; border-right: 1px solid var(--line); }
.process-step { transition: background 160ms ease; }
.process-step:hover { background: color-mix(in oklch, var(--surface) 46%, transparent); }
.process-step:last-child { border-right: 0; }
.process-step strong { display: block; margin-bottom: 55px; color: var(--accent); font-size: 0.8rem; }
.process-step h3 { margin-bottom: 8px; font-size: 1.1rem; }
.process-step p { color: var(--muted); font-size: 0.9rem; }

.cta {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 30px;
  align-items: end;
  padding: clamp(38px, 7vw, 82px);
  color: var(--ink);
  background:
    radial-gradient(circle at 85% 15%, color-mix(in oklch, var(--accent) 25%, transparent), transparent 24rem),
    var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 8px);
}

.cta h2 { max-width: 780px; margin: 0; font-size: clamp(2.8rem, 6vw, 6.2rem); line-height: 0.92; letter-spacing: -0.07em; }
.cta p { color: var(--muted); }
.cta .button { color: var(--accent-ink); border-color: var(--accent); background: var(--accent); }

.site-footer { padding-block: 38px; border-top: 1px solid var(--line); }
.footer-grid { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.footer-grid p { margin: 0; color: var(--muted); font-size: 0.88rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a { color: var(--muted); font-size: 0.88rem; text-underline-offset: 4px; }

.page-hero { padding-block: clamp(80px, 12vw, 150px); }
.page-hero-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 60px; align-items: end; }
.page-hero h1 { margin-bottom: 26px; }
.page-summary { max-width: 50ch; color: var(--muted); font-size: 1.16rem; }
.profile-photo { max-width: 420px; margin: 0; aspect-ratio: 4 / 5; overflow: hidden; justify-self: end; border-radius: var(--radius); background: var(--surface-soft); }
.profile-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center; filter: saturate(0.9) contrast(1.02); }

.standalone-profile {
  scroll-margin-top: 82px;
  border-top: 1px solid var(--line);
}

.standalone-page[hidden] { display: none !important; }

.standalone-profile-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding-top: 36px;
}

.standalone-profile-nav a {
  color: var(--ink);
  font-weight: 680;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.profile-facts { display: grid; grid-template-columns: repeat(3, 1fr); border-block: 1px solid var(--line); }
.profile-facts div { padding: 26px; border-right: 1px solid var(--line); }
.profile-facts div:last-child { border-right: 0; }
.profile-facts span { display: block; margin-bottom: 7px; color: var(--muted); font-size: 0.82rem; }
.profile-facts strong { font-size: 1.12rem; }

.story-layout { display: grid; grid-template-columns: 0.65fr 1.35fr; gap: clamp(40px, 8vw, 120px); }
.story-layout aside { position: sticky; top: 110px; height: fit-content; }
.story-layout aside p { color: var(--muted); }
.story-block { padding-block: 32px; border-top: 1px solid var(--line); }
.story-block h3 { margin-bottom: 13px; font-size: clamp(1.45rem, 3vw, 2.35rem); letter-spacing: -0.04em; }
.story-block p { max-width: 69ch; color: var(--muted); }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.tag { padding: 7px 10px; color: var(--muted); border: 1px solid var(--line); border-radius: 8px; font-size: 0.8rem; }

.case-hero {
  min-height: calc(100dvh - 72px);
  display: grid;
  grid-template-columns: 1fr 0.8fr;
  gap: 60px;
  align-items: center;
  padding-block: 60px;
}
.case-hero h1 { margin-bottom: 24px; }
.case-emblem { display: grid; place-items: center; min-height: 520px; border: 1px solid var(--line); border-radius: calc(var(--radius) + 8px); background: radial-gradient(circle at 50% 50%, color-mix(in oklch, var(--accent) 28%, transparent), transparent 42%), var(--surface-soft); }
.case-emblem img { width: min(40%, 180px); }
.case-stats { display: grid; grid-template-columns: repeat(4, 1fr); border-block: 1px solid var(--line); }
.case-stats div { padding: 28px; border-right: 1px solid var(--line); }
.case-stats div:last-child { border-right: 0; }
.case-stats strong { display: block; font-size: clamp(1.8rem, 4vw, 3.2rem); letter-spacing: -0.05em; }
.case-stats span { color: var(--muted); font-size: 0.84rem; }

.reveal { opacity: 0; transform: translateY(16px); transition: opacity 520ms cubic-bezier(.16,1,.3,1), transform 520ms cubic-bezier(.16,1,.3,1); }
.reveal.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 980px) {
  .hero, .case-hero, .page-hero-grid { grid-template-columns: 1fr; }
  .hero { min-height: auto; padding-block: 64px; }
  .hero-visual { min-height: 600px; }
  .page-hero { padding-block: 80px; }
  .profile-photo { width: 100%; max-width: 520px; justify-self: start; }
  .proof-grid { grid-template-columns: repeat(2, 1fr); }
  .proof-grid > *:nth-child(2) { border-right: 0; }
  .proof-grid > *:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .case-feature { grid-template-columns: 1fr; }
  .project-grid, .cta { grid-template-columns: 1fr; }
  .process { grid-template-columns: repeat(2, 1fr); }
  .process-step { border-bottom: 1px solid var(--line); }
  .process-step:nth-child(2n) { border-right: 0; }
  .process-step:last-child { grid-column: 1 / -1; border-bottom: 0; }
  .case-stats { grid-template-columns: repeat(2, 1fr); }
  .case-stats div:nth-child(2) { border-right: 0; }
  .case-stats div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .capability-lab { grid-template-columns: 1fr; }
  .lab-tabs { display: grid; grid-template-columns: repeat(4, 1fr); padding: 10px; border-right: 0; border-bottom: 1px solid var(--line); }
  .lab-tab { min-height: 66px; padding: 11px; }
  .lab-tab.active { box-shadow: inset 0 -3px 0 var(--accent); }
  .skills-matrix { grid-template-columns: 1fr; gap: 34px; }
  .skills-intro { position: static; max-width: 560px; }
}

@media (max-width: 760px) {
  .shell { width: min(calc(100% - 28px), var(--max)); }
  .menu-toggle { display: inline-flex; }
  .nav { gap: 10px; }
  .nav-actions { display: flex; align-items: center; gap: 2px; }
  .theme-toggle { width: 44px; padding: 0; font-size: 0; }
  .theme-toggle::before { content: "◐"; font-size: 1rem; }
  .nav-links {
    position: fixed;
    top: 73px;
    left: 14px;
    right: 14px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .nav-links a { justify-content: flex-start; }
  h1, .hero h1 {
    max-width: 100%;
    font-size: clamp(2.75rem, 13vw, 4rem);
    overflow-wrap: anywhere;
  }
  .lead { max-width: 100%; }
  .hero { gap: 40px; }
  .hero-visual { min-height: 520px; }
  .hero-visual img { object-position: 61% center; }
  .system-map { inset: 54px 14px 90px; }
  .map-node { min-width: 104px; padding: 10px 11px; }
  .map-center { min-width: 142px; padding: 17px; }
  .map-center .brand-mark { width: 32px; height: 32px; margin-bottom: 9px; }
  .map-frontend { left: 0; }
  .map-backend { right: 0; }
  .map-qa { right: 8%; bottom: 8%; }
  .proof-grid { grid-template-columns: 1fr; }
  .proof-grid > * { min-height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .proof-grid > *:last-child { border-bottom: 0; }
  .capability { grid-template-columns: 46px 1fr; gap: 18px; }
  .capability p { grid-column: 2; }
  .case-copy { min-height: 550px; }
  .project-grid, .team-grid { grid-template-columns: 1fr; }
  .project:nth-child(3) { grid-column: auto; }
  .person { min-height: 520px; }
  .process { grid-template-columns: 1fr; }
  .process-step, .process-step:nth-child(2n) { min-height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .process-step:last-child { grid-column: auto; }
  .process-step strong { margin-bottom: 30px; }
  .footer-grid { align-items: flex-start; flex-direction: column; }
  .profile-facts { grid-template-columns: 1fr; }
  .profile-facts div { border-right: 0; border-bottom: 1px solid var(--line); }
  .profile-facts div:last-child { border-bottom: 0; }
  .story-layout { grid-template-columns: 1fr; }
  .story-layout aside { position: static; }
  .case-emblem { min-height: 360px; }
  .case-stats { grid-template-columns: 1fr; }
  .case-stats div { border-right: 0; border-bottom: 1px solid var(--line); }
  .case-stats div:last-child { border-bottom: 0; }
  .capability-lab { min-height: 0; overflow: visible; border-radius: 16px; }
  .lab-tabs { display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none; }
  .lab-tabs::-webkit-scrollbar { display: none; }
  .lab-tab { flex: 0 0 132px; min-height: 64px; }
  .lab-tab small { white-space: nowrap; }
  .lab-stage { padding: 14px; }
  .demo-panel { min-height: 0; }
  .demo-head { min-height: 0; flex-direction: column; margin-bottom: 16px; }
  .inbox-demo, .ai-demo { grid-template-columns: 1fr; }
  .demo-conversations { display: flex; gap: 8px; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .conversation { flex: 0 0 210px; }
  .demo-chat { min-height: 360px; padding: 18px; }
  .knowledge-map { min-height: 330px; }
  .ai-query { min-height: 250px; }
  .qa-demo { grid-template-columns: 1fr; }
  .qa-demo .demo-action { width: 100%; }
  .backend-demo { padding: 16px; }
  .request-card { align-items: flex-start; flex-direction: column; }
  .request-card .demo-action { width: 100%; margin-left: 0; }
  .pipeline { justify-content: flex-start; padding-bottom: 8px; }
  .pipeline span { min-width: 68px; }
  .pipeline i { flex-basis: 15px; }
  .skill-band { grid-template-columns: 1fr; gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

@media (forced-colors: active) {
  .brand-mark, .project, .person, .button { border: 1px solid CanvasText; }
}
