/*
  Design system: "terminal session" — this deck teaches next-token prediction
  and prompt-hacking, so the visual language borrows from a REPL: a monospace
  token stream for headings, a warm amber cursor/accent (the token currently
  being predicted), muted log-line callouts instead of card chrome.
  Deliberately single-theme (dark terminal) — a presentation ground, not a doc.
*/

:root {
  --bg:        #12181c;
  --bg-deep:   #0b0f12;
  --ink:       #e9e6df;
  --ink-dim:   #8f9a9d;
  --rule:      #2a3438;
  --accent:    #e0a458;   /* amber — the predicted token / cursor */
  --accent-dim: rgba(224, 164, 88, 0.14);
  --cool:      #6fb3a0;   /* muted teal — RL / safety notes */
  --cool-dim:  rgba(111, 179, 160, 0.12);
  --danger:    #d1766a;   /* muted terracotta — warnings */
  --danger-dim: rgba(209, 118, 106, 0.14);

  --mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

.reveal {
  font-family: var(--sans);
  color: var(--ink);
}

.reveal .slides { text-shadow: none; }

.reveal-viewport {
  background: var(--bg);
}

.reveal section { text-align: left; }

/* ---- headings: token-stream style ---- */
.reveal h1, .reveal h2, .reveal h3 {
  font-family: var(--mono);
  text-transform: none;
  letter-spacing: -0.01em;
  font-weight: 600;
  color: var(--ink);
}

.reveal h1 { font-size: 2em; }

.reveal h2 {
  color: var(--accent);
  font-size: 1.4em;
  padding-bottom: 0.35em;
  border-bottom: 1px solid var(--rule);
  display: inline-block;
}

.reveal h3 {
  color: var(--ink);
  font-size: 1em;
  font-weight: 500;
}

.reveal h3::before {
  content: "// ";
  color: var(--ink-dim);
}

.reveal p, .reveal li {
  font-family: var(--sans);
  line-height: 1.4;
}

.reveal .subtitle { font-family: var(--mono); color: var(--ink-dim); font-weight: 400; }

.reveal .tag {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 0.55em;
  letter-spacing: 0.02em;
}

.reveal .lead { font-size: 1.05em; color: var(--ink); }

.reveal .big-idea {
  font-size: 1.1em;
  color: var(--accent);
  border-left: 2px solid var(--accent);
  padding-left: 0.7em;
  text-align: left;
}

.reveal .caption {
  font-family: var(--mono);
  font-size: 0.55em;
  color: var(--ink-dim);
}

.reveal ul, .reveal ol { display: block; }
.reveal .agenda li { margin: 0.3em 0; font-family: var(--mono); font-size: 0.85em; }
.reveal .big-list li { margin: 0.5em 0; }

/* ---- callouts: rendered as log lines, not cards ---- */
.reveal .callout {
  text-align: left;
  border-radius: 2px;
  padding: 0.5em 0.9em;
  font-size: 0.72em;
  margin: 0.6em 0;
  font-family: var(--sans);
  border-left: 2px solid var(--rule);
}
.reveal .callout::before {
  font-family: var(--mono);
  margin-right: 0.5em;
  opacity: 0.8;
}
.reveal .callout.tip     { background: var(--accent-dim); border-left-color: var(--accent); }
.reveal .callout.tip::before { content: "»"; color: var(--accent); }
.reveal .callout.note    { background: var(--cool-dim); border-left-color: var(--cool); }
.reveal .callout.note::before { content: "#"; color: var(--cool); }
.reveal .callout.warning { background: var(--danger-dim); border-left-color: var(--danger); }
.reveal .callout.warning::before { content: "!"; color: var(--danger); }

.reveal .link-out {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.75em;
  color: var(--bg-deep);
  background: var(--accent);
  border-radius: 2px;
  padding: 0.3em 0.7em;
  text-decoration: none;
}
.reveal a.link-out:hover { background: var(--ink); }
.reveal a.inline-link {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--rule);
}
.reveal a.inline-link:hover { text-decoration-color: var(--accent); }

.reveal blockquote {
  text-align: left;
  font-size: 0.68em;
  font-family: var(--sans);
  border-left: 2px solid var(--rule);
  background: rgba(255,255,255,0.03);
  padding: 0.6em 1em;
  color: var(--ink);
}
.reveal blockquote ul { margin-top: 0.4em; }

.reveal .two-col {
  display: flex;
  gap: 1.2em;
  text-align: left;
  margin-top: 1em;
}
.reveal .two-col .col {
  flex: 1;
  padding: 0.7em 1em;
  border-radius: 2px;
  background: rgba(255,255,255,0.03);
  border-left: 2px solid var(--rule);
}
.reveal .two-col .col.vague   { border-left-color: var(--danger); }
.reveal .two-col .col.precise { border-left-color: var(--accent); }
.reveal .two-col h4 {
  margin: 0 0 0.3em 0;
  font-size: 0.75em;
  font-family: var(--mono);
  color: var(--ink-dim);
}
.reveal .two-col h4::before { content: none; }
.reveal .two-col p { font-size: 0.72em; margin: 0; font-family: var(--sans); }

