/* ==========================================================================
   DeX CLASSIUS — classius.dexproject.site
   Part of dexproject.site. Premium monochrome, dark, animated grid + glow.
   ========================================================================== */

:root {
  --bg: #08090b;
  --bg-elev: #0e1013;
  --card: #111318;

  --text: #f4f4f2;
  --text-dim: #9d9da0;
  --text-faint: #626266;

  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.22);

  --ok: #7ee2a8;
  --warn: #f0c674;
  --err: #ff8f8f;

  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Space Grotesk', var(--font-body);

  --container: 1160px;
  --r: 12px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

::selection {
  background: #fff;
  color: #000;
}

:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.7);
  outline-offset: 3px;
  border-radius: 4px;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

img, svg {
  display: block;
  max-width: 100%;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

[hidden] {
  display: none !important;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}

.narrow {
  max-width: 780px;
}

main {
  flex: 1 0 auto;
}

/* --------------------------------------------------------------------------
   Animated background layers
   -------------------------------------------------------------------------- */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.page-bg .bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(ellipse 90% 65% at 50% 0%, #000 30%, transparent 78%);
  mask-image: radial-gradient(ellipse 90% 65% at 50% 0%, #000 30%, transparent 78%);
}

.bg-glow {
  position: absolute;
  width: 620px;
  height: 620px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.5;
  will-change: transform;
}

.glow-a {
  top: -240px;
  left: -160px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.14), transparent 65%);
  animation: drift-a 22s var(--ease-out) infinite alternate;
}

.glow-b {
  top: 24%;
  right: -260px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08), transparent 65%);
  animation: drift-b 26s var(--ease-out) infinite alternate;
}

@keyframes drift-a {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(180px, 120px, 0) scale(1.12); }
  100% { transform: translate3d(-60px, 260px, 0) scale(1); }
}

@keyframes drift-b {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(-240px, 180px, 0) scale(1.2); }
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 20px;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 0.94rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  cursor: pointer;
  border: 1px solid transparent;
  background: none;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out),
    border-color 0.25s ease, background-color 0.25s ease, color 0.25s ease, opacity 0.2s ease;
}

.btn svg {
  width: 16px;
  height: 16px;
  transition: transform 0.35s var(--ease-out);
}

.btn:hover svg {
  transform: translateX(3px);
}

.btn:active {
  transform: scale(0.985);
}

.btn-solid {
  background: #fff;
  color: #09090b;
  box-shadow: 0 8px 26px -10px rgba(255, 255, 255, 0.35);
}

.btn-solid:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px -12px rgba(255, 255, 255, 0.45);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  border-color: var(--line-strong);
}

.btn-ghost:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.07);
  transform: translateY(-2px);
}

.btn-quiet {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-dim);
  border-color: var(--line);
  padding: 9px 15px;
  font-size: 0.87rem;
}

.btn-quiet:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.btn-danger:hover {
  color: var(--err);
  border-color: rgba(255, 143, 143, 0.5);
}

.btn-sm {
  padding: 7px 13px;
  font-size: 0.82rem;
  border-radius: 8px;
}

.btn-block {
  width: 100%;
}

.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 9, 11, 0.6);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.site-header.is-scrolled {
  background: rgba(8, 9, 11, 0.88);
  border-bottom-color: var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  height: 68px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.06rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.wordmark .mark {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: linear-gradient(135deg, #fff 0%, #9d9da0 100%);
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.25);
  flex: none;
}

.wordmark em {
  font-style: normal;
  color: var(--text-faint);
  font-weight: 500;
}

.site-nav {
  display: flex;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.site-nav a {
  position: relative;
  padding: 7px 15px;
  border-radius: 8px;
  color: var(--text-dim);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.25s ease, background-color 0.25s ease;
}

.site-nav a:hover {
  color: var(--text);
}

.site-nav a.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-actions .btn {
  padding: 8px 16px;
  font-size: 0.88rem;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.3s var(--ease-out), opacity 0.2s ease;
}

.site-header.menu-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-header.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
.site-header.menu-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 16px 20px 20px;
  background: rgba(8, 9, 11, 0.97);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

.site-header.menu-open .mobile-nav {
  display: flex;
}

.mobile-nav a {
  padding: 11px 12px;
  border-radius: 10px;
  color: var(--text-dim);
  font-size: 0.95rem;
}

.mobile-nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.mobile-nav .btn {
  margin-top: 6px;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  padding: clamp(64px, 11vw, 132px) 0 clamp(48px, 8vw, 90px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-dim);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.82); }
}

