/* ── Design tokens ─────────────────────────────────────────────────── */
:root {
  --navy:       #1b2a4a;
  --navy-mid:   #243560;
  --ivory:      #f4f0ea;
  --warm-gray:  #e8e2d9;
  --teal:       oklch(0.52 0.10 210);
  --teal-lt:    oklch(0.75 0.08 210);
  --gold:       oklch(0.72 0.12 70);
  --text-dark:  #1b2a4a;
  --text-light: #f4f0ea;
  --text-mid:   #5a6a8a;
  --code-bg:    #0f1f3d;
  --code-txt:   #c8d8f8;

  --r-main-font-size:         38px;
  --r-main-color:             var(--text-dark);
  --r-heading-color:          var(--navy);
  --r-link-color:             var(--teal);
  --r-link-color-hover:       var(--teal-lt);
  --r-main-font:              "Helvetica Neue", Helvetica, Arial, sans-serif;
  --r-heading-font:           "Helvetica Neue", Helvetica, Arial, sans-serif;
  --r-code-font:              "SF Mono", "Fira Code", "Consolas", monospace;
  --r-heading-font-weight:    700;
  --r-heading-letter-spacing: -0.02em;
  --r-heading-line-height:    1.12;
  --r-heading-text-transform: none;
}

/* ── Base font size ───────────────────────────────────────────────── */
.reveal {
  font-size: var(--r-main-font-size);
}

/* ── Title slide alignment ─────────────────────────────────────────── */
.reveal .slides section.quarto-title-block,
.reveal .slides section#title-slide {
  text-align: left !important;
}

div#title-logos {
  position: absolute;
  right: -140px;
  top: 400px;
  margin: 0;
  padding: 0;
}

img#logo-center {
  position: relative;
  width: 300px !important;
  margin: 0;
  padding: 0;
  top: 0px;
  left: 0px;
}

img#logo-top-right {
  position: relative;
  width: 300px !important;
  margin: 0;
  padding: 0;
  top: -258px;
  left: -166px;
}

img#logo-bottom-right {
  position: relative;
  width: 300px !important;
  margin: 0;
  padding: 0;
  top: 260px;
  left: -166px;
}

.reveal .slides section.quarto-title-block .title {
  margin-left: 0 !important;
  text-align: left !important;
  font-size: 2.1em !important;
}

.reveal .slides section.quarto-title-block .subtitle {
  margin-left: 0 !important;
  text-align: left !important;
  font-size: 1.6em !important;
}

.reveal .slides section.quarto-title-block .quarto-title-authors,
.reveal .slides section.quarto-title-block .quarto-title-banner,
.reveal .slides section.quarto-title-block .date {
  margin-top: 5ex !important;
  margin-left: -1ex !important;
  text-align: left !important;
  font-size: 1.2em !important;
  justify-content: flex-start !important;
}


/* ── Full Background coloring (Viewport) ──────────────────────────── */
.reveal .backgrounds .slide-background:nth-child(odd) {
  background-color: var(--navy) !important;
}

.reveal .backgrounds .slide-background:nth-child(even) {
  background-color: var(--ivory) !important;
}

/* ── Slide content coloring ────────────────────────────────────────── */

/* Default (Even slides: 2, 4, 6...) */
.reveal .slides section {
  color: var(--text-dark);
}

/* Odd slides (1, 3, 5...: Navy background) */
.reveal .slides section:nth-child(odd) {
  color: var(--text-light) !important;
}

.reveal .slides section:nth-child(odd) h1,
.reveal .slides section:nth-child(odd) h2,
.reveal .slides section:nth-child(odd) h3,
.reveal .slides section:nth-child(odd) h4 {
  color: var(--text-light) !important;
}

.reveal .slides section:nth-child(odd) a { color: var(--teal-lt) !important; }
.reveal .slides section:nth-child(odd) ul li::marker { color: var(--gold); }
.reveal .slides section:nth-child(odd) strong { color: var(--gold); }

/* ── Footer and Logo coloring ─────────────────────────────────────── */

/* Default (Even slides: Ivory background) */
.reveal .footer {
  color: var(--text-dark);
}

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

/* Odd slides (Navy background) */
.reveal:has(.slides section.present:nth-child(odd)) .footer {
  color: var(--text-light) !important;
}

.reveal:has(.slides section.present:nth-child(odd)) .footer a {
  color: var(--teal-lt) !important;
}

.reveal:has(.slides section.present:nth-child(odd)) .slide-number {
  color: var(--text-light) !important;
}

/* Hide slide numbers on title slide */
.reveal:has(.slides section:first-child.present) .slide-number {
  display: none !important;
}


/* ── Top gradient bar (Title slide) ────────────────────────────────── */
.reveal .backgrounds .slide-background:first-child::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 10px;
  background: linear-gradient(90deg, var(--teal) 0%, var(--gold) 100%);
  z-index: 1;
}

/* ── Headings ─────────────────────────────────────────────────────── */
.reveal h1 {
  font-size: 1.7em;
}
.reveal h2 {
  font-size: 1.4em;
}

.reveal h1, .reveal h2, .reveal h3, .reveal h4 {
  font-family: var(--r-heading-font);
  font-weight: var(--r-heading-font-weight);
  color: var(--navy);
  letter-spacing: var(--r-heading-letter-spacing);
  line-height: var(--r-heading-line-height);
  text-transform: var(--r-heading-text-transform);
}

/* ── Code blocks ─────────────────────────────────────────────────── */
.reveal div.sourceCode {
  background: var(--code-bg);
  border-radius: 12px !important;
  margin: 1em 0;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  flex-shrink: 0;
}

.reveal pre.sourceCode {
  background: transparent !important;
  margin: 0;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}


.reveal pre.sourceCode code {
  background: transparent !important;
  color: var(--code-txt) !important;
  font-family: var(--r-code-font);
  font-size: 1.4em;
  line-height: 1.5;
  padding: 15px 25px;
  max-height: none !important;
}


/* ── Syntax highlighting — matches Beyond Sequential.html palette ──── */
/* Pandoc token → HTML .class → color                                  */
.reveal code.sourceCode span    { color: var(--code-txt); }
.reveal code.sourceCode span.co { color: #5a7aa8; } /* comment  → .comment */
.reveal code.sourceCode span.fu { color: #7ec8f8; } /* function → .fn      */
.reveal code.sourceCode span.st { color: #f8a878; } /* string   → .str     */
.reveal code.sourceCode span.ot { color: #d0a8f8; } /* ←  assign→ .op     */
.reveal code.sourceCode span.op { color: #d0a8f8; } /* operator → .op      */
.reveal code.sourceCode span.sc { color: #d0a8f8; } /* |> :: %do%→.op     */
.reveal code.sourceCode span.cf { color: #d0a8f8; } /* if/for   → .op      */
.reveal code.sourceCode span.at { color: #f8c87e; } /* arg=     → .arg     */
.reveal code.sourceCode span.dv { color: #f8e87e; } /* integer  → .new     */
.reveal code.sourceCode span.fl { color: #f8e87e; } /* float    → .new     */
.reveal code.sourceCode span.cn { color: #f8e87e; } /* constant → .new     */


.reveal .slides section:nth-child(odd) .highlight {
    color: var(--gold);
}

.reveal .slides section:nth-child(even) .highlight {
    color: var(--teal);
}
