:root {
  --slide-width: 1920;
  --slide-height: 1080;
  --bg: #f7fafc;
  --paper: #ffffff;
  --ink: #172033;
  --muted: #5c6b7d;
  --line: #d7e0ea;
  --blue: #2563eb;
  --green: #159957;
  --orange: #f28c28;
  --red: #e84a5f;
  --violet: #7c3aed;
  --teal: #0f9f9a;
  --shadow: 0 24px 70px rgba(26, 41, 61, 0.14);
}

* { box-sizing: border-box; }

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
}

body {
  position: relative;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
}

button { font: inherit; }

.deck {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1920px;
  height: 1080px;
  container-type: size;
  transform: translate(-50%, -50%) scale(var(--deck-scale, 1));
  transform-origin: center;
  overflow: hidden;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.slide {
  position: absolute;
  inset: 0;
  display: none;
  padding: clamp(30px, 3.4cqw, 52px);
}

.slide.active {
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 1.7cqw, 26px);
}

.slide::before {
  position: absolute;
  inset: 0 0 auto;
  height: 12px;
  background: linear-gradient(90deg, var(--blue), var(--green), var(--orange));
  content: "";
}

.slide-header {
  position: relative;
  z-index: 1;
}

h1,
h2,
p { margin: 0; }

.unit {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: clamp(24px, 2.2cqw, 36px);
  font-weight: 900;
}

.page-ref {
  position: absolute;
  top: 4px;
  right: 0;
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  background: #f6f8fb;
  color: var(--muted);
  font-size: clamp(18px, 1.45cqw, 24px);
  font-weight: 900;
}

h1 {
  font-size: clamp(50px, 5.2cqw, 76px);
  line-height: 1;
  letter-spacing: 0;
}

.subtitle {
  margin-top: 10px;
  color: var(--muted);
  font-size: clamp(23px, 2.15cqw, 32px);
  font-weight: 800;
}

.ai-definition-layout,
.compare-layout,
.principle-layout,
.textbook-case-layout {
  flex: 1;
  min-height: 0;
}

.ai-definition-layout {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: 22px;
}

.definition-card,
.agent-card,
.compare-table,
.flow-panel,
.feature-panel,
.agent-case-list,
.textbook-figure {
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.definition-card {
  display: grid;
  align-content: center;
  gap: 28px;
  padding: 44px;
}

.definition-card h2,
.agent-card h2,
.compare-table h2,
.flow-panel h2,
.feature-panel h2 {
  color: var(--green);
  font-size: clamp(32px, 2.8cqw, 44px);
  line-height: 1.1;
}

.definition-card p {
  font-size: clamp(28px, 2.55cqw, 40px);
  font-weight: 900;
  line-height: 1.38;
}

.definition-card strong {
  color: var(--blue);
}

.intelligence-map {
  position: relative;
  min-height: 0;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(37, 99, 235, 0.08) 1px, transparent 1px) 0 0 / 54px 54px,
    linear-gradient(rgba(21, 153, 87, 0.08) 1px, transparent 1px) 0 0 / 54px 54px,
    #f6f8fb;
}

.map-core {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: clamp(190px, 13cqw, 250px);
  height: clamp(190px, 13cqw, 250px);
  transform: translate(-50%, -50%);
  place-items: center;
  border: 8px solid #dbeafe;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: clamp(58px, 5.3cqw, 86px);
  font-weight: 900;
}

.map-item {
  position: absolute;
  display: grid;
  min-width: clamp(154px, 11cqw, 210px);
  min-height: clamp(84px, 5.8cqw, 108px);
  place-items: center;
  border: 4px solid currentColor;
  border-radius: 8px;
  background: #fff;
  font-size: clamp(28px, 2.35cqw, 38px);
  font-weight: 900;
  box-shadow: 0 12px 30px rgba(23, 32, 51, 0.08);
}

.item-recognition { top: 7%; left: 38%; color: var(--blue); }
.item-learning { top: 30%; right: 7%; color: var(--green); }
.item-reasoning { right: 12%; bottom: 12%; color: var(--orange); }
.item-solving { bottom: 12%; left: 8%; color: var(--red); }
.item-language { top: 30%; left: 6%; color: var(--violet); }

.compare-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: minmax(0, 0.82fr) minmax(0, 1fr);
  gap: 18px;
}

.agent-card {
  display: grid;
  align-content: center;
  gap: 20px;
  padding: 30px;
}

.agent-card p {
  font-size: clamp(24px, 2.2cqw, 34px);
  font-weight: 900;
  line-height: 1.32;
}

