/* Free Software Isn't Gratis — Dark, Terminal-flavored Theme
 *
 * Built on the revealjs skill's base-styles.css.
 * All font sizes use pt (points) for predictable sizing.
 *
 * Design language: dark, terminal-flavored, for a sharp,
 * story-driven SRE Day talk about open-source sustainability.
 */

/* ===========================================
   FONTS — loaded once, used everywhere via variables
   =========================================== */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

/* ===========================================
   CSS VARIABLES
   =========================================== */
:root {
  /* Backgrounds */
  --background-color: #0a0a0a;           /* near-black, projector-friendly */
  --section-divider-bg: #050505;         /* slightly darker for contrast */
  --code-bg: #111418;                    /* terminal surface */
  --panel-bg: rgba(255, 255, 255, 0.04); /* subtle panel on dark bg */
  --panel-border: rgba(255, 255, 255, 0.08);

  /* Typography */
  --heading-font: "IBM Plex Sans", "Source Sans Pro", Helvetica, sans-serif;
  --body-font: "IBM Plex Sans", "Source Sans Pro", Helvetica, sans-serif;
  --mono-font: "JetBrains Mono", "Courier New", monospace;
  --base-font-size: 24pt;                /* reveal.js base; the only value intentionally not in pt would be a CSS limitation — but 24pt works and keeps the all-pt rule intact */
  --text-size: 18pt;                     /* body text */
  --h1-size: 54pt;
  --h2-size: 38pt;
  --h3-size: 26pt;
  --footnote-size: 12pt;
  --mono-size: 16pt;

  /* Palette */
  --primary-color: #5EA8A7;              /* terminal teal */
  --primary-deep: #277884;              /* hover/deep */
  --secondary-color: #F39C12;            /* warn amber */
  --critical-color: #E74C3C;             /* blame red, "this is fine." */
  --success-color: #2ECC71;              /* terminal green, "you can do this" */
  --text-color: #e0e0e0;                 /* off-white */
  --muted-color: #7a7a7a;                /* captions, secondary */
  --line-color: #2E4053;                 /* muted slate */

  /* Layout */
  --slide-padding: 56px;
  --slide-padding-top: 48px;
  --content-gap: 28px;
  --box-radius: 6px;

  /* Spacing scale — used by all components */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 40px;
  --space-9: 48px;
  --space-10: 64px;

  /* Card padding */
  --card-padding: 24px 28px;
  --card-padding-tight: 18px 22px;

  /* Card depth (light mode) */
  --card-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  --card-shadow-light: 0 2px 8px rgba(26, 26, 26, 0.06);
  --card-shadow-strong: 0 4px 16px rgba(26, 26, 26, 0.10);
}

/* ===========================================
   LIGHT THEME — opt-in via `?theme=light` or `T` key
   Cream/warm palette, terminal feel preserved
   =========================================== */
:root[data-theme="light"] {
  /* Backgrounds */
  --background-color: #faf7f2;           /* warm cream, like a book page */
  --section-divider-bg: #f0ebe2;         /* slightly darker cream for act transitions */
  --code-bg: #111418;                    /* KEEP dark — terminal surface is a "card" on cream */
  --panel-bg: #ffffff;                   /* solid white for stronger card definition on cream */
  --panel-border: rgba(26, 26, 26, 0.10);

  /* Accents — DEEPER variants for AA contrast on cream */
  --primary-color: #1F6B73;              /* deep teal — AA on #faf7f2 (~6:1) */
  --primary-deep: #144A52;              /* deeper teal for hover/gradient */
  --secondary-color: #8A4A00;           /* deep amber — AA on #faf7f2 */
  --critical-color: #A8331F;            /* deep red — AA on #faf7f2 */
  --success-color: #1E6B3F;             /* deep green — AA on #faf7f2 */

  /* Text */
  --text-color: #1a1a1a;                 /* near-black, ~16:1 on cream */
  --muted-color: #5a5a5a;               /* captions, secondary */
  --line-color: #c8c0b3;                /* warm slate for dividers */

  /* Terminal uses lighter teal inside the dark code surface, to stay consistent */
  --terminal-accent: #5EA8A7;            /* regular teal, used only inside .terminal on dark code-bg */

  /* Stronger card shadows for depth on cream */
  --card-shadow: 0 1px 3px rgba(26, 26, 26, 0.06), 0 1px 2px rgba(26, 26, 26, 0.04);
  --card-shadow-light: 0 2px 8px rgba(26, 26, 26, 0.08);
  --card-shadow-strong: 0 6px 20px rgba(26, 26, 26, 0.12);
}

