:root {
  --bg: #f8f9fc;
  --white: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --line: #e6e8ef;
  --brand: #4f46e5;
  --yellow: #fde047;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.55; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h2 { font-size: clamp(28px, 3.6vw, 40px); letter-spacing: -.03em; }
.sub { color: var(--muted); margin: 6px 0 26px; }

.nav { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 20px; padding: 14px 5vw; background: var(--white); border-bottom: 1px solid var(--line); }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 19px; }
.logo b { background: var(--brand); color: #fff; border-radius: 10px; padding: 4px 8px; font-size: 15px; }
.nav-search { flex: 1; max-width: 360px; }
.nav-search input { width: 100%; padding: 10px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); font: inherit; }
.links { display: flex; gap: 22px; margin-left: auto; color: var(--muted); font-size: 15px; }
.links a:hover { color: var(--brand); }
.burger { display: none; background: none; border: 0; font-size: 24px; cursor: pointer; }

.btn { display: inline-flex; justify-content: center; align-items: center; gap: 6px; padding: 10px 18px; border-radius: 12px; background: var(--brand); color: #fff; font-weight: 600; border: 0; cursor: pointer; font: inherit; font-weight: 600; transition: background .2s, transform .2s; }
.btn:hover { background: #4338ca; transform: translateY(-1px); }
.btn-lg { padding: 14px 24px; font-size: 16px; }
.btn-ghost { background: var(--white); color: var(--text); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--bg); }
.btn-block { width: 100%; }

.hero { display: grid; grid-template-columns: 1.4fr 1fr; gap: 50px; align-items: center; padding: 80px 5vw; }
.badge { display: inline-block; background: #eef2ff; color: var(--brand); font-weight: 600; padding: 6px 14px; border-radius: 999px; font-size: 14px; }
.hero h1 { font-size: clamp(38px, 5.4vw, 66px); line-height: 1.05; letter-spacing: -.04em; margin: 18px 0; }
.hero mark { background: linear-gradient(transparent 60%, var(--yellow) 60%); color: inherit; }
.hero p { color: var(--muted); font-size: 19px; max-width: 520px; }
.hero-actions { display: flex; gap: 10px; margin: 28px 0; flex-wrap: wrap; }
.trust { list-style: none; display: flex; gap: 20px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }

.hero-card { background: var(--white); border: 1px solid var(--line); border-radius: 24px; padding: 28px; box-shadow: 0 30px 60px -30px rgba(79, 70, 229, .35); }
.hc-head { display: flex; justify-content: space-between; color: var(--muted); font-size: 14px; }
.hc-head b { color: var(--text); }
.ring { position: relative; width: 170px; margin: 24px auto; }
.ring svg { transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 12; }
.ring .track { stroke: #eef2ff; }
.ring .bar { stroke: var(--brand); stroke-linecap: round; stroke-dasharray: 326.7; stroke-dashoffset: 130.7; transition: stroke-dashoffset .6s ease; }
.ring span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 32px; font-weight: 800; }
.streak { text-align: center; margin-top: 14px; color: var(--muted); }

.courses { padding: 60px 5vw; }
.head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; }
.filters select { padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--white); font: inherit; }
.seg { display: flex; background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 3px; }
.seg button { border: 0; background: none; padding: 7px 14px; border-radius: 9px; cursor: pointer; font: inherit; color: var(--muted); }
.seg button.on { background: var(--brand); color: #fff; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.course { background: var(--white); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; transition: transform .25s, box-shadow .25s; }
.course:hover { transform: translateY(-4px); box-shadow: 0 18px 36px -18px rgba(17, 24, 39, .25); }
.course img { aspect-ratio: 16/10; object-fit: cover; width: 100%; }
.course-body { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.course-tags { display: flex; gap: 6px; }
.course-tags span { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--bg); color: var(--muted); font-weight: 600; }
.course h3 { font-size: 18px; line-height: 1.3; }
.course .by { color: var(--muted); font-size: 14px; }
.course-foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); font-size: 14px; }
.course-foot b { font-size: 18px; }
.enroll { border: 1px solid var(--brand); background: none; color: var(--brand); border-radius: 10px; padding: 7px 12px; cursor: pointer; font: inherit; font-weight: 600; }
.enroll.on { background: var(--brand); color: #fff; }
.empty { text-align: center; color: var(--muted); padding: 40px; }

.path { padding: 60px 5vw; max-width: 900px; margin: 0 auto; }
.module { background: var(--white); border: 1px solid var(--line); border-radius: 16px; margin-bottom: 12px; overflow: hidden; }
.mod-h { width: 100%; display: flex; justify-content: space-between; gap: 10px; padding: 20px 22px; background: none; border: 0; font: inherit; font-weight: 700; font-size: 17px; text-align: left; cursor: pointer; color: var(--text); }
.mod-h span { color: var(--muted); font-weight: 500; font-size: 14px; white-space: nowrap; }
.module.done .mod-h span { color: #16a34a; }
.module ul { list-style: none; max-height: 0; overflow: hidden; transition: max-height .35s ease; padding: 0 22px; }
.module.open ul { max-height: 300px; padding-bottom: 16px; }
.module li { padding: 10px 0 10px 30px; border-top: 1px solid var(--line); position: relative; color: var(--muted); }
.module li::before { content: "▶"; position: absolute; left: 4px; font-size: 11px; top: 14px; color: var(--brand); }
.module.done li::before { content: "✓"; color: #16a34a; font-size: 14px; top: 10px; }

.mentors { padding: 60px 5vw; }
.mentor-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 26px; }
.mentor-grid article { background: var(--white); border: 1px solid var(--line); border-radius: 18px; padding: 26px; text-align: center; }
.mentor-grid img { width: 110px; height: 110px; border-radius: 50%; margin: 0 auto 14px; }
.mentor-grid p { color: var(--muted); font-size: 14px; }

.signup { margin: 40px 5vw 70px; padding: 60px 30px; border-radius: 26px; background: var(--text); color: #fff; text-align: center; }
.signup form { display: flex; gap: 10px; max-width: 640px; margin: 26px auto 0; }
.signup input { flex: 1; padding: 13px 16px; border-radius: 12px; border: 2px solid transparent; font: inherit; }
.signup input.invalid { border-color: #f87171; }
.signup p { margin-top: 14px; font-weight: 600; min-height: 1.5em; }
.footer { text-align: center; padding: 26px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); }

@media (max-width: 960px) {
  .grid, .mentor-grid { grid-template-columns: 1fr 1fr; }
  .hero { grid-template-columns: 1fr; }
  .nav-search { display: none; }
}
@media (max-width: 680px) {
  .links { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--white); border-bottom: 1px solid var(--line); display: none; }
  .links.open { display: flex; }
  .links a { padding: 14px 5vw; }
  .burger { display: block; margin-left: auto; }
  .nav > .btn { display: none; }
  .grid, .mentor-grid { grid-template-columns: 1fr; }
  .signup form { flex-direction: column; }
  .mod-h { flex-direction: column; }
}
