:root {
  color-scheme: light;
  --ink: #182224;
  --muted: #5d6b6c;
  --paper: #f7f5ee;
  --panel: #ffffff;
  --teal: #0f6466;
  --teal-deep: #103c3f;
  --amber: #d59135;
  --coral: #bf5b4a;
  --green: #637a4a;
  --line: rgba(24, 34, 36, 0.13);
  --shadow: 0 18px 45px rgba(18, 31, 33, 0.14);
  --header-height: 72px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Noto Sans KR", sans-serif;
  line-height: 1.6;
}

body::selection {
  background: rgba(15, 100, 102, 0.18);
}

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(18px, 5vw, 64px);
  color: #fff;
  transition:
    background 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease;
}

.site-header.is-scrolled {
  background: rgba(247, 245, 238, 0.94);
  color: var(--ink);
  box-shadow: 0 12px 30px rgba(21, 31, 32, 0.08);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 8px;
  font-size: 0.78rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(12px, 3vw, 28px);
  font-size: 0.95rem;
  font-weight: 700;
}

.nav-links a {
  opacity: 0.86;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  opacity: 1;
}

.hero {
  position: relative;
  min-height: min(760px, 78vh);
  display: grid;
  align-items: center;
  overflow: hidden;
  color: #fff;
}

.hero-media,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-media {
  background:
    linear-gradient(90deg, rgba(13, 35, 37, 0.72) 0%, rgba(13, 35, 37, 0.44) 46%, rgba(13, 35, 37, 0.08) 100%),
    url("assets/ai-learning-workspace.png") center / cover no-repeat;
  transform: scale(1.01);
}

.hero-overlay {
  background:
    linear-gradient(0deg, rgba(11, 28, 29, 0.42), rgba(11, 28, 29, 0.04) 46%),
    radial-gradient(circle at 12% 18%, rgba(213, 145, 53, 0.3), transparent 24%);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(760px, calc(100% - 40px));
  margin-left: clamp(20px, 7vw, 96px);
  padding-top: var(--header-height);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--amber);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  max-width: 10ch;
  font-size: clamp(3.4rem, 11vw, 8.4rem);
  line-height: 0.92;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 680px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1.06rem, 2vw, 1.34rem);
  word-break: keep-all;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 11px 18px;
  font-weight: 850;
  line-height: 1.2;
  transition:
    transform 160ms ease,
    background 160ms ease,
    border-color 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  background: var(--amber);
  color: #1b211d;
}

.button.secondary {
  border-color: rgba(255, 255, 255, 0.58);
  color: #fff;
}

.overview {
  width: min(1120px, calc(100% - 36px));
  margin: -38px auto 0;
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.metric {
  padding: 22px clamp(16px, 3vw, 30px);
  border-right: 1px solid var(--line);
}

.metric:last-child {
  border-right: 0;
}

.metric strong {
  display: block;
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  line-height: 1;
  color: var(--teal);
}

.metric span {
  color: var(--muted);
  font-weight: 750;
}

.section {
  width: min(1160px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(70px, 10vw, 118px) 0 0;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(240px, 0.75fr) minmax(280px, 1.25fr);
  gap: clamp(22px, 5vw, 72px);
  align-items: end;
  margin-bottom: 30px;
}

.section-heading.compact {
  grid-template-columns: 1fr;
  max-width: 760px;
}

.section-heading h2,
.manifest-copy h2,
.final-cta h2 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 4.1rem);
  line-height: 1.04;
  letter-spacing: 0;
}

.section-heading p:not(.eyebrow),
.manifest-copy p:not(.eyebrow),
.final-cta p {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  word-break: keep-all;
}

.lane-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.lane-card,
.code-card,
.lab-card,
.link-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(18, 31, 33, 0.08);
}

.lane-card {
  min-height: 330px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(22px, 4vw, 34px);
}

.lane-kicker {
  color: var(--coral);
  font-weight: 900;
  text-transform: uppercase;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
}

.lane-card h3,
.code-card h3,
.lab-card h3 {
  margin: 12px 0 10px;
  font-size: clamp(1.35rem, 2vw, 1.8rem);
  line-height: 1.15;
}

.lane-card p,
.code-card p,
.lab-card p {
  margin: 0;
  color: var(--muted);
  word-break: keep-all;
}

.pill-list,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.pill-list li,
.tag-list li,
.difficulty {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--teal-deep);
  background: rgba(15, 100, 102, 0.06);
  font-size: 0.83rem;
  font-weight: 800;
}

.library-shell {
  position: relative;
}

.library-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(160px, 220px);
  gap: 12px;
  margin-bottom: 16px;
}

.search-field,
.select-field {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.search-field input,
.select-field select {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 14px;
  outline: none;
}

.search-field input:focus,
.select-field select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(15, 100, 102, 0.12);
}

.tab-list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 14px;
}

.tab {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--muted);
  padding: 7px 14px;
  font-weight: 850;
  cursor: pointer;
  white-space: nowrap;
}

.tab.is-active {
  background: var(--teal-deep);
  color: #fff;
  border-color: var(--teal-deep);
}

.code-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.code-card {
  min-height: 360px;
  display: flex;
  flex-direction: column;
  padding: 22px;
}