/* ===========================================
   BASE STYLES
   =========================================== */

.reveal {
  font-family: var(--body-font);
  font-size: var(--base-font-size);
}

.reveal strong,
.reveal b { font-weight: 700; }

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

.reveal-viewport.is-section-divider .slide-background.present {
  background-color: var(--section-divider-bg) !important;
}

.reveal h1,
.reveal h2,
.reveal h3,
.reveal h4,
.reveal h5,
.reveal h6 {
  font-family: var(--heading-font);
  text-transform: none;
  color: var(--text-color);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.reveal h1 { font-size: var(--h1-size); }
.reveal h2 { font-size: var(--h2-size); margin-bottom: 0; }
.reveal h3 { font-size: var(--h3-size); color: var(--primary-color); }

.reveal p,
.reveal li,
.reveal td,
.reveal th,
.reveal blockquote {
  font-size: var(--text-size);
  color: var(--text-color);
  line-height: 1.5;
}

.reveal code,
.reveal pre {
  font-family: var(--mono-font);
  font-size: var(--mono-size);
}

/* ===========================================
   LISTS
   =========================================== */

.reveal ul {
  list-style: none;
  padding-left: 0;
  margin: 15px 0;
}

.reveal ul li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 14px;
}

.reveal ul li::before {
  content: '❯';
  position: absolute;
  left: 0;
  top: 0.05em;
  color: var(--primary-color);
  font-family: var(--mono-font);
  font-weight: 700;
}

.reveal ul ul li::before {
  content: '·';
  color: var(--muted-color);
}

/* ===========================================
   SLIDE LAYOUT
   =========================================== */

.reveal .slides section {
  height: 100%;
  display: flex !important;
  flex-direction: column !important;
  padding: var(--slide-padding-top) var(--slide-padding) var(--slide-padding) var(--slide-padding) !important;
  box-sizing: border-box;
  text-align: left;
}

.reveal .slides section.stack {
  padding: 0 !important;
}

.reveal .slides section > .content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: var(--content-gap);
  text-align: left;
}

.reveal .slides section > .footnote {
  position: absolute;
  bottom: 18px;
  left: var(--slide-padding);
  right: var(--slide-padding);
  font-size: var(--footnote-size);
  color: var(--muted-color);
}

/* ===========================================
   SECTION DIVIDERS
   =========================================== */

.reveal .slides section.section-divider {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  text-align: center;
}

.reveal .slides section.section-divider h1 {
  font-size: 64pt;
  text-align: center;
  letter-spacing: -0.02em;
  position: relative;
  padding-bottom: 24px;
}

.reveal .slides section.section-divider h1::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: var(--primary-color);
}

.reveal .slides section.section-divider .section-number {
  font-family: var(--mono-font);
  font-size: 18pt;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: 18px;
  display: block;
}

.reveal .slides section.section-divider p {
  font-size: 22pt;
  color: var(--muted-color);
  margin-top: 30px;
}

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

.reveal .slides section#title {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: flex-start !important;
  text-align: left;
  padding: 80px !important;
}

.reveal .slides section#title h1 {
  font-size: 42pt;
  line-height: 1.08;
  margin-bottom: 0;
  letter-spacing: -0.02em;
  font-weight: 700;
  max-width: 1120px;
  text-align: left;
  hyphens: none;
  -webkit-hyphens: none;
}

.reveal .slides section#title .title-prompt {
  font-family: var(--mono-font);
  color: var(--primary-color);
  font-size: 20pt;
  margin-bottom: 20px;
  display: inline-block;
  position: relative;
  letter-spacing: 0.02em;
  font-weight: 500;
}

.reveal .slides section#title .title-prompt::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 48px;
  height: 2px;
  background: var(--primary-color);
  opacity: 0.85;
}

.reveal .slides section#title .speaker {
  font-size: 24pt;
  color: var(--text-color);
  margin-top: 28px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.reveal .slides section#title .speaker .role {
  color: var(--muted-color);
  font-size: 18pt;
  font-weight: 400;
  display: block;
  margin-top: 6px;
  letter-spacing: 0;
}

.reveal .slides section#title .event {
  font-family: var(--mono-font);
  font-size: 16pt;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  margin-top: 40px;
  font-weight: 500;
}

/* ===========================================
   TEXT SIZE UTILITIES
   =========================================== */

.text-sm { font-size: 14pt !important; }
.text-lg { font-size: 20pt !important; }
.text-xl { font-size: 24pt !important; }
.text-2xl { font-size: 30pt !important; }
.text-3xl { font-size: 38pt !important; }
.text-4xl { font-size: 46pt !important; }
.text-mono { font-family: var(--mono-font) !important; }

