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

:root {
  --bg-primary: #f0f2f7;
  --bg-secondary: #e8eaf2;
  --card-bg: rgba(255,255,255,0.85);
  --card-border: rgba(0,0,0,0.06);
  --card-shadow: 0 20px 60px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.04);
  --text: #1a1b2e;
  --text-secondary: #4a4d6a;
  --text-muted: #8b8fa8;
  --accent: #4f46e5;
  --accent2: #7c3aed;
  --cyan: #0891b2;
  --emerald: #059669;
  --amber: #d97706;
  --rose: #e11d48;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius: 24px;
  --transition: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

html, body {
  height: 100%; width: 100%;
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
  touch-action: manipulation;
  -webkit-overflow-scrolling: auto;
}

/* ── Animated Background ─────────────────────── */
.bg {
  position: fixed; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(79,70,229,0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(124,58,237,0.05) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(8,145,178,0.04) 0%, transparent 50%),
    linear-gradient(135deg, #f0f2f7 0%, #e4e7f0 50%, #eceef5 100%);
}

.bg-orb {
  position: absolute; border-radius: 50%; filter: blur(100px); opacity: 0.5;
}
.bg-orb:nth-child(1) {
  width: 500px; height: 500px; top: -10%; left: -5%;
  background: rgba(79,70,229,0.08);
}
.bg-orb:nth-child(2) {
  width: 400px; height: 400px; bottom: -10%; right: -5%;
  background: rgba(124,58,237,0.06);
}
.bg-orb:nth-child(3) {
  width: 300px; height: 300px; top: 40%; left: 50%;
  background: rgba(8,145,178,0.06);
}

/* ── Progress Bar ────────────────────────────── */
.progress-bar {
  position: fixed; top: 0; left: 0; height: 3px; z-index: 100;
  background: linear-gradient(90deg, var(--accent), var(--accent2), var(--cyan));
  transition: width var(--transition);
  box-shadow: 0 1px 8px rgba(79,70,229,0.3);
}

/* ── Slide Container ─────────────────────────── */
.slides-viewport {
  position: relative; z-index: 1;
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
}

.slide {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0; pointer-events: none;
  visibility: hidden;
  will-change: opacity;
  transition: opacity 0.3s ease;
}
.slide.active {
  opacity: 1; pointer-events: auto;
  visibility: visible;
}
.slide.exit-left, .slide.exit-right {
  visibility: visible;
  opacity: 0;
}

/* ── Card ────────────────────────────────────── */
.card {
  position: relative;
  width: 100%; max-width: 880px;
  max-height: calc(100vh - 100px);
  overflow-y: auto; overflow-x: hidden;
  background: rgba(255,255,255,0.92);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 48px 52px;
  box-shadow: var(--card-shadow);
}

.card::before {
  content: ''; position: absolute; inset: -1px;
  border-radius: var(--radius);
  padding: 1px;
  background: linear-gradient(135deg, rgba(79,70,229,0.15) 0%, transparent 40%, transparent 60%, rgba(124,58,237,0.1) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* scrollbar */
.card::-webkit-scrollbar { width: 4px; }
.card::-webkit-scrollbar-track { background: transparent; }
.card::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.1); border-radius: 4px; }

/* ── Slide Number ────────────────────────────── */
.slide-number {
  position: absolute; top: 16px; right: 28px;
  font-size: 64px; font-weight: 900; color: var(--text);
  font-variant-numeric: tabular-nums;
  opacity: 0.06;
  line-height: 1; letter-spacing: -0.04em;
  pointer-events: none; user-select: none;
}

/* ── Tag / Badge ─────────────────────────────── */
.slide-tag {
  display: inline-block;
  font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--accent);
  background: rgba(79,70,229,0.08);
  border: 1px solid rgba(79,70,229,0.12);
  padding: 5px 14px; border-radius: 100px;
  margin-bottom: 20px;
}

/* ── Typography ──────────────────────────────── */
.slide h1 {
  font-size: clamp(31px, 4vw, 47px); font-weight: 800;
  line-height: 1.15; letter-spacing: -0.03em;
  margin-bottom: 12px;
  color: var(--text);
}