.code-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.category-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--teal);
  box-shadow: 0 0 0 5px rgba(15, 100, 102, 0.1);
}

.category-dot.agents {
  background: var(--coral);
  box-shadow: 0 0 0 5px rgba(191, 91, 74, 0.11);
}

.category-dot.data {
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(99, 122, 74, 0.12);
}

.category-dot.eval {
  background: #566a91;
  box-shadow: 0 0 0 5px rgba(86, 106, 145, 0.12);
}

.category-dot.prompts {
  background: var(--amber);
  box-shadow: 0 0 0 5px rgba(213, 145, 53, 0.16);
}

.code-meta {
  display: grid;
  gap: 8px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.code-meta span {
  color: var(--ink);
  font-weight: 800;
}

.card-actions {
  margin-top: auto;
  display: flex;
  gap: 8px;
  padding-top: 22px;
}

.action-button {
  min-height: 40px;
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--teal-deep);
  padding: 8px 10px;
  font-weight: 900;
  cursor: pointer;
}

.action-button:hover,
.action-button:focus-visible {
  border-color: var(--teal);
  background: rgba(15, 100, 102, 0.06);
}

.lab-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.link-card {
  min-height: 210px;
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 18px;
  align-items: start;
  padding: 22px;
}

.link-card.empty-link {
  grid-template-columns: 1fr;
}

.link-card h3 {
  margin: 0 0 8px;
  font-size: clamp(1.18rem, 2vw, 1.55rem);
  line-height: 1.2;
}

.link-card p {
  margin: 0;
  color: var(--muted);
  word-break: keep-all;
}

.link-card code {
  color: var(--teal-deep);
  font-weight: 850;
}

.score-ring {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #fff 52%, transparent 53%),
    conic-gradient(var(--teal) 0 78%, rgba(15, 100, 102, 0.15) 78% 100%);
  color: var(--teal-deep);
  font-weight: 950;
}

.source-link {
  display: inline-flex;
  margin-top: 18px;
  color: var(--teal-deep);
  font-weight: 900;
}

.lab-card {
  min-height: 270px;
  padding: 22px;
  display: flex;
  flex-direction: column;
}

.lab-number {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(213, 145, 53, 0.18);
  color: #6d4417;
  font-weight: 950;
}

.lab-card .tag-list {
  margin-top: auto;
  padding-top: 20px;
}

.roadmap {
  display: grid;
  gap: 12px;
}

.roadmap-item {
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 18px;
  align-items: start;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}

.roadmap-item:last-child {
  border-bottom: 1px solid var(--line);
}

.roadmap-stage {
  color: var(--coral);
  font-weight: 950;
}

.roadmap-item h3 {
  margin: 0 0 6px;
  font-size: 1.24rem;
}

.roadmap-item p {
  margin: 0;
  color: var(--muted);
}

.manifest-section {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(320px, 1.2fr);
  gap: 22px;
  align-items: stretch;
}

.schema-preview {
  margin: 0;
  overflow: auto;
  border-radius: 8px;
  background: #102426;
  color: #f2efe5;
  padding: 24px;
  font-size: clamp(0.82rem, 2vw, 0.98rem);
  line-height: 1.7;
}

.final-cta {
  width: min(1160px, calc(100% - 36px));
  margin: clamp(70px, 10vw, 118px) auto 0;
  padding: clamp(36px, 6vw, 64px);
  background: var(--teal-deep);
  color: #fff;
  border-radius: 8px;
}

.final-cta p {
  max-width: 760px;
  margin: 16px 0 24px;
  color: rgba(255, 255, 255, 0.78);
}

.site-footer {
  width: min(1160px, calc(100% - 36px));
  min-height: 96px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--muted);
  font-weight: 750;
}

.site-footer a {
  color: var(--teal-deep);
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  max-width: min(320px, calc(100vw - 36px));
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--teal-deep);
  color: #fff;
  box-shadow: var(--shadow);
  transform: translateY(18px);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

:focus-visible {
  outline: 3px solid rgba(213, 145, 53, 0.72);
  outline-offset: 3px;
}

@media (max-width: 920px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .nav-links {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .hero {
    min-height: 74vh;
  }

  .hero-content {
    width: min(680px, calc(100% - 32px));
    margin-inline: 16px;
  }

  .overview,
  .lane-grid,
  .code-grid,
  .link-grid,
  .lab-grid,
  .manifest-section,
  .section-heading {
    grid-template-columns: 1fr;
  }

  .overview {
    margin-top: 0;
  }

  .metric {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .metric:last-child {
    border-bottom: 0;
  }

  .library-controls {
    grid-template-columns: 1fr;
  }

  .roadmap-item {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

@media (max-width: 560px) {
  :root {
    --header-height: 104px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
  }

  .hero h1 {
    font-size: clamp(3rem, 17vw, 5rem);
  }

  .hero-actions,
  .card-actions {
    flex-direction: column;
  }

  .button,
  .action-button {
    width: 100%;
  }

  .section,
  .overview,
  .final-cta,
  .site-footer {
    width: min(100% - 28px, 1160px);
  }

  .lane-card,
  .code-card,
  .link-card,
  .lab-card {
    min-height: auto;
  }

  .link-card {
    grid-template-columns: 1fr;
  }
}
