:root {
  color-scheme: light;
  --navy: #16245e;
  --ink: #1a2547;
  --blue: #2563eb;
  --blue-soft: #eaf1fe;
  --blue-border: #bacff6;
  --coral: #e11d6b;
  --green: #109564;
  --green-soft: #e7f5ee;
  --slate: #566388;
  --muted: #8a95b2;
  --line: #dce3ef;
  --line-soft: #e9eef6;
  --paper: #ffffff;
  --bg: #edf4ff;
  --shadow: 0 24px 60px rgba(22, 36, 94, 0.14);
  font-family: "Noto Sans KR", "Apple SD Gothic Neo", "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 82% 8%, rgba(186, 207, 246, 0.62) 0 14rem, transparent 14.1rem),
    linear-gradient(180deg, #f5f9ff 0%, #e6effc 100%);
  color: var(--ink);
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-shell {
  min-height: 100vh;
  background-image: url("./assets/ppt_bg.png");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center top;
}

.topbar {
  align-items: center;
  display: flex;
  gap: 2rem;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1440px;
  padding: 1.25rem 2rem 0.75rem;
}

.brand {
  align-items: center;
  display: inline-flex;
  gap: 0.85rem;
  min-width: 0;
}

.brand img {
  border-radius: 18px;
  height: 58px;
  object-fit: cover;
  width: 58px;
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.05;
}

.brand strong {
  color: var(--navy);
  font-size: clamp(1.35rem, 2.6vw, 2rem);
  font-weight: 900;
}

.brand small {
  color: var(--slate);
  font-size: 0.88rem;
  font-weight: 800;
  margin-top: 0.2rem;
  text-transform: uppercase;
}

.topnav {
  align-items: center;
  display: flex;
  gap: 0.45rem;
}

.topnav a {
  border-radius: 999px;
  color: var(--slate);
  font-size: 0.94rem;
  font-weight: 800;
  padding: 0.65rem 0.95rem;
}

.topnav a:hover,
.topnav a:focus-visible {
  background: var(--blue-soft);
  color: var(--navy);
  outline: none;
}

main {
  margin: 0 auto;
  max-width: 1440px;
  padding: 1rem 2rem 4rem;
}

.learn-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 320px minmax(0, 1fr);
  min-height: calc(100vh - 112px);
}

.filters {
  align-self: start;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line-soft);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 1rem;
  position: sticky;
  top: 1rem;
}

.search {
  display: grid;
  gap: 0.45rem;
}

.search span,
.filter-label,
.eyebrow {
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.search input {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
  min-height: 48px;
  outline: none;
  padding: 0 0.95rem;
  width: 100%;
}

.search input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.filter-group {
  border-top: 1px solid var(--line-soft);
  margin-top: 1rem;
  padding-top: 1rem;
}

.chip-row,
.chip-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.65rem;
}

.chip-stack {
  flex-direction: column;
}

.chip {
  align-items: center;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--slate);
  cursor: pointer;
  display: inline-flex;
  font-size: 0.88rem;
  font-weight: 850;
  justify-content: center;
  min-height: 38px;
  padding: 0 0.85rem;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.chip:hover {
  border-color: var(--blue-border);
  color: var(--navy);
}

.chip[aria-pressed="true"] {
  background: var(--navy);
  border-color: var(--navy);
  color: white;
}

.chip.wide {
  justify-content: space-between;
  width: 100%;
}

.lesson-workspace {
  min-width: 0;
}

.workspace-head,
.section-head {
  align-items: end;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.workspace-head h1,
.section-head h2 {
  color: var(--navy);
  font-size: clamp(2rem, 5vw, 4.6rem);
  letter-spacing: 0;
  line-height: 1.02;
  margin: 0;
  max-width: 780px;
}

.section-head h2 {
  font-size: clamp(1.8rem, 3.6vw, 3.5rem);
}

.eyebrow {
  margin: 0 0 0.45rem;
}

.stats {
  align-items: center;
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  min-width: 220px;
}

.study-note {
  color: var(--slate);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.5;
  margin: 0.9rem 0 0;
}

.site-footer {
  margin: 0 auto;
  max-width: 1440px;
  padding: 0 2rem 3rem;
}

.footer-note {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 1rem 1.15rem;
}

.footer-note strong {
  color: var(--navy);
  display: block;
  font-size: 0.98rem;
  font-weight: 900;
}

.footer-note p {
  color: var(--slate);
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.6;
  margin: 0.45rem 0 0;
}

.stat {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  color: var(--slate);
  font-size: 0.78rem;
  font-weight: 850;
  min-width: 74px;
  padding: 0.65rem 0.75rem;
  text-align: center;
}

.stat strong {
  color: var(--navy);
  display: block;
  font-size: 1.2rem;
}

.player-layout {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr) 390px;
}

