/* deck.css -- slides for a talk, readable on the web afterwards.

   Taken from build/build.css, which /build/ keeps for itself. Every deck
   under /deck/ carries its own copy of this file and deck.js, so a deck
   stays exactly as it was given, whatever later decks change. To start a
   new deck, copy the folder of the last one.

   The vhost CSP is default-src 'none' with style-src/script-src/img-src
   'self': no web fonts, no inline styles, no off-origin anything. System
   font stacks only.

   Dark on purpose, in both colour schemes: it is a stage. */

:root {
  color-scheme: dark;
  --bg: #0d0e12;
  --bg2: #13151b;
  --fg: #ecedf2;
  --muted: #9a9daa;
  --rule: #262a35;
  --card: #171a22;
  --accent: #7fb8dd;      /* the site's dark-mode link colour */
  --accent2: #c9a3e6;
  --ok: #9fcf8a;
  --bad: #e57f7f;
  --glow: rgba(127, 184, 221, .35);

  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-snap-type: y proximity; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

a { color: var(--accent); text-underline-offset: .15em; text-decoration-thickness: 1px; }
a:hover { color: #a8d2ee; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }

/* Inline code on a tint, as on the rest of the site (its dark-mode
   --code-bg). Not inside a code block, which has its own background. */
code {
  padding: .12em .35em; border-radius: 4px;
  background: #26262d; color: var(--fg);
  font-family: var(--mono); font-size: .875em;
}
pre code { padding: 0; background: none; font-size: inherit; }

.skip {
  position: absolute; left: 1rem; top: -3rem; z-index: 50;
  background: var(--fg); color: var(--bg); padding: .4rem .8rem; border-radius: 4px;
}
.skip:focus { top: 1rem; }

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

.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .7rem clamp(1rem, 4vw, 2.5rem);
  background: var(--bg);
}
.bar a { text-decoration: none; }
.bar-home { display: flex; align-items: center; gap: .55rem; color: var(--fg); font-weight: 600; }
.bar-home img { display: block; }
.bar-event { color: var(--muted); font-size: .92rem; }

/* ---- breadcrumb trail -------------------------------------------------
   deck.js writes it from the scenes: one entry per <section class="scene">,
   named by its data-title, or its heading when it has none. */

.trail {
  position: fixed; right: clamp(.75rem, 2vw, 1.75rem); top: 50%; z-index: 20;
  transform: translateY(-50%);
}
.trail ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .2rem; }
.trail a {
  display: flex; align-items: center; justify-content: flex-end; gap: .7rem;
  padding: .25rem 0; text-decoration: none; color: var(--muted); font-size: .8rem;
}
.trail a::after {
  content: ""; width: 9px; height: 9px; border-radius: 50%;
  border: 1.5px solid var(--muted); flex: none;
  transition: transform .3s var(--ease), background .3s, border-color .3s, box-shadow .3s;
}
.trail span {
  opacity: 0; transform: translateX(6px);
  transition: opacity .25s, transform .25s var(--ease);
  white-space: nowrap;
}
.trail:hover span, .trail a:focus-visible span, .trail a[aria-current] span { opacity: 1; transform: none; }
.trail a[aria-current] { color: var(--fg); }
.trail a[aria-current]::after {
  background: var(--accent); border-color: var(--accent);
  transform: scale(1.35); box-shadow: 0 0 12px var(--glow);
}
.trail a.done::after { background: var(--muted); }
.trail a.done[aria-current]::after { background: var(--accent); }

/* The scroll progress line, for narrow screens where the trail is hidden.
   deck.js sets --p on it; without the script it stays empty. */
.progress { position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 40; display: none; }
.progress-bar {
  height: 100%; width: 100%; transform-origin: 0 50%;
  transform: scaleX(var(--p, 0));
  background: var(--accent);
}

@media (max-width: 760px) {
  .trail { display: none; }
  .progress { display: block; }
  .bar-event { display: none; }
}

/* ---- scenes: one per slide -------------------------------------------- */

.scene {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex; align-items: center;
  padding: 5.5rem clamp(1rem, 6vw, 5rem) 4rem;
  scroll-snap-align: start;
  border-top: 1px solid var(--rule);
  overflow: hidden;
}
.scene:first-child { border-top: 0; }

/* Two columns, text and a picture or a terminal; one below 860px. */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 5vw, 4rem); align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
/* Two lists side by side, lined up at the top rather than centred. */
.split.top { align-items: start; }
h3 { margin: 1.6rem 0 0; font-size: clamp(1.2rem, 2vw, 1.5rem); color: var(--accent); }
h3 + .bullets { margin-top: .6rem; }

/* A centred slide: the title slide, a section break, a one-liner. */
.center { text-align: center; }
.center .scene-inner { padding-right: 0; }
.center h2, .center .lede { margin-left: auto; margin-right: auto; }

