@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&family=Noto+Sans+SC:wght@300;400;500;700&display=swap');

:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #020617;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --primary: #0f172a;
  --cta: #0369a1;
  --cta-hover: #075985;
  --red: #c41e3a;
  --blue: #0369a1;
  --yellow: #b45309;
  --black: #0f172a;
  --mono: "IBM Plex Mono", "SF Mono", Consolas, monospace;
  --sans: "IBM Plex Sans", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --slide-count: 14;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* Progress bar */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--cta);
  width: 0%;
  z-index: 1000;
  transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.page-counter {
  position: fixed;
  top: 1.5rem;
  right: 2rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  z-index: 100;
  letter-spacing: 0.05em;
}

.keyboard-hint {
  position: fixed;
  bottom: 1.5rem;
  right: 2rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.keyboard-hint kbd {
  font-family: var(--mono);
  font-size: 0.7rem;
  padding: 0.15rem 0.4rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text-secondary);
}

/* Slides */
.slides {
  display: flex;
  width: calc(100vw * var(--slide-count));
  height: 100vh;
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.slide {
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 3.5rem;
  position: relative;
  overflow: hidden;
}

.slide-inner {
  width: 100%;
  max-width: 1200px;
  position: relative;
  z-index: 2;
}

.slide-inner.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.slide-inner.split.reverse {
  grid-template-columns: 0.65fr 1.35fr;
}

.slide-inner.split.reverse > .text-col {
  order: 2;
}

.slide-inner.split.reverse > .visual-col {
  order: 1;
}

.slide-inner.centered {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Typography */
.eyebrow {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cta);
  margin-bottom: 1.25rem;
}

.meta {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(3rem, 6vw, 5.5rem);
  line-height: 1;
}

h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.15;
  margin-bottom: 1.2rem;
  max-width: 100%;
}

h3 {
  font-size: 1.4rem;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

p {
  font-size: 1.15rem;
  line-height: 1.75;
  color: var(--text-secondary);
  margin: 0 0 1rem;
  max-width: 48ch;
}

p:last-child {
  margin-bottom: 0;
}

p.lead {
  font-size: 1.35rem;
  color: var(--text);
  font-weight: 500;
  margin-top: 1.5rem;
}

.section-lead {
  font-size: 1.25rem;
  max-width: 72ch;
}

/* Cover */
.slide-cover .slide-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.mondrian-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: repeat(8, 1fr);
  gap: 0;
  opacity: 0.06;
  pointer-events: none;
}

.mondrian-bg .block {
  border: 2px solid var(--primary);
}

.mondrian-bg .block.red {
  grid-column: 1 / 4;
  grid-row: 1 / 3;
  background: var(--red);
}

.mondrian-bg .block.blue {
  grid-column: 10 / 13;
  grid-row: 2 / 5;
  background: var(--blue);
}

.mondrian-bg .block.yellow {
  grid-column: 2 / 5;
  grid-row: 7 / 9;
  background: var(--yellow);
}

.mondrian-bg .block.black {
  grid-column: 9 / 11;
  grid-row: 6 / 8;
  background: var(--black);
}

.slide-cover .title {
  font-size: clamp(3.5rem, 7vw, 6.5rem);
  letter-spacing: -0.04em;
  margin-bottom: 0.5rem;
}

.slide-cover .subtitle {
  font-size: clamp(1.3rem, 2.2vw, 1.9rem);
  color: var(--text-secondary);
  max-width: 32ch;
  margin: 0 auto 2.5rem;
}

.knife-hero {
  width: 100%;
  max-width: 520px;
  margin-top: 1rem;
}

.knife-hero svg {
  width: 100%;
  height: auto;
}

/* Visual columns */
.visual-col {
  display: flex;
  align-items: center;
  justify-content: center;
}

.visual-col svg {
  width: 100%;
  max-width: 440px;
  height: auto;
}

/* Code window */
.code-window {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
}

.code-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border);
  background: #f1f5f9;
}

.code-header span:nth-child(1),
.code-header span:nth-child(2),
.code-header span:nth-child(3) {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--red);
}

.code-header span:nth-child(2) {
  background: var(--yellow);
}