.player-panel,
.lesson-list {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line-soft);
  border-radius: 26px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.video-frame {
  aspect-ratio: 16 / 9;
  background: var(--navy);
  min-height: 260px;
  overflow: hidden;
}

.video-frame iframe {
  border: 0;
  display: block;
  height: 100%;
  width: 100%;
}

.selected-meta {
  padding: 1.2rem 1.25rem 1.35rem;
}

.selected-meta h2 {
  color: var(--navy);
  font-size: clamp(1.45rem, 2.8vw, 2.4rem);
  letter-spacing: 0;
  line-height: 1.12;
  margin: 0 0 0.8rem;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.tag {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 850;
  min-height: 32px;
  padding: 0 0.72rem;
}

.tag.level {
  background: var(--navy);
  color: white;
}

.tag.category {
  background: var(--blue-soft);
  color: var(--blue);
}

.tag.topik {
  background: var(--green-soft);
  color: var(--green);
}

.lesson-list {
  max-height: 720px;
  min-height: 420px;
}

.list-head {
  align-items: center;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  justify-content: space-between;
  min-height: 56px;
  padding: 0 0.95rem;
}

.list-head span {
  color: var(--slate);
  font-size: 0.88rem;
  font-weight: 900;
}

.icon-button {
  align-items: center;
  background: var(--blue-soft);
  border: 1px solid var(--blue-border);
  border-radius: 999px;
  color: var(--navy);
  cursor: pointer;
  display: inline-flex;
  font-size: 1.35rem;
  font-weight: 600;
  height: 36px;
  justify-content: center;
  line-height: 1;
  width: 36px;
}

#lessonList {
  display: grid;
  max-height: 664px;
  overflow: auto;
}

.lesson-button {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink);
  cursor: pointer;
  display: grid;
  gap: 0.45rem;
  padding: 0.95rem;
  text-align: left;
  width: 100%;
}

.lesson-button:hover,
.lesson-button:focus-visible {
  background: #f6f9fe;
  outline: none;
}

.lesson-button[aria-current="true"] {
  background: var(--green-soft);
  box-shadow: inset 4px 0 0 var(--green);
}

.lesson-button strong {
  color: var(--navy);
  font-size: 1rem;
  line-height: 1.25;
}

.lesson-button span {
  color: var(--slate);
  font-size: 0.82rem;
  font-weight: 780;
}

.paths,
.teachers {
  margin-top: 4rem;
}

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

.path-card,
.teacher-grid article {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  box-shadow: 0 14px 38px rgba(22, 36, 94, 0.09);
  min-height: 138px;
  padding: 1rem;
}

.path-card {
  cursor: pointer;
  text-align: left;
}

.path-card:hover,
.path-card:focus-visible {
  border-color: var(--blue-border);
  outline: none;
}

.path-card strong {
  color: var(--navy);
  display: block;
  font-size: 1.05rem;
  line-height: 1.2;
}

.path-card span {
  color: var(--slate);
  display: block;
  font-size: 0.88rem;
  font-weight: 760;
  margin-top: 0.55rem;
}

.path-count {
  align-items: center;
  background: var(--navy);
  border-radius: 999px;
  color: white;
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 900;
  min-height: 32px;
  padding: 0 0.75rem;
  margin-bottom: 0.8rem;
}

.teacher-grid article {
  align-items: center;
  display: grid;
  gap: 0.35rem;
  grid-template-columns: 74px minmax(0, 1fr);
  min-height: 110px;
}

.teacher-grid img {
  border: 3px solid var(--coral);
  border-radius: 24px;
  grid-row: span 2;
  height: 74px;
  object-fit: cover;
  width: 74px;
}

.teacher-grid strong {
  align-self: end;
  color: var(--navy);
  font-size: 1.15rem;
  font-weight: 900;
}

.teacher-grid span {
  align-self: start;
  color: var(--coral);
  font-size: 0.9rem;
  font-weight: 850;
}

.empty {
  color: var(--slate);
  font-weight: 760;
  padding: 1rem;
}

@media (max-width: 1120px) {
  .learn-grid,
  .player-layout {
    grid-template-columns: 1fr;
  }

  .filters {
    order: 2;
    position: static;
  }

  .lesson-workspace {
    order: 1;
  }

  .lesson-list {
    max-height: none;
  }

  #lessonList {
    max-height: 520px;
  }

  .path-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .topbar,
  main {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .topbar,
  .workspace-head,
  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .topnav {
    overflow-x: auto;
  }

  .stats {
    justify-content: flex-start;
  }

  .path-grid,
  .teacher-grid {
    grid-template-columns: 1fr;
  }

  .workspace-head h1,
  .section-head h2 {
    font-size: 2.35rem;
  }

  .brand img {
    height: 50px;
    width: 50px;
  }
}
