/* ============================================================
   Aspirations Lecture — Interactive slides
   ============================================================ */
:root {
  --bg:        #F7F6F2;
  --surface:   #FFFFFF;
  --ink:       #1A1814;
  --ink-mute:  #5A5852;
  --line:      #D9D6CE;
  --accent:    #01696F;
  --accent-hi: #015057;
  --accent-soft:#E3EEEF;
  --gold:      #B58A2B;

  --shadow-lg: 0 24px 60px -20px rgba(20, 18, 14, 0.18);
  --shadow-md: 0 8px 24px -8px rgba(20, 18, 14, 0.14);

  --bar-h: 72px;
  --radius: 18px;
  --radius-lg: 28px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

/* ============================================================
   TOP CONTROL BAR
   ============================================================ */
.control-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--bar-h);
  z-index: 50;
  background: rgba(247, 246, 242, 0.92);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 20px;
  gap: 16px;
}

.control-left, .control-right { display: flex; align-items: center; gap: 10px; }
.control-right { justify-content: flex-end; }

.brand { display: flex; align-items: center; gap: 12px; }
.brand svg { flex-shrink: 0; }
.presenter-badge {
  width: 40px; height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent, #01696F);
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
  flex-shrink: 0;
}

/* Presenter card on slide 1 */
.presenter-card {
  display: inline-flex;
  align-items: center;
  gap: 22px;
  margin: 28px auto 0;
  padding: 14px 26px 14px 14px;
  background: rgba(255,255,255,0.65);
  border: 1px solid rgba(1,105,111,0.18);
  border-radius: 999px;
  backdrop-filter: blur(6px);
  box-shadow: 0 6px 24px rgba(10,32,45,0.08);
}
.presenter-photo {
  width: clamp(78px, 8vw, 120px);
  height: clamp(78px, 8vw, 120px);
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: 0 4px 12px rgba(10,32,45,0.15);
  flex-shrink: 0;
}
.presenter-text { text-align: left; line-height: 1.25; }
.presenter-name { font-family: 'Instrument Serif', Georgia, serif; font-size: clamp(20px, 2.2vw, 30px); color: var(--ink, #0a1d2b); font-weight: 600; }
.presenter-role { font-size: clamp(13px, 1.1vw, 16px); color: var(--ink-mute, #5b6770); margin-top: 2px; }
.presenter-date { font-size: clamp(12px, 1vw, 14px); color: var(--accent, #01696F); margin-top: 2px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }

/* Thumbnail navigator strip — bottom of every page */
.thumbstrip {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: rgba(247,246,242,0.92);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(1,105,111,0.14);
  z-index: 40;
  padding: 8px 0;
  box-shadow: 0 -6px 22px rgba(10,32,45,0.06);
}
.thumbstrip-inner {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 0 16px;
  scrollbar-width: thin;
}
.thumbstrip-inner::-webkit-scrollbar { height: 6px; }
.thumbstrip-inner::-webkit-scrollbar-thumb { background: rgba(1,105,111,0.25); border-radius: 4px; }
.thumb {
  position: relative;
  flex: 0 0 auto;
  width: 96px; height: 56px;
  border-radius: 8px;
  border: 2px solid transparent;
  background: #ddd;
  cursor: pointer;
  padding: 0;
  overflow: hidden;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.thumb:hover { transform: translateY(-2px); border-color: rgba(1,105,111,0.4); box-shadow: 0 4px 12px rgba(10,32,45,0.15); }
.thumb.active { border-color: var(--accent, #01696F); box-shadow: 0 0 0 2px rgba(1,105,111,0.20), 0 4px 12px rgba(1,105,111,0.20); }
.thumb-img {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
}
.thumb-num {
  position: absolute;
  left: 6px; bottom: 4px;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  background: rgba(10,29,43,0.78);
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.04em;
}

/* Make space for the thumbstrip at the bottom of slides */
.stage { padding-bottom: 80px; }
@media (max-width: 720px) {
  .thumb { width: 76px; height: 44px; }
  .stage { padding-bottom: 70px; }
}
.brand-text { line-height: 1.15; }
.brand-title { font-weight: 700; font-size: 15px; color: var(--ink); }
.brand-sub { font-size: 12px; color: var(--ink-mute); }

/* Playback controls */
.controls {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface);
  padding: 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}
.ctl-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent;
  border: none;
  color: var(--ink);
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, transform 0.12s ease;
}
.ctl-btn:hover { background: #EFEEEA; }
.ctl-btn:active { transform: scale(0.96); }
.ctl-btn.primary {
  background: var(--accent); color: #fff;
}
.ctl-btn.primary:hover { background: var(--accent-hi); }
.ctl-btn[disabled] { opacity: 0.4; cursor: not-allowed; }

.link-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: inherit;
  font-weight: 600;
  font-size: 13px;
  padding: 9px 14px;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.18s ease;
}
.link-btn:hover { border-color: var(--accent); color: var(--accent); }

/* Progress bar */
.progress-track {
  position: fixed; top: var(--bar-h); left: 0; right: 0;
  height: 3px; background: var(--line); z-index: 49;
}
.progress-fill {
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  transition: width 0.45s cubic-bezier(.22,.61,.36,1);
}

/* ============================================================
   STAGE — one slide per screen
   ============================================================ */
.stage {
  position: relative;
  height: 100vh;
  padding-top: calc(var(--bar-h) + 3px);
  outline: none;
}

.slide {
  position: absolute;
  inset: calc(var(--bar-h) + 3px) 0 0 0;
  display: grid;
  align-items: center;
  padding: clamp(20px, 4vw, 56px) clamp(20px, 5vw, 80px);
  opacity: 0;
  transform: translateY(20px) scale(0.995);
  pointer-events: none;
  transition: opacity 0.55s ease, transform 0.55s cubic-bezier(.22,.61,.36,1);
}
.slide.active {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

/* Layouts */
.slide.cover {
  grid-template-columns: 1fr;
  text-align: center;
  background:
    radial-gradient(1200px 600px at 50% 110%, rgba(1,105,111,0.10), transparent 60%),
    var(--bg);
}
.slide.cover .image-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.38;
  overflow: hidden;
}
.slide.cover .image-wrap img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.85); }
.slide.cover .image-wrap::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, var(--bg) 0%, rgba(247,246,242,0.4) 35%, var(--bg) 100%);
}
.slide.cover .content { position: relative; z-index: 1; max-width: 1100px; margin: 0 auto; }

.slide.split {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 64px);
}
.slide.split .image-wrap {
  height: 100%;
  max-height: calc(100vh - var(--bar-h) - 120px);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  position: relative;
}
.slide.split .image-wrap img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}

/* Slide text */
.eyebrow {
  display: inline-block;
  font-size: clamp(13px, 1vw, 15px);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: clamp(18px, 2vw, 26px);
}

.slide h1 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400;
  font-size: clamp(40px, 5.5vw, 80px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 clamp(20px, 2.4vw, 32px);
  color: var(--ink);
}

.slide.cover h1 { font-size: clamp(48px, 7vw, 104px); }

.slide h2.subtitle {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: clamp(20px, 2vw, 30px);
  line-height: 1.35;
  color: var(--ink-mute);
  margin: 0 0 clamp(22px, 2.5vw, 36px);
  max-width: 30ch;
}
.slide.cover h2.subtitle { margin-left: auto; margin-right: auto; }

.slide ul.bullets {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 1.5vw, 22px);
}
.slide ul.bullets li {
  font-size: clamp(19px, 1.9vw, 26px);
  line-height: 1.45;
  color: var(--ink);
  padding-left: 30px;
  position: relative;
}
.slide ul.bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 14px;
  height: 2.5px;
  background: var(--accent);
  border-radius: 2px;
}