.code-header span:nth-child(3) {
  background: #22c55e;
}

.code-title {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

pre {
  margin: 0;
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
}

code {
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--text);
}

/* Browser mockup */
.browser-mockup {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
}

.browser-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1rem;
  background: #f1f5f9;
  border-bottom: 1px solid var(--border);
}

.browser-header span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--red);
}

.browser-header span:nth-child(2) {
  background: var(--yellow);
}

.browser-header span:nth-child(3) {
  background: #22c55e;
}

.browser-url {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  background: #fff;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.browser-body {
  padding: 1.5rem;
}

.browser-body h4 {
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
  color: var(--text);
}

.browser-section {
  padding: 1rem;
  margin-bottom: 0.75rem;
  border-radius: 8px;
  background: #f8fafc;
  border-left: 3px solid var(--red);
}

.browser-section:nth-child(3) {
  border-left-color: var(--blue);
}

.browser-section:nth-child(4) {
  border-left-color: var(--yellow);
}

.browser-section p {
  font-size: 0.9rem;
  margin: 0;
  color: var(--text-secondary);
}

.section-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--red);
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.section-tag.blue {
  color: var(--blue);
}

.section-tag.yellow {
  color: var(--yellow);
}

/* Overview */
.section-header {
  margin-bottom: 3rem;
}

.section-header.centered {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Overview blade list */
.blade-list {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.blade-list li {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 1.25rem;
  color: var(--text-secondary);
}

.blade-list strong {
  font-family: var(--mono);
  font-weight: 600;
  color: var(--text);
  min-width: 6.5rem;
}

.blade-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--dot-color, var(--primary));
  flex-shrink: 0;
}

.knife-overview {
  max-width: 420px;
}

/* System diagram */
.system-diagram {
  position: relative;
  width: 800px;
  max-width: 100%;
  margin: 0 auto;
  min-height: 360px;
}

.system-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 3;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
}

.system-label {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.system-sub {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.system-edges {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.system-edges svg {
  width: 100%;
  height: 100%;
}

.system-nodes {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.system-node {
  position: absolute;
  width: 170px;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
  transition: transform 0.25s ease;
}

.system-node:hover {
  transform: translateY(-4px);
}

.system-node[data-tool="markdown"] {
  top: 0;
  left: 0;
  border-top: 4px solid var(--red);
}

.system-node[data-tool="html"] {
  bottom: 0;
  left: 0;
  border-top: 4px solid var(--blue);
}

.system-node[data-tool="svg"] {
  top: 0;
  right: 0;
  border-top: 4px solid var(--yellow);
}

.system-node[data-tool="github"] {
  bottom: 0;
  right: 0;
  border-top: 4px solid var(--black);
}

.system-node .node-num {
  display: block;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
  letter-spacing: 0.04em;
}

.system-node h3 {
  font-size: 1.15rem;
  margin-bottom: 0.25rem;
}

.system-node p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0;
}

/* Tool slides */
.tool-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--tool-color, var(--text));
  margin-bottom: 1.25rem;
  letter-spacing: 0.05em;
}

.tool-tag::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--tool-color, var(--text));
}

.slide-tool[data-tool="markdown"] {
  --accent: var(--red);
}

.slide-tool[data-tool="html"] {
  --accent: var(--blue);
}

.slide-tool[data-tool="svg"] {
  --accent: var(--yellow);
}

.slide-tool[data-tool="github"] {
  --accent: var(--black);
}

/* GitHub card */
.github-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.75rem;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
}

.github-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.github-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #0f172a;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
}

.github-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.github-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}

.github-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.github-contributions {
  margin-bottom: 1.25rem;
}

.contrib-title {
  display: block;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}

.contrib-grid {
  display: flex;
  gap: 4px;
}

