:root {
  --bg: #0f1115;
  --fg: #f4f4f5;
  --accent: #4f9dff;
  --muted: #9aa0a6;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

#slides {
  height: 100vh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
}

.slide {
  height: 100vh;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 8vh 10vw;
}

.intro-slide {
  align-items: center;
  text-align: center;
}

.slide-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.intro-photo {
  width: clamp(140px, 20vw, 220px);
  height: clamp(140px, 20vw, 220px);
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1em;
  border: 2px solid var(--accent);
}

.slide-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.slide-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  align-self: stretch;
  gap: 2em;
  margin-bottom: 2em;
}

.slide-header-row .code-link {
  margin-top: 0;
  flex-shrink: 0;
}

.header-links {
  display: flex;
  gap: 1em;
  flex-shrink: 0;
}

.header-links .code-link {
  text-decoration: none;
  display: inline-block;
}

.slide .eyebrow {
  font-size: clamp(0.8rem, 1.2vw, 1rem);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin: 0 0 0.5em 0;
}

.slide h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin: 0 0 0.5em 0;
}

.slide h2 {
  font-size: clamp(1.2rem, 2.5vw, 1.75rem);
  font-weight: 400;
  color: var(--muted);
  margin: 0 0 1em 0;
}

.slide p {
  font-size: clamp(1rem, 1.6vw, 1.4rem);
  line-height: 1.5;
  max-width: 60ch;
}

.media-row {
  display: flex;
  align-items: center;
  gap: 3em;
  width: 70vw;
  max-width: 1100px;
}

.media-row .media-video,
.media-row .media-image {
  flex: 1;
  width: 50%;
  border-radius: 8px;
}

.media-row .media-video {
  width: auto;
  max-height: 250px;
  object-fit: contain;
}

#deep-dive-2 .media-image {
  width: auto;
  max-height: 250px;
  object-fit: contain;
}

.media-row .media-image {
  background: #fff;
  padding: 0.75em;
  object-fit: contain;
}

.slide .notes {
  color: var(--muted);
  font-style: italic;
  font-size: 1rem;
}

.slide p.tight {
  margin-top: 1.5em;
  color: var(--muted);
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 7em;
  row-gap: 3em;
  max-width: 80ch;
}

.two-col h3 {
  color: var(--accent);
  font-size: clamp(1.1rem, 1.8vw, 1.4rem);
  margin: 0 0 0.5em 0;
}

.two-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: clamp(0.95rem, 1.4vw, 1.2rem);
  line-height: 1.5;
}

.two-col li::before {
  content: "\2022";
  color: var(--accent);
  margin-right: 0.6em;
}

.two-col li ul {
  margin-top: 0.4em;
  margin-left: 1.4em;
}

.two-col li ul li {
  font-size: 0.9em;
}

.two-col li ul li::before {
  content: "\2013";
  color: var(--muted);
}

.intro-bullets {
  display: grid;
  grid-template-columns: repeat(2, auto);
  grid-auto-flow: column;
  grid-template-rows: repeat(6, auto);
  column-gap: 3em;
  row-gap: 0.5em;
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
  font-size: clamp(1rem, 1.4vw, 1.2rem);
}

.intro-bullets li::before {
  content: "\2022";
  color: var(--accent);
  margin-right: 0.6em;
}

.diagram-placeholder {
  margin-top: 1.5em;
  padding: 3em;
  border: 1px dashed var(--muted);
  color: var(--muted);
  text-align: center;
  max-width: 60ch;
}

.dots {
  position: fixed;
  right: 2vw;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 10;
}

.dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid var(--muted);
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.dots button.active {
  background: var(--accent);
  border-color: var(--accent);
}

.code-link {
  margin-top: 1.5em;
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 1rem;
  padding: 0.6em 1.2em;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
}

.code-link:hover {
  background: var(--accent);
  color: var(--bg);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal-overlay[hidden] {
  display: none;
}

.modal {
  background: #1a1d23;
  border-radius: 10px;
  width: min(80vw, 900px);
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75em 1.25em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-family: "SFMono-Regular", Consolas, Menlo, monospace;
  color: var(--muted);
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.25em;
}

.modal-close:hover {
  color: var(--fg);
}

.modal-body {
  overflow: auto;
  padding: 0;
}

.modal-body pre {
  margin: 0;
  padding: 1.25em;
}

.modal-body code {
  font-family: "SFMono-Regular", Consolas, Menlo, monospace;
  font-size: 0.85rem;
  line-height: 1.5;
}
