:root {
  --bg:        #0a0e14;
  --bg-soft:   #0d121b;
  --surface:   #11161f;
  --surface-2: #161c27;
  --border:    #1f2733;
  --border-2:  #2b3543;
  --text:      #c9d1d9;
  --text-dim:  #8b949e;
  --text-mute: #5a6573;
  --cyan:      #22d3ee;
  --cyan-dim:  #0e7490;
  --amber:     #f5a623;
  --green:     #3fb950;
  --red:       #f85149;
  --mono: "JetBrains Mono", "SF Mono", ui-monospace, "Cascadia Code", Menlo, monospace;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --maxw: 1100px;
  --nav-h: 60px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 18% 12%, rgba(34,211,238,0.08), transparent 42%),
    radial-gradient(circle at 85% 88%, rgba(245,166,35,0.05), transparent 45%);
  pointer-events: none;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
}

a { color: inherit; text-decoration: none; }
::selection { background: var(--cyan); color: #04141a; }

.mono { font-family: var(--mono); }
.cy { color: var(--cyan); }
.am { color: var(--amber); }
.gr { color: var(--green); }
.dim { color: var(--text-dim); }
.prompt { color: var(--cyan); font-family: var(--mono); }
.prompt::before { content: "$ "; color: var(--amber); }

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

nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  display: flex;
  align-items: center;
  background: rgba(10,14,20,0.72);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
nav.scrolled { border-bottom-color: var(--border); background: rgba(10,14,20,0.9); }
nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { font-family: var(--mono); font-size: 15px; font-weight: 700; color: var(--text); white-space: nowrap; }
.logo .tilde { color: var(--cyan); }
.logo .cur { color: var(--amber); animation: blink 1.1s step-end infinite; }

.chips { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; justify-content: center; }
.chip {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .04em;
  color: var(--text-mute);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 8px;
  background: var(--surface);
  white-space: nowrap;
}
.chip b { color: var(--cyan); font-weight: 500; }

.nav-links { display: flex; gap: 22px; font-family: var(--mono); font-size: 13px; }
.nav-links a { color: var(--text-dim); transition: color .2s; position: relative; }
.nav-links a:hover, .nav-links a.active { color: var(--cyan); }
.nav-links a.active::after {
  content: ""; position: absolute; left: 0; bottom: -6px; width: 100%; height: 2px; background: var(--cyan);
}
.menu-btn { display: none; background: none; border: none; color: var(--cyan); font-size: 22px; cursor: pointer; font-family: var(--mono); }

section { padding: 96px 0; position: relative; }
.sec-label {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-mute);
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.sec-label .num { color: var(--amber); }
.sec-label .line { flex: 1; height: 1px; background: var(--border); }
h2.sec-title { font-family: var(--mono); font-size: clamp(22px, 3.4vw, 34px); font-weight: 700; letter-spacing: -.01em; margin-bottom: 8px; }
h2.sec-title .prompt::before { content: "$ "; }

#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: var(--nav-h);
}
.hero-kicker {
  font-family: var(--mono);
  font-size: 13.5px;
  color: var(--text-dim);
  letter-spacing: .02em;
  margin-bottom: 22px;
}
.hero-kicker .path { color: var(--cyan); }
.hero-kicker .sep { color: var(--text-mute); margin: 0 8px; }
h1 {
  font-family: var(--mono);
  font-weight: 800;
  font-size: clamp(44px, 10vw, 110px);
  line-height: .96;
  letter-spacing: -.03em;
  color: #f0f6fc;
  margin-bottom: 26px;
}
h1 .l2 { color: var(--cyan); }
.hero-type {
  font-family: var(--mono);
  font-size: clamp(16px, 2.6vw, 24px);
  color: var(--amber);
  min-height: 1.4em;
  margin-bottom: 22px;
}
.hero-type .cur { color: var(--cyan); animation: blink 1.05s step-end infinite; }
.hero-sum { max-width: 640px; color: var(--text-dim); font-size: 16.5px; margin-bottom: 38px; }
.hero-sum b { color: var(--text); font-weight: 500; }