.basic-agent { border-top: 10px solid var(--orange); }
.smart-agent { border-top: 10px solid var(--blue); }

.example-chip {
  width: max-content;
  max-width: 100%;
  border-radius: 999px;
  padding: 10px 18px;
  background: #f6f8fb;
  color: var(--muted);
  font-size: clamp(20px, 1.75cqw, 28px);
  font-weight: 900;
}

.compare-table {
  grid-column: 1 / -1;
  display: grid;
  grid-template-rows: auto repeat(3, 1fr);
  gap: 10px;
  padding: 24px;
}

.compare-row {
  display: grid;
  grid-template-columns: 0.55fr 1fr 1fr;
  align-items: center;
  gap: 12px;
}

.compare-row b,
.compare-row span {
  display: grid;
  min-height: 68px;
  align-items: center;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: clamp(23px, 2cqw, 32px);
  font-weight: 900;
}

.compare-row b {
  background: #eef5ff;
  color: var(--blue);
}

.compare-row span {
  background: #f6f8fb;
}

.compare-row span:last-child {
  background: #eaf8f0;
  color: var(--green);
}

.principle-layout {
  display: grid;
  grid-template-columns: 1.38fr 0.62fr;
  gap: 18px;
}

.flow-panel,
.feature-panel {
  display: grid;
  align-content: start;
  gap: 22px;
  padding: 28px;
}

.agent-flow {
  display: grid;
  grid-template-columns: 1fr 72px 1fr 72px 1fr 72px 1fr;
  align-items: center;
  min-height: 380px;
}

.flow-node {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 12px;
  min-height: clamp(250px, 17cqw, 320px);
  border: 5px solid currentColor;
  border-radius: 8px;
  padding: 18px;
  background: #fff;
  text-align: center;
}

.flow-node span {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border-radius: 50%;
  background: currentColor;
  color: #fff;
  font-size: 28px;
  font-weight: 900;
}

.flow-node b {
  color: var(--ink);
  font-size: clamp(28px, 2.35cqw, 38px);
  font-weight: 900;
}

.flow-node p {
  color: var(--muted);
  font-size: clamp(21px, 1.8cqw, 28px);
  font-weight: 900;
  line-height: 1.25;
}

.sensor { color: var(--blue); }
.thinking { color: var(--green); }
.decision { color: var(--orange); }
.actuator { color: var(--red); }

.flow-arrow {
  position: relative;
  height: 8px;
  background: #b6c4d6;
}

.flow-arrow::after {
  position: absolute;
  top: 50%;
  right: -4px;
  width: 0;
  height: 0;
  transform: translateY(-50%);
  border-top: 18px solid transparent;
  border-bottom: 18px solid transparent;
  border-left: 26px solid #b6c4d6;
  content: "";
}

.repeat-note {
  border-left: 10px solid var(--green);
  border-radius: 8px;
  padding: 18px 22px;
  background: #eaf8f0;
  color: var(--green);
  font-size: clamp(26px, 2.3cqw, 36px);
  font-weight: 900;
}

.feature-grid {
  display: grid;
  gap: 16px;
  margin-top: 4px;
}

.feature-grid span {
  display: grid;
  min-height: clamp(92px, 6.2cqw, 124px);
  place-items: center;
  border: 4px solid currentColor;
  border-radius: 8px;
  background: #fff;
  font-size: clamp(32px, 2.9cqw, 46px);
  font-weight: 900;
}