.contrib-week {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contrib-day,
.legend-day {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: #e2e8f0;
}

.contrib-day.level-0,
.legend-day.level-0 {
  background: #e2e8f0;
}

.contrib-day.level-1,
.legend-day.level-1 {
  background: #86efac;
}

.contrib-day.level-2,
.legend-day.level-2 {
  background: #4ade80;
}

.contrib-day.level-3,
.legend-day.level-3 {
  background: #22c55e;
}

.contrib-day.level-4,
.legend-day.level-4 {
  background: #15803d;
}

.contrib-legend {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.contrib-legend .legend-day {
  width: 12px;
  height: 12px;
}

.github-stats {
  display: flex;
  gap: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.github-stat {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.github-stat strong {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

.github-stat span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* GitHub feature list */
.feature-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem 3rem;
  margin-top: 1rem;
}

.feature-row {
  display: flex;
  gap: 1.25rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}

.feature-num {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--cta);
  min-width: 2rem;
  padding-top: 0.2rem;
}

.feature-body h3 {
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
}

.feature-body p {
  font-size: 1rem;
  color: var(--text-secondary);
  margin: 0;
}

/* Timeline */
.timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: 3rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.timeline-item {
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border-right: 1px solid var(--border);
  background: var(--surface);
}

.timeline-item:last-child {
  border-right: none;
}

.timeline-item:nth-child(1) {
  background: #fef2f2;
}

.timeline-item:nth-child(2) {
  background: #f0f9ff;
}

.timeline-item:nth-child(3) {
  background: #fffbeb;
}

.timeline-item:nth-child(4) {
  background: #f8fafc;
}

.timeline-item .year {
  font-family: var(--mono);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text);
}

.timeline-item .tool {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
}

.timeline-item .note {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.timeline-caption {
  text-align: center;
  margin-top: 2rem;
  font-size: 1rem;
  color: var(--text-secondary);
}

/* Comparison slide - source vs rendered with fade-in */
.slide-comparison .section-header {
  margin-bottom: 1rem;
}

.slide-comparison h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  margin-bottom: 0.5rem;
  max-width: 900px;
}

.slide-comparison .section-lead {
  font-size: 1rem;
  margin-bottom: 0;
}

.slide-comparison .slide-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.comparison {
  position: relative;
  width: 100%;
  max-width: 1100px;
  height: auto;
  margin: 0 auto;
  display: flex;
  align-items: stretch;
  gap: 1.5rem;
}

.panel {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.12);
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.25s ease;
}

.slide.active .panel {
  opacity: 1;
  transform: translateY(0);
}

.slide.active .panel.source {
  transition-delay: 80ms;
}

.slide.active .panel.preview {
  transition-delay: 220ms;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid;
}

.panel-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.panel pre {
  margin: 0;
  padding: 1.25rem;
  overflow-x: auto;
  height: calc(100% - 45px);
}

.panel code {
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.7;
}

/* Source panel - dark */
.panel.source {
  background: #0f172a;
  border: 1px solid #1e293b;
  color: #e2e8f0;
}

.panel.source .panel-header {
  background: #1e293b;
  border-color: #334155;
}

.panel.source .panel-label {
  color: #94a3b8;
}

.panel.source code {
  color: inherit;
}

/* Preview panel - light */
.panel.preview {
  background: var(--surface);
  border: 1px solid var(--border);
}

.panel.preview .panel-header {
  background: #f8fafc;
  border-color: var(--border);
}

.panel.preview .panel-label {
  color: var(--text-muted);
}

.preview-body {
  padding: 1.25rem;
  height: auto;
  overflow: visible;
}

.preview-body h4 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.preview-body h5 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin: 0.65rem 0 0.25rem;
}

.preview-body ul {
  margin: 0 0 0.5rem;
  padding-left: 1.1rem;
}

.preview-body li {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.preview-body ol {
  margin: 0 0 0.5rem;
  padding-left: 1.25rem;
}

.preview-body ol li {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.preview-body blockquote {
  margin: 0;
  padding: 0.5rem 0 0.5rem 1rem;
  border-left: 3px solid var(--cta);
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.5;
}

.html-preview {
  text-align: left;
}

.svg-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

/* All comparison layouts: unified side-by-side */
.comparison .panel {
  position: relative;
  flex: 1;
  min-width: 0;
  max-height: 420px;
}

.comparison .panel.source {
  flex: 1;
}

.comparison .panel.preview {
  flex: 1;
}

.comparison .panel pre {
  height: auto;
  max-height: 360px;
  overflow: hidden;
}

.comparison .panel .preview-body {
  max-height: 360px;
  overflow: hidden;
}

/* Quote card */
.quote-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--red);
  border-radius: 12px;
  padding: 2.5rem;
  max-width: 380px;
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.06);
}

