:root {
  --bg: #0e1116;
  --fg: #e6e6e6;
  --muted: #9aa3ad;
  --accent: #7aa2f7;
  --link: #e6b84a;
  --rule: #1f2530;
  --code-bg: #0a0d12;
}

* { box-sizing: border-box; }

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

body.light-mode {
  --bg: #f7f7f5;
  --fg: #1a1d23;
  --muted: #5c6470;
  --accent: #2563a8;
  --link: #5d2b8a;
  --rule: #d0d4da;
}

#deck {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.slide {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  justify-content: center;
  padding: 6vh 8vw;
  overflow: auto;
}

.slide.is-active {
  display: flex;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  letter-spacing: -0.02em;
  color: var(--link);
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 600;
  margin: 0 0 1.5rem 0;
  letter-spacing: -0.01em;
  color: var(--link);
}

.slide h3 {
  font-size: clamp(1.1rem, 1.6vw, 1.4rem);
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 0.6rem 0;
  letter-spacing: -0.005em;
}

.subtitle {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  color: var(--muted);
  margin: 0 0 2rem 0;
}

.meta {
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  margin: 0;
}

.title-slide {
  align-items: flex-start;
}

.title-block {
  margin: auto 0;
}

.hint {
  position: absolute;
  bottom: 4vh;
  left: 8vw;
  color: var(--muted);
  font-size: 0.9rem;
}

.hint kbd {
  background: var(--rule);
  border: 1px solid var(--muted);
  border-radius: 4px;
  padding: 1px 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
}

.bullets {
  margin: 0 0 1.2rem 0;
  padding-left: 1.2em;
}

.bullets li {
  margin: 0.4em 0;
}

.bullets .bullets {
  margin: 0.3em 0 0 0;
}

.steps {
  margin: 0 0 1rem 0;
  padding-left: 1.5em;
}

.steps > li {
  margin: 0 0 1.2rem 0;
  padding-left: 0.3em;
}

.steps > li > p:first-child {
  margin: 0 0 0.4rem 0;
  font-weight: 600;
}

.slide a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  word-break: break-word;
}

.slide a:hover,
.slide a:focus-visible {
  text-decoration-thickness: 2px;
  outline: none;
}

.slide code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--rule);
  padding: 0.05em 0.35em;
  border-radius: 4px;
  font-size: 0.9em;
}

/* Multi-line code blocks always render on a dark "window" so the
   prism-tomorrow theme stays readable in both light and dark modes. */
.code-block {
  background: var(--code-bg);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 1em 1.2em;
  font-size: 0.75rem;
  overflow: auto;
  max-height: 60vh;
  margin: 0 0 1.2rem 0;
}

.slide .code-block code {
  background: transparent;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
  color: #e6e6e6;
}

.eyebrow {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--accent);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 0.6rem 0;
}

.lead {
  margin: 1rem 0 0.4rem 0;
}

.lead:first-child {
  margin-top: 0;
}

.slide p {
  margin: 0 0 1rem 0;
  max-width: 60ch;
}

.agenda {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3rem;
}

.agenda-section .bullets {
  margin-bottom: 0;
}

.image-placeholder {
  margin: 1.5rem 0 0 0;
  padding: 1.4em;
  border: 1px dashed var(--rule);
  border-radius: 8px;
  color: var(--muted);
  font-style: italic;
  text-align: center;
}

/* Top-left hover zone for the theme toggle. The zone is invisible —
   it just enlarges the hit-area so the user doesn't have to land on
   the icon exactly to reveal it. */
.theme-zone {
  position: fixed;
  top: 0;
  left: 0;
  width: 6em;
  height: 6em;
  z-index: 10;
}

.theme-toggle {
  position: absolute;
  top: 1em;
  left: 1em;
  background: transparent;
  border: none;
  color: var(--fg);
  cursor: pointer;
  padding: 0.3em 0.5em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}

.theme-zone.is-revealed .theme-toggle {
  opacity: 0.55;
  pointer-events: auto;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  opacity: 0.95;
  outline: none;
}

.theme-icon {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.6rem;
  line-height: 1;
}

/* Bottom-right nav cluster: prev arrow, counter, next arrow.
   Padding/margin extends the hover hit-zone beyond the visible buttons. */
.deck-nav {
  position: fixed;
  right: 2vw;
  bottom: 2vh;
  display: flex;
  align-items: center;
  gap: 0.1em;
  padding: 1.5em;
  margin: -1.5em;
  pointer-events: auto;
}

.slide-counter {
  background: transparent;
  border: none;
  color: var(--fg);
  opacity: 0.18;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.95rem;
  cursor: pointer;
  padding: 0.4em 0.6em;
  transition: opacity 120ms ease;
}

.slide-counter:hover,
.slide-counter:focus-visible,
.deck-nav.is-revealed .slide-counter {
  opacity: 0.85;
  outline: none;
}

.nav-arrow {
  background: transparent;
  border: none;
  color: var(--fg);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.15em 0.45em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}

.deck-nav.is-revealed .nav-arrow {
  opacity: 0.55;
  pointer-events: auto;
}

.nav-arrow:hover,
.nav-arrow:focus-visible {
  opacity: 0.95;
  outline: none;
}

.nav-arrow:disabled {
  cursor: default;
  opacity: 0.15;
}

.slide-counter .sep {
  margin: 0 0.2em;
  color: var(--muted);
}

.slide-counter.is-editing {
  opacity: 0.95;
}

.slide-counter input {
  width: 3ch;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--accent);
  color: var(--fg);
  font: inherit;
  text-align: right;
  padding: 0;
  outline: none;
}

/* Hide spinner on number input. */
.slide-counter input::-webkit-outer-spin-button,
.slide-counter input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.slide-counter input[type=number] {
  -moz-appearance: textfield;
}
