:root {
  --bg: #0d0f12;
  --bg-2: #14171c;
  --line: #242932;
  --text: #e6e4de;
  --muted: #9a9c9f;
  --accent: #6fb7ff;
  --accent-2: #3a7fcf;
  --font-display: "Instrument Serif", Georgia, "Times New Roman", serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
}

* { box-sizing: border-box; }
html { color-scheme: dark; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 24px; }

header.top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 28px 0;
}
.brand { display: flex; align-items: center; gap: 12px; font-weight: 600; letter-spacing: .01em; color: var(--text); }
.brand svg { width: 28px; height: 28px; }
nav { display: flex; gap: 28px; font-size: 15px; }
nav a { color: var(--muted); }
nav a:hover { color: var(--text); text-decoration: none; }

.hero { padding: 96px 0 72px; border-bottom: 1px solid var(--line); }
.eyebrow { font-family: var(--font-mono); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin: 0 0 20px; }
h1 {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(42px, 6.5vw, 76px); line-height: 1.02; letter-spacing: -.01em;
  margin: 0 0 28px; max-width: 16ch; text-wrap: balance;
}
.lede { font-size: 20px; color: var(--muted); max-width: 58ch; margin: 0; text-wrap: pretty; }

section { padding: 72px 0; border-bottom: 1px solid var(--line); }
section:last-of-type { border-bottom: 0; }
h2 { font-family: var(--font-display); font-weight: 400; font-size: 36px; line-height: 1.1; margin: 0 0 12px; }
.intro { color: var(--muted); max-width: 60ch; margin: 0 0 40px; }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.card {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 6px; padding: 28px;
}
.card h3 { margin: 0 0 10px; font-size: 19px; font-weight: 600; }
.card p { margin: 0; color: var(--muted); font-size: 16px; }
.card .meta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.tag { font-family: var(--font-mono); font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 3px 8px; }
.card a.more { display: inline-block; margin-top: 16px; font-size: 15px; }

.stack { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.stack h3 { font-family: var(--font-mono); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin: 0 0 12px; font-weight: 500; }
.stack ul { list-style: none; margin: 0; padding: 0; }
.stack li { padding: 8px 0; border-top: 1px solid var(--line); color: var(--text); }

footer { padding: 48px 0 64px; color: var(--muted); font-size: 14px; display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; border-top: 1px solid var(--line); }
footer p { margin: 0; }

@media (max-width: 720px) {
  .grid, .stack { grid-template-columns: 1fr; }
  .hero { padding: 64px 0 48px; }
  section { padding: 56px 0; }
  nav { gap: 18px; }
}

/* ---------- atmosphere ---------- */
body { position: relative; overflow-x: hidden; }
.aurora {
  position: fixed; inset: -20%; z-index: -2; pointer-events: none;
  background:
    radial-gradient(40% 50% at 20% 20%, rgba(111,183,255,.22), transparent 70%),
    radial-gradient(35% 45% at 80% 10%, rgba(139,92,246,.18), transparent 70%),
    radial-gradient(45% 40% at 60% 90%, rgba(45,212,191,.12), transparent 70%);
  filter: blur(40px);
  animation: drift 28s ease-in-out infinite alternate;
}
@keyframes drift {
  0%   { transform: translate3d(0,0,0) rotate(0deg) scale(1); }
  50%  { transform: translate3d(-4%,3%,0) rotate(3deg) scale(1.06); }
  100% { transform: translate3d(3%,-4%,0) rotate(-2deg) scale(1.02); }
}
.grain {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .06 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.dots {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(rgba(230,228,222,.07) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(60% 50% at 50% 0%, #000 30%, transparent 100%);
}

/* ---------- hero flourish ---------- */
h1 .glow {
  background: linear-gradient(92deg, #cfe7ff 0%, var(--accent) 45%, #b79cff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero { position: relative; }
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: .5;
}
.brand svg { animation: spin 40s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- reveals ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal:nth-child(2) { transition-delay: .08s } .reveal:nth-child(3) { transition-delay: .16s } .reveal:nth-child(4) { transition-delay: .24s }

/* ---------- card glow ---------- */
.card { position: relative; overflow: hidden; transition: transform .35s ease, border-color .35s ease; }
.card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .35s;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), rgba(111,183,255,.16), transparent 60%);
}
.card:hover { transform: translateY(-3px); border-color: #3a4352; }
.card:hover::before { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .aurora, .brand svg { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
