:root {
  --bg: #f6f8fc;
  --surface: #fff;
  --ink: #0b1220;
  --muted: #4a5568;
  --line: rgba(15, 23, 42, .12);
  --navy: #0a1628;
  --blue: #1e3a5f;
  --accent: #0ea5e9;
  --accent-dark: #0284c7;
  --green: #0f766e;
  --max: 1120px;
  --space: clamp(1rem, 2.5vw, 1.75rem);
  --shadow: 0 8px 24px rgba(15, 23, 42, .08);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #eef2f9 0%, var(--bg) 38%);
  line-height: 1.55;
}
a { color: var(--blue); }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus {
  left: 1rem;
  top: 1rem;
  position: fixed;
  z-index: 20;
  background: var(--navy);
  color: white;
  padding: .5rem 1rem;
  border-radius: 6px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(246, 248, 252, .94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: var(--max);
  margin: auto;
  padding: .75rem var(--space);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.logo {
  display: flex;
  align-items: center;
  gap: .55rem;
  text-decoration: none;
  font-weight: 800;
  color: var(--navy);
}
.logo__mark {
  display: grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 8px;
  background: linear-gradient(145deg, var(--blue), var(--navy));
  color: white;
  font-size: .72rem;
  letter-spacing: .05em;
}
.logo__text span { color: var(--accent-dark); }
.site-nav { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: flex-end; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 700; font-size: .93rem; }
.site-nav a:hover { color: var(--accent-dark); }

.hero {
  max-width: var(--max);
  margin: auto;
  padding: clamp(2.5rem, 6vw, 4.75rem) var(--space);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(18rem, .9fr);
  gap: clamp(1.5rem, 4vw, 2.75rem);
  align-items: center;
}
.eyebrow {
  margin: 0 0 .7rem;
  color: var(--accent-dark);
  font: 800 .72rem ui-monospace, "Cascadia Code", Consolas, monospace;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.hero h1 {
  margin: 0 0 1rem;
  max-width: 12ch;
  color: var(--navy);
  font-size: clamp(2.25rem, 6vw, 4.5rem);
  line-height: .98;
  letter-spacing: -.035em;
}
.lead {
  max-width: 58ch;
  color: var(--muted);
  font-size: 1.1rem;
}
.hero__actions { display: flex; gap: .75rem; flex-wrap: wrap; }
.btn,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.35rem;
  padding: .62rem 1rem;
  border-radius: 6px;
  border: 1px solid rgba(14, 165, 233, .35);
  background: linear-gradient(180deg, var(--accent), var(--accent-dark));
  color: white;
  text-decoration: none;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.btn--secondary {
  background: white;
  color: var(--navy);
  border-color: var(--line);
}
.hero-card {
  border-radius: 16px;
  padding: 1.35rem;
  background: linear-gradient(135deg, #071422, #0f2847 48%, #0c4a6e);
  color: #e2e8f0;
  box-shadow: 0 20px 50px rgba(10, 22, 40, .14);
}
.hero-card .big {
  display: block;
  color: white;
  font-size: 4rem;
  font-weight: 900;
  line-height: 1;
}
.hero-card p { color: #cbd5e1; }

.section {
  max-width: var(--max);
  margin: auto;
  padding: clamp(2.25rem, 5vw, 3.5rem) var(--space);
}
.catalog-intro {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}
.catalog-intro h2,
.section-head h2,
.lesson-content h2,
.result h2,
.certificate h2 {
  margin: 0 0 .45rem;
  color: var(--navy);
  font-size: clamp(1.45rem, 3vw, 1.95rem);
  letter-spacing: -.025em;
}
.catalog-intro p,
.course-desc,
.lesson-content p,
.certificate p,
.path-card p { color: var(--muted); }
.catalog-pill {
  border: 1px solid rgba(14, 165, 233, .28);
  border-radius: 999px;
  background: rgba(14, 165, 233, .09);
  padding: .35rem .65rem;
  color: var(--accent-dark);
  font: 800 .72rem ui-monospace, "Cascadia Code", Consolas, monospace;
  text-transform: uppercase;
  white-space: nowrap;
}
.course-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.course-card {
  display: flex;
  flex-direction: column;
  position: relative;
  min-height: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .06);
  overflow: hidden;
}
.course-media {
  flex: 0 0 10.25rem;
  height: 10.25rem;
  max-height: 10.25rem;
  background: linear-gradient(145deg, #e0f2fe, #f8fafc);
  display: grid;
  place-items: center;
  border-bottom: 1px solid rgba(15, 23, 42, .08);
  overflow: hidden;
}
.course-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.course-body {
  position: relative;
  z-index: 1;
  padding: 1rem;
  flex: 1;
  background: white;
}
.course-title {
  margin: 0 0 .5rem;
  color: var(--navy);
  font-size: 1.05rem;
  line-height: 1.28;
}
.course-actions {
  position: relative;
  z-index: 1;
  padding: 0 1rem 1rem;
  background: white;
}

.path-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.path-card,
.lesson-content,
.quiz-question,
.result,
.certificate {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  padding: clamp(1.1rem, 3vw, 1.6rem);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .06);
}
.path-card span {
  color: var(--accent-dark);
  font-weight: 900;
  font-family: ui-monospace, Consolas, monospace;
}
.path-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}
.path-card__top strong {
  color: var(--green);
  font-size: .82rem;
}
.path-card h3 { margin: .6rem 0 .45rem; color: var(--navy); }
.path-course-list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  gap: .55rem;
}
.path-course-button {
  width: 100%;
  min-height: 0;
  justify-content: flex-start;
  gap: .65rem;
  padding: .7rem .75rem;
  border-color: var(--line);
  background: #f8fafc;
  color: var(--navy);
  text-align: left;
  box-shadow: none;
}
.path-course-button:hover {
  border-color: rgba(14, 165, 233, .35);
  background: #eef7ff;
}
.path-check {
  display: inline-grid;
  place-items: center;
  flex: 0 0 1.45rem;
  width: 1.45rem;
  height: 1.45rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: white;
  font-weight: 900;
  font-family: inherit;
}
.is-complete .path-check {
  border-color: rgba(15, 118, 110, .28);
  background: var(--green);
}
.path-course-title {
  color: inherit;
  font-family: inherit;
  font-weight: 800;
  line-height: 1.25;
}
.lesson-shell {
  max-width: 860px;
  margin: auto;
  display: grid;
  gap: 1rem;
}
.lesson-content img { max-width: 100%; }
.callout {
  border-left: 4px solid var(--accent);
  background: #eef7ff;
  border-radius: 6px;
  padding: .9rem 1rem;
}
.quiz-question { margin: 1rem 0; }
.quiz-question p {
  margin-top: 0;
  font-weight: 800;
  color: var(--navy);
}
label {
  display: block;
  margin: .25rem 0;
  color: var(--muted);
}
input[type="text"] {
  min-height: 2.35rem;
  padding: .55rem .75rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
}
.result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem 1.1rem;
  color: var(--muted);
}
.badge-pass,
.badge-fail {
  display: inline-block;
  border-radius: 999px;
  padding: .24rem .52rem;
  font-weight: 900;
}
.badge-pass { background: rgba(13, 148, 136, .1); color: var(--green); }
.badge-fail { background: #fee2e2; color: #b91c1c; }
.certificate-preview { margin-top: 1rem; }
.certificate-paper {
  border: 8px double var(--blue);
  border-radius: 10px;
  background: #fff;
  padding: 2rem;
  text-align: center;
}
.certificate-paper h3 { color: var(--blue); font-size: 1.5rem; }
.loading {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  padding: 1rem;
  color: var(--muted);
}
.site-footer {
  border-top: 1px solid rgba(14, 165, 233, .2);
  background: linear-gradient(180deg, #030712, #0a1628);
  color: #94a3b8;
  text-align: center;
  padding: 2rem var(--space);
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .course-grid,
  .path-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .header-inner { align-items: flex-start; flex-direction: column; }
  .site-nav { justify-content: flex-start; }
  .hero h1 { max-width: none; }
  .course-grid,
  .path-grid { grid-template-columns: 1fr; }
  .catalog-intro { align-items: flex-start; flex-direction: column; }
}