.slide h2 {
  font-size: clamp(23px, 2.5vw, 31px); font-weight: 700;
  line-height: 1.2; letter-spacing: -0.02em;
  margin-bottom: 10px; margin-top: 28px;
  color: var(--text);
}

.slide h2:first-of-type { margin-top: 0; }

.subtitle {
  font-size: clamp(19px, 2vw, 25px); font-weight: 400;
  color: var(--text-secondary); margin-bottom: 24px;
  line-height: 1.5;
}

.slide p {
  font-size: 18px; line-height: 1.7; color: var(--text-secondary);
  margin-bottom: 12px;
}

/* ── Lists ───────────────────────────────────── */
.slide ul, .slide ol {
  list-style: none; padding: 0; margin: 8px 0 16px 0;
}

.slide ul li, .slide ol li {
  font-size: 18px; line-height: 1.65; color: var(--text-secondary);
  padding: 6px 0 6px 24px; position: relative;
}

.slide ul li::before {
  content: ''; position: absolute; left: 4px; top: 14px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); opacity: 0.6;
}

.slide ol { counter-reset: step; }
.slide ol li { counter-increment: step; padding-left: 36px; }
.slide ol li::before {
  content: counter(step);
  position: absolute; left: 0; top: 5px;
  width: 24px; height: 24px; border-radius: 8px;
  background: rgba(79,70,229,0.08); border: 1px solid rgba(79,70,229,0.12);
  color: var(--accent); font-size: 15px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

.slide li strong { color: var(--text); font-weight: 600; }
.slide li em { color: var(--accent); font-style: normal; }

/* ── Emphasis / Highlight ────────────────────── */
.emphasis {
  position: relative;
  background: linear-gradient(135deg, rgba(79,70,229,0.07), rgba(124,58,237,0.05));
  border: 1.5px solid rgba(79,70,229,0.18);
  border-radius: 14px;
  padding: 16px 20px;
  margin: 14px 0;
}
.emphasis::before {
  content: '⭐'; position: absolute; top: -12px; left: 18px;
  font-size: 16px;
  background: white; padding: 0 6px; border-radius: 4px;
}
.emphasis-label {
  font-size: 14px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1.2px; color: var(--accent); margin-bottom: 6px;
}
.emphasis p, .emphasis li { color: var(--text); font-weight: 500; }

.highlight-text {
  background: linear-gradient(135deg, rgba(79,70,229,0.12), rgba(124,58,237,0.08));
  padding: 2px 8px; border-radius: 6px;
  font-weight: 700; color: var(--accent);
}

.big-number {
  font-size: clamp(36px, 5vw, 56px); font-weight: 900;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1; margin: 8px 0;
}

/* ── Feature Grid ────────────────────────────── */
.feature-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  margin: 16px 0;
}
.feature-item {
  font-size: 17px; line-height: 1.55; color: var(--text-secondary);
  padding: 12px 14px; border-radius: 12px;
  background: rgba(0,0,0,0.02);
  border: 1px solid rgba(0,0,0,0.04);
  transition: background 0.2s;
}
.feature-item:hover { background: rgba(0,0,0,0.04); }
.feature-item strong { color: var(--text); display: block; margin-bottom: 2px; font-size: 16px; }

/* ── Architecture Diagram ────────────────────── */
.arch-diagram {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  margin: 16px 0; padding: 18px; border-radius: 16px;
  background: rgba(0,0,0,0.02); border: 1px solid rgba(0,0,0,0.05);
}
.arch-box {
  padding: 12px 24px; border-radius: 14px; text-align: center;
  font-size: 16px; font-weight: 600; width: 100%; max-width: 340px;
}
.arch-frontier {
  background: linear-gradient(135deg, rgba(225,29,72,0.08), rgba(217,119,6,0.06));
  border: 1px solid rgba(225,29,72,0.15); color: var(--rose);
}
.arch-agent {
  background: linear-gradient(135deg, rgba(79,70,229,0.08), rgba(124,58,237,0.06));
  border: 1px solid rgba(79,70,229,0.15); color: var(--accent);
}
.arch-model {
  background: linear-gradient(135deg, rgba(8,145,178,0.08), rgba(5,150,105,0.06));
  border: 1px solid rgba(8,145,178,0.15); color: var(--cyan);
}
.arch-arrow { color: var(--text-muted); font-size: 17px; line-height: 1; }
.arch-sub { font-size: 14px; font-weight: 400; color: var(--text-muted); margin-top: 2px; }

