:root {
  --bg: #0a0e14; --bg2: #0f1520; --panel: rgba(17, 24, 36, .72); --line: rgba(120, 160, 220, .14);
  --text: #e6edf3; --muted: #8b98a9; --accent: #3ee6c1; --accent2: #5b8cff; --warn: #ffb454;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.65 var(--sans); overflow-x: hidden; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.mono, .tag, .kicker, nav a, .logo, .hash, time, .filters button, .chips li, .ix { font-family: var(--mono); }

/* Background: animated node graph + blueprint grid */
#net { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; }
.grid-bg { position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px; mask-image: radial-gradient(ellipse at 50% 20%, #000 20%, transparent 75%); opacity: .5; }

/* Header */
.top { position: sticky; top: 0; z-index: 10; backdrop-filter: blur(12px); background: rgba(10, 14, 20, .7); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { color: var(--text); font-weight: 700; font-size: 1.05rem; }
.logo .prompt { color: var(--accent); }
.caret { display: inline-block; width: .55em; height: 1.1em; margin-left: 3px; vertical-align: -.15em; background: var(--accent); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
nav { display: flex; gap: 22px; align-items: center; }
nav a { color: var(--muted); font-size: .9rem; }
nav a:hover { color: var(--text); text-decoration: none; }
nav .pill { color: var(--bg); background: var(--accent); padding: 6px 12px; border-radius: 8px; font-weight: 700; }
nav .pill:hover { color: var(--bg); filter: brightness(1.1); }

/* Hero */
.hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; padding: 96px 0 56px; min-height: calc(100vh - 64px); }
.kicker { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-size: .82rem; border: 1px solid var(--line); border-radius: 99px; padding: 6px 14px; background: var(--panel); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 var(--accent); animation: ping 2s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(62, 230, 193, .6); } 100% { box-shadow: 0 0 0 10px rgba(62, 230, 193, 0); } }
h1 { font-size: clamp(2.6rem, 6.5vw, 4.6rem); font-weight: 800; margin-top: 22px;
  background: linear-gradient(100deg, #fff 30%, var(--accent) 60%, var(--accent2) 90%); background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: sheen 8s ease-in-out infinite alternate; }
@keyframes sheen { to { background-position: 100% 0; } }
.role { font-size: clamp(1.15rem, 2.4vw, 1.5rem); color: var(--muted); margin: 0 0 18px; }
.rotator { color: var(--text); font-weight: 600; border-right: 2px solid var(--accent); padding-right: 4px; white-space: nowrap; }
.lead { color: #b6c2d1; font-size: 1.08rem; max-width: 36em; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 10px; border: 1px solid var(--line); color: var(--text); font-weight: 600; background: var(--panel); transition: transform .2s, border-color .2s, box-shadow .2s; }
.btn:hover { text-decoration: none; transform: translateY(-2px); border-color: var(--accent); box-shadow: 0 8px 24px -10px rgba(62, 230, 193, .5); }
.btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #06111a; border: 0; }
.btn.ghost { background: transparent; }

/* Terminal */
.term { border: 1px solid var(--line); border-radius: 14px; background: rgba(8, 12, 18, .9); box-shadow: 0 30px 80px -30px rgba(91, 140, 255, .45), 0 0 0 1px rgba(255, 255, 255, .02) inset; overflow: hidden; }
.term-bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .02); }
.term-bar i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.term-bar i:nth-child(2) { background: #febc2e; } .term-bar i:nth-child(3) { background: #28c840; }
.term-bar span { margin-left: 10px; font: 12px var(--mono); color: var(--muted); }
.term-body { margin: 0; padding: 18px 18px 22px; min-height: 340px; font: 13.5px/1.7 var(--mono); color: #c9d4e0; white-space: pre-wrap; word-break: break-word; }
.term-body .p { color: var(--accent); } .term-body .k { color: var(--accent2); } .term-body .s { color: var(--warn); } .term-body .c { color: #5c6b7e; }
.term-body .cur { display: inline-block; width: .6em; height: 1.1em; background: var(--accent); vertical-align: -.2em; animation: blink 1s steps(1) infinite; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin-bottom: 40px; }
.stat { background: var(--bg2); padding: 26px 22px; }
.stat b { display: block; font: 700 2.2rem/1 var(--mono); color: var(--text); margin-bottom: 8px; }
.stat span { color: var(--muted); font-size: .9rem; }

/* Sections */
.block { padding: 72px 0; }
.head { margin-bottom: 32px; }
.head p { color: var(--muted); margin: 0; }
.tag { color: var(--accent); font-size: .85rem; display: block; margin-bottom: 10px; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); }
.cards { display: grid; gap: 16px; }
.cards.four { grid-template-columns: repeat(4, 1fr); }
.cards.three { grid-template-columns: repeat(3, 1fr); }
.card { position: relative; padding: 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); transition: transform .25s, border-color .25s; overflow: hidden; }
.card:hover { transform: translateY(-4px); border-color: rgba(62, 230, 193, .45); }
.card h3 { font-size: 1.1rem; }
.card p { color: var(--muted); margin: 0; font-size: .95rem; }
.cards.four .card h3 { padding-right: 34px; }
.ix { position: absolute; top: 18px; right: 20px; color: #2d3a4d; font-weight: 700; font-size: 1.4rem; }
.card svg { width: 34px; height: 34px; margin-bottom: 14px; fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.card.glow::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(62, 230, 193, .14), transparent 45%); }
.card.glow:hover::before { opacity: 1; }

/* Stack chips */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.filters button { cursor: pointer; font-size: .85rem; padding: 7px 13px; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: var(--muted); transition: all .2s; }
.filters button:hover { color: var(--text); }
.filters button.on { color: #06111a; background: var(--accent); border-color: var(--accent); }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chips li { font-size: .88rem; padding: 8px 13px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: #c9d4e0; transition: opacity .3s, transform .3s, border-color .3s; }
.chips li:hover { border-color: var(--accent2); }
.chips li.dim { opacity: .18; transform: scale(.96); }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0 0 0 28px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--accent), var(--accent2), transparent); }
.timeline li { position: relative; padding: 0 0 34px 22px; }
.timeline li::before { content: ""; position: absolute; left: -27px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 3px solid var(--accent); }
.timeline li:first-child::before { background: var(--accent); box-shadow: 0 0 16px var(--accent); }
.hash { font-size: .78rem; color: var(--warn); margin-right: 12px; }
time { font-size: .85rem; color: var(--muted); }
.timeline h3 { font-size: 1.15rem; margin: 6px 0 6px; }
.timeline p { margin: 0; color: var(--muted); max-width: 46em; }

/* Now */
.now-card { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding: 36px; border-radius: 18px; border: 1px solid rgba(62, 230, 193, .35);
  background: linear-gradient(135deg, rgba(62, 230, 193, .08), rgba(91, 140, 255, .08)); }
.now-card p { color: #b6c2d1; margin: 0; max-width: 40em; }
.now-card .btn { flex-shrink: 0; }

.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 32px 0 48px; border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; }

/* Scroll reveal (only when JS is running) */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.2, .7, .2, 1), transform .7s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 56px; min-height: 0; }
  .cards.four, .cards.three { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .now-card { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 600px) {
  nav a:not(.pill) { display: none; }
  .cards.four, .cards.three { grid-template-columns: 1fr; }
  .term-body { font-size: 12px; min-height: 300px; }
  .stat b { font-size: 1.7rem; }
  .rotator { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
