:root {
  --bg: #03070f;
  --panel: #07111f;
  --edge: #12304d;
  --cyan: #00f0ff;
  --blue: #2a7fff;
  --sea: #5eead4;
  --sun: #fdba74;
  --text: #eaf8ff;
  --muted: #8aa4bd;
}

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

html { background: var(--bg); }

body {
  min-height: 100vh;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(0, 240, 255, .12), transparent 70%),
    linear-gradient(to bottom, rgba(42, 127, 255, .05) 1px, transparent 1px) 0 0 / 100% 48px,
    linear-gradient(to right, rgba(42, 127, 255, .05) 1px, transparent 1px) 0 0 / 48px 100%,
    var(--bg);
  color: var(--text);
  font: 17px/1.6 "Share Tech Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  overflow-x: hidden;
}

a { color: var(--cyan); text-decoration: none; }
a:hover { text-shadow: 0 0 10px rgba(0, 240, 255, .8); }

code {
  font-family: inherit;
  color: var(--sea);
}

/* ---- top bar ---- */

.top {
  display: flex;
  align-items: center;
  gap: .4rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px 16px;
  font-size: 15px;
}

.top a {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: var(--text);
  font-family: "Orbitron", sans-serif;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-size: 13px;
}

.top img { filter: drop-shadow(0 0 6px rgba(0, 240, 255, .55)); }
.top .path { color: var(--cyan); }

.top .path a {
  display: inline;
  color: var(--muted);
  font: inherit;
  letter-spacing: normal;
  text-transform: none;
}

.top .path a:hover { color: var(--cyan); }

/* ---- hero ---- */

.hero {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 16px 56px;
  text-align: center;
}

.logo {
  width: min(560px, 100%);
  height: auto;
  filter: drop-shadow(0 0 24px rgba(0, 240, 255, .25)) drop-shadow(0 0 4px rgba(94, 234, 212, .3));
}

.tagline {
  position: relative;
  margin: 36px auto 18px;
  font-family: "Orbitron", sans-serif;
  font-weight: 900;
  font-size: clamp(1.4rem, 4.6vw, 2.6rem);
  line-height: 1.2;
  letter-spacing: .03em;
  text-transform: uppercase;
  text-shadow: 0 0 4px rgba(255, 255, 255, .5), 0 0 18px rgba(0, 240, 255, .55), 0 0 40px rgba(42, 127, 255, .4);
}

.tagline::before,
.tagline::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
  text-shadow: none;
  mix-blend-mode: screen;
  opacity: .85;
}

.tagline::before { color: var(--cyan); animation: split-a 5.2s infinite linear; }
.tagline::after  { color: var(--blue); animation: split-b 4.4s infinite linear; }

@keyframes split-a {
  0%, 90%, 100% { transform: translate(0); clip-path: inset(0 0 100% 0); }
  91% { transform: translate(-5px, 0); clip-path: inset(10% 0 60% 0); }
  93% { transform: translate(4px, 0);  clip-path: inset(55% 0 20% 0); }
  95% { transform: translate(-2px, 0); clip-path: inset(30% 0 45% 0); }
  97% { transform: translate(0);       clip-path: inset(0 0 100% 0); }
}

@keyframes split-b {
  0%, 86%, 100% { transform: translate(0); clip-path: inset(100% 0 0 0); }
  87% { transform: translate(5px, 0);  clip-path: inset(40% 0 35% 0); }
  89% { transform: translate(-6px, 0); clip-path: inset(5% 0 75% 0); }
  91% { transform: translate(0);       clip-path: inset(100% 0 0 0); }
}

.lede {
  max-width: 660px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 18px;
}

/* example pages: a smaller hero with no logo */
.hero.page { padding: 24px 16px 48px; }
.hero.page .tagline { margin-top: 12px; }

/* ---- sections ---- */

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

section { margin-bottom: 72px; }

.heading {
  font-family: "Orbitron", sans-serif;
  font-size: 1.1rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--cyan);
  text-shadow: 0 0 12px rgba(0, 240, 255, .5);
  margin-bottom: 18px;
}