.btns { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  font-family: var(--mono);
  font-size: 14px;
  padding: 13px 22px;
  border-radius: 6px;
  border: 1px solid var(--border-2);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: all .18s ease;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn:hover { transform: translateY(-2px); border-color: var(--cyan); }
.btn.primary { background: var(--cyan); color: #04141a; border-color: var(--cyan); font-weight: 600; }
.btn.primary:hover { background: #5ee0f3; box-shadow: 0 6px 22px rgba(34,211,238,.28); }

.scroll-cue {
  margin-top: 64px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-mute);
  letter-spacing: .15em;
  display: flex; align-items: center; gap: 8px;
}
.scroll-cue .arrow { animation: bob 1.6s ease-in-out infinite; }

.whoami-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 56px; align-items: start; }
.whoami-body p { color: var(--text-dim); margin-bottom: 18px; font-size: 16.5px; }
.whoami-body p b { color: var(--text); font-weight: 500; }
.whoami-body .hl { color: var(--cyan); font-weight: 500; }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.stat { background: var(--surface); padding: 22px 20px; }
.stat .val { font-family: var(--mono); font-size: 38px; font-weight: 800; color: var(--cyan); line-height: 1; }
.stat .val .suf { color: var(--amber); }
.stat .lbl { font-family: var(--mono); font-size: 11.5px; color: var(--text-mute); margin-top: 8px; letter-spacing: .03em; text-transform: uppercase; }

.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px 24px 22px;
  display: flex; flex-direction: column;
  transition: border-color .2s, transform .2s, box-shadow .2s;
  position: relative;
  overflow: hidden;
}
.card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--cyan), transparent 70%);
  opacity: 0; transition: opacity .25s;
}
.card:hover { transform: translateY(-4px); border-color: var(--border-2); box-shadow: 0 14px 40px rgba(0,0,0,.45); }
.card:hover::before { opacity: 1; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.card h3 { font-family: var(--mono); font-size: 19px; font-weight: 700; color: #f0f6fc; }
.card .role { font-family: var(--mono); font-size: 11.5px; color: var(--amber); margin-bottom: 14px; letter-spacing: .02em; }
.card .desc { color: var(--text-dim); font-size: 14.5px; line-height: 1.6; margin-bottom: 16px; }
.card .feats { list-style: none; margin-bottom: 18px; display: flex; flex-direction: column; gap: 7px; }
.card .feats li { font-size: 13.5px; color: var(--text-dim); padding-left: 18px; position: relative; line-height: 1.5; }
.card .feats li::before { content: "▸"; color: var(--cyan); position: absolute; left: 0; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.tag { font-family: var(--mono); font-size: 11px; color: var(--text-dim); background: var(--surface-2); border: 1px solid var(--border); border-radius: 4px; padding: 3px 8px; }

.badge { font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: .08em; padding: 3px 9px; border-radius: 4px; white-space: nowrap; }
.badge.live { color: var(--green); background: rgba(63,185,80,.12); border: 1px solid rgba(63,185,80,.35); }
.badge.live::before { content: "● "; }
.badge.shipped { color: var(--cyan); background: rgba(34,211,238,.1); border: 1px solid rgba(34,211,238,.32); }
.badge.wip { color: var(--amber); background: rgba(245,166,35,.1); border: 1px solid rgba(245,166,35,.32); }

.infra-diagram { max-width: 780px; margin: 0 auto; }
.infra-diagram .term { max-width: 100%; }

.ascii-art {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.35;
  color: var(--text-dim);
  white-space: pre;
  overflow-x: auto;
  padding: 8px 0 16px;
}

.ai-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; align-items: start; }
.ai-story p { color: var(--text-dim); margin-bottom: 18px; font-size: 16px; line-height: 1.65; }
.ai-story p b { color: var(--text); font-weight: 500; }
.ai-story .hl { color: var(--cyan); font-weight: 500; }

.ai-os-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; }
.os-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 22px;
}
.os-card h3 { font-family: var(--mono); font-size: 14px; color: var(--amber); margin-bottom: 12px; }
.os-card p { color: var(--text-dim); font-size: 14px; line-height: 1.6; }

.stack-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.stack-col { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 20px 22px; }
.stack-col h3 { font-family: var(--mono); font-size: 13px; color: var(--amber); margin-bottom: 14px; letter-spacing: .02em; }
.stack-col h3::before { content: "# "; color: var(--text-mute); }
.stack-items { display: flex; flex-wrap: wrap; gap: 7px; }
.stack-items span { font-family: var(--mono); font-size: 12.5px; color: var(--text-dim); background: var(--surface-2); border: 1px solid var(--border); border-radius: 4px; padding: 4px 9px; transition: color .15s, border-color .15s; }
.stack-items span:hover { color: var(--cyan); border-color: var(--cyan-dim); }

