@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500&display=swap');

/* ─────────────────────────────────────────
   TOKENS
───────────────────────────────────────── */
:root {
  --bg:          #0c0f18;
  --bg-card:     #141925;
  --bg-card2:    #1a2032;
  --accent:      #4A9EFF;
  --accent-dim:  rgba(74,158,255,0.12);
  --accent-glow: rgba(74,158,255,0.25);
  --text:        #eef2ff;
  --text-mid:    #8fa0bf;
  --text-dim:    #6b80a0;
  --border:      #1e2840;
  --border-hi:   #2e3f60;
  --red:         #ff5555;
  --red-dim:     rgba(255,85,85,0.1);
  --green:       #50fa7b;
  --green-dim:   rgba(80,250,123,0.08);
  --yellow:      #f1c40f;
  --mono:        'JetBrains Mono', monospace;
  --sans:        'Inter', -apple-system, sans-serif;
}

/* ─────────────────────────────────────────
   RESET & BASE
───────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 100vw; height: 100vh;
  overflow: hidden;
  background: var(--bg);
  font-family: var(--sans);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* ─────────────────────────────────────────
   SHELL
───────────────────────────────────────── */
.presentation { width: 100vw; height: 100vh; position: relative; }

.slide {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  justify-content: center; align-items: flex-start;
  padding: 72px 100px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.45s ease;
  overflow: hidden;
  background: var(--bg);
}
.slide.active { opacity: 1; pointer-events: auto; }
.slide.centered { align-items: center; text-align: center; }

/* ─────────────────────────────────────────
   CHROME — progress bar, counter, badge
───────────────────────────────────────── */
.progress-bar {
  position: fixed; top: 0; left: 0; right: 0;
  height: 3px; background: var(--border); z-index: 500;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #7ec8ff);
  transition: width 0.4s ease;
  border-radius: 0 2px 2px 0;
}

.slide-counter {
  position: fixed; bottom: 22px; right: 32px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.1em;
  color: var(--text-dim); z-index: 500;
}

.event-badge {
  position: fixed; bottom: 22px; left: 32px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--text-mid); z-index: 500;
}

/* ─── ACT PROGRESS ─── */
.act-progress {
  position: fixed; top: 10px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 0;
  z-index: 500; transition: opacity 0.3s;
}
.act-progress.hidden { opacity: 0; pointer-events: none; }
.act-item {
  display: flex; align-items: center; gap: 6px;
  padding: 3px 12px; border-radius: 20px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.06em;
  color: var(--text-dim); white-space: nowrap;
  transition: color 0.3s, background 0.3s;
}
.act-item.active {
  color: var(--accent); background: var(--accent-dim);
}
.act-item.done { color: var(--text-mid); }
.act-item.done::before { content: '✓ '; opacity: 0.6; }
.act-sep {
  width: 20px; height: 1px;
  background: var(--border); flex-shrink: 0;
}

/* ─── NAV DOTS ─── */
.nav-dots {
  position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 5px; align-items: center; z-index: 500;
}
.nav-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--text-dim); border: none; padding: 0;
  cursor: pointer; transition: background 0.2s, transform 0.2s;
  position: relative;
}
.nav-dot:hover { background: var(--text-mid); transform: scale(1.5); }
.nav-dot.active { background: var(--accent); transform: scale(1.3); }
/* Tooltip on hover */
.nav-dot::after {
  content: attr(data-tip);
  position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%);
  background: var(--bg-card); border: 1px solid var(--border-hi);
  color: var(--text-mid); font-size: 10px; font-weight: 600;
  padding: 2px 6px; border-radius: 4px; white-space: nowrap;
  font-family: var(--sans); pointer-events: none;
  opacity: 0; transition: opacity 0.15s;
}
.nav-dot:hover::after { opacity: 1; }

/* ─────────────────────────────────────────
   TYPOGRAPHY
───────────────────────────────────────── */
.label {
  font-size: 15px; font-weight: 700;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 18px;
  display: flex; align-items: center; gap: 8px;
}
.label::before {
  content: ''; display: inline-block;
  width: 20px; height: 2px; background: var(--accent);
  border-radius: 2px;
}