.hero h1 {
  margin: 24px 0 0;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6.4vw, 4.3rem);
  font-weight: 700;
  line-height: 1.03;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.hero h1 .outline {
  color: transparent;
  -webkit-text-stroke: 1.4px rgba(255, 255, 255, 0.55);
}

.hero-lede {
  max-width: 620px;
  margin-top: 22px;
  color: var(--text-dim);
  font-size: clamp(1rem, 1.6vw, 1.1rem);
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 34px;
  margin-top: 46px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.hero-stats div b {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.hero-stats div span {
  color: var(--text-faint);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */
.section {
  padding: clamp(56px, 9vw, 104px) 0;
  scroll-margin-top: 78px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 38px;
}

.sec-kicker {
  color: var(--text-faint);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.sec-title {
  margin-top: 10px;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.2vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
  text-wrap: balance;
}

.sec-lede {
  max-width: 560px;
  margin-top: 12px;
  color: var(--text-dim);
  font-size: 0.98rem;
}

/* --------------------------------------------------------------------------
   Catalogue toolbar
   -------------------------------------------------------------------------- */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.search-wrap {
  position: relative;
  flex: 1 1 260px;
  min-width: 220px;
}

.search-wrap svg {
  position: absolute;
  top: 50%;
  left: 14px;
  width: 17px;
  height: 17px;
  transform: translateY(-50%);
  color: var(--text-faint);
  pointer-events: none;
}

.search-wrap input {
  width: 100%;
  padding: 12px 14px 12px 41px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.02);
  font-size: 0.93rem;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.search-wrap input:focus {
  outline: none;
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
}

.search-wrap input::placeholder {
  color: var(--text-faint);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 8px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-dim);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.chip:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.chip.active {
  background: #fff;
  border-color: #fff;
  color: #08090b;
}

.result-line {
  margin: 4px 0 22px;
  color: var(--text-faint);
  font-size: 0.85rem;
}

/* --------------------------------------------------------------------------
   Course grid + card
   -------------------------------------------------------------------------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 18px;
}

.course-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.005));
  padding: 24px 22px 20px;
  overflow: hidden;
  transition: transform 0.4s var(--ease-out), border-color 0.3s ease, background-color 0.3s ease;
}

.course-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, 0.07), transparent 65%);
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.course-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
}

.course-card:hover::after {
  opacity: 1;
}

.course-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.course-icon svg {
  width: 21px;
  height: 21px;
}

.course-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.course-card p {
  flex: 1;
  margin-top: 10px;
  color: var(--text-dim);
  font-size: 0.9rem;
  line-height: 1.65;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
}

.tag {
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-faint);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.tag.solid {
  background: #fff;
  border-color: #fff;
  color: #08090b;
}

.tag.free {
  border-color: rgba(126, 226, 168, 0.4);
  color: var(--ok);
}

.tag.warn {
  border-color: rgba(240, 198, 116, 0.4);
  color: var(--warn);
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--text-faint);
  font-size: 0.82rem;
}

.card-foot .go {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-weight: 500;
}

.card-foot .go svg {
  width: 14px;
  height: 14px;
  transition: transform 0.3s var(--ease-out);
}

.course-card:hover .card-foot .go svg {
  transform: translateX(3px);
}

/* Progress bar reused across catalogue / dashboard / player */
.bar {
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  overflow: hidden;
}

.bar > i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #fff;
  transition: width 0.6s var(--ease-out);
}

/* --------------------------------------------------------------------------
   Empty / loading states
   --------------------------------------------------------------------------
   */
.empty {
  padding: 60px 24px;
  border: 1px dashed var(--line);
  border-radius: 16px;
  color: var(--text-faint);
  text-align: center;
  font-size: 0.93rem;
}

.skel {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px 22px;
  background: rgba(255, 255, 255, 0.015);
}

.skel i {
  display: block;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.05));
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}

.skel .l1 { width: 46px; height: 46px; border-radius: 12px; margin-bottom: 18px; }
.skel .l2 { width: 70%; height: 14px; margin-bottom: 12px; }
.skel .l3 { width: 100%; height: 10px; margin-bottom: 8px; }
.skel .l4 { width: 55%; height: 10px; }

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --------------------------------------------------------------------------
   Reveal on scroll
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
  transition-delay: var(--d, 0ms);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

/* --------------------------------------------------------------------------
   Course detail
   -------------------------------------------------------------------------- */
.page-hero {
  padding: clamp(36px, 6vw, 68px) 0 0;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text-faint);
  font-size: 0.86rem;
  transition: color 0.2s ease;
}

