/*
  Shared default theme: "terminal session".

  Extracted from the language-modelling and functions decks, which had each
  independently grown the same dark-REPL design language: a monospace token
  stream for headings, a warm amber cursor/accent, muted log-line callouts
  instead of card chrome. Load this after reveal.js's own theme CSS and
  before any deck-specific custom.css:

    <link rel="stylesheet" href="../../vendor/reveal.js/theme/black.css" />
    <link rel="stylesheet" href="../../theme/slides-theme.css" />
    <link rel="stylesheet" href="custom.css" />

  Deck-specific custom.css should only contain: extra accent colors/variables
  this deck alone needs, and small overrides (see each deck's custom.css for
  examples — e.g. a different --r-h2-size).
*/

: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: "Inter", -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --r-heading-font: "Inter", system-ui, -apple-system, sans-serif;
  --r-main-font: "Inter", system-ui, -apple-system, sans-serif;

  --r-h2-size: 1.4em;   /* per-deck override target — see custom.css */
}

.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: var(--r-h2-size);
  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); }

/* ---- author attribution on title slides ---- */
.author {
  margin-top: 1.5em;
  font-size: 0.7em;
  letter-spacing: 0.05em;
  opacity: 0.85;
}
.author::before { content: "— "; }

/* ---- 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);
}