h1 {
  font-size: 68px; font-weight: 900;
  line-height: 1.05; letter-spacing: -0.03em;
}
h2 {
  font-size: 48px; font-weight: 800;
  line-height: 1.1; letter-spacing: -0.02em;
}
h3 {
  font-size: 30px; font-weight: 700; line-height: 1.2;
}

.giant {
  font-size: 130px; font-weight: 900;
  letter-spacing: -0.04em; line-height: 1;
  background: linear-gradient(130deg, #fff 10%, var(--accent) 80%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

.body-text {
  font-size: 24px; font-weight: 400;
  line-height: 1.55; color: var(--text-mid);
  margin-top: 12px;
}

.accent   { color: var(--accent); }
.dim      { color: var(--text-dim); }
.mid      { color: var(--text-mid); }
.red      { color: var(--red); }
.green    { color: var(--green); }

/* ─────────────────────────────────────────
   BULLETS
───────────────────────────────────────── */
ul.bullets { list-style: none; margin-top: 28px; width: 100%; max-width: 840px; }
ul.bullets li {
  display: flex; align-items: flex-start; gap: 16px;
  font-size: 23px; font-weight: 400; color: var(--text-mid);
  padding: 13px 0; border-bottom: 1px solid var(--border);
  line-height: 1.45;
}
ul.bullets li:last-child { border-bottom: none; }
ul.bullets li strong { color: var(--text); font-weight: 600; }
ul.bullets li .ico { flex-shrink: 0; font-size: 22px; margin-top: 1px; }

/* ─────────────────────────────────────────
   CARDS
───────────────────────────────────────── */
.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 14px; padding: 28px 32px;
}
.card--accent { border-color: var(--accent); background: var(--accent-dim); }
.card--red    { border-color: var(--red);    background: var(--red-dim); }
.card--green  { border-color: var(--green);  background: var(--green-dim); }

/* ─────────────────────────────────────────
   GRID LAYOUTS
───────────────────────────────────────── */
.two-col {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 28px; width: 100%; max-width: 1100px;
}
.stack { display: flex; flex-direction: column; gap: 16px; width: 100%; max-width: 900px; }

/* ─────────────────────────────────────────
   DIAGRAMS
───────────────────────────────────────── */
.diagram {
  display: flex; align-items: center;
  justify-content: center; gap: 0;
  width: 100%; max-width: 1000px;
  margin-top: 36px;
}

.d-col { display: flex; flex-direction: column; align-items: center; gap: 10px; }

.d-box {
  background: var(--bg-card); border: 1.5px solid var(--border-hi);
  border-radius: 10px; padding: 11px 20px;
  font-size: 14px; font-weight: 600;
  text-align: center; white-space: nowrap; color: var(--text);
}
.d-box--accent { border-color: var(--accent); background: var(--accent-dim); color: var(--accent); }
.d-box--red    { border-color: var(--red);    background: var(--red-dim);    color: var(--red);    }
.d-box--green  { border-color: var(--green);  background: var(--green-dim);  color: var(--green);  }
.d-box--dim    { border-color: var(--border); color: var(--text-mid); }
.d-box--lg     { font-size: 17px; padding: 16px 28px; }

.d-arrow {
  display: flex; align-items: center; padding: 0 10px;
  color: var(--border-hi); font-size: 20px; gap: 0;
  flex-shrink: 0;
}
.d-arrow-long { padding: 0 16px; }
.d-label { font-size: 11px; color: var(--text-dim); text-align: center; margin-top: 5px; }

/* ─────────────────────────────────────────
   CODE BLOCKS
───────────────────────────────────────── */
pre {
  font-family: var(--mono); font-size: 14px; line-height: 1.7;
  background: #070a12; border: 1px solid var(--border);
  border-radius: 10px; padding: 18px 22px; overflow: hidden;
  color: #8fa3c4;
}
pre .cm { color: #3a4f6e; }   /* comment */
pre .kw { color: #7dd3fc; }   /* keyword */
pre .st { color: #86efac; }   /* string */
pre .nm { color: #fbbf24; }   /* number / field num */
pre .ty { color: #c084fc; }   /* type */
pre .fi { color: #67e8f9; }   /* field name */
pre .pu { color: #8fa3c4; }   /* punctuation */

.code-label {
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-dim); margin-bottom: 8px;
}

/* ─────────────────────────────────────────
   BIG QUOTE
───────────────────────────────────────── */
.big-quote {
  font-size: 44px; font-weight: 700; line-height: 1.28;
  text-align: center; max-width: 880px; color: var(--text);
}
.big-quote em { color: var(--accent); font-style: normal; }
.attribution {
  font-size: 17px; color: var(--text-dim); font-weight: 400;
  margin-top: 28px; text-align: center;
}

/* ─────────────────────────────────────────
   TAKEAWAY CARDS
───────────────────────────────────────── */
.takeaway {
  display: flex; gap: 24px; align-items: flex-start;
  padding: 22px 28px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: 14px;
  border-left: 4px solid var(--accent);
}
.takeaway-num {
  font-size: 44px; font-weight: 900;
  color: var(--accent); opacity: 0.25; line-height: 1; flex-shrink: 0;
}
.takeaway-title { font-size: 21px; font-weight: 700; color: var(--text); }
.takeaway-sub   { font-size: 16px; color: var(--text-mid); margin-top: 5px; line-height: 1.4; }

/* ─────────────────────────────────────────
   LINKS / THANK YOU
───────────────────────────────────────── */
.link-row {
  display: flex; align-items: center; gap: 16px;
  font-size: 20px; color: var(--text-mid);
  padding: 14px 0; border-bottom: 1px solid var(--border);
}
.link-row:last-child { border-bottom: none; }
.link-row a { color: var(--accent); text-decoration: none; font-weight: 500; }
.link-row a:hover { text-decoration: underline; }

/* ─────────────────────────────────────────
   BLOG IMAGE CARD
───────────────────────────────────────── */
.blog-img-card {
  background: #f0f4f8;
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
}
.blog-img {
  max-width: 100%;
  max-height: 44vh;
  object-fit: contain;
  display: block;
  border-radius: 4px;
}

/* ─────────────────────────────────────────
   SLIDE-SPECIFIC: TITLE
───────────────────────────────────────── */
.slide--title {
  background: radial-gradient(ellipse 80% 60% at 65% 40%, #0a1a35 0%, var(--bg) 70%);
  align-items: flex-start;
}
.title-left { max-width: 800px; }
.talk-title {
  font-size: 62px; font-weight: 900; line-height: 1.05;
  letter-spacing: -0.03em; margin-bottom: 40px;
}
.talk-title span { display: block; color: var(--accent); }
.profile-wrap { display: flex; align-items: center; gap: 20px; margin-bottom: 28px; }
.profile-pic {
  width: 80px; height: 80px; border-radius: 50%;
  object-fit: cover; border: 2px solid var(--accent);
  flex-shrink: 0;
}
.speaker-info { display: flex; flex-direction: column; gap: 4px; }
.speaker-name { font-size: 22px; font-weight: 700; }
.speaker-role { font-size: 18px; color: var(--text-mid); }
.speaker-quote {
  font-size: 16px; font-style: italic;
  color: var(--text-mid); border-left: 2px solid var(--accent);
  padding-left: 14px; margin-top: 20px; max-width: 560px; line-height: 1.5;
}
.key-hint {
  position: absolute; bottom: 60px;
  font-size: 12px; color: var(--text-dim); letter-spacing: 0.08em;
  display: flex; align-items: center; gap: 8px;
}
.key-hint kbd {
  background: var(--bg-card); border: 1px solid var(--border-hi);
  border-radius: 4px; padding: 2px 7px; font-family: var(--sans);
  font-size: 11px; color: var(--text-mid);
}

/* ─────────────────────────────────────────
   SLIDE-SPECIFIC: HOOK
───────────────────────────────────────── */
.slide--hook { padding: 0; }
.netflix-grid {
  position: absolute; inset: 0;
  display: grid; grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(3, 1fr); gap: 5px;
  opacity: 0.3; z-index: 0;
}
.thumb { border-radius: 3px; }
.hook-overlay {
  position: relative; z-index: 1;
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  justify-content: center; align-items: center;
  padding: 80px;
  background: linear-gradient(135deg, rgba(12,15,24,0.7) 0%, rgba(12,15,24,0.5) 100%);
}
.hook-main {
  font-size: 52px; font-weight: 800; line-height: 1.2;
  text-align: center; text-shadow: 0 2px 24px rgba(0,0,0,0.9);
  max-width: 800px;
}
.hook-main span { display: block; color: var(--accent); margin-top: 8px; }
.hook-sub {
  font-size: 22px; color: var(--text-mid); margin-top: 28px;
  text-align: center; text-shadow: 0 2px 12px rgba(0,0,0,0.8);
}

/* ─────────────────────────────────────────
   SLIDE-SPECIFIC: TELEPHONE OPERATOR
───────────────────────────────────────── */
.slide--operator { padding: 0; overflow: hidden; }
.operator-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(20%) brightness(0.4) contrast(1.1);
}
.operator-overlay {
  position: relative; z-index: 1;
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  justify-content: flex-end;
  padding: 72px 100px;
  background: linear-gradient(to top,
    rgba(12,15,24,0.97) 0%,
    rgba(12,15,24,0.6) 55%,
    transparent 100%);
}
.operator-lines { display: flex; flex-direction: column; gap: 16px; max-width: 700px; }
.operator-line {
  font-size: 28px; font-weight: 600; line-height: 1.35; color: var(--text);
}
.operator-line.hl-line { color: var(--accent); }
.operator-line.dim-line { font-size: 19px; color: var(--text-mid); font-weight: 400; }

/* ─────────────────────────────────────────
   SLIDE-SPECIFIC: 411
───────────────────────────────────────── */
.slide--411 { align-items: center; text-align: center; }
.num-411 {
  font-size: 160px; font-weight: 900; line-height: 1;
  letter-spacing: -0.06em;
  background: linear-gradient(135deg, var(--accent) 0%, #a0d4ff 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.phone-emoji { font-size: 52px; margin-bottom: 16px; }
.num-411-caption {
  font-size: 26px; font-weight: 600; color: var(--text);
  margin-top: 12px; max-width: 700px; line-height: 1.4;
}
.num-411-sub {
  font-size: 20px; color: var(--text-mid); margin-top: 16px; max-width: 600px;
}
.num-411-key {
  font-size: 22px; color: var(--accent); font-weight: 700;
  margin-top: 28px; padding: 14px 32px;
  border: 1.5px solid var(--accent); border-radius: 10px;
  background: var(--accent-dim);
}

/* ─────────────────────────────────────────
   SLIDE-SPECIFIC: BEFORE / AFTER
───────────────────────────────────────── */
.ba-title {
  font-size: 19px; font-weight: 700;
  padding-bottom: 14px; margin-bottom: 18px;
  border-bottom: 2px solid var(--border);
}
.ba-title.red-title  { color: var(--red);   border-color: var(--red);   }
.ba-title.green-title{ color: var(--green); border-color: var(--green); }
.ba-note {
  font-size: 14px; color: var(--text-mid);
  margin-top: 6px; line-height: 1.4;
}
.ba-tag {
  display: inline-block; border-radius: 6px; padding: 3px 10px;
  font-size: 12px; font-weight: 700; margin-top: 6px;
  letter-spacing: 0.04em;
}
.ba-tag.bad  { background: var(--red-dim);   border: 1px solid var(--red);   color: var(--red);   }
.ba-tag.good { background: var(--green-dim); border: 1px solid var(--green); color: var(--green); }

/* ─────────────────────────────────────────
   SLIDE-SPECIFIC: SIDECAR DIAGRAM
───────────────────────────────────────── */
.sidecar-layout {
  width: 100%; max-width: 900px;
  margin-top: 32px; display: flex; flex-direction: column; gap: 0;
}
.sidecar-step {
  display: flex; align-items: center; gap: 0;
  padding: 16px 0;
}
.sidecar-step + .sidecar-step { border-top: 1px dashed var(--border); }
.step-label {
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-dim); width: 70px; flex-shrink: 0;
}
.step-desc {
  font-size: 14px; color: var(--text-mid); margin-top: 4px;
}

/* ─────────────────────────────────────────
   SLIDE-SPECIFIC: PROTOCOL SHAPES
───────────────────────────────────────── */
.slide--protocol { align-items: center; }
.proto-quote {
  font-size: 38px; font-weight: 700; line-height: 1.3;
  text-align: center; max-width: 860px;
}
.proto-quote em { color: var(--accent); font-style: normal; }

/* ─────────────────────────────────────────
   SLIDE-SPECIFIC: AGENDA
───────────────────────────────────────── */
.agenda-list { list-style: none; margin-top: 36px; width: 100%; max-width: 820px; }
.agenda-item {
  display: flex; align-items: flex-start; gap: 24px;
  padding: 20px 24px; margin-bottom: 14px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px;
}
.act-num {
  font-size: 11px; font-weight: 700; color: var(--accent);
  letter-spacing: 0.12em; text-transform: uppercase;
  white-space: nowrap; padding-top: 4px;
}
.act-title { font-size: 21px; font-weight: 600; color: var(--text); }
.act-sub   { font-size: 15px; color: var(--text-mid); margin-top: 4px; }

/* ─────────────────────────────────────────
   SLIDE-SPECIFIC: SCALE
───────────────────────────────────────── */
.slide--scale { align-items: center; text-align: center; }

/* ─────────────────────────────────────────
   SLIDE-SPECIFIC: INSIGHT SPLIT
───────────────────────────────────────── */
.insight-split {
  display: grid; grid-template-columns: 1fr auto 1fr;
  gap: 24px; align-items: center;
  width: 100%; max-width: 1000px; margin-top: 40px;
}
.insight-box {
  padding: 24px 28px; border-radius: 14px; text-align: center;
}
.insight-box--before {
  background: var(--bg-card); border: 1px solid var(--border-hi);
}
.insight-box--after {
  background: var(--accent-dim); border: 1px solid var(--accent);
}
.insight-box h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.insight-box p  { font-size: 14px; color: var(--text-mid); line-height: 1.5; }
.insight-divider {
  font-size: 32px; color: var(--text-dim); text-align: center;
}

/* ─────────────────────────────────────────
   SLIDE-SPECIFIC: INTERNET PATTERNS
───────────────────────────────────────── */
.pattern-grid {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: 20px; width: 100%; max-width: 1040px; margin-top: 32px;
}
.pattern-card {
  padding: 22px 24px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: 12px;
}
.pattern-card .picon { font-size: 28px; margin-bottom: 10px; }
.pattern-card h4 { font-size: 17px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.pattern-card p  { font-size: 14px; color: var(--text-mid); line-height: 1.45; }

/* ─────────────────────────────────────────
   PROBLEM SLIDES
───────────────────────────────────────── */
.problem-label {
  display: flex; align-items: center; gap: 12px; margin-bottom: 20px;
}
.problem-num {
  font-size: 72px; font-weight: 900;
  color: var(--red); opacity: 0.2; line-height: 1;
}

/* ─────────────────────────────────────────
   NAIVE SOLUTION TWO-COL
───────────────────────────────────────── */
.naive-col { padding: 24px 28px; border-radius: 14px; }
.naive-col.bad  {
  background: var(--red-dim); border: 1px solid var(--red);
}
.naive-col.good {
  background: var(--accent-dim); border: 1px solid var(--accent);
}
.naive-col h3 { font-size: 17px; font-weight: 700; margin-bottom: 14px; }
.naive-col h3.red-h   { color: var(--red); }
.naive-col h3.green-h { color: var(--accent); }

/* REST vs GRPC cols */
.proto-col {
  padding: 28px 32px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: 14px;
}
.proto-col h3 { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.proto-col .proto-sub {
  font-size: 15px; color: var(--text-mid);
  margin-bottom: 20px; font-style: italic;
}
.proto-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.proto-col ul li {
  font-size: 17px; color: var(--text-mid);
  display: flex; align-items: flex-start; gap: 10px;
}
.proto-col ul li strong { color: var(--text); }
.proto-col.left { border-top: 3px solid var(--text-dim); }
.proto-col.right { border-top: 3px solid var(--accent); }