.text-muted { color: var(--muted-color) !important; }
.text-center { text-align: center !important; }
.text-uppercase { text-transform: uppercase; letter-spacing: 0.1em; }
.font-light { font-weight: 300; }
.font-bold { font-weight: 700; }
.font-mono { font-family: var(--mono-font); }

.text-primary { color: var(--primary-color) !important; }
.text-warn { color: var(--secondary-color) !important; }
.text-critical { color: var(--critical-color) !important; }
.text-success { color: var(--success-color) !important; }

/* ===========================================
   TERMINAL / CODE BLOCKS
   =========================================== */

.terminal {
  background: var(--code-bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--box-radius);
  padding: var(--space-5) var(--space-6);
  font-family: var(--mono-font);
  font-size: var(--mono-size);
  color: var(--text-color);
  margin: var(--space-4) 0;
  text-align: left;
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

.terminal .prompt {
  color: var(--primary-color);
  margin-right: 8px;
  user-select: none;
}

.terminal .output {
  color: var(--muted-color);
  display: block;
  margin-top: 4px;
}

.terminal .error {
  color: var(--critical-color);
}

.terminal .ok {
  color: var(--success-color);
}

.terminal .warn {
  color: var(--secondary-color);
}

/* ===========================================
   PANELS / CARDS
   =========================================== */

.panel {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--box-radius);
  padding: var(--card-padding);
  margin: var(--space-3) 0;
  box-shadow: var(--card-shadow);
}

.panel.critical {
  border-left: 6px solid var(--critical-color);
}

.panel.warn {
  border-left: 4px solid var(--secondary-color);
}

.panel.success {
  border-left: 4px solid var(--success-color);
}

.panel.primary {
  border-left: 4px solid var(--primary-color);
}

/* ===========================================
   STAT / BIG NUMBER
   =========================================== */

.stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin: var(--space-2) 0;
}

.stat .number {
  font-size: 80pt;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.035em;
  color: var(--primary-color);
  font-family: var(--heading-font);
}

.stat .number.critical { color: var(--critical-color); }
.stat .number.warn { color: var(--secondary-color); }
.stat .number.success { color: var(--success-color); }

.stat .label {
  font-size: 18pt;
  color: var(--muted-color);
  margin-top: var(--space-2);
  line-height: 1.4;
}

/* ===========================================
   BLOCKQUOTES
   =========================================== */

.reveal blockquote {
  border-left: 4px solid var(--primary-color);
  padding-left: var(--space-6);
  margin: var(--space-5) 0;
  font-style: italic;
  background: none;
  box-shadow: none;
  width: 100%;
  max-width: none;
}

.reveal blockquote cite {
  display: block;
  margin-top: var(--space-3);
  font-style: normal;
  color: var(--muted-color);
  font-size: 14pt;
}

/* ===========================================
   FIGURE / IMAGE
   =========================================== */

.reveal figure {
  margin: 16px 0;
  text-align: center;
}

.reveal figure img {
  max-width: 100%;
  max-height: 480px;
  border: 1px solid var(--line-color);
  border-radius: var(--box-radius);
  display: block;
  margin: 0 auto;
}

.reveal figure figcaption {
  font-size: 13pt;
  color: var(--muted-color);
  margin-top: 12px;
  font-style: italic;
}

.reveal figure.portrait {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.reveal figure.portrait img {
  max-height: 380px;
  width: auto;
  border: 1px solid var(--line-color);
}

/* ===========================================
   FRAMEWORK STEP
   =========================================== */

.step {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-top: 3px solid var(--primary-color);
  border-radius: var(--box-radius);
  padding: var(--card-padding);
  text-align: left;
  box-shadow: var(--card-shadow);
}

.step .step-number {
  font-family: var(--mono-font);
  font-size: 14pt;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  display: block;
  margin-bottom: var(--space-2);
  font-weight: 500;
}

.step h3 {
  margin: 0 0 var(--space-3) 0;
  color: var(--text-color);
  font-size: 24pt;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.step p {
  font-size: 16pt;
  color: var(--muted-color);
  margin: 0;
  line-height: 1.45;
}

/* ===========================================
   TIMELINE
   =========================================== */

.timeline {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 20px 0;
}

.timeline .event {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 24px;
  align-items: start;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-color);
}

.timeline .event:last-child {
  border-bottom: none;
}

.timeline .event .date {
  font-family: var(--mono-font);
  font-size: 14pt;
  color: var(--primary-color);
  letter-spacing: 0.05em;
}

.timeline .event .what {
  font-size: 18pt;
  color: var(--text-color);
}

/* ===========================================
   DECORATIVE TOP RULE
   =========================================== */

.reveal .slides section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color) 0%, var(--primary-deep) 100%);
}

.reveal .slides section.section-divider::before {
  background: var(--primary-color);
  height: 4px;
}

/* ===========================================
   CLOSING SLIDE
   =========================================== */

.reveal .slides section#closing {
  text-align: center;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
}

.reveal .slides section#closing .this-is-fine {
  font-size: 90pt;
  font-weight: 800;
  color: var(--critical-color);
  letter-spacing: -0.03em;
  margin: 0 0 16px 0;
  line-height: 1;
}

.reveal .slides section#closing .subtitle {
  font-size: 26pt;
  color: var(--text-color);
  margin-bottom: 40px;
}

.reveal .slides section#closing .contact {
  font-family: var(--mono-font);
  font-size: 18pt;
  color: var(--primary-color);
  padding-top: 24px;
  border-top: 1px solid var(--line-color);
  margin-top: 32px;
}

/* ===========================================
   PROGRESS BAR ACCENT
   =========================================== */

.reveal .progress {
  background: rgba(255, 255, 255, 0.08);
  height: 4px;
}

.reveal .progress span {
  background: var(--primary-color);
}

/* ===========================================
   CONTROLS
   =========================================== */

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

/* ===========================================
   THEME INDICATOR
   =========================================== */

.theme-indicator {
  position: fixed;
  bottom: 12px;
  right: 14px;
  font-family: var(--mono-font);
  font-size: 10pt;
  letter-spacing: 0.18em;
  color: var(--muted-color);
  z-index: 100;
  text-transform: uppercase;
  pointer-events: none;
  user-select: none;
  opacity: 0.55;
}

.theme-indicator::before {
  content: 'theme · ';
  opacity: 0.7;
}

/* ===========================================
   WHOAMI SLIDE
   =========================================== */

.reveal .slides section#whoami .title-prompt {
  margin-bottom: 20px;
}

.whoami-name {
  font-size: 48pt;
  line-height: 1.05;
  margin: 0;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--text-color);
}

.whoami-header {
  display: flex;
  flex-direction: column;
}

.cert-row {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
}

.cert-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 130px;
}

.cert-badge {
  width: 120px;
  height: 120px;
  background: transparent;
  box-sizing: border-box;
  transition: transform 0.25s ease-out, filter 0.25s ease-out;
  object-fit: contain;
  cursor: pointer;
}

.cert-badge:hover {
  transform: scale(1.1) translateY(-4px);
  filter: drop-shadow(0 8px 16px rgba(94, 168, 167, 0.45));
}

/* Default Theme (Dark Mode) Badge Toggle */
.cert-gcp-light {
  display: none !important;
}
.cert-gcp-dark {
  display: block !important;
}

/* Light Theme Active Badge Toggle */
:root[data-theme="light"] .cert-gcp-light {
  display: block !important;
}
:root[data-theme="light"] .cert-gcp-dark {
  display: none !important;
}

.cert-label {
  font-family: var(--mono-font);
  font-size: 11pt;
  color: var(--muted-color);
  text-align: center;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.whoami-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 32px;
  margin: 0;
  padding: 16px 20px;
  border-left: 2px solid var(--primary-color);
  background: var(--panel-bg);
  border-radius: 0 4px 4px 0;
}

.whoami-meta-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 16px;
  align-items: baseline;
}

.whoami-meta-label {
  font-family: var(--mono-font);
  font-size: 10pt;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 600;
  white-space: nowrap;
}

.whoami-meta-value {
  font-size: 13pt;
  color: var(--text-color);
  line-height: 1.3;
}

.whoami-meta-value em {
  color: var(--primary-color);
  font-style: normal;
  font-weight: 600;
}

.whoami-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  margin-top: 4px;
}

/* ===========================================
   ANIMATIONS
   =========================================== */

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12pt); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes pulseCritical {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.55; }
}

@keyframes terminalBlink {
  0%, 50%  { opacity: 1; }
  51%, 100% { opacity: 0; }
}

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes accentPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(94, 168, 167, 0.4); }
  50%      { box-shadow: 0 0 0 8px rgba(94, 168, 167, 0); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-20pt); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20pt); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Apply fade-in-up to slide content on enter */
.reveal .slides section .content {
  animation: fadeInUp 0.5s ease-out both;
}

/* Stagger children of content for a quick cascade */
.reveal .slides section .content > * {
  animation: fadeInUp 0.5s ease-out both;
}
.reveal .slides section .content > *:nth-child(1) { animation-delay: 0.05s; }
.reveal .slides section .content > *:nth-child(2) { animation-delay: 0.15s; }
.reveal .slides section .content > *:nth-child(3) { animation-delay: 0.25s; }
.reveal .slides section .content > *:nth-child(4) { animation-delay: 0.35s; }

/* "This is fine." 🔥 pulses slowly in critical red */
.this-is-fine {
  animation: pulseCritical 2.4s ease-in-out infinite;
}

/* Terminal cursor blink on the ❯ prompt after typing */
.title-prompt .cursor {
  display: inline-block;
  width: 8px;
  height: 1em;
  background: var(--primary-color);
  margin-left: 4px;
  vertical-align: text-bottom;
  animation: terminalBlink 1.05s steps(1) infinite;
}

/* Theme indicator subtle shimmer */
.theme-indicator {
  background: linear-gradient(90deg,
    var(--muted-color) 0%,
    var(--text-color) 50%,
    var(--muted-color) 100%);
  background-size: 200% 100%;
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  animation: shimmer 6s linear infinite;
}

/* Link hover — subtle underline animation */
.reveal a {
  position: relative;
  transition: color 0.2s ease-out;
}
.reveal a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: var(--primary-color);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease-out;
}
.reveal a:hover::after {
  transform: scaleX(1);
}

/* Section divider title — small entrance */
.reveal .slides section.section-divider h1 {
  animation: slideInLeft 0.6s ease-out both;
}
.reveal .slides section.section-divider .section-number {
  animation: fadeIn 0.4s ease-out both;
  animation-delay: 0.15s;
}

/* Stat number big-text — count-up effect via CSS variable */
.stat .number {
  display: inline-block;
  animation: fadeInUp 0.6s ease-out both;
}

/* Panel entrance */
.reveal .slides section .panel {
  animation: fadeInUp 0.5s ease-out both;
}

/* QR code frames in the KCD gift and contact slides */
.reveal .slides section img[alt*="QR code"] {
  animation: fadeIn 0.6s ease-out both;
}

/* Reduced motion: respect user preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===========================================
   LIGHT-THEME-SPECIFIC OVERRIDES
   (Things that can't be done with variables alone)
   =========================================== */

:root[data-theme="light"] .reveal .slides section::before {
  /* Same teal gradient in light mode — still a clean hairline */
  background: linear-gradient(90deg, var(--primary-color) 0%, var(--primary-deep) 100%);
}

:root[data-theme="light"] figure.portrait img,
:root[data-theme="light"] .reveal figure img {
  /* Stallman portrait has a dark bg; give it a subtle shadow for separation on cream */
  box-shadow: 0 2px 12px rgba(26, 26, 26, 0.12);
}

:root[data-theme="light"] .terminal {
  /* Terminal surface stays dark — it's a deliberate "island of contrast" on cream */
  background: var(--code-bg);
  border-color: rgba(0, 0, 0, 0.2);
}

/* Use the regular (lighter) teal for terminal prompts inside the dark code surface */
:root[data-theme="light"] .terminal .prompt {
  color: var(--terminal-accent);
}

/* The 'h1::after' divider on section dividers still uses primary — looks correct in both modes */
:root[data-theme="light"] .reveal blockquote {
  /* Blockquote with deeper teal in light mode for AA */
  border-left: 4px solid var(--primary-color);
}

/* ===========================================
   FOOTNOTE LINK
   =========================================== */

.reveal a {
  color: var(--primary-color);
  text-decoration: none;
  border-bottom: 1px dotted var(--primary-color);
}

.reveal a:hover {
  color: var(--primary-deep);
  border-bottom-color: var(--primary-deep);
}

/* Reference QR Codes - floating transparently on slide backgrounds */
.ref-qr {
  background: transparent !important;
  padding: 0 !important;
  border-radius: 0 !important;
  border: none !important;
  box-sizing: border-box !important;
}

/* Hide light theme QR codes by default (dark mode is active) */
.ref-qr.qr-light-theme {
  display: none !important;
}
.ref-qr.qr-dark-theme {
  display: inline-block !important;
}

/* Toggle displays when light theme is active */
:root[data-theme="light"] .ref-qr.qr-light-theme {
  display: inline-block !important;
}
:root[data-theme="light"] .ref-qr.qr-dark-theme {
  display: none !important;
}