.back-link:hover { color: #fff; }
.back-link svg { width: 14px; height: 14px; }

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.85fr);
  gap: 32px;
  align-items: start;
  margin-top: 26px;
}

.detail-grid h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4.2vw, 2.7rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: 16px 0 0;
  text-wrap: balance;
}

.detail-grid .lede {
  margin-top: 16px;
  color: var(--text-dim);
  font-size: 1.02rem;
  line-height: 1.75;
}

.detail-body {
  margin-top: 26px;
  color: var(--text-dim);
  font-size: 0.96rem;
  line-height: 1.8;
}

.side-card {
  position: sticky;
  top: 88px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.008));
  padding: 24px 22px;
}

.side-card .price {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.side-card .price small {
  display: block;
  margin-top: 4px;
  color: var(--text-faint);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.spec {
  margin: 20px 0;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 11px;
}

.spec div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.88rem;
}

.spec dt, .spec span:first-child {
  color: var(--text-faint);
}

.spec b {
  font-weight: 600;
}

.side-note {
  margin-top: 16px;
  color: var(--text-faint);
  font-size: 0.8rem;
  line-height: 1.6;
  text-align: center;
}

/* Syllabus */
.syllabus {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.014);
}

.module-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.module-head .num {
  color: var(--text-faint);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.module-head h3 {
  flex: 1;
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.lesson-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  color: var(--text-dim);
  font-size: 0.9rem;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.lesson-row:last-child { border-bottom: none; }

.lesson-row:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.lesson-row .kind {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text-faint);
}

.lesson-row .kind svg { width: 13px; height: 13px; }

.lesson-row .grow { flex: 1; min-width: 0; }

.lesson-row .dur {
  color: var(--text-faint);
  font-size: 0.8rem;
  white-space: nowrap;
}

.lesson-row .done-mark {
  color: var(--ok);
  flex: none;
}

.lesson-row.locked { opacity: 0.6; }

.lesson-row .lock { color: var(--text-faint); flex: none; }
.lesson-row .lock svg { width: 14px; height: 14px; }

/* --------------------------------------------------------------------------
   Learn player
   -------------------------------------------------------------------------- */
.player {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 0;
  min-height: calc(100vh - 68px);
}

.player-side {
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.012);
  padding: 24px 18px 40px;
  max-height: calc(100vh - 68px);
  overflow-y: auto;
  position: sticky;
  top: 68px;
}

.player-side h2 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.35;
}

.player-side .prog {
  margin: 16px 0 6px;
}

.player-side .prog-text {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  color: var(--text-faint);
  font-size: 0.78rem;
}

.side-module {
  margin-top: 22px;
}