.feature-grid span:nth-child(1) { color: var(--blue); background: #eef5ff; }
.feature-grid span:nth-child(2) { color: var(--green); background: #eaf8f0; }
.feature-grid span:nth-child(3) { color: var(--orange); background: #fff8ef; }
.feature-grid span:nth-child(4) { color: var(--violet); background: #f5f0ff; }

.textbook-case-layout {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 18px;
}

.agent-case-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 0;
  padding: 24px;
  list-style: none;
}

.agent-case-list li {
  display: grid;
  grid-template-columns: 0.62fr 1fr;
  align-items: center;
  gap: 16px;
  border-left: 10px solid var(--blue);
  border-radius: 8px;
  padding: 14px 18px;
  background: #f6f8fb;
}

.agent-case-list li:nth-child(2) { border-left-color: var(--orange); }
.agent-case-list li:nth-child(3) { border-left-color: var(--green); }
.agent-case-list li:nth-child(4) { border-left-color: var(--violet); }

.agent-case-list b {
  color: var(--ink);
  font-size: clamp(22px, 1.9cqw, 30px);
  font-weight: 900;
  line-height: 1.2;
}

.agent-case-list span {
  color: var(--muted);
  font-size: clamp(20px, 1.65cqw, 26px);
  font-weight: 900;
  line-height: 1.25;
}

.textbook-figure {
  display: grid;
  place-items: center;
  margin: 0;
  padding: 18px 24px 22px;
  background: #fff;
}

.textbook-figure img {
  display: block;
  width: min(100%, 1080px);
  max-height: 390px;
  object-fit: contain;
}

.ml-definition-layout {
  display: grid;
  grid-template-columns: 0.98fr 1.02fr;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 18px;
  flex: 1;
  min-height: 0;
}

.ml-definition-card,
.ml-cycle-card,
.ml-example-panel,
.learning-type,
.model-screenshot {
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.ml-definition-card {
  display: grid;
  align-content: center;
  gap: 24px;
  padding: 34px;
}

.ml-definition-card h2,
.ml-example-panel h2,
.learning-type h2,
.tree-branch h2 {
  color: var(--green);
  font-size: clamp(32px, 2.75cqw, 44px);
  line-height: 1.1;
}

.ml-definition-card p {
  font-size: clamp(26px, 2.3cqw, 36px);
  font-weight: 900;
  line-height: 1.38;
}

.ml-definition-card strong {
  color: var(--blue);
}

.ml-cycle-card {
  display: grid;
  grid-template-columns: 1fr 64px 1fr 64px 1fr 64px 1fr;
  align-items: center;
  padding: 28px;
}

.cycle-step {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 10px;
  min-height: 220px;
  border: 5px solid currentColor;
  border-radius: 8px;
  text-align: center;
}

.cycle-step b {
  color: var(--ink);
  font-size: clamp(28px, 2.3cqw, 38px);
  font-weight: 900;
}

.cycle-step span {
  color: var(--muted);
  font-size: clamp(19px, 1.6cqw, 26px);
  font-weight: 900;
  line-height: 1.25;
}

.data { color: var(--blue); background: #eef5ff; }
.learn { color: var(--orange); background: #fff8ef; }
.model { color: var(--green); background: #eaf8f0; }
.use { color: var(--violet); background: #f5f0ff; }

.cycle-arrow {
  position: relative;
  height: 8px;
  background: #b6c4d6;
}

.cycle-arrow::after {
  position: absolute;
  top: 50%;
  right: -4px;
  width: 0;
  height: 0;
  transform: translateY(-50%);
  border-top: 17px solid transparent;
  border-bottom: 17px solid transparent;
  border-left: 25px solid #b6c4d6;
  content: "";
}

.ml-example-panel {
  grid-column: 1 / -1;
  display: grid;
  gap: 16px;
  padding: 24px;
}

.ml-example-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.ml-example-grid div {
  display: grid;
  gap: 8px;
  border-left: 10px solid var(--blue);
  border-radius: 8px;
  padding: 16px 18px;
  background: #f6f8fb;
}

.ml-example-grid div:nth-child(2) { border-left-color: var(--green); }
.ml-example-grid div:nth-child(3) { border-left-color: var(--orange); }

.ml-example-grid b {
  font-size: clamp(23px, 1.9cqw, 30px);
  font-weight: 900;
}

.ml-example-grid span {
  color: var(--muted);
  font-size: clamp(19px, 1.55cqw, 25px);
  font-weight: 900;
  line-height: 1.25;
}

.learning-types-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  flex: 1;
  min-height: 0;
}

.learning-type {
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  gap: 18px;
  padding: 28px;
  border-top: 10px solid currentColor;
}

.supervised { color: var(--blue); }
.unsupervised { color: var(--green); }
.reinforcement { color: var(--orange); }

.learning-type h2 {
  color: currentColor;
}

.learning-type p {
  color: var(--ink);
  font-size: clamp(23px, 1.95cqw, 31px);
  font-weight: 900;
  line-height: 1.32;
}

.type-flow {
  display: grid;
  gap: 10px;
}

.type-flow span {
  display: grid;
  min-height: 58px;
  place-items: center;
  border-radius: 8px;
  background: #f6f8fb;
  color: var(--ink);
  font-size: clamp(21px, 1.75cqw, 28px);
  font-weight: 900;
}

.type-flow span + span {
  position: relative;
}

.type-flow span + span::before {
  position: absolute;
  top: -14px;
  left: 50%;
  width: 0;
  height: 0;
  transform: translateX(-50%);
  border-right: 10px solid transparent;
  border-left: 10px solid transparent;
  border-top: 12px solid #b6c4d6;
  content: "";
}

.learning-type ul {
  display: grid;
  align-content: end;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.learning-type li {
  border-left: 8px solid currentColor;
  border-radius: 8px;
  padding: 12px 16px;
  background: #f6f8fb;
  color: var(--ink);
  font-size: clamp(20px, 1.7cqw, 27px);
  font-weight: 900;
}

.model-screenshot {
  display: grid;
  place-items: center;
  flex: 1;
  min-height: 0;
  margin: 0;
  padding: 34px;
}

.model-screenshot img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 720px;
  object-fit: contain;
}

.model-lesson {
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  gap: 18px;
  flex: 1;
  min-height: 0;
}

.model-lesson.with-link {
  grid-template-rows: minmax(0, 1fr) auto;
}

.model-lesson.with-link .model-notes {
  grid-row: 1 / -1;
}

.model-lesson.with-link .model-figure {
  grid-column: 2;
  grid-row: 1;
  padding: 12px;
}

.model-lesson.two-figures {
  grid-template-columns: 0.68fr 1.32fr;
  grid-template-rows: minmax(0, 1.08fr) minmax(0, 0.72fr);
}

.model-lesson.two-figures .model-notes {
  grid-row: 1 / -1;
}

.model-lesson.two-figures .secondary {
  grid-column: 2;
}

.model-notes,
.model-figure {
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.model-notes {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 26px;
}

.model-notes h2 {
  color: var(--green);
  font-size: clamp(30px, 2.55cqw, 40px);
  line-height: 1.12;
}

.model-notes p {
  color: var(--ink);
  font-size: clamp(21px, 1.75cqw, 28px);
  font-weight: 900;
  line-height: 1.35;
}

.example-list,
.step-list {
  display: grid;
  gap: 9px;
}

.example-list b,
.step-list b {
  color: var(--blue);
  font-size: clamp(22px, 1.85cqw, 30px);
  font-weight: 900;
}

.example-list span,
.step-list span {
  border-left: 8px solid var(--blue);
  border-radius: 8px;
  padding: 10px 13px;
  background: #f6f8fb;
  color: var(--muted);
  font-size: clamp(17px, 1.35cqw, 23px);
  font-weight: 900;
  line-height: 1.24;
}

.example-list span:nth-child(3),
.step-list span:nth-child(3) { border-left-color: var(--green); }
.example-list span:nth-child(4),
.step-list span:nth-child(4) { border-left-color: var(--orange); }
.example-list span:nth-child(5),
.step-list span:nth-child(5) { border-left-color: var(--violet); }
.example-list span:nth-child(6),
.step-list span:nth-child(6) { border-left-color: var(--red); }

.example-list.compact span {
  font-size: clamp(16px, 1.25cqw, 21px);
}

.model-figure {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 18px;
}

.model-figure.primary,
.model-figure.secondary {
  align-content: center;
}

.model-figure img {
  display: block;
  width: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.model-link-stack {
  display: grid;
  grid-column: 2;
  grid-row: 2;
  gap: 8px;
}

.model-link {
  display: grid;
  min-height: 54px;
  place-items: center;
  border: 2px solid #bfdbfe;
  border-radius: 8px;
  padding: 8px 18px;
  background: #eef5ff;
  color: var(--blue);
  cursor: pointer;
  font-size: clamp(17px, 1.25cqw, 22px);
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}

.model-link:hover {
  background: #dbeafe;
}

.nav-zone {
  position: fixed;
  top: 0;
  bottom: 0;
  z-index: 5;
  width: 12cqw;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.nav-prev { left: 0; }
.nav-next { right: 0; }

.nav-zone span {
  position: absolute;
  top: 50%;
  display: block;
  width: 30px;
  height: 30px;
  opacity: 0.28;
  transform: translateY(-50%) rotate(45deg);
}

.nav-prev span {
  left: 20px;
  border-bottom: 6px solid var(--ink);
  border-left: 6px solid var(--ink);
}

.nav-next span {
  right: 20px;
  border-top: 6px solid var(--ink);
  border-right: 6px solid var(--ink);
}

.footer {
  position: fixed;
  right: 22px;
  bottom: 18px;
  left: 22px;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  pointer-events: none;
}

.footer p {
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--muted);
  font-size: 16px;
  font-weight: 900;
}

.dots {
  display: flex;
  gap: 8px;
  pointer-events: auto;
}

.dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 50%;
  background: #b6c4d6;
  cursor: pointer;
}

.dot.active {
  width: 34px;
  border-radius: 999px;
  background: var(--blue);
}
