/* nuGPU — landing page
   Aesthetic: 1980s oscilloscope readout / silicon datasheet, not synthwave.
   Single committed dark theme — screen-emits-light-on-black is the whole point. */

:root {
  --bg: #4e1b63;
  --bg-deep: #3b1249;
  --panel: #5b2673;
  --line: #8a5aa1;
  --line-faint: #66307f;
  --gold: #f2c75c;
  --gold-deep: #c8912e;
  --pink: #ff7ab8;
  --green: #66f2a0;
  --green-dim: #7fd9a8;
  --amber: #ffb84d;
  --text: #f3ebf7;
  --text-dim: #c9b3d6;

  --font-display: 'Audiowide', 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;

  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
}

body {
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  padding-inline: 24px;
  background:
    radial-gradient(ellipse 900px 600px at 78% 12%, rgba(242, 199, 92, 0.10), transparent 60%),
    var(--bg);
  position: relative;
}

img { max-width: 100%; }
[hidden] { display: none !important; }

::selection {
  background: var(--green);
  color: var(--bg-deep);
}

a {
  color: var(--green);
}

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

.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.18) 0px,
    rgba(0, 0, 0, 0.18) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: multiply;
  opacity: 0.5;
}

/* ---------- header ---------- */

.site-header {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-block: 28px 8px;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.5rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  filter: drop-shadow(0 0 8px rgba(242, 199, 92, 0.35));
}

.wordmark-nu,
.wordmark-accent {
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.wordmark-nu { background-image: linear-gradient(180deg, #fff1b8, #f2c75c); }
.wordmark-accent { background-image: linear-gradient(180deg, #f2c75c 10%, #c8912e 90%); }

.status-badge {
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--amber);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 5px 10px;
  background: var(--panel);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 6px var(--amber);
  animation: blink 1.6s steps(1, end) infinite;
}

@keyframes blink {
  0%, 45% { opacity: 1; }
  50%, 100% { opacity: 0.15; }
}

.site-nav {
  display: flex;
  gap: 28px;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

.site-nav a {
  color: var(--text);
  text-decoration: none;
  padding-block: 4px;
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--gold);
  border-color: var(--gold);
}

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

main {
  max-width: 1120px;
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 56px;
  align-items: center;
  padding-block: 48px 64px;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 0 0 18px;
}

h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 4.4vw, 3.4rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 22px;
  color: var(--text);
  text-wrap: balance;
}

.lede {
  font-family: var(--font-body);
  font-size: 1.08rem;
  line-height: 1.7;
  color: var(--text-dim);
  max-width: 46ch;
  margin: 0;
}

/* ---------- scope panel ---------- */

.scope {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg-deep);
  padding: 14px;
  box-shadow: 0 0 0 1px var(--line-faint) inset, 0 30px 60px -30px rgba(0, 0, 0, 0.6);
}

#cache-canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 42 / 29;
  background:
    linear-gradient(var(--line-faint) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, var(--line-faint) 1px, transparent 1px) 0 0 / 24px 24px,
    var(--bg-deep);
}

.scope-readout {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--green-dim);
  padding-top: 10px;
  margin-top: 10px;
  border-top: 1px solid var(--line-faint);
}

/* ---------- blog ---------- */

.prose-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding-block: 40px 64px;
}

.prose {
  max-width: 68ch;
  font-size: 1.05rem;
  line-height: 1.75;
}

.prose h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 20px; }

.prose h2, .prose h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.2;
  margin: 2em 0 0.6em;
}

.prose a { color: var(--gold); }
.prose p, .prose ul, .prose ol, .prose pre, .prose blockquote { margin: 0 0 1.2em; }

.prose code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--bg-deep);
  padding: 0.15em 0.4em;
  border-radius: 3px;
}

.prose pre {
  background: var(--bg-deep);
  border: 1px solid var(--line-faint);
  border-radius: 4px;
  padding: 14px 16px;
  overflow-x: auto;
  line-height: 1.5;
}

.prose pre code { background: none; padding: 0; }

.prose blockquote {
  border-left: 3px solid var(--gold);
  padding-left: 16px;
  color: var(--text-dim);
}

.post-meta { font-size: 0.85rem; letter-spacing: 0.04em; color: var(--text-dim); margin: 0 0 12px; }
.post-meta a { color: var(--text-dim); }

.post-list { list-style: none; padding: 0; margin: 0; }
.post-list li { padding-block: 18px; border-bottom: 1px solid var(--line-faint); }
.post-list time { display: block; font-size: 0.82rem; color: var(--text-dim); }
.post-list p { margin: 6px 0 0; color: var(--text-dim); }

.post-link {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--gold);
  text-decoration: none;
}

.post-link:hover { text-decoration: underline; }

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

.site-footer {
  max-width: 1120px;
  margin: 0 auto;
  padding-block: 20px 40px;
  font-family: var(--font-body);
  font-size: 0.76rem;
  color: var(--text-dim);
}

/* ---------- responsive ---------- */

@media (max-width: 760px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 36px;
    padding-block: 28px 44px;
  }

  .scope {
    max-width: 420px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .status-dot {
    animation: none;
    opacity: 1;
  }
}

.k-hit { color: var(--green); }
.k-l2 { color: var(--gold); }
.k-mem { color: var(--amber); }
.k-inv { color: var(--pink); }