.side-module > p {
  margin-bottom: 8px;
  color: var(--text-faint);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.side-lesson {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 11px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: none;
  color: var(--text-dim);
  font-size: 0.87rem;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.side-lesson:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.side-lesson.current {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--line-strong);
  color: #fff;
}

.side-lesson .tick {
  width: 16px;
  flex: none;
  color: var(--text-faint);
}

.side-lesson.complete .tick { color: var(--ok); }
.side-lesson .tick svg { width: 15px; height: 15px; }

.player-main {
  padding: clamp(28px, 4vw, 52px) clamp(20px, 4vw, 56px) 90px;
  min-width: 0;
}

.player-main .crumb {
  color: var(--text-faint);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.player-main h1 {
  margin: 12px 0 26px;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.4vw, 2.15rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.18;
}

.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-bottom: 28px;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #000;
}

.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Lesson body (rendered Markdown) */
.prose {
  color: var(--text-dim);
  font-size: 1rem;
  line-height: 1.85;
  max-width: 74ch;
}

.prose > * + * { margin-top: 18px; }

.prose h2 {
  margin-top: 34px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.22rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.prose h3 {
  margin-top: 26px;
  color: var(--text);
  font-size: 1.02rem;
  font-weight: 600;
}

.prose strong { color: var(--text); font-weight: 600; }

.prose em { color: var(--text); font-style: italic; }

.prose ul, .prose ol {
  padding-left: 22px;
  list-style: disc;
}

.prose ol { list-style: decimal; }

.prose li + li { margin-top: 8px; }

.prose a {
  color: #fff;
  border-bottom: 1px solid var(--line-strong);
}

.prose code {
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.87em;
  color: #fff;
}

.prose pre {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0b0c0f;
  overflow-x: auto;
}

.prose pre code {
  padding: 0;
  border: 0;
  background: none;
  font-size: 0.85rem;
  line-height: 1.7;
}

.prose blockquote {
  padding: 14px 20px;
  border-left: 2px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.025);
  border-radius: 0 10px 10px 0;
  color: var(--text);
  font-size: 0.96rem;
}

.prose hr {
  border: 0;
  border-top: 1px solid var(--line);
}

.lesson-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 46px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.gate {
  padding: 46px 30px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
  text-align: center;
}

.gate h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.gate p {
  max-width: 420px;
  margin: 12px auto 22px;
  color: var(--text-dim);
  font-size: 0.93rem;
}

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */
.form {
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 7px;
}

.field > label, .field-label {
  color: var(--text-dim);
  font-size: 0.84rem;
  font-weight: 500;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.input, .select, .textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  font-size: 0.92rem;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.045);
}

.input::placeholder, .textarea::placeholder { color: var(--text-faint); }

.textarea {
  min-height: 120px;
  resize: vertical;
  font-family: inherit;
  line-height: 1.65;
}

.textarea.code {
  min-height: 220px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
}

.select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-faint) 50%),
    linear-gradient(135deg, var(--text-faint) 50%, transparent 50%);
  background-position: calc(100% - 19px) 50%, calc(100% - 14px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 38px;
}

.select option { background: #0e1013; color: var(--text); }

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-dim);
  font-size: 0.88rem;
  cursor: pointer;
}

.check input {
  width: 17px;
  height: 17px;
  accent-color: #fff;
  cursor: pointer;
}

.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-msg {
  color: var(--text-dim);
  font-size: 0.87rem;
  line-height: 1.6;
  min-height: 1.2em;
}

.form-msg.ok { color: var(--ok); }
.form-msg.err { color: var(--err); }

/* --------------------------------------------------------------------------
   Auth card
   -------------------------------------------------------------------------- */
.auth-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(40px, 8vw, 90px) 24px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.006));
  padding: 34px 30px 30px;
}

.auth-card h1 {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.auth-card .sub {
  margin: 8px 0 26px;
  color: var(--text-dim);
  font-size: 0.92rem;
}

.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 22px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.02);
}

.tabs button {
  flex: 1;
  padding: 8px 12px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--text-dim);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.tabs button[aria-selected="true"] {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.auth-foot {
  margin-top: 20px;
  color: var(--text-faint);
  font-size: 0.82rem;
  text-align: center;
}

/* --------------------------------------------------------------------------
   Dashboard
   -------------------------------------------------------------------------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  margin-bottom: 34px;
}

.stat {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  padding: 20px 18px;
}

.stat b {
  display: block;
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.stat span {
  color: var(--text-faint);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.enroll-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.018);
  padding: 20px 22px;
  margin-bottom: 12px;
  transition: border-color 0.25s ease;
}

.enroll-card:hover { border-color: var(--line-strong); }

.enroll-card h3 {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.enroll-card .sub {
  margin-top: 5px;
  color: var(--text-faint);
  font-size: 0.83rem;
}

.enroll-card .prog-wrap { margin-top: 14px; }

.enroll-card .prog-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 7px;
  color: var(--text-faint);
  font-size: 0.78rem;
}

.enroll-card .actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
}

/* --------------------------------------------------------------------------
   Certificate
   -------------------------------------------------------------------------- */
.cert-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: clamp(30px, 6vw, 64px) 24px 90px;
}