.heading::before { content: "> "; opacity: .7; }

.note { color: var(--muted); font-size: 15px; margin-top: 12px; }

/* ---- code windows ---- */

.example {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 20px;
  align-items: start;
}

.window {
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: 10px;
  box-shadow: 0 0 0 1px rgba(0, 240, 255, .04), 0 12px 40px rgba(0, 0, 0, .5), 0 0 30px rgba(0, 240, 255, .06);
  overflow: hidden;
  min-width: 0;
}

.bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--edge);
  background: rgba(0, 240, 255, .03);
}

.bar span { width: 10px; height: 10px; border-radius: 50%; background: #1b3654; }
.bar b { margin-left: 8px; font-weight: normal; color: var(--muted); font-size: 13px; }

pre {
  padding: 16px 18px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.55;
}

pre code { color: var(--text); }

.k { color: #7aa8ff; }
.t { color: var(--sea); }
.f { color: var(--cyan); }
.s { color: var(--sun); }
.n { color: #f0abfc; }
.d { color: #c4b5fd; }
.c { color: #5a7590; }
.p { color: var(--cyan); }

.term pre code { color: #cfe9ff; }

/* ---- features ---- */

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}

.features article,
.features .card {
  background: linear-gradient(to bottom, rgba(0, 240, 255, .05), transparent 60%), var(--panel);
  border: 1px solid var(--edge);
  border-top: 2px solid var(--cyan);
  border-radius: 8px;
  padding: 20px;
}

.features h2 {
  font-family: "Orbitron", sans-serif;
  font-size: .95rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.features p { color: var(--muted); font-size: 15px; }

/* a feature card that is a link to an example */
a.card { display: block; color: var(--text); transition: border-color .15s, box-shadow .15s; }
a.card:hover { text-shadow: none; border-color: var(--cyan); box-shadow: 0 0 18px rgba(0, 240, 255, .18); }
a.card .file { color: var(--cyan); font-size: 14px; margin-bottom: 6px; }
a.card .more { display: block; margin-top: 12px; color: var(--cyan); font-size: 14px; }

.stack > * + * { margin-top: 16px; }

/* ---- benchmarks ---- */

.table { overflow-x: auto; border: 1px solid var(--edge); border-radius: 8px; background: var(--panel); }

table { width: 100%; border-collapse: collapse; font-size: 15px; }

th, td { padding: 10px 14px; text-align: right; white-space: nowrap; }
th:first-child, td:first-child { text-align: left; white-space: normal; }
th { color: var(--muted); font-weight: normal; border-bottom: 1px solid var(--edge); }
td { border-bottom: 1px solid rgba(18, 48, 77, .6); color: var(--muted); }
tr:last-child td { border-bottom: none; }
td b { color: var(--text); font-weight: normal; margin-right: .5em; }
td:last-child { color: var(--text); }
td.x { color: var(--cyan); text-shadow: 0 0 10px rgba(0, 240, 255, .6); }

/* ---- language and library ---- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.list { list-style: none; }
.list li { position: relative; padding-left: 1.3em; margin-bottom: 12px; color: var(--muted); font-size: 15px; }
.list li::before { content: "▸"; position: absolute; left: 0; color: var(--cyan); }
.list b { color: var(--text); font-weight: normal; }

.modules { color: var(--text); font-size: 15px; line-height: 1.9; }

/* ---- footer ---- */

footer {
  border-top: 1px solid var(--edge);
  padding: 28px 16px 40px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

footer p + p { margin-top: 6px; }

/* ---- CRT overlay ---- */

.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  background: repeating-linear-gradient(to bottom, transparent 0, transparent 2px, rgba(0, 0, 0, .18) 3px);
}

@media (max-width: 820px) {
  .example, .split { grid-template-columns: 1fr; }
  body { font-size: 16px; }
  pre { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .tagline::before, .tagline::after { animation: none; }
}