/* multimodal badges */
.multimodal-row {
  display: flex; gap: 8px; justify-content: center; flex-wrap: wrap;
  margin: 10px 0 4px;
}
.mm-badge {
  padding: 6px 14px; border-radius: 100px; font-size: 16px; font-weight: 600;
  background: rgba(79,70,229,0.06); border: 1px solid rgba(79,70,229,0.1);
  color: var(--accent);
}

/* ── Timeline ────────────────────────────────── */
.timeline { margin: 16px 0; padding-left: 20px; border-left: 2px solid rgba(79,70,229,0.15); }
.timeline-item { padding: 8px 0 16px 20px; position: relative; }
.timeline-item::before {
  content: ''; position: absolute; left: -27px; top: 14px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--bg-primary);
  box-shadow: 0 0 0 3px rgba(79,70,229,0.12);
}
.timeline-item.current::before {
  background: var(--emerald);
  box-shadow: 0 0 0 3px rgba(5,150,105,0.15), 0 0 12px rgba(5,150,105,0.2);
}
.timeline-label {
  font-size: 15px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--accent); margin-bottom: 4px;
}
.timeline-item.current .timeline-label { color: var(--emerald); }
.timeline-text { font-size: 17px; color: var(--text-secondary); line-height: 1.5; }

/* ── Callout ─────────────────────────────────── */
.callout {
  padding: 16px 18px; border-radius: 12px; margin: 16px 0;
  font-size: 17px; line-height: 1.6;
  border-left: 3px solid;
}
.callout.info { background: rgba(79,70,229,0.05); border-color: var(--accent); color: #3730a3; }
.callout.success { background: rgba(5,150,105,0.05); border-color: var(--emerald); color: #065f46; }
.callout.warning { background: rgba(217,119,6,0.05); border-color: var(--amber); color: #92400e; }
.callout.danger { background: rgba(225,29,72,0.05); border-color: var(--rose); color: #9f1239; }

/* ── Stat / Highlight ────────────────────────── */
.stat-row {
  display: flex; gap: 16px; margin: 20px 0; flex-wrap: wrap;
}
.stat-box {
  flex: 1; min-width: 120px; padding: 18px; border-radius: 14px;
  background: rgba(0,0,0,0.02); border: 1px solid rgba(0,0,0,0.05);
  text-align: center;
}
.stat-value {
  font-size: 31px; font-weight: 800; letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--accent), var(--cyan));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-label { font-size: 14px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-top: 4px; }

/* ── Navigation ──────────────────────────────── */
.nav-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  padding: 16px 24px 24px;
  background: linear-gradient(to top, rgba(240,242,247,0.95) 0%, transparent 100%);
}

/* Side arrows — desktop/tablet */
.nav-btn {
  position: fixed; top: 50%; z-index: 60;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.06); border: 1px solid rgba(0,0,0,0.1);
  color: var(--text); border-radius: 18px;
  width: 64px; height: 64px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background 0.15s; font-size: 28px;
}
#prev { left: 28px; }
#next { right: 28px; }
.nav-btn:hover { background: rgba(0,0,0,0.1); }
.nav-btn:active { transform: translateY(-50%) scale(0.93); }
.nav-btn:disabled { opacity: 0.12; cursor: not-allowed; }

/* Dots */
.nav-dots { display: flex; gap: 6px; align-items: center; }
.nav-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(0,0,0,0.12);
  cursor: pointer; transition: all 0.3s;
}
.nav-dot.active {
  background: var(--accent); width: 24px; border-radius: 4px;
  box-shadow: 0 0 8px rgba(79,70,229,0.3);
}