.timeline .term { max-width: 100%; }
.timeline-body { padding: 20px 26px 24px; }
.tl-item {
  display: grid;
  grid-template-columns: 52px 14px 1fr;
  gap: 12px;
  align-items: baseline;
  padding: 5px 0;
  border-left: 1px solid var(--border);
  margin-left: 6px;
  padding-left: 18px;
  position: relative;
  transition: background .15s;
  border-radius: 0 4px 4px 0;
}
.tl-item:last-child { border-left-color: transparent; }
.tl-item:hover { background: var(--surface); }
.tl-item.highlight .tl-role { color: var(--cyan); font-weight: 600; }
.tl-item.highlight .tl-co { color: var(--amber); }
.tl-year { font-family: var(--mono); font-size: 11px; color: var(--text-mute); text-align: right; }
.tl-dot { font-family: var(--mono); font-size: 8px; color: var(--cyan); text-align: center; }
.tl-role { font-family: var(--mono); font-size: 13px; color: var(--text); font-weight: 500; }
.tl-co { font-family: var(--mono); font-size: 11.5px; color: var(--text-dim); display: block; margin-top: 1px; grid-column: 3; }
.tl-desc { font-family: var(--sans); font-size: 12.5px; color: var(--text-mute); display: block; margin-top: 2px; grid-column: 3; }

.term {
  background: var(--bg-soft);
  border: 1px solid var(--border-2);
  border-radius: 12px;
  overflow: hidden;
  max-width: 760px;
  margin: 0 auto;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.term-bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; background: var(--surface); border-bottom: 1px solid var(--border); }
.term-bar .dot { width: 12px; height: 12px; border-radius: 50%; }
.term-bar .r { background: #ff5f56; } .term-bar .y { background: #ffbd2e; } .term-bar .g { background: #27c93f; }
.term-bar .title { font-family: var(--mono); font-size: 12px; color: var(--text-mute); margin-left: 10px; }
.term-body { padding: 26px 26px 30px; font-family: var(--mono); font-size: 14.5px; }
.term-body .line { margin-bottom: 6px; color: var(--text-dim); }
.term-body .out { color: var(--text); margin: 4px 0 18px; padding-left: 2px; }
.contact-rows { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.crow { display: flex; align-items: center; gap: 14px; }
.crow .k { color: var(--text-mute); width: 96px; flex-shrink: 0; }
.crow .k::before { content: "› "; color: var(--amber); }
.crow a, .crow span { color: var(--cyan); transition: color .15s; }
.crow a:hover { color: var(--amber); text-decoration: underline; }
.term-body .cur { color: var(--cyan); animation: blink 1.05s step-end infinite; }

footer { border-top: 1px solid var(--border); padding: 36px 0; }
footer .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
footer .f-l { font-family: var(--mono); font-size: 12.5px; color: var(--text-mute); }
footer .f-l b { color: var(--cyan); font-weight: 500; }
footer .f-r { display: flex; gap: 18px; font-family: var(--mono); font-size: 12.5px; }
footer .f-r a { color: var(--text-dim); transition: color .2s; }
footer .f-r a:hover { color: var(--cyan); }

.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

@keyframes blink { 0%,50% { opacity: 1; } 50.01%,100% { opacity: 0; } }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(5px); } }

@media (max-width: 860px) {
  .chips { display: none; }
  .whoami-grid { grid-template-columns: 1fr; gap: 40px; }
  .cards { grid-template-columns: 1fr; }
  .ai-grid { grid-template-columns: 1fr; }
  .ai-os-grid { grid-template-columns: 1fr; }
  section { padding: 72px 0; }
}
@media (max-width: 620px) {
  .nav-links { position: fixed; top: var(--nav-h); right: 0; left: 0; flex-direction: column; background: var(--bg-soft); border-bottom: 1px solid var(--border); padding: 18px 24px; gap: 16px; transform: translateY(-130%); transition: transform .28s ease; }
  .nav-links.open { transform: translateY(0); }
  .menu-btn { display: block; }
  .stats { grid-template-columns: 1fr 1fr; }
  .wrap { padding: 0 18px; }
  .term-body { padding: 20px; font-size: 13px; }
  .timeline-body { padding: 14px 16px; }
  .tl-item { grid-template-columns: 44px 12px 1fr; gap: 8px; padding-left: 12px; }
  .crow { flex-wrap: wrap; gap: 4px; }
  .crow .k { width: auto; }
  .ascii-art { font-size: 9.5px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}