/* ─── Variables ─── */
:root {
  --blue:     #3DB8F5;
  --blue-lo:  rgba(61, 184, 245, 0.12);
  --blue-md:  rgba(61, 184, 245, 0.30);
  --navy:     #0B2545;
  --yellow:   #F5C518;
  --yellow-lo:rgba(245, 197, 24, 0.14);
  --yellow-bd:rgba(245, 197, 24, 0.40);
  --warn:     #e74c3c;
  --warn-lo:  rgba(231, 76, 60, .12);
  --purple:   #b388ff;
  --purple-lo:rgba(155, 89, 182, .14);
  --purple-bd:rgba(155, 89, 182, .40);
  --dim:      #999;
  --dimmer:   #666;

  /* legacy aliases — keep components working */
  --ac:       var(--blue);
  --ac-lo:    var(--blue-lo);
  --ac-md:    var(--blue-md);
  --gold:     var(--yellow);
  --gold-lo:  var(--yellow-lo);
  --gold-bd:  var(--yellow-bd);
}

/* ─── Base overrides ─── */
.reveal {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}
.reveal h1, .reveal h2, .reveal h3 { text-transform: none; letter-spacing: -0.02em; }
.reveal h2 { color: var(--blue); font-weight: 700; }
.reveal h3 { color: var(--blue); font-size: 1.2em; font-weight: 600; }
.reveal p  { color: #ccc; line-height: 1.6; margin-bottom: 0.6em; }
.reveal a  { color: var(--blue); }
.reveal .progress bar { background: var(--blue) !important; }
.reveal .progress { height: 3px; }
.reveal section { font-size: 0.95em; }

/* markdown inline styles */
.reveal p strong { color: #fff; font-weight: 700; }
.reveal p em     { color: #ddd; }
.reveal p code,
.reveal h2 code  {
  color: var(--blue);
  background: var(--blue-lo);
  border: 1px solid var(--blue-md);
  padding: .12em .4em;
  border-radius: 4px;
  font-size: .86em;
  font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
}

/* ─── Slide layout helpers ─── */
.slide-center { text-align: center; }
.slide-left   { text-align: left; padding: 1.8em 2.6em; }

/* ─── Title slide ─── */
.slide-title .title-badge {
  display: inline-block;
  font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
  font-size: 0.38em;
  color: var(--blue);
  background: var(--blue-lo);
  border: 1px solid var(--blue-md);
  padding: 0.25em 0.75em;
  border-radius: 6px;
  letter-spacing: 0.06em;
  margin-bottom: 0.9em;
}
.slide-title h1        { font-size: 3.2em; color: #fff; margin-bottom: .15em; font-weight: 800; letter-spacing: -0.04em; }
.slide-title .subtitle { font-size: 1.2em; color: var(--dim); margin: 0 0 .6em; }
.slide-title hr        { border: none; border-top: 1px solid var(--blue-md); width: 80px; margin: 0 auto .65em; }
.slide-title .tagline  { color: var(--blue); font-style: italic; font-size: .9em; }

/* ─── Warn heading (red h2) ─── */
.slide-warn h2 { color: var(--warn) !important; font-size: 2.4em; }

/* ─── Warn-title (white h2 with em in warn colour) ─── */
.slide-warn-title h2       { color: #fff !important; }
.slide-warn-title h2 em    { color: var(--warn); font-style: normal; }

/* ─── Aha badge slide ─── */
.slide-aha h2 { color: #fff; }
.slide-aha .aha-badge {
  display: inline-block;
  background: linear-gradient(135deg, #f39c12, #e67e22);
  color: #fff; padding: .13em .55em; border-radius: 20px;
  font-size: .55em; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  vertical-align: middle; margin-right: .3em;
}

/* ─── Thesis slide ─── */
.slide-thesis h2 { color: var(--blue) !important; font-size: 2.6em; margin-bottom: 0.3em; }

/* ─── Question slide ─── */
.slide-question h2         { color: #fff !important; font-size: 2.2em; line-height: 1.3; }
.slide-question p strong   { color: var(--warn) !important; }

/* ─── Closing slide ─── */
.slide-closing a {
  display: block; color: var(--blue); font-size: 1.15em;
  font-weight: 600; margin: .4em 0; text-decoration: none;
}
.slide-closing a:hover { text-decoration: underline; }
.slide-closing .author {
  color: var(--dim); font-size: .82em; margin-top: 1.2em;
  padding-top: .7em; text-align: center;
}
.slide-closing .author::before {
  content: ''; display: block; width: 70px; height: 1px;
  background: #444; margin: 0 auto .7em;
}
.slide-closing .author a { font-size: 1em; }

/* ─── Entry-points list ─── */
.entry-points p { line-height: 2.3; font-size: 1em; }
.entry-points p code {
  display: inline-block;
  border: 1px solid var(--blue-md);
  border-radius: 6px; padding: .25em .75em;
  font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
}

/* ─── Nav hint ─── */
.nav-hint {
  position: fixed; bottom: 12px; right: 18px;
  color: rgba(255,255,255,.15); font-size: .65em;
  font-family: system-ui; pointer-events: none; z-index: 999;
}

/* ════════════════════════════════════════════════════════
   COMPONENT: Character image (bob.jpg, bob-team.jpg)
   ════════════════════════════════════════════════════════ */
.charimage { text-align: center; }
.charimage img {
  max-height: 62vh;
  max-width: 80%;
  border-radius: 16px;
  box-shadow: 0 16px 64px rgba(0, 0, 0, 0.55);
  display: block;
  margin: 0 auto;
}
.charimage img.wide {
  max-width: 92%;
  max-height: 55vh;
}
.char-caption {
  color: rgba(255,255,255,0.45);
  font-size: 0.82em;
  margin-top: 0.7em;
  font-style: italic;
}

/* ════════════════════════════════════════════════════════
   COMPONENT: Pillars (three foundations)
   ════════════════════════════════════════════════════════ */
.pillars {
  display: flex; gap: 1.2em; justify-content: center;
  flex-wrap: wrap; margin-top: .7em;
}
.pillar {
  background: var(--blue-lo); border: 1px solid var(--blue-md);
  border-radius: 12px; padding: .95em 1.1em;
  width: 190px; text-align: center;
}
.pillar .ico  { font-size: 2em; display: block; margin-bottom: .2em; }
.pillar h4    { color: var(--blue); margin: .2em 0; font-size: .9em; font-weight: 700; }
.pillar p     { color: var(--dim); font-size: .73em; margin: 0; line-height: 1.5; }

/* ════════════════════════════════════════════════════════
   COMPONENT: Journey rows
   ════════════════════════════════════════════════════════ */
.journey { margin: .4em 0; }
.jrow { display: flex; align-items: flex-start; gap: 1.2em; margin: .55em 0; }
.jday {
  background: var(--blue); color: #0B2545; border-radius: 50%;
  width: 52px; height: 52px; flex-shrink: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-weight: 800; line-height: 1; font-size: .9em;
}
.jday .dn  { font-size: .6em; text-transform: uppercase; font-weight: 600; }
.jtxt h4   { color: #fff; margin: 0 0 .15em; font-size: .9em; font-weight: 700; }
.jtxt p    { color: var(--dim); font-size: .78em; margin: .18em 0; line-height: 1.55; }
.jtxt .saved { color: var(--blue); font-size: .72em; margin-top: .3em; }
.jtxt .saved code { font-size: .92em; }

/* ════════════════════════════════════════════════════════
   COMPONENT: Compare boxes (bad / good)
   ════════════════════════════════════════════════════════ */
.compare { display: flex; gap: 1.6em; justify-content: center; flex-wrap: wrap; }
.cbox { border-radius: 12px; padding: 1.1em 1.3em; width: 265px; }
.cbox.bad  { background: var(--warn-lo);  border: 1px solid rgba(231,76,60,.3); }
.cbox.good { background: var(--blue-lo);  border: 1px solid var(--blue-md); }
.cbox h4   { margin: 0 0 .6em; font-size: .94em; font-weight: 700; }
.cbox.bad  h4 { color: var(--warn); }
.cbox.good h4 { color: var(--blue); }
.cbox ul   { margin: 0; padding-left: 1.1em; }
.cbox li   { color: #bbb; font-size: .77em; margin-bottom: .3em; line-height: 1.45; }

/* ════════════════════════════════════════════════════════
   COMPONENT: File-tree
   ════════════════════════════════════════════════════════ */
.ftree {
  background: rgba(0,0,0,.45); border: 1px solid #333; border-radius: 8px;
  padding: .9em 1.2em; font-family: 'JetBrains Mono','Fira Code',Consolas,monospace;
  font-size: .82em; text-align: left; display: inline-block;
  line-height: 1.9; white-space: pre;
}
.ftree .folder    { color: var(--blue); }
.ftree .highlight { color: var(--blue); font-weight: 600; }
.ftree .comment   { color: var(--dimmer); }
.ftree .file      { color: #ccc; }
.ftree .branch-label { color: var(--blue); font-weight: 700; margin-bottom: .25em; display: block; }

/* ════════════════════════════════════════════════════════
   COMPONENT: Three-layer stack (tiers)
   ════════════════════════════════════════════════════════ */
.layers { display: flex; flex-direction: column; align-items: center; gap: .35em; }
.lbox {
  border-radius: 10px; padding: .6em 1.7em; text-align: center;
  width: 430px; max-width: 88vw;
}
.lbox.discovery   { background: var(--purple-lo); border: 1px solid var(--purple-bd); }
.lbox.engineering { background: var(--blue-lo);   border: 1px solid var(--blue-md); }
.lbox.knowledge   { background: var(--yellow-lo); border: 1px solid var(--yellow-bd); }
.lbox h4          { margin: 0 0 .1em; font-size: .92em; font-weight: 700; }
.lbox.discovery   h4 { color: var(--purple); }
.lbox.engineering h4 { color: var(--blue); }
.lbox.knowledge   h4 { color: var(--yellow); }
.lbox p           { margin: 0; color: #aaa; font-size: .73em; }
.larrow           { color: var(--dimmer); font-size: .95em; line-height: 1.4; }
.larrow.up        { color: var(--blue); font-weight: 600; }
.larrow em        { color: var(--dim); font-size: .84em; }

/* ════════════════════════════════════════════════════════
   COMPONENT: Bar chart
   ════════════════════════════════════════════════════════ */
.bars { display: flex; gap: 1.4em; justify-content: center; align-items: flex-end; }
.bcol { text-align: center; }
.bcol .bar {
  width: 64px; background: var(--blue); border-radius: 5px 5px 0 0;
  display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: .25em; margin: 0 auto;
}
.bcol .bar span  { color: #0B2545; font-weight: 700; font-size: .82em; }
.bcol .lbl       { color: var(--dim); font-size: .71em; margin-top: .3em; line-height: 1.4; }
.bcol .lbl em    { font-size: .84em; }

/* ════════════════════════════════════════════════════════
   COMPONENT: Cards
   ════════════════════════════════════════════════════════ */
.cards { display: flex; gap: 1.2em; justify-content: center; flex-wrap: wrap; margin-top: .6em; }
.card {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.10);
  border-radius: 10px; padding: .8em 1em; width: 180px; text-align: left;
}
.card h4 { color: var(--blue); margin: 0 0 .25em; font-size: .78em; font-weight: 700;
           font-family: 'JetBrains Mono','Fira Code',Consolas,monospace; }
.card p  { color: var(--dim); font-size: .72em; margin: 0; line-height: 1.45; }

.cards .card.highlight-card { background: var(--blue-lo); border-color: var(--blue-md); }
.cards .card.highlight-card h4 { color: var(--yellow); }
.cards .card.highlight-card p  { color: #aaa; }

/* ════════════════════════════════════════════════════════
   COMPONENT: Pipeline (phase flow)
   ════════════════════════════════════════════════════════ */
.pipeline {
  display: grid;
  grid-template-rows: auto auto;
  row-gap: 0.45em;
  column-gap: 0.3em;
  justify-items: center;
  align-items: center;
  margin-top: 0.9em;
}
.pbox {
  background: var(--blue-lo); border: 1px solid var(--blue-md);
  border-radius: 8px; padding: 0.65em 0.5em;
  min-width: 85px; text-align: center;
}
.picon { font-size: 1.4em; display: block; margin-bottom: 0.1em; }
.pname { color: var(--blue); font-size: 0.74em; font-weight: 700; display: block;
         font-family: 'JetBrains Mono','Fira Code',Consolas,monospace; }
.pgate {
  color: var(--yellow); font-size: 0.66em;
  line-height: 1.3; text-align: center;
}
.pgate::before { content: '✓ '; font-weight: 700; }
.parrow { color: var(--dimmer); font-size: 1.3em; font-weight: 300; }

/* ═══ Responsive safety ═══ */
@media (max-width: 700px) {
  .pillars, .compare, .cards, .bars { flex-direction: column; align-items: center; }
  .pillar, .cbox, .card { width: 90vw; max-width: 320px; }
  .ftree { font-size: .74em; }
  .pipeline { font-size: .82em; }
  .lbox  { width: 90vw; }
  .jrow  { flex-direction: column; align-items: center; }
  .jtxt  { text-align: center; }
  .charimage img { max-width: 95%; }
}