.cert {
  position: relative;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: linear-gradient(180deg, #101216, #0a0b0e);
  padding: clamp(32px, 6vw, 64px);
  text-align: center;
  overflow: hidden;
}

.cert::before {
  content: '';
  position: absolute;
  inset: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  pointer-events: none;
}

.cert .brand {
  color: var(--text-faint);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.cert h1 {
  margin: 26px 0 8px;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3.4vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.cert .holder {
  margin: 22px 0 6px;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4.4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  border-bottom: 1px solid var(--line-strong);
  display: inline-block;
  padding-bottom: 10px;
}

.cert .for {
  margin-top: 22px;
  color: var(--text-dim);
  font-size: 0.94rem;
}

.cert .course {
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
}

.cert .code {
  margin-top: 30px;
  color: var(--text-faint);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
}

.cert-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 26px;
}

.verify-box {
  max-width: 560px;
  margin: 26px auto 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  padding: 24px;
}

/* --------------------------------------------------------------------------
   Bootcamp
   -------------------------------------------------------------------------- */
.track-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.track {
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.02);
  padding: 24px 22px;
  transition: border-color 0.25s ease, transform 0.35s var(--ease-out);
}

.track:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
}

.track h3 {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.track p {
  margin-top: 10px;
  color: var(--text-dim);
  font-size: 0.89rem;
  line-height: 1.7;
}

.track ul {
  margin-top: 14px;
  display: grid;
  gap: 7px;
  color: var(--text-dim);
  font-size: 0.86rem;
}

.track li {
  display: flex;
  gap: 9px;
  align-items: flex-start;
}

.track li::before {
  content: '';
  flex: none;
  width: 5px;
  height: 5px;
  margin-top: 9px;
  border-radius: 50%;
  background: var(--line-strong);
}

/* --------------------------------------------------------------------------
   Admin
   -------------------------------------------------------------------------- */
.admin-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: clamp(30px, 5vw, 52px) 0 0;
}

.admin-top h1 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.6vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 26px 0 22px;
}

.admin-tabs button {
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-dim);
  font-size: 0.87rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.admin-tabs button:hover { color: var(--text); border-color: var(--line-strong); }

.admin-tabs button[aria-selected="true"] {
  background: #fff;
  border-color: #fff;
  color: #08090b;
}

.admin-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.016);
  padding: 24px 22px;
  margin-bottom: 20px;
}

.card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.card-hint {
  color: var(--text-faint);
  font-size: 0.83rem;
}

.card-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.card-tools .input { width: auto; min-width: 200px; padding: 9px 13px; font-size: 0.87rem; }

.table-wrap {
  max-height: 520px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.87rem;
}

thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 11px 14px;
  background: var(--bg-elev);
  border-bottom: 1px solid var(--line);
  color: var(--text-faint);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-align: left;
  white-space: nowrap;
}

tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--text-dim);
  vertical-align: middle;
}

tbody tr:last-child td { border-bottom: none; }

tbody tr:hover td { background: rgba(255, 255, 255, 0.02); }

td.strong { color: var(--text); font-weight: 500; }

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.row-hidden { opacity: 0.5; }

.pill {
  display: inline-block;
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 500;
  white-space: nowrap;
}

.pill.ok { border-color: rgba(126, 226, 168, 0.4); color: var(--ok); }
.pill.warn { border-color: rgba(240, 198, 116, 0.4); color: var(--warn); }
.pill.err { border-color: rgba(255, 143, 143, 0.45); color: var(--err); }

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  color: var(--text-faint);
  font-size: 0.82rem;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}