.slide .body-text {
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.5;
  color: var(--ink-mute);
}
.slide.cover .body-text { font-size: clamp(18px, 1.6vw, 24px); margin-top: 16px; }

/* Two-column comparison */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 12px;
}
.two-col .col {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(20px, 2vw, 28px);
}
.two-col .col .col-head {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.two-col .col .col-text {
  font-size: clamp(17px, 1.5vw, 21px);
  line-height: 1.45;
  color: var(--ink);
}
.two-col .col.aspiration {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.two-col .col.aspiration .col-head { color: #FFD89F; }
.two-col .col.aspiration .col-text { color: #fff; }

.slide-number {
  position: absolute;
  bottom: clamp(86px, 8vh, 96px);
  right: clamp(20px, 2.5vw, 36px);
  font-size: 13px;
  color: var(--ink-mute);
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   VOICE STATUS PILL
   ============================================================ */
.voice-pill {
  position: fixed;
  bottom: 92px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 60;
  box-shadow: var(--shadow-lg);
  pointer-events: none;
}
.voice-pill.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.voice-pill .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #6DCC75;
  animation: pulse 1.2s infinite ease-in-out;
}
.voice-pill.paused .dot { background: #FFD089; animation: none; }
.voice-pill.stopped .dot { background: #888; animation: none; }
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.5); opacity: 0.4; }
}

/* ============================================================
   TOC OVERLAY
   ============================================================ */
.toc {
  position: fixed;
  inset: 0;
  background: rgba(20, 18, 14, 0.55);
  backdrop-filter: blur(6px);
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
}
.toc[hidden] { display: none; }
.toc-panel {
  background: var(--surface);
  border-radius: var(--radius-lg);
  max-width: 720px;
  width: 100%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.toc-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 26px;
  border-bottom: 1px solid var(--line);
}
.toc-head h2 {
  margin: 0;
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: 28px;
}
.icon-btn {
  background: transparent; border: none; cursor: pointer;
  font-size: 28px; line-height: 1; color: var(--ink-mute);
  padding: 4px 10px; border-radius: 8px;
}
.icon-btn:hover { background: #EFEEEA; color: var(--ink); }
.toc-list {
  list-style: none;
  margin: 0; padding: 14px 0;
  overflow-y: auto;
  counter-reset: tocnum;
}
.toc-list li {
  counter-increment: tocnum;
  padding: 14px 26px;
  cursor: pointer;
  display: flex; align-items: center; gap: 16px;
  border-left: 3px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.toc-list li::before {
  content: counter(tocnum, decimal-leading-zero);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-mute);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
  min-width: 28px;
}
.toc-list li:hover { background: #F4F2EC; }
.toc-list li.current { border-left-color: var(--accent); background: var(--accent-soft); }
.toc-list li .toc-title { font-weight: 600; font-size: 16px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .slide.split {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    gap: 18px;
    align-content: start;
    padding-top: clamp(16px, 3vw, 28px);
    overflow-y: auto;
  }
  .slide.split .image-wrap {
    max-height: 32vh;
  }
  .slide h1 { font-size: clamp(32px, 6vw, 50px); }
  .slide ul.bullets li { font-size: clamp(16px, 2.5vw, 19px); }
  .two-col { grid-template-columns: 1fr; }
  .ctl-btn span { display: none; }
  .ctl-btn { padding: 10px; }
  .link-btn span { display: none; }
  .brand-text { display: none; }
  .control-bar { grid-template-columns: auto 1fr auto; padding: 0 12px; }
}

@media (max-width: 600px) {
  :root { --bar-h: 62px; }
  .slide { padding: 14px 16px; }
  .slide h1 { font-size: clamp(28px, 8vw, 40px); }
  .eyebrow { font-size: 11px; padding: 4px 10px; margin-bottom: 12px; }
  .link-btn { padding: 7px 10px; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .slide { transition: opacity 0.2s ease; transform: none !important; }
  .voice-pill .dot { animation: none; }
}
