/* ==========================================================================
   Lukas Pham — design system. Night-sky theme: deep navy, cyan for code,
   sky-violet for AI, orange for the human decision.
   ========================================================================== */
:root {
  --night: #04071a;
  --night-2: #071128;
  --surface: rgba(16, 28, 50, 0.62);
  --surface-solid: #0d182d;
  --surface-hi: rgba(26, 44, 76, 0.7);
  --line: #1c2c47;
  --line-2: #2a3a5c;
  --text: #e8eef7;
  --copy: #c3d0e3;
  --muted: #8fa3bf;
  --cyan: #00e5ff;
  --cyan-soft: rgba(0, 229, 255, 0.12);
  --sky: #8fd8ff;
  --ai: #a99bff;
  --blue: #1f6feb;
  --orange: #ff6b00;
  --orange-2: #ff8f40;
  --ok: #4be3a5;
  --warn: #ffc56b;
  --radius: 16px;
  --radius-sm: 10px;
  --font-sans: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --page: 1160px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--copy);
  background: var(--night);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
/* Starfield + nebula, fixed behind everything */
body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
body::before {
  background:
    radial-gradient(60vw 40vw at 50% -6%, rgba(31, 111, 235, 0.34), transparent 70%),
    radial-gradient(40vw 30vw at 100% 80%, rgba(0, 229, 255, 0.09), transparent 70%),
    radial-gradient(36vw 30vw at 0% 60%, rgba(169, 155, 255, 0.08), transparent 70%),
    linear-gradient(180deg, var(--night) 0%, var(--night-2) 100%);
}
body::after {
  opacity: 0.55;
  background-image:
    radial-gradient(1px 1px at 20px 30px, rgba(220, 235, 255, 0.85), transparent 60%),
    radial-gradient(1px 1px at 120px 80px, rgba(220, 235, 255, 0.6), transparent 60%),
    radial-gradient(1.5px 1.5px at 200px 150px, rgba(143, 216, 255, 0.9), transparent 60%),
    radial-gradient(1px 1px at 300px 40px, rgba(220, 235, 255, 0.5), transparent 60%),
    radial-gradient(1px 1px at 380px 210px, rgba(220, 235, 255, 0.7), transparent 60%),
    radial-gradient(1.5px 1.5px at 60px 260px, rgba(220, 235, 255, 0.55), transparent 60%);
  background-size: 420px 300px;
}
::selection { background: var(--cyan); color: var(--night); }
a { color: var(--sky); }
a:hover { color: var(--cyan); }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }

.container { max-width: var(--page); margin: 0 auto; padding: 0 20px; }
@media (min-width: 720px) { .container { padding: 0 40px; } }

/* ---------- Type ---------- */
h1, h2, h3, h4 { color: var(--text); margin: 0; font-weight: 600; }
.display {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: clamp(2.1rem, 5.4vw, 3.9rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
}
.display em { font-style: normal; color: var(--cyan); }
.h2 { font-family: var(--font-mono); font-size: clamp(1.6rem, 3.4vw, 2.4rem); line-height: 1.15; letter-spacing: -0.01em; }
.h3 { font-size: 1.2rem; line-height: 1.3; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--copy); max-width: 640px; }
.muted { color: var(--muted); }
.mono { font-family: var(--font-mono); }
.eyebrow {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow b { color: var(--cyan); font-weight: 500; }
code { font-family: var(--font-mono); font-size: 0.86em; background: rgba(143, 216, 255, 0.08); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; color: var(--sky); }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(4, 7, 26, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(42, 58, 92, 0.6);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; font-weight: 600; }
.brand__mark {
  width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 0.85rem; font-weight: 700; color: var(--cyan);
  border: 1px solid rgba(0, 229, 255, 0.5);
  box-shadow: 0 0 18px rgba(0, 229, 255, 0.25), inset 0 0 10px rgba(0, 229, 255, 0.12);
}
.brand small { display: block; font-family: var(--font-mono); font-size: 0.68rem; color: var(--muted); font-weight: 400; letter-spacing: 0.06em; }
.nav__links { display: none; gap: 26px; font-size: 0.92rem; }
.nav__links a { color: var(--copy); text-decoration: none; }
.nav__links a:hover { color: var(--cyan); }
@media (min-width: 900px) { .nav__links { display: flex; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans); font-size: 0.95rem; font-weight: 600;
  text-decoration: none; cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), background 0.18s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn--glow {
  color: var(--cyan);
  background: rgba(0, 229, 255, 0.06);
  border-color: rgba(0, 229, 255, 0.55);
  box-shadow: 0 0 0 4px rgba(0, 229, 255, 0.07), 0 0 26px rgba(0, 229, 255, 0.22), inset 0 0 14px rgba(0, 229, 255, 0.1);
}
.btn--glow:hover { color: var(--cyan); box-shadow: 0 0 0 5px rgba(0, 229, 255, 0.1), 0 0 36px rgba(0, 229, 255, 0.34), inset 0 0 18px rgba(0, 229, 255, 0.14); }
.btn--solid { color: #fff; background: var(--orange); box-shadow: 0 8px 28px rgba(255, 107, 0, 0.3); }
.btn--solid:hover { color: #fff; background: var(--orange-2); }
.btn--ghost { color: var(--copy); border-color: var(--line-2); background: transparent; }
.btn--ghost:hover { color: var(--text); border-color: var(--sky); }
.btn--sm { padding: 8px 14px; font-size: 0.85rem; }
.link-arrow { font-family: var(--font-mono); font-size: 0.85rem; text-decoration: none; color: var(--sky); }
.link-arrow:hover { color: var(--cyan); }

/* ---------- Surfaces ---------- */
.glass {
  background: linear-gradient(180deg, rgba(22, 38, 66, 0.66), rgba(12, 22, 42, 0.62));
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.02em;
  padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--line-2); color: var(--muted); background: rgba(4, 7, 26, 0.35);
}
.chip--cyan { color: var(--cyan); border-color: rgba(0, 229, 255, 0.4); }
.chip--ai { color: var(--ai); border-color: rgba(169, 155, 255, 0.45); }
.chip--human { color: var(--orange-2); border-color: rgba(255, 143, 64, 0.45); }
.chip--ok { color: var(--ok); border-color: rgba(75, 227, 165, 0.4); }
.chip--warn { color: var(--warn); border-color: rgba(255, 197, 107, 0.4); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; }

/* ---------- Sections ---------- */
.section { padding: 96px 0; position: relative; }
.section--tight { padding: 64px 0; }
.section__head { display: grid; gap: 14px; margin-bottom: 40px; max-width: 760px; }
.section__head.center { margin-left: auto; margin-right: auto; text-align: center; justify-items: center; }
.rule { height: 1px; background: linear-gradient(90deg, transparent, var(--line-2), transparent); border: 0; margin: 0; }

.grid { display: grid; gap: 20px; }
@media (min-width: 760px) { .grid--2 { grid-template-columns: repeat(2, 1fr); } .grid--3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1040px) { .grid--4 { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 640px) and (max-width: 1039px) { .grid--4 { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 36px 0 48px; font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); }
.footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer a { color: var(--muted); }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
  .reveal.is-visible { opacity: 1; transform: none; }
}
@keyframes blink { 50% { opacity: 0; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
