/* Reveal.js theme shared by every talk on the site.
   Slides are authored on a fixed 1920x1080 canvas (see talks/base.html), so
   px values here are in canvas units and scale with the viewport. Slides stay
   light in both colour schemes because the figures have white backgrounds. */

:root {
  --talk-fg: #1a1a1a;
  --talk-bg: #ffffff;
  --talk-muted: #5f6673;
  --talk-navy: #0b3a6e;
  --talk-accent: #2b5adb;
  --talk-accent-soft: #8fb4ff;
  --talk-rule: rgba(11, 58, 110, 0.18);

  --r-link-color: var(--talk-accent);
}

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

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

.reveal {
  color: var(--talk-fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 42px;
  line-height: 1.35;
}

.reveal ::selection {
  background: var(--talk-accent);
  color: #fff;
}

/* ---------- slide frame ---------- */

.reveal .slides {
  text-align: left;
}

.reveal .slides section {
  box-sizing: border-box;
  height: 100%;
  padding: 56px 80px 64px;
}

/* A vertical stack is just a container; its children carry the padding. */
.reveal .slides section.stack {
  padding: 0;
}

/* Reveal is configured with `display: "flex"` (talks/base.html), so every
   visible slide is a column: heading on top, body filling what is left. */
.reveal .slides section:not(.stack) {
  flex-direction: column;
}

/* ---------- type ---------- */

.reveal h1,
.reveal h2,
.reveal h3 {
  margin: 0;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.01em;
}

.reveal h2 {
  color: var(--talk-navy);
  font-size: 62px;
}

.reveal h3 {
  margin-top: 10px;
  font-size: 40px;
  font-weight: 600;
  color: var(--talk-fg);
}

.reveal .slide-head {
  flex: none;
  margin-bottom: 36px;
}

.reveal .slide-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: safe center;
}

.reveal p {
  margin: 0 0 0.6em;
}

.reveal ul,
.reveal ol {
  margin: 0;
  padding-left: 1.1em;
}

.reveal li {
  margin: 0 0 0.55em;
}

.reveal li > ul,
.reveal li > ol {
  margin-top: 0.4em;
  font-size: 0.92em;
}

.reveal ul li::marker {
  color: var(--talk-accent);
}

.reveal ol li::marker {
  color: var(--talk-navy);
  font-weight: 600;
}

/* reset.css flattens these. */
.reveal em {
  font-style: italic;
}

.reveal strong {
  font-weight: 700;
}

.reveal .katex {
  font-size: 1.08em;
}

.reveal a {
  color: var(--talk-accent);
  text-decoration: none;
}

.reveal a:hover {
  text-decoration: underline;
}

.reveal .small {
  font-size: 0.8em;
}

.reveal .compact {
  font-size: 0.9em;
}

.reveal .smaller {
  font-size: 0.68em;
}

.reveal .tiny {
  font-size: 0.5em;
}

/* Display equations: a little air, never wider than the slide. */
.reveal .eq {
  margin: 0.35em 0 0.7em;
  text-align: center;
}

.reveal .katex-display {
  margin: 0;
}

.reveal li > .eq {
  margin-left: -1.1em;
}

/* ---------- layout helpers ---------- */

.reveal .cols {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.reveal .cols.text-wide {
  grid-template-columns: 3fr 2fr;
}

.reveal .cols.fig-wide {
  grid-template-columns: 2fr 3fr;
}

.reveal .cols.fig-wider {
  grid-template-columns: 1fr 2fr;
}

.reveal .cols > * {
  min-width: 0;
  min-height: 0;
  max-height: 100%;
}

.reveal .col-figs {
  display: flex;
  flex-direction: column;
  gap: 20px;
  height: 100%;
  justify-content: center;
}

.reveal .col-figs img {
  flex: 0 1 auto;
  min-height: 0;
}

.reveal img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  margin: 0 auto;
  object-fit: contain;
}

/* A slide body that is nothing but one figure. */
.reveal .fig {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reveal .fig-row {
  flex: 1;
  min-height: 0;
  display: flex;
  gap: 32px;
  align-items: center;
  justify-content: center;
}

.reveal .fig-row img {
  flex: 1 1 0;
  min-width: 0;
}

/* Small figure pinned to the top-right corner, beside the heading. */
.reveal .corner-fig {
  position: absolute;
  top: 16px;
  right: 60px;
  width: 440px;
}

.reveal .cite {
  flex: none;
  margin: 28px 0 0;
  padding-top: 14px;
  border-top: 2px solid var(--talk-rule);
  color: var(--talk-muted);
  font-size: 20px;
  line-height: 1.35;
}

.reveal .cite p {
  margin: 0 0 0.2em;
}

/* ---------- special slides ---------- */

.reveal .slides section.title-slide {
  justify-content: center;
  color: #fff;
}

.reveal .title-slide h1 {
  max-width: 1300px;
  font-size: 92px;
  color: #fff;
}

.reveal .title-slide .subtitle {
  margin: 28px 0 0;
  font-size: 44px;
  font-weight: 600;
  color: var(--talk-accent-soft);
}

.reveal .title-slide .byline {
  position: absolute;
  left: 80px;
  bottom: 72px;
  margin: 0;
  font-size: 30px;
  font-weight: 600;
}

/* Section dividers: big navy heading on the left, a figure on the right. */
.reveal .section-slide .cols {
  grid-template-columns: 2fr 3fr;
}

.reveal .section-slide.text-only .cols {
  grid-template-columns: 1fr;
}

.reveal .section-slide h2 {
  font-size: 84px;
}

.reveal .section-slide h3 {
  margin-top: 16px;
  font-size: 56px;
  color: var(--talk-navy);
  font-weight: 700;
}

.reveal .refs {
  font-size: 23px;
  line-height: 1.3;
}

.reveal .refs li {
  margin-bottom: 0.3em;
}

.reveal .thanks {
  font-size: 25px;
  line-height: 1.35;
}

.reveal .thanks p {
  margin-bottom: 0.55em;
}

/* ---------- chrome ---------- */

.reveal .controls {
  color: var(--talk-accent);
}

.reveal .progress {
  height: 5px;
  color: var(--talk-accent);
  background: rgba(11, 58, 110, 0.08);
}

.reveal .slide-number {
  right: auto;
  left: 16px;
  bottom: 14px;
  padding: 4px 8px;
  border-radius: 4px;
  background: transparent;
  color: var(--talk-muted);
  font-family: inherit;
  font-size: 15px;
}

.reveal .slide-number a {
  color: inherit;
}

.talk-exit {
  position: fixed;
  z-index: 40;
  top: 12px;
  right: 16px;
  padding: 4px 10px;
  border-radius: 4px;
  color: var(--talk-muted);
  font: 14px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  text-decoration: none;
  opacity: 0;
  transition: opacity 0.2s;
}

body:hover .talk-exit {
  opacity: 0.55;
}

.talk-exit:hover,
.talk-exit:focus {
  opacity: 1 !important;
  color: var(--talk-accent);
}

.has-dark-background ~ .talk-exit,
.reveal.has-dark-background .slide-number {
  color: rgba(255, 255, 255, 0.75);
}

/* PDF export (?print-pdf, then print from Chrome/Chromium). Reveal's print
   sheet forces display:block and zero padding; restore the column layout. */
html.reveal-print .reveal .slides section:not(.stack) {
  display: flex !important;
  height: 100% !important;
  padding: 56px 80px 64px !important;
}

@media print {
  .talk-exit {
    display: none;
  }
}