code, .reveal code {
  font-family: var(--mono);
  background: rgba(255,255,255,0.06);
  padding: 0.1em 0.35em;
  border-radius: 2px;
  color: var(--accent);
}

/* ---- section-landmark slides: terminal prompt treatment ---- */
.reveal .term-slide {
  text-align: left;
  background:
    repeating-linear-gradient(rgba(255,255,255,0.015) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at 50% 30%, rgba(224,164,88,0.06), transparent 60%),
    var(--bg-deep);
}
.reveal .term-slide .prompt {
  font-family: var(--mono);
  color: var(--cool);
  font-size: 0.6em;
  letter-spacing: 0.02em;
}
.reveal .term-slide .prompt::before { content: "$ "; color: var(--ink-dim); }
.reveal .term-slide h1, .reveal .term-slide h2 {
  border-bottom: none;
  font-size: 2.1em;
  color: var(--ink);
}
.reveal .term-slide .cursor {
  display: inline-block;
  width: 0.5em;
  height: 0.85em;
  background: var(--accent);
  margin-left: 0.15em;
  vertical-align: -0.1em;
  animation: blink 1s steps(1) infinite;
}
@media (prefers-reduced-motion: reduce) {
  .reveal .term-slide .cursor { animation: none; }
}
@keyframes blink { 50% { opacity: 0; } }

.reveal aside.notes { display: none; }

/* ---- tables: level/spec sheets, not report tables ---- */
.reveal table {
  margin: 0.8em 0;
  font-size: 0.62em;
  border-collapse: collapse;
  width: 100%;
}
.reveal table th, .reveal table td {
  border: none;
  border-bottom: 1px solid var(--rule);
  padding: 0.35em 0.7em;
  text-align: left;
  font-variant-numeric: tabular-nums;
}
.reveal table th {
  font-family: var(--mono);
  color: var(--ink-dim);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.85em;
  border-bottom: 1px solid var(--accent-dim);
}
.reveal table td:first-child, .reveal table th:first-child {
  font-family: var(--mono);
  color: var(--accent);
}
.reveal table.levels td:nth-child(3) { letter-spacing: 0.05em; }
.reveal table tbody tr:hover { background: rgba(255,255,255,0.03); }

/* ---- token-demo: next-token candidates as probability bars ---- */
.reveal .token-demo { margin-top: 0.6em; }
.reveal .td-prompt {
  font-family: var(--mono);
  color: var(--ink-dim);
  font-size: 0.65em;
  margin-bottom: 0.5em;
}
.reveal .td-bars { display: flex; flex-direction: column; gap: 0.28em; }
.reveal .td-bar {
  display: grid;
  grid-template-columns: 5.5em 1fr 3em;
  align-items: center;
  gap: 0.6em;
  font-size: 0.6em;
}
.reveal .td-word { font-family: var(--mono); color: var(--ink); text-align: right; }
.reveal .td-track {
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  height: 0.65em;
  overflow: hidden;
}
.reveal .td-fill { display: block; height: 100%; background: var(--accent); border-radius: 2px; }
.reveal .td-pct { font-family: var(--mono); color: var(--ink-dim); font-variant-numeric: tabular-nums; }
.reveal .td-bar.excluded .td-fill { background: var(--rule); }
.reveal .td-bar.excluded .td-word, .reveal .td-bar.excluded .td-pct { color: var(--ink-dim); opacity: 0.45; }
.reveal .td-cutoff {
  border-top: 1px dashed var(--rule);
  margin: 0.25em 0;
  padding-top: 0.3em;
  font-family: var(--mono);
  font-size: 0.52em;
  color: var(--accent);
  text-align: center;
}
.reveal .td-pair { display: flex; gap: 1.5em; margin-top: 0.4em; }
.reveal .td-panel { flex: 1; }
.reveal .td-panel h4 {
  font-family: var(--mono);
  font-size: 0.65em;
  color: var(--ink-dim);
  margin: 0 0 0.4em 0;
  text-align: center;
  font-weight: 500;
}

/* ---- code blocks: keep them small and quiet, not a syntax-highlighted wall ---- */
.reveal pre {
  box-shadow: none;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0.6em 0;
}
.reveal pre code {
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  font-size: 0.5em;
  padding: 0.7em 0.9em;
  max-height: none;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: break-word;
  background: rgba(255,255,255,0.04);
  border-left: 2px solid var(--rule);
  border-radius: 2px;
  color: var(--ink);
}