.quote-text {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 1rem;
}

.quote-author {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

/* Point flow */
.point-flow {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 1rem;
  max-width: 1000px;
  margin: 2rem auto 0;
}

.point-step {
  flex: 1;
  padding: 1.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: transform 0.25s ease;
  max-width: 300px;
}

.point-step:hover {
  transform: translateY(-4px);
}

.point-step .point-num {
  display: block;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--cta);
  margin-bottom: 1rem;
}

.point-step h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.point-step p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin: 0;
}

.point-arrow {
  display: flex;
  align-items: center;
  color: var(--text-muted);
  font-size: 1.5rem;
  font-weight: 300;
}

/* HTML demo stage */
.demo-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.demo-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  min-width: 140px;
}

.demo-step.highlight {
  border-color: var(--cta);
  background: #f0f9ff;
}

.demo-step .step-num {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
}

.demo-step .step-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.demo-arrow {
  color: var(--text-muted);
  font-size: 1.25rem;
}

.browser-mockup.large {
  max-width: 800px;
  margin: 0 auto;
}

.browser-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

/* HTML rich media */
.slide-html-media .slide-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.slide-html-media .section-header {
  margin-bottom: 1.25rem;
}

.slide-html-media h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  margin-bottom: 0.75rem;
}

.slide-html-media .section-lead {
  font-size: 1rem;
  margin-bottom: 0;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  max-width: 900px;
  margin: 0 auto 1rem;
}

.media-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
  transition: transform 0.25s ease;
}

.media-card:hover {
  transform: translateY(-4px);
}

.media-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #f0f9ff;
  color: var(--blue);
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.media-card:nth-child(1) .media-icon {
  background: #fef2f2;
  color: var(--red);
}

.media-card:nth-child(2) .media-icon {
  background: #f0f9ff;
  color: var(--blue);
}

.media-card:nth-child(3) .media-icon {
  background: #fffbeb;
  color: var(--yellow);
}

.media-card:nth-child(4) .media-icon {
  background: #f8fafc;
  color: var(--black);
}

.media-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}

.media-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0;
  max-width: none;
}

.media-browser {
  width: 100%;
  max-width: 520px;
}

.media-body {
  padding: 0.875rem;
}

.media-body h4 {
  font-size: 0.9rem;
  margin-bottom: 0.6rem;
}

.media-blocks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 0.4rem;
}

.media-block {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  min-height: 36px;
}

.media-block.text {
  background: #f8fafc;
  border: 1px solid var(--border);
  color: var(--text);
}

.media-block.image {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--red);
}

.media-block.video {
  grid-column: 1 / -1;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  color: var(--blue);
  min-height: 42px;
}

.media-block.cta {
  grid-column: 1 / -1;
  background: var(--cta);
  color: #fff;
  border-radius: 6px;
}

/* SVG Gallery */
.svg-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  max-width: 900px;
  margin: 2rem auto 0;
}

.svg-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem 1rem;
  text-align: center;
  transition: transform 0.25s ease;
}

.svg-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.svg-card svg {
  width: 100%;
  height: auto;
  max-height: 120px;
  margin-bottom: 0.75rem;
}

.svg-card span {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
}

/* Workflow */
.workflow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin: 3rem auto;
  max-width: 100%;
}

.workflow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  padding: 2rem 2.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  min-width: 150px;
  transition: transform 0.25s ease;
}

.workflow-step:hover {
  transform: translateY(-4px);
}

.workflow-step[data-tool="markdown"] {
  border-top: 4px solid var(--red);
}

.workflow-step[data-tool="html"] {
  border-top: 4px solid var(--blue);
}

.workflow-step[data-tool="svg"] {
  border-top: 4px solid var(--yellow);
}

.workflow-step[data-tool="github"] {
  border-top: 4px solid var(--black);
}

.step-icon {
  font-family: var(--mono);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
}

