/*
 * cresko_style.css
 * Custom RevealJS theme for Cresko lectures
 * (shared with the BioE Stats course; applied to every deck via _metadata.yml)
 *
 * WHAT THIS DOES:
 *   - All slides: uniform smaller base font via .reveal .slides
 *   - Slide headers (h2): dark green, thin black underline
 *   - Section dividers (h1): dark green, no underline;
 *     white text on slides with a dark background-color
 *   - Slides with no header: no underline appears
 */

/* ── Global base font — sized for presenting ───────────────────── */
.reveal .slides {
  font-size: 0.7em;
}

/* ── Slide headers (## Title) ──────────────────────────────────── */
.reveal h2 {
  color: #1a5c2e;              /* dark green */
  font-size: 1.35em;           /* slightly larger than body text */
  font-weight: 600;
  margin-bottom: 0.3em;
  padding-bottom: 0.25em;
  border-bottom: 2px solid #222;  /* thin black line */
}

/* No line on slides without header text (## followed by nothing)  */
.reveal h2:empty {
  border-bottom: none;
  margin: 0;
  padding: 0;
}

/* ── Section dividers (# Title) ─────────────────────────────────── */
.reveal h1 {
  color: #1a5c2e;              /* dark green to match h2 headers */
  font-size: 1.2em;
  font-weight: 700;
  border-bottom: none;         /* no line on section dividers */
}

/* Section dividers with a dark background-color: white text        */
.reveal .has-dark-background h1,
.reveal .has-dark-background h2 {
  color: #ffffff;
  border-bottom-color: #ffffff;
}

/* ── Title slide ───────────────────────────────────────────────── */
/* Quarto uses #title-slide (ID) and .title (class on h1)          */
.reveal #title-slide,
.reveal section.title-slide {
  font-size: 1.4em;           /* counteract the global 0.7em shrink */
}

.reveal #title-slide h1,
.reveal #title-slide .title,
.reveal .title h1 {
  color: #1a5c2e;
  font-size: 2.0em;
  border-bottom: none;
}

.reveal #title-slide .subtitle,
.reveal #title-slide .author,
.reveal #title-slide .quarto-title-author-name,
.reveal #title-slide .date {
  font-size: 1.0em;
}

/* ── Callout boxes — match the green theme ─────────────────────── */
.reveal .callout-tip {
  border-left-color: #1a5c2e;
}

/* ── Code blocks — clean sizing ─────────────────────────────────── */
.reveal pre code {
  font-size: 0.75em;
  line-height: 1.4;
}

/* ── Highlighted code lines — subtle green accent ──────────────── */
.reveal pre code .highlight-line,
.reveal pre code .code-annotation-code {
  background-color: rgba(26, 92, 46, 0.08);
}

/* ── Tables — clean look ───────────────────────────────────────── */
.reveal table {
  font-size: 0.85em;
}

.reveal table th {
  color: #1a5c2e;
  border-bottom: 2px solid #1a5c2e;
}

/* ── Math — ensure good size on all slides ─────────────────────── */
.reveal .math.display {
  font-size: 0.95em;
}

/* ── Fragment equations — add a little spacing ─────────────────── */
.reveal .fragment .math.display {
  margin-top: 0.4em;
  margin-bottom: 0.4em;
}

/* ── Incremental list items — fade in smoothly ─────────────────── */
.reveal .incremental li {
  opacity: 0;
  transition: opacity 0.4s ease;
}
.reveal .incremental li.visible {
  opacity: 1;
}