.step {
  margin: 0 0 .6rem; font-family: var(--mono); font-size: .8rem;
  letter-spacing: .12em; text-transform: uppercase; color: var(--accent);
}
h1, h2 { margin: 0 0 1rem; line-height: 1.1; letter-spacing: -.02em; font-weight: 700; }
h1 { font-size: clamp(2.4rem, 6.2vw, 4.6rem); }
h1 em, h2 em { font-style: normal; color: var(--accent); }
h2 { font-size: clamp(1.9rem, 4.4vw, 3.2rem); max-width: 20em; }
.lede { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: #cfd1da; max-width: 36em; margin: 0 0 1rem; }
/* A conclusion under a list: lede-sized, in full white. */
.punch { color: var(--fg); }
.aside { color: var(--muted); font-size: .95rem; max-width: 40em; margin-top: 1.5rem; }
.more { font-size: .95rem; margin-top: 1.5rem; color: var(--muted); }

/* The title slide: who, where, when, under the title. */
.byline { margin: 2rem 0 0; color: var(--muted); font-size: clamp(1rem, 1.5vw, 1.2rem); }
.byline strong { color: var(--fg); font-weight: 600; }

/* ---- reveal on scroll -------------------------------------------------
   Only with the script: deck.js adds .js to <html> before first paint and
   .in to each .reveal as it scrolls into view. Without it, nothing here
   applies and every scene is simply visible. */

.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal:nth-child(2) { transition-delay: .08s; }
.js .reveal:nth-child(3) { transition-delay: .16s; }
.js .reveal:nth-child(4) { transition-delay: .24s; }
.js .reveal:nth-child(5) { transition-delay: .32s; }
.js .reveal:nth-child(6) { transition-delay: .4s; }

/* ---- lists ------------------------------------------------------------ */

/* Short claims, a bold line and a muted one under it. */
.points { list-style: none; padding: 0; margin: 1.6rem 0 0; display: grid; gap: 1rem; }
.points strong { color: var(--fg); font-size: 1.1rem; }
.points span { display: block; margin-top: .25rem; color: var(--muted); }

/* A plain bulleted list, at the size of a lede. */
.bullets { margin: 1.6rem 0 0; padding-left: 1.4em; display: grid; gap: .5rem; font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: #cfd1da; max-width: 36em; }
.bullets li::marker { color: var(--accent); }

/* Text after a list stands apart from it, whatever kind of paragraph it
   is. More specific than .lede, .aside and .punch, so it wins over their
   own margins. */
:is(.points, .bullets, .cards, .facts, .timeline, .split) + p { margin-top: 2.3rem; }

/* The same, as cards side by side. */
.cards { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.cards li { background: var(--card); border: 1px solid var(--rule); border-radius: 10px; padding: 1rem 1.2rem; }
.cards strong { display: block; color: var(--accent); font-size: 1.1rem; }
.cards span { display: block; margin-top: .3rem; color: var(--muted); font-size: .95rem; }

/* Big numbers. */
.facts { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.facts li { background: var(--card); border: 1px solid var(--rule); border-radius: 10px; padding: .9rem 1.1rem; }
.facts strong { display: block; font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 700; color: var(--fg); line-height: 1.1; }
.facts span { display: block; margin-top: .3rem; color: var(--muted); font-size: .95rem; }

/* A timeline: a time, and what happened then. */
.timeline { list-style: none; padding: 0; margin: 2rem 0 0; position: relative; max-width: 40rem; }
.timeline::before {
  content: ""; position: absolute; left: 5.2rem; top: .6rem; bottom: .6rem; width: 2px;
  background: var(--accent); transform-origin: top;
}
.js .timeline::before { transform: scaleY(0); transition: transform 1.6s .3s var(--ease); }
.js .timeline.in::before { transform: none; }
.timeline li { display: grid; grid-template-columns: 4.4rem 1fr; gap: 2rem; padding: .6rem 0; position: relative; }
.timeline li::before {
  content: ""; position: absolute; left: 4.85rem; top: 1.05rem; width: 12px; height: 12px; border-radius: 50%;
  background: var(--bg2); border: 2px solid var(--accent);
}
.timeline li:last-child::before { border-color: var(--ok); background: var(--ok); }
.timeline time { font-family: var(--mono); color: var(--accent); text-align: right; }
.timeline span { color: #cfd1da; }

/* ---- a quote, set off to the right and below the rest ----------------- */

.quote {
  width: fit-content; max-width: 26rem; margin: 5rem 0 0 auto;
  padding: .2rem 0 .2rem 1.2rem; border-left: 2px solid var(--accent2);
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
}
.quote p { margin: 0 0 .4rem; color: var(--fg); font-style: italic; }
.quote .q-them { color: var(--muted); }
.quote footer { margin-top: .8rem; color: var(--muted); font-size: .85rem; }
.quote cite { font-style: italic; }

/* ---- code blocks ------------------------------------------------------ */

.code {
  margin: 0; padding: 1.4rem 1.5rem; overflow-x: auto;
  background: #0a0b0f; border: 1px solid var(--rule); border-radius: 10px;
  font-family: var(--mono); font-size: .88rem; line-height: 1.65; color: #d7d9e0;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .45);
}
.code .k { color: var(--accent2); }
.code .s { color: var(--ok); }
.code .prompt { color: var(--accent); }
.code .dim { color: var(--muted); }
.code .ok { color: var(--ok); font-weight: 700; }
.code .bad { color: var(--bad); font-weight: 700; }
/* A terminal whose output lines land one after another: give each
   <span class="line"> a t1..t8 for its turn. */
.js .term .line { opacity: 0; transition: opacity .3s; }
.js .term.in .line { opacity: 1; }
.js .term.in .t1 { transition-delay: .9s; }
.js .term.in .t2 { transition-delay: 1.4s; }
.js .term.in .t3 { transition-delay: 1.6s; }
.js .term.in .t4 { transition-delay: 1.8s; }
.js .term.in .t5 { transition-delay: 2s; }
.js .term.in .t6 { transition-delay: 2.2s; }
.js .term.in .t7 { transition-delay: 2.4s; }
.js .term.in .t8 { transition-delay: 2.6s; }

/* ---- pictures --------------------------------------------------------- */

/* Screenshots and recordings. Beside the text in a .split, or under it
   (.wide), never taller than the screen leaves room for. .crop shows the
   top of a tall one. */
.shot { margin: 0; }
.shot img, .shot video {
  display: block; max-width: 100%; height: auto;
  border: 1px solid var(--rule); border-radius: 10px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .45); background: #0a0b0f;
}
.split .shot img { max-height: 72vh; }
.shot.crop img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: top left; }
.shot.wide { margin-top: 2rem; }
.shot.wide img { max-height: 42vh; width: auto; }
.shot.wide video { width: 100%; max-height: 58vh; }
.split.shots { grid-template-columns: 1fr 1.15fr; }
/* A slide with a screenshot or video beside the text may use more of the
   screen than a text slide does, so the picture stays readable. */
.scene-inner.split.shots { max-width: 84rem; }
.split .shot video { width: 100%; max-height: 72vh; }
@media (max-width: 860px) { .split.shots { grid-template-columns: 1fr; } }

.figure { margin: 0; }
.figure img, .figure video { display: block; max-width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--rule); }
.figure figcaption { margin-top: .6rem; color: var(--muted); font-size: .9rem; }

/* ---- the last slide: where to go next --------------------------------- */

.go { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); grid-auto-rows: 1fr; gap: 1rem; }
.go li { display: flex; }
.go li > a { flex: 1; }
.go a {
  display: block; padding: 1.5rem; border-radius: 14px; text-align: left;
  background: var(--card); border: 1px solid var(--rule); text-decoration: none; color: var(--fg);
  transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
}
.go a:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 0 30px var(--glow); color: var(--fg); }
.go strong, .go span { display: block; }
.go strong { font-size: 1.2rem; }
.go span { color: var(--muted); font-size: .93rem; }