.workflow-step h3 {
  font-size: 1.15rem;
  margin: 0;
}

.workflow-step p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

.workflow-arrow {
  color: var(--text-muted);
  font-size: 2rem;
}

.workflow-note {
  text-align: center;
  max-width: 52ch;
  margin: 1.5rem auto 0;
  font-size: 1rem;
  color: var(--text-secondary);
}

/* Before / After */
.before-after {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  max-width: 100%;
  margin: 2rem auto 0;
}

.ba-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.ba-panel.before {
  background: linear-gradient(180deg, #fff 0%, #fef2f2 100%);
  border-color: #fecaca;
}

.ba-panel.after {
  background: linear-gradient(180deg, #fff 0%, #f0fdf4 100%);
  border-color: #bbf7d0;
}

.ba-header {
  padding: 1rem 1.2rem;
  background: #f1f5f9;
  border-bottom: 1px solid var(--border);
}

.ba-header span {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.ba-body {
  padding: 2rem;
}

.ba-doc {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.ba-line {
  height: 8px;
  background: #cbd5e1;
  border-radius: 2px;
  margin-bottom: 0.6rem;
}

.ba-browser {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.ba-browser h5 {
  font-size: 1rem;
  margin: 0 0 1rem;
  color: var(--text);
}

.ba-section {
  padding: 0.8rem 1rem;
  margin-bottom: 0.6rem;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
}

.ba-section.red {
  background: #fef2f2;
  border-left: 3px solid var(--red);
}

.ba-section.blue {
  background: #f0f9ff;
  border-left: 3px solid var(--blue);
}

.ba-section.yellow {
  background: #fffbeb;
  border-left: 3px solid var(--yellow);
}

.ba-caption {
  font-size: 1rem;
  color: var(--text-muted);
  margin: 0;
}

/* Build examples */
.build-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  max-width: 900px;
  margin: 0 auto;
}

.build-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  transition: transform 0.25s ease;
}

.build-card:hover {
  transform: translateY(-4px);
}

.build-num {
  display: block;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--cta);
  margin-bottom: 0.75rem;
}

.build-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
}

.build-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0;
  max-width: none;
}

/* URL bento */
.url-bento {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  max-width: 100%;
  margin: 2.5rem auto 0;
}

.url-item {
  text-align: left;
  padding: 2rem;
  background: linear-gradient(145deg, #ffffff, #f8fafc);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.url-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.url-item.wide {
  background: linear-gradient(145deg, #f0f9ff, #e0f2fe);
  border-color: #bae6fd;
}

.url-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #dcfce7, #bbf7d0);
  color: #16a34a;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  box-shadow: 0 2px 8px rgba(22,163,74,0.15);
}

.url-item h3 {
  font-size: 1.2rem;
  margin-bottom: 0.4rem;
}

.url-item p {
  font-size: 1rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

/* End */
.slide-end h2 {
  max-width: 22ch;
  margin-left: auto;
  margin-right: auto;
}

.takeaway {
  max-width: 52ch;
  margin: 1.5rem auto 2rem;
  padding: 1.5rem 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-align: center;
}

.takeaway p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin: 0 0 0.75rem;
  max-width: none;
}

.takeaway p:last-child {
  margin-bottom: 0;
  color: var(--text);
  font-weight: 500;
}

.closing {
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--text);
  margin-top: 2rem;
}

.contact-row {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 3rem;
  margin-top: 2rem;
}

.contact-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.contact-frame {
  width: 150px;
  height: 150px;
  padding: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.contact-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 6px;
}

.contact-label {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* Navigation */
.nav-btn {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: var(--surface);
  border: 1px solid var(--border);
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  cursor: pointer;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}

.nav-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  transform: translateY(-50%) scale(1.05);
}

.nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.nav-btn.prev {
  left: 2rem;
}

.nav-btn.next {
  right: 2rem;
}

/* Decorative grid background */
.slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(15, 23, 42, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 23, 42, 0.03) 1px, transparent 1px);
  background-size: 80px 80px;
  pointer-events: none;
  z-index: 0;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .slides,
  .progress-bar,
  .nav-btn,
  .contact-frame {
    transition: none;
  }
}
