:root {
  /* Colors */
  --bg-primary: #202124;
  --bg-surface: #303134;
  --border-subtle: #303134;
  --border-standard: #3c3f43;
  --text-primary: #E8EAED;
  --text-muted: #9AA0A6;
  --text-dim: #5F6368;
  --accent-primary: #4A7FE0;
  --accent-hover: #6B9AE8;
  --accent-light: #90B4FF;
  
  /* Typography */
  --font-display: "Google Sans", "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "Fira Code", "JetBrains Mono", monospace;
  
  /* Layout */
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --spacing-3xl: 4rem;
  --spacing-4xl: 5rem;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow: hidden;
  font-size: 1.5vw; /* Fluid base sizing for presentation */
}

/* Presentation Container */
#presentation {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

/* Option 1: Executive Spotlight */
#presentation::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(74, 127, 224, 0.15) 0%, transparent 60%);
  border-radius: 50%;
  filter: blur(40px);
  pointer-events: none;
  z-index: -1;
}

#presentation::after {
  content: '';
  position: absolute;
  bottom: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(74, 127, 224, 0.1) 0%, transparent 60%);
  border-radius: 50%;
  filter: blur(40px);
  pointer-events: none;
  z-index: -1;
}

/* Slides */
.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  padding: 8vw 12vw;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: opacity 0.4s ease-out, transform 0.4s ease-out;
  transform: translateX(5%);
}

.slide.active {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.slide.previous {
  transform: translateX(-5%);
}

/* Typography elements */
h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 5.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: var(--spacing-2xl);
}

h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: var(--spacing-xl);
  color: var(--text-primary);
}

.title-slide h1 {
  color: var(--accent-light);
}

.title-slide h2 {
  font-size: clamp(1.5rem, 2.5vw, 2.5rem);
  font-weight: 400;
  color: var(--text-muted);
}

p {
  font-size: clamp(1.2rem, 2vw, 2.2rem);
  margin-bottom: var(--spacing-lg);
  color: var(--text-primary);
  max-width: 45rem;
}

.large-text p {
  font-size: clamp(2rem, 3.5vw, 4rem);
  font-weight: 600;
  line-height: 1.3;
  font-family: var(--font-display);
  color: var(--text-primary);
  max-width: 50rem;
}

.large-text p .accent {
  color: var(--accent-light);
}

ul {
  list-style: none;
  font-size: clamp(1.2rem, 2vw, 2.2rem);
}

li {
  margin-bottom: var(--spacing-md);
  position: relative;
  padding-left: 1.5em;
  color: var(--text-muted);
}

li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--accent-primary);
  font-weight: 700;
}

/* Code Blocks — Expressive Code overrides scoped to slide context */
#presentation .expressive-code {
  width: 100%;
}

/* Scale code text to presentation viewport — EC header/frame untouched */
#presentation .expressive-code pre {
  font-size: clamp(1rem, 1.5vw, 1.8rem) !important;
  line-height: 1.5;
}

#presentation .expressive-code code {
  font-family: var(--font-mono);
}

/* Layout Utilities */
.split-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.centered {
  text-align: center;
  align-items: center;
}

.centered p {
  margin-left: auto;
  margin-right: auto;
}

.accent-box {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-top-color: rgba(255, 255, 255, 0.12);
  padding: 2rem 3rem;
  border-radius: 0.5rem;
  box-shadow: 0 8px 32px rgba(74, 127, 224, 0.1);
}

.accent-box h3 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--accent-light);
  margin-bottom: 1rem;
}

/* Footer / Progress / Blog Links */
.controls-container {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  z-index: 100;
}

.progress-bar-container {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--bg-surface);
}

.progress-bar {
  height: 100%;
  background: var(--accent-primary);
  width: 0%;
  transition: width 0.3s ease-out;
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(32, 33, 36, 0.85);
  border: 1px solid #303134;
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  backdrop-filter: blur(8px);
}

.nav-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem;
  border-radius: 50%;
  transition: color 0.15s ease;
  line-height: 0;
}

.nav-btn:hover:not(:disabled) {
  color: var(--accent-light);
}