.sub-list {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.sub-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 0.87rem;
}

.sub-item:last-child { border-bottom: none; }

.sub-item .grow { flex: 1; min-width: 0; }

.sub-item .muted { color: var(--text-faint); font-size: 0.78rem; }

/* --------------------------------------------------------------------------
   Doc pages (privacy / terms)
   -------------------------------------------------------------------------- */
.doc-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.016);
  padding: clamp(26px, 5vw, 46px);
}

.doc h2 {
  margin: 32px 0 10px;
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

.doc h2:first-child { margin-top: 0; }

.doc p, .doc li {
  color: var(--text-dim);
  font-size: 0.94rem;
  line-height: 1.8;
}

.doc ul { padding-left: 20px; list-style: disc; margin-top: 10px; }
.doc li + li { margin-top: 7px; }
.doc a { color: #fff; border-bottom: 1px solid var(--line-strong); }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  margin-top: 60px;
  padding: 44px 0 40px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.008);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 26px;
}

.footer-brand {
  max-width: 320px;
}

.footer-brand p {
  margin-top: 12px;
  color: var(--text-faint);
  font-size: 0.85rem;
  line-height: 1.7;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  color: var(--text-dim);
  font-size: 0.87rem;
}

.footer-links a { transition: color 0.2s ease; }
.footer-links a:hover { color: #fff; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--text-faint);
  font-size: 0.8rem;
}

/* --------------------------------------------------------------------------
   Toast
   -------------------------------------------------------------------------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 300;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100vw - 40px);
  padding: 12px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(14, 16, 19, 0.97);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.9);
  font-size: 0.88rem;
  opacity: 0;
  transform: translate(-50%, 14px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.35s var(--ease-out);
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast .toast-dot {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: #fff;
  animation: pulse 1.8s ease-in-out infinite;
}

.toast.err .toast-dot { background: var(--err); }

/* --------------------------------------------------------------------------
   Utilities
   -------------------------------------------------------------------------- */
.stack-sm > * + * { margin-top: 10px; }
.stack > * + * { margin-top: 16px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.center { text-align: center; }
.dim { color: var(--text-dim); }
.faint { color: var(--text-faint); }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -60px;
  left: 16px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 8px;
  background: #fff;
  color: #08090b;
  font-size: 0.85rem;
  font-weight: 600;
  transition: top 0.25s ease;
}

.skip-link:focus { top: 12px; }

/* --------------------------------------------------------------------------
   Breakpoints
   -------------------------------------------------------------------------- */
@media (max-width: 940px) {
  .site-nav { display: none; }
  .nav-toggle { display: flex; }
  .detail-grid { grid-template-columns: minmax(0, 1fr); }
  .side-card { position: static; }
  .player { grid-template-columns: minmax(0, 1fr); }
  .player-side {
    position: static;
    max-height: none;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 620px) {
  .container { padding: 0 18px; }
  .header-inner { height: 62px; }
  .header-actions .btn { display: none; }
  .mobile-nav .btn { display: inline-flex; }
  .hero-stats { gap: 22px; }
  .field-row { grid-template-columns: 1fr; }
  .enroll-card { grid-template-columns: minmax(0, 1fr); }
  .enroll-card .actions { flex-direction: row; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .section-head { flex-direction: column; align-items: flex-start; }
  .lesson-nav { flex-direction: column; align-items: stretch; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

/* --------------------------------------------------------------------------
   Motion preferences
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .bg-glow, .eyebrow .dot, .skel i, .spinner, .toast .toast-dot {
    animation: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  *, *::before, *::after {
    transition-duration: 0.01ms !important;
  }
}

/* --------------------------------------------------------------------------
   Print — the certificate page turns into a clean A4 sheet
   -------------------------------------------------------------------------- */
@media print {
  .site-header, .site-footer, .cert-actions, .page-bg { display: none !important; }
  body { background: #fff; color: #000; }
  .cert {
    border-color: #999;
    background: #fff;
    color: #000;
  }
  .cert .brand, .cert .for, .cert .code { color: #444; }
  .cert::before { border-color: #ccc; }
}
