/* ============================================================
   Custom theme for Branching Processes presentation
   Two modes: .transition (black bg) and default (white bg)
   ============================================================ */

:root {
  --accent: #B45309;
  --accent-soft: #FBBF24;
  --ink: #1F2937;
  --muted: #6B7280;
  --bg: #FFFFFF;
  --bold: #1E3A8A;
}

/* ---- Base / Talking Slides ---- */
.reveal section {
  font-family: "Inter", "Helvetica Neue", "Helvetica", "Arial", "Noto Sans", sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 34px;
  /* padding: 56px 72px; */
  text-align: center;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.reveal section p,
.reveal section blockquote {
  margin-left: auto;
  margin-right: auto;
}

.reveal section ul,
.reveal section ol {
  display: inline-block;
  text-align: left;
}

.reveal h1 {
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.5px;
  font-size: 56px;
}

.reveal h2 {
  color: var(--accent);
  font-weight: 700;
  letter-spacing: -0.3px;
  font-size: 48px;
}

.reveal h3 {
  color: var(--ink);
  font-weight: 600;
  font-size: 38px;
}

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

/* Bold words get distinct navy color */
.reveal strong {
  color: var(--bold);
}

/* ---- Blockquotes ---- */
.reveal blockquote {
  border-left: 4px solid var(--accent-soft);
  padding-left: 18px;
  color: var(--muted);
  font-style: italic;
  font-size: 40px;
  line-height: 1.35;
}

/* ---- Header / Footer ---- */
.reveal header,
.reveal footer {
  color: var(--muted);
  font-size: 14px;
}

/* ============================================================
   TRANSITION SLIDES (black background)
   ============================================================ */
.reveal section.transition,
.reveal section.transition > section.transition {
  background: #000 !important;
  color: #F9FAFB;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 56px 72px !important;
  box-sizing: border-box;
}

/* Hide the org heading on transition slides — only show content */
.reveal section.transition > h2 {
  display: none;
}

/* Title slide — full black background */
.reveal section#sec-title-slide {
  background: #000 !important;
  color: #F9FAFB;
  text-align: center;
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 56px 72px !important;
  box-sizing: border-box;
}

.reveal section#sec-title-slide h1.title {
  color: #F9FAFB;
  font-family: "Inter", "Helvetica Neue", "Helvetica", "Arial", "Noto Sans", sans-serif;
  font-weight: 700;
  font-size: 64px;
  line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.reveal section#sec-title-slide h2.author {
  color: var(--accent);
  font-weight: 600;
  font-size: 36px;
  margin-top: 24px;
}

.reveal section#sec-title-slide p.date {
  color: #9CA3AF;
  font-size: 24px;
  margin-top: 16px;
}

.reveal section.transition h1 {
  color: #F9FAFB;
  font-family: "Baskerville", "Bitstream Iowan Old Style", "Cambria", "Georgia", serif;
  font-weight: 400;
  font-size: 76px;
  line-height: 1.15;
}

.reveal section.transition h1 em,
.reveal section.transition h1 strong {
  color: var(--accent-soft);
  font-style: normal;
  font-weight: 400;
}

.reveal section.transition h2 {
  color: var(--accent-soft);
  font-weight: 500;
  font-size: 48px;
}

.reveal section.transition h3 {
  color: #F9FAFB;
  font-family: "Baskerville", "Bitstream Iowan Old Style", "Cambria", "Georgia", serif;
  font-weight: 400;
  font-size: 52px;
}

.reveal section.transition p {
  color: #D1D5DB;
  font-size: 38px;
}

.reveal section.transition strong,
.reveal section.transition b {
  color: var(--accent-soft);
  font-weight: 700;
}

.reveal section.transition a {
  color: var(--accent-soft);
}

.reveal section.transition blockquote {
  border-left: 4px solid var(--accent-soft);
  color: #D1D5DB;
  font-style: italic;
}

.reveal section.transition li {
  color: #E5E7EB;
}

/* Reveal.js sets inline display:block on the current slide — restore flex for it */
.reveal section.transition.present {
  display: flex !important;
}

/* Footer line pinned to bottom of a transition slide */
.reveal section.transition.has-footer p:first-of-type {
  margin-top: auto;
}

.reveal section.transition.has-footer p:last-child {
  margin-top: auto;
  font-size: 30px;
  color: #9CA3AF;
}

/* Pivot structure: "Instead of X / we ask Y" on transition slides */
.reveal section.transition .pivot {
  font-family: "Baskerville", "Bitstream Iowan Old Style", "Cambria", "Georgia", serif;
  line-height: 1.25;
}

.reveal section.transition .pivot .pivot-lead {
  font-size: 44px;
  color: #9CA3AF;
  margin: 0;
}

.reveal section.transition .pivot .pivot-quote {
  font-size: 64px;
  color: #F9FAFB;
  margin: 0.15em 0 0.55em;
}

.reveal section.transition .pivot .pivot-quote em {
  color: var(--accent-soft);
  font-style: normal;
}