.foot {
  padding: 2rem clamp(1rem, 6vw, 5rem); border-top: 1px solid var(--rule);
  color: var(--muted); font-size: .85rem; text-align: center;
}
.foot p { margin: .3rem 0; }

/* ---- presenting -------------------------------------------------------
   In full screen (f), deck.js marks <html> .presenting: the page chrome
   goes, every slide snaps to the screen, the text grows a step for the
   back of the room, and the pointer hides when it's left alone. */

.counter { display: none; }
.presenting { scroll-snap-type: y mandatory; }
.presenting body { font-size: 1.25rem; }
.presenting .bar, .presenting .trail, .presenting .progress, .presenting .foot, .presenting .skip { display: none; }
.presenting .scene { padding-top: 3rem; padding-bottom: 3rem; border-top: 0; }
.presenting .scene-inner { padding-right: 0; }
.presenting .counter {
  display: block; position: fixed; right: 1.2rem; bottom: .9rem; z-index: 20;
  font-family: var(--mono); font-size: .8rem; color: var(--muted);
}
.presenting.idle, .presenting.idle * { cursor: none; }

/* ---- motion off ------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal, .js .term .line { opacity: 1; transform: none; }
  .js .timeline::before { transform: none; }
}

/* ---- print: one slide a page, dark on white --------------------------- */

@media print {
  :root { color-scheme: light; --bg: #fff; --bg2: #fff; --card: #fff; --fg: #111; --muted: #555; --rule: #ccc; --accent: #1d5f8a; --accent2: #6b3f8f; }
  .bar, .trail, .progress, .counter, .skip { display: none; }
  .scene { min-height: 0; padding: 2rem 0; border-top: 0; break-after: page; overflow: visible; }
  .scene-inner { padding-right: 0; }
  .js .reveal, .js .term .line { opacity: 1; transform: none; }
  .js .timeline::before { transform: none; }
  .lede, .timeline span { color: var(--fg); }
  .code { background: #f4f4f6; color: #111; box-shadow: none; }
  code { background: #f0f0ec; }
}