/* Slide counter */
.slide-counter {
  position: fixed; top: 16px; right: 24px; z-index: 50;
  font-size: 16px; font-weight: 600; color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* Keyboard hint */
.kbd-hint {
  position: fixed; bottom: 76px; right: 24px; z-index: 50;
  font-size: 11px; color: var(--text-muted);
  display: flex; gap: 6px; align-items: center;
}
.kbd {
  display: inline-block; padding: 2px 7px; border-radius: 4px;
  background: rgba(0,0,0,0.04); border: 1px solid rgba(0,0,0,0.08);
  font-size: 11px; font-family: var(--font);
}

/* ── Title Slide Special ─────────────────────── */
.title-slide .card {
  text-align: center; padding: 72px 52px;
  background: radial-gradient(ellipse at 50% 0%, rgba(79,70,229,0.04) 0%, var(--card-bg) 70%);
}
.title-logo {
  font-size: 64px; margin-bottom: 16px;
}
.title-presenter {
  font-size: 17px; color: var(--text-muted);
  margin-top: 20px; letter-spacing: 0.5px;
}
.title-brand {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 20px; border-radius: 100px;
  background: rgba(0,0,0,0.03); border: 1px solid rgba(0,0,0,0.06);
  font-size: 16px; color: var(--text-secondary); margin-top: 24px;
}

/* ── End Slide ───────────────────────────────── */
.end-slide .card { text-align: center; padding: 72px 52px; }
.end-quote {
  font-size: clamp(19px, 2.2vw, 25px); font-weight: 500;
  color: var(--text-secondary); font-style: italic;
  margin: 16px 0 28px; line-height: 1.6;
}

/* ── Staggered Animations ────────────────────── */
.slide.active .stagger > * {
  animation: stagger-in 0.5s ease both;
}
.slide.active .stagger > *:nth-child(1) { animation-delay: 0.1s; }
.slide.active .stagger > *:nth-child(2) { animation-delay: 0.18s; }
.slide.active .stagger > *:nth-child(3) { animation-delay: 0.26s; }
.slide.active .stagger > *:nth-child(4) { animation-delay: 0.34s; }
.slide.active .stagger > *:nth-child(5) { animation-delay: 0.42s; }
.slide.active .stagger > *:nth-child(6) { animation-delay: 0.5s; }
.slide.active .stagger > *:nth-child(7) { animation-delay: 0.58s; }
.slide.active .stagger > *:nth-child(8) { animation-delay: 0.66s; }
.slide.active .stagger > *:nth-child(9) { animation-delay: 0.74s; }

@keyframes stagger-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ──────────────────────────────── */
@media (max-width: 768px) {
  .card { padding: 32px 24px; border-radius: 20px; max-height: calc(100vh - 60px); }
  .feature-grid { grid-template-columns: 1fr; }
  .stat-row { gap: 8px; }
  .stat-box { min-width: 70px; padding: 10px; }
  .stat-value { font-size: 20px; }
  .kbd-hint { display: none; }
  .nav-btn { display: none; }
  .nav-bar { padding: 8px 16px 14px; }
  .slide { padding: 10px; }
  .arch-diagram { padding: 14px; }
  .timeline { padding-left: 14px; }
  .multimodal-row { gap: 6px; }
  .mm-badge { font-size: 12px; padding: 4px 10px; }
  .bg-orb { display: none; }
  .slide.active .stagger > * { animation: none !important; }
  .slide h1 { font-size: 24px; }
  .subtitle { font-size: 16px; margin-bottom: 16px; }
  .slide p { font-size: 14px; }
  .slide ul li, .slide ol li { font-size: 14px; padding: 4px 0 4px 22px; }
  .emphasis { padding: 14px 16px; margin: 10px 0; }
  .callout { padding: 12px 14px; margin: 12px 0; font-size: 13px; }
}

@media (max-width: 480px) {
  .card { padding: 24px 18px; border-radius: 16px; }
  .title-slide .card, .end-slide .card { padding: 36px 18px; }
  .title-logo { font-size: 44px; }
  .slide-counter { top: 6px; right: 10px; font-size: 11px; }
  .slide-number { font-size: 40px; top: 8px; right: 12px; }
  .nav-dot { width: 6px; height: 6px; }
  .nav-dot.active { width: 16px; }
  .slide h1 { font-size: 22px; }
  .stat-value { font-size: 18px; }
}

@media (min-width: 1400px) {
  .card { max-width: 960px; padding: 64px 60px; }
}