/* ============================================================
   CUSTOM TITLE SLIDE
   ============================================================ */

.reveal .title-custom {
  display: flex;
  flex-direction: column;
  height: 880px;
  text-align: left;
  padding: 48px 56px;
  box-sizing: border-box;
}

.reveal .title-custom .title-heading {
  font-family: "Baskerville", "Bitstream Iowan Old Style", "Cambria", "Georgia", serif;
  color: var(--bold);
  font-size: 68px;
  font-weight: 700;
  line-height: 1.25;
  margin: 0;
  text-transform: none;
  letter-spacing: -0.5px;
}

.reveal .title-custom .title-logos {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.reveal .title-custom .title-affil {
  display: flex;
  align-items: center;
  gap: 28px;
}

.reveal .title-custom .title-affil img.ne {
  max-height: 110px;
  width: auto;
}

.reveal .title-custom .title-affil img.uo {
  max-height: 180px;
  width: auto;
}

.reveal .title-custom .title-names {
  font-family: "Inter", "Helvetica Neue", "Helvetica", "Arial", sans-serif;
  font-size: 30px;
  line-height: 1.5;
  color: var(--ink);
  margin: 0;
  text-align: left;
}

/* Instant replace: old fragment disappears, new one appears — no animation */
.reveal .fragment.instant-replace {
  opacity: 0 !important;
  visibility: hidden !important;
  transition: none !important;
}
.reveal .fragment.instant-replace.visible {
  opacity: 0 !important;
  visibility: hidden !important;
}
.reveal .fragment.instant-replace.current-fragment {
  opacity: 1 !important;
  visibility: visible !important;
}

/* ============================================================
   GRID LAYOUTS
   ============================================================ */

/* Two columns */
.reveal .two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  align-items: center;
}

/* Three columns (grid) */
.reveal .three-col {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 28px;
  align-items: stretch;
}

/* Roadmap styles */
.roadmap-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    margin: 60px auto;
}

.roadmap-item {
    background: white;
    color: black;
    width: 340px;
    height: 240px;
    box-sizing: border-box;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 1.3em;
    font-weight: 600;
    text-align: center;
    line-height: 1.4;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.roadmap-arrow {
    font-size: 2em;
    color: #B8860B;
    font-weight: bold;
}

/* Three columns (list items — flex with fragments) */
.reveal .three-col-items {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 60vh;
  margin-top: -40px;
  gap: 40px;
}

.reveal .three-col-items > div {
  flex: 1;
  text-align: center;
  font-size: 1.6em;
  font-weight: 600;
  line-height: 1.4;
  max-width: 520px;
}

/* Four columns (flex, no fragments) */
.reveal .four-col-items {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
}

.reveal .four-col-items > div {
  flex: 1;
  text-align: center;
  font-size: 1.4em;
  font-weight: 600;
  line-height: 1.3;
}

/* Four columns */
.reveal .four-col {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 24px;
  align-items: stretch;
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */

/* Muted / secondary text */
.reveal .quiet {
  color: var(--muted);
}

/* Large accent text */
.reveal .big {
  font-size: 56px;
  font-weight: 700;
  color: var(--accent);
}

/* Centered content */
.reveal section.centered {
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Left-aligned content */
.reveal .left {
  text-align: left;
}

/* Column labels / subtitles */
.reveal .col-label {
  font-size: 28px;
  color: var(--muted);
  text-align: center;
  margin-top: 12px;
}

/* Column headings */
.reveal .col-heading {
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
  text-align: center;
  margin-bottom: 8px;
}

/* Arrow between columns */
.reveal .arrow {
  text-align: center;
  font-size: 100px;
  color: var(--accent);
  margin: 0;
  line-height: 1;
  transform: translateY(-0.12em);
}

/* Takeaway bar */
.reveal .takeaway {
  border-top: 2px solid var(--accent);
  margin-top: 28px;
  padding-top: 16px;
  font-size: 30px;
}

/* Image styling */
.reveal img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Figure captions */
.reveal figcaption {
  color: var(--muted);
  font-size: 20px;
  margin-top: 8px;
}

/* Math blocks */
.reveal .katex-display {
  font-size: 1.8em;
}

/* Code blocks - keep minimal */
.reveal pre {
  font-size: 20px;
}

/* Tables — prevent overflow */
.reveal table {
  width: 100%;
  border-collapse: collapse;
  font-size: 22px;
  line-height: 1.3;
  table-layout: fixed;
}

.reveal th {
  color: var(--accent);
  font-size: 24px;
  text-align: center;
  border: none;
  padding: 16px 12px 12px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.reveal td {
  border: none;
  border-top: 2px solid #E5E7EB;
  padding: 16px 12px 12px;
  vertical-align: top;
  word-wrap: break-word;
  overflow-wrap: break-word;
  text-align: center;
}

/* ---- Manim animation slide background ---- */
.reveal .bp-bg {
  background: #000 !important;
  color: #F9FAFB;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
}

.reveal .bp-bg.present {
  display: flex !important;
}
