/* ===== 1. COLOURS (change here only) ===== */
:root {
  --bg: #060814; /* deep space blue */
  --panel: #0d1226;
  --panel2: #131a36;
  --ink: #eaf0ff;
  --muted: #9ba8cc;
  --line: #1f2a55;
  --violet: #8b5cf6;
  --cyan: #22d3ee;
  --pink: #f472b6;
  --glow: 0 0 30px rgba(139, 92, 246, 0.28);
}
/* ===== 2. BASE ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font:
    17px/1.75 "Inter",
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
}
h1,
h2,
h3 {
  font-family: "Sora", "Inter", sans-serif;
  line-height: 1.2;
  margin: 0 0 0.5em;
  color: #fff;
}
h1 {
  font-size: clamp(2.2rem, 5.4vw, 3.9rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}
h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -0.01em;
}
h2::after {
  content: "";
  display: block;
  width: 70px;
  height: 5px;
  margin-top: 12px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--violet), var(--cyan));
}
h3 {
  font-size: 1.12rem;
  font-weight: 700;
}
.sub {
  margin-top: 48px;
  color: var(--cyan);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 1rem;
  font-weight: 700;
}
.sub::before {
  content: "> ";
  color: var(--violet);
}
p {
  margin: 0 0 1em;
  max-width: 72ch;
}
a {
  color: var(--cyan);
}
mark {
  background: rgba(244, 114, 182, 0.16);
  color: #ffb3d6;
  padding: 1px 7px;
  border-radius: 5px;
  font-weight: 600;
}
:focus-visible {
  outline: 3px solid var(--pink);
  outline-offset: 2px;
}
.hl {
  background: linear-gradient(90deg, var(--violet), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.code-tag {
  display: inline-block;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.4);
  padding: 3px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}
/* ===== 3. NAV ===== */
nav.top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  background: #04060f;
  padding: 14px max(24px, calc((100% - 1040px) / 2));
}
.brand {
  font-family: "Sora", sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand b {
  color: var(--cyan);
}
.orb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(
    circle at 35% 30%,
    #c9b8ff,
    var(--violet) 60%,
    #4c1d95
  );
  box-shadow: 0 0 14px var(--violet);
  animation: breathe 3s ease-in-out infinite;
}
nav.top ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}
nav.top a {
  display: block;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 7px 11px;
  border-radius: 999px;
}
nav.top a:hover {
  color: #fff;
  background: rgba(139, 92, 246, 0.2);
}
/* ===== 4. HERO (centered) + NEURAL NETWORK CANVAS ===== */
.hero {
  position: relative;
  overflow: hidden;
  padding: 90px max(24px, calc((100% - 1040px) / 2)) 96px;
  text-align: center;
  background:
    radial-gradient(
      ellipse at 50% 20%,
      rgba(139, 92, 246, 0.28),
      transparent 62%
    ),
    var(--bg);
}
#net {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.hero-in {
  position: relative;
  z-index: 1;
}
.hero-in p {
  margin-left: auto;
  margin-right: auto;
}
.lead {
  font-size: 1.2rem;
  color: var(--muted);
}
.btn {
  display: inline-block;
  background: linear-gradient(90deg, var(--violet), var(--cyan));
  color: #06101f;
  font-weight: 800;
  padding: 13px 28px;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: var(--glow);
}
.btn:hover {
  filter: brightness(1.12);
}
.btn.ghost {
  background: rgba(6, 8, 20, 0.6);
  color: var(--ink);
  border: 2px solid var(--violet);
  margin-left: 12px;
  box-shadow: none;
}
.btn.ghost:hover {
  background: rgba(139, 92, 246, 0.25);
}
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
  margin: 48px auto 0;
  max-width: 900px;
  text-align: left;
}
.stat {
  background: rgba(13, 18, 38, 0.78);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 20px;
  color: var(--muted);
  font-size: 0.93rem;
  backdrop-filter: blur(4px);
}
.stat b {
  display: block;
  font-family: "Sora", sans-serif;
  font-size: 1.25rem;
  background: linear-gradient(90deg, var(--violet), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
/* ===== 5. SECTIONS ===== */
section {
  padding: 80px max(24px, calc((100% - 1040px) / 2));
  border-top: 1px solid var(--line);
}
section:nth-of-type(even) {
  background: #080c1c;
}
.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}
.js .reveal.in {
  opacity: 1;
  transform: none;
}
/* ===== 6. CARDS ===== */
.grid,
.two {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}
.grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}
.two {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  transition:
    transform 0.25s,
    border-color 0.25s,
    box-shadow 0.25s;
}
.card::before {
  content: "";
  position: absolute;
  left: 24px;
  top: 0;
  width: 44px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, var(--violet), var(--cyan));
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--violet);
  box-shadow: var(--glow);
}
.card p {
  margin: 0;
  font-size: 0.96rem;
  color: var(--muted);
}
.card ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}
.card li {
  margin-bottom: 0.5em;
}
.tag {
  display: inline-block;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--pink);
  background: rgba(244, 114, 182, 0.12);
  padding: 2px 10px;
  border-radius: 6px;
  margin-bottom: 12px;
  letter-spacing: 0.05em;
}
.key {
  background: linear-gradient(
    90deg,
    rgba(139, 92, 246, 0.2),
    rgba(139, 92, 246, 0.04)
  );
  border: 1px solid rgba(139, 92, 246, 0.5);
  border-left: 8px solid var(--violet);
  border-radius: 12px;
  padding: 18px 24px;
  margin: 28px 0;
}
.key b {
  display: inline-block;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  color: #06101f;
  background: linear-gradient(90deg, var(--violet), var(--cyan));
  padding: 2px 10px;
  border-radius: 5px;
  margin-bottom: 8px;
}
.key p {
  margin: 0;
  color: var(--ink);
}
.essay {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 6px solid var(--cyan);
  border-radius: 16px;
  padding: 30px 34px;
  margin-top: 20px;
}
.essay p {
  max-width: none;
  color: var(--muted);
  text-align: justify;
}
.essay p:last-child {
  margin-bottom: 0;
}
/* nested AI diagram */
.nest {
  max-width: 560px;
  margin: 22px auto 0;
}
.n {
  border: 2px solid var(--violet);
  border-radius: 26px;
  padding: 12px 16px 16px;
  background: rgba(139, 92, 246, 0.06);
  text-align: center;
}
.n > span {
  display: block;
  font:
    700 0.85rem "JetBrains Mono",
    ui-monospace,
    monospace;
  color: #fff;
  margin-bottom: 10px;
  letter-spacing: 0.04em;
}
.n2 {
  border-color: var(--cyan);
  background: rgba(34, 211, 238, 0.06);
}
.n3 {
  border-color: var(--pink);
  background: rgba(244, 114, 182, 0.06);
}
.n4 {
  border-color: #fff;
  background: linear-gradient(
    90deg,
    rgba(139, 92, 246, 0.35),
    rgba(34, 211, 238, 0.3)
  );
  animation: breathe 3s ease-in-out infinite;
}
.n4 > span {
  margin: 0;
}
/* ===== 7. TIMELINE, STEPS, PIPELINE ===== */
ol.tl {
  list-style: none;
  margin: 30px 0 0;
  padding: 0 0 0 34px;
  position: relative;
}
ol.tl::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 6px;
  bottom: 6px;
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--violet), var(--cyan), var(--pink));
}
ol.tl li {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 22px;
  margin-bottom: 16px;
}
ol.tl li::before {
  content: "";
  position: absolute;
  left: -34px;
  top: 24px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: var(--bg);
  border: 4px solid var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
}
ol.tl li:nth-child(even)::before {
  border-color: var(--violet);
  box-shadow: 0 0 12px var(--violet);
}
ol.tl b {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.95rem;
  color: var(--pink);
}
ol.tl h3 {
  margin: 2px 0 6px;
}
ol.tl p {
  margin: 0;
  font-size: 0.96rem;
  color: var(--muted);
}
ol.pipe {
  list-style: none;
  counter-reset: p;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  padding: 0;
  margin: 26px 0;
}
ol.pipe li {
  counter-increment: p;
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 3px solid var(--violet);
  border-radius: 14px;
  padding: 18px;
}
ol.pipe li:nth-child(even) {
  border-top-color: var(--cyan);
}
ol.pipe li::before {
  content: "0" counter(p);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.8rem;
  color: var(--pink);
}
ol.pipe b {
  display: block;
  font-family: "Sora", sans-serif;
  font-size: 1rem;
  color: #fff;
}
ol.pipe span {
  font-size: 0.93rem;
  color: var(--muted);
}
ol.steps {
  list-style: none;
  counter-reset: s;
  padding: 0;
  margin: 26px 0 0;
  display: grid;
  gap: 12px;
}
ol.steps li {
  counter-increment: s;
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 22px;
}
ol.steps li::before {
  content: counter(s);
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--violet), var(--cyan));
  color: #06101f;
  font-family: "Sora", sans-serif;
  font-weight: 800;
  display: grid;
  place-items: center;
}
ol.steps p {
  margin: 0;
  color: var(--muted);
}
ol.steps h3 {
  margin-bottom: 0.3em;
}
/* ===== 8. TABLE, CODE, FAQ ===== */
.scroll {
  overflow-x: auto;
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
}
table {
  border-collapse: collapse;
  width: 100%;
  min-width: 640px;
  font-size: 0.95rem;
}
th,
td {
  text-align: left;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  background: #0a0f24;
  color: var(--cyan);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
td:first-child {
  color: #fff;
  font-weight: 700;
}
td {
  color: var(--muted);
}
tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover td {
  background: var(--panel2);
}
pre.code {
  background: #03050c;
  border: 1px solid var(--line);
  border-left: 6px solid var(--violet);
  border-radius: 12px;
  padding: 22px;
  overflow-x: auto;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.86rem;
  color: #cdbdff;
  margin: 22px 0;
}
details {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 5px solid var(--violet);
  border-radius: 12px;
  padding: 15px 22px;
  margin-bottom: 12px;
}
details[open] {
  border-left-color: var(--cyan);
}
summary {
  cursor: pointer;
  font-weight: 700;
  color: #fff;
}
details p {
  margin: 12px 0 0;
  color: var(--muted);
}
/* ===== 9. FOOTER ===== */
footer {
  background: #04060f;
  color: var(--muted);
  text-align: center;
  padding: 34px 20px 46px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.8rem;
  border-top: 3px solid var(--violet);
}
/* ===== 10. ANIMATION + RESPONSIVE ===== */
@keyframes breathe {
  50% {
    transform: scale(1.08);
    filter: brightness(1.3);
  }
}
@media (max-width: 600px) {
  .btn.ghost {
    margin: 12px 0 0;
  }
  .essay {
    padding: 22px;
  }
  .essay p {
    text-align: left;
  }
  ol.steps li {
    grid-template-columns: 1fr;
  }
  ol.tl {
    padding-left: 28px;
  }
  ol.tl li::before {
    left: -28px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .js .reveal {
    opacity: 1;
    transform: none;
  }
}