.nav-btn:disabled {
  color: var(--text-dim);
  cursor: default;
}

.slide-counter {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  min-width: 4.5rem;
  text-align: center;
  user-select: none;
}

.blog-link {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.2s ease;
  font-weight: 600;
}

.blog-link:hover {
  color: var(--accent-light);
}

.blog-link svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* Speaker Name Lockup */
.speaker-lockup {
  position: absolute;
  top: 2rem;
  left: 2rem;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  z-index: 100;
  opacity: 0.5;
}

/* Sidebar & Thumbnails */
#sidebar-toggle {
  position: fixed;
  left: 2rem;
  bottom: 2rem;
  width: 3rem;
  height: 3rem;
  border-radius: 0.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-standard);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1001;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  transition: background 0.2s, border-color 0.2s, transform 0.1s;
}

#sidebar-toggle:hover {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #fff;
}

#sidebar-toggle:active {
  transform: scale(0.95);
}

#sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 260px;
  background: var(--bg-surface);
  border-right: 1px solid var(--border-standard);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  transform: translateX(0);
  box-shadow: 2px 0 12px rgba(0, 0, 0, 0.3);
}

#sidebar.collapsed {
  transform: translateX(-100%);
  box-shadow: none;
}

.sidebar-header {
  padding: 1.25rem 1rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-standard);
}

#thumbnail-list {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}

#thumbnail-list::-webkit-scrollbar {
  width: 6px;
}
#thumbnail-list::-webkit-scrollbar-track {
  background: transparent;
}
#thumbnail-list::-webkit-scrollbar-thumb {
  background: var(--border-standard);
  border-radius: 4px;
}
#thumbnail-list::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

.thumbnail-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.2s;
}

.thumbnail-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.thumbnail-item.active {
  background: rgba(74, 127, 224, 0.1);
  border-left: 3px solid var(--accent-primary);
  padding-left: calc(1rem - 3px);
}

.thumbnail-index {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  width: 1.5rem;
  text-align: right;
  font-weight: 600;
}

.thumbnail-item.active .thumbnail-index {
  color: var(--accent-light);
}

.thumbnail-wrapper {
  width: 160px;
  height: 90px;
  position: relative;
  background: var(--bg-primary);
  overflow: hidden;
  border: 1px solid var(--border-standard);
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.thumbnail-item.active .thumbnail-wrapper {
  border-color: var(--accent-light);
  box-shadow: 0 0 0 1px var(--accent-light);
}

.thumbnail-slide {
  width: 1920px !important;
  height: 1080px !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  transform: scale(0.08333) !important;
  transform-origin: top left !important;
  pointer-events: none !important;
  
  opacity: 1 !important;
  visibility: visible !important;
  transition: none !important;
  
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  padding: 153px 230px !important;
  box-sizing: border-box !important;
  
  /* Hardcode font sizes for thumbnail clone so they don't depend on viewport */
  font-size: 28.8px !important;
}

.thumbnail-slide h1 { font-size: 105px !important; margin-bottom: 50px !important; line-height: 1.1 !important; }
.thumbnail-slide h2 { font-size: 67px !important; margin-bottom: 40px !important; line-height: 1.2 !important; }
.thumbnail-slide p { font-size: 42px !important; margin-bottom: 30px !important; line-height: 1.5 !important; }
.thumbnail-slide .large-text p { font-size: 76px !important; line-height: 1.3 !important; }
.thumbnail-slide ul { font-size: 42px !important; }
.thumbnail-slide li { margin-bottom: 20px !important; }
.thumbnail-slide pre { font-size: 34px !important; padding: 40px !important; border-width: 4px !important; border-radius: 16px !important; }
.thumbnail-slide .accent-box { padding: 40px 60px !important; border-width: 4px !important; border-radius: 16px !important; }
.thumbnail-slide .accent-box h3 { font-size: 45px !important; margin-bottom: 20px !important; }
.thumbnail-slide .speaker-lockup { display: none !important; }

/* Shift main content a bit if desired, but overlay is fine. Let's adjust controls to not overlap sidebar toggle */
.controls-container {
  padding-left: 6rem;
}
