/* KateelLearningDemos shared GitHub Pages styles */
:root {
  --bg-0: #070816;
  --bg-1: #0f172a;
  --bg-2: #111827;
  --card: rgba(255, 255, 255, 0.065);
  --card-strong: rgba(255, 255, 255, 0.095);
  --border: rgba(255, 255, 255, 0.12);
  --text: #e5e7eb;
  --muted: #9ca3af;
  --primary: #3b82f6;
  --secondary: #8b5cf6;
  --accent: #ec4899;
  --gold: #fbbf24;
  --success: #4ade80;
  --danger: #fb7185;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 0%, rgba(59, 130, 246, 0.22), transparent 34rem),
    radial-gradient(circle at 85% 10%, rgba(236, 72, 153, 0.18), transparent 30rem),
    linear-gradient(135deg, var(--bg-0), var(--bg-1) 48%, #17102b);
  line-height: 1.65;
}

a { color: inherit; }
a:hover { color: #fff; }
code { color: #bfdbfe; background: rgba(59, 130, 246, 0.16); padding: 0.12rem 0.35rem; border-radius: 0.4rem; }

.container {
  width: min(1400px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 0 0 4rem;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(7, 8, 22, 0.78);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px);
}

.nav-inner {
  width: min(1400px, calc(100% - 2rem));
  margin: 0 auto;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  font-weight: 900;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, #60a5fa, #a78bfa, #f472b6);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-decoration: none;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.nav-link,
.dropdown-content a {
  color: var(--muted);
  text-decoration: none;
  border-radius: 999px;
  padding: 0.55rem 0.8rem;
  font-size: 0.9rem;
  font-weight: 700;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.dropdown-content a:hover,
.dropdown-content a.active {
  color: #fff;
  background: rgba(59, 130, 246, 0.16);
}

.nav-cta {
  color: #fff !important;
  background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.28);
}

.nav-dropdown { position: relative; }
.nav-dropdown summary {
  list-style: none;
  cursor: pointer;
}
.nav-dropdown summary::-webkit-details-marker { display: none; }
.dropdown-content {
  position: absolute;
  right: 0;
  top: calc(100% + 0.65rem);
  min-width: 220px;
  padding: 0.55rem;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.site-hero {
  position: relative;
  text-align: center;
  padding: clamp(3rem, 7vw, 6.5rem) 0 3rem;
  overflow: hidden;
}

.site-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle at center, rgba(59, 130, 246, 0.2), transparent 65%);
}

.hero-eyebrow,
.section-kicker {
  color: #93c5fd;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 900;
  font-size: 0.78rem;
  margin: 0 0 0.75rem;
}

.site-hero h1 {
  margin: 0;
  font-size: clamp(2.35rem, 7vw, 5.8rem);
  line-height: 0.95;
  letter-spacing: -0.07em;
  background: linear-gradient(90deg, #fff, #93c5fd 35%, #c4b5fd 65%, #f9a8d4);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  max-width: 920px;
  margin: 1.25rem auto 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
}

.pill-row,
.cta-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.pill,
.level-badge,
.btn-mini {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: #dbeafe;
  border-radius: 999px;
  padding: 0.42rem 0.72rem;
  font-size: 0.82rem;
  font-weight: 800;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 999px;
  padding: 0.9rem 1.35rem;
  font-weight: 900;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover { transform: translateY(-2px); }
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 18px 45px rgba(59, 130, 246, 0.32);
}
.btn-secondary,
.btn-soft {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
}
.btn-soft { color: #bfdbfe; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin: 2rem 0 4rem;
}

.stat-card,
.info-card,
.demo-card,
.course-card,
.attribution-card {
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035));
  border-radius: var(--radius);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
}

.stat-card {
  text-align: center;
  padding: 1.35rem;
}

.stat-value {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 950;
  letter-spacing: -0.04em;
  background: linear-gradient(90deg, #60a5fa, #f9a8d4);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label { color: var(--muted); font-weight: 700; }

.section {
  margin: 4.5rem 0;
  scroll-margin-top: 90px;
}

.section-header {
  text-align: center;
  max-width: 850px;
  margin: 0 auto 2rem;
}

.section-header.left {
  text-align: left;
  max-width: none;
  margin: 0 0 1rem;
}

.section-header h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  letter-spacing: -0.04em;
}

.section-header p:not(.section-kicker) { color: var(--muted); }

.course-grid,
.card-grid,
.demo-grid {
  display: grid;
  gap: 1.2rem;
}

.course-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.demo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.course-card,
.demo-card {
  display: block;
  color: inherit;
  text-decoration: none;
  padding: 1.35rem;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.demo-card {
  height: 100%;
}

.course-card:hover,
.demo-card:hover {
  transform: translateY(-6px);
  border-color: rgba(96, 165, 250, 0.45);
  box-shadow: 0 24px 70px rgba(59, 130, 246, 0.22);
}

.course-card-top,
.demo-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.course-card h3,
.demo-card h3,
.info-card h3 {
  margin: 0 0 0.55rem;
  color: #fff;
  letter-spacing: -0.02em;
}

.course-card p,
.demo-card p,
.info-card p,
.info-card li,
.attribution-card p {
  color: var(--muted);
}

.course-meta,
.demo-meta,
.demo-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.demo-actions {
  margin-top: auto;
}

.btn-mini { text-decoration: none; }
.btn-mini.outline { color: #bfdbfe; border-color: rgba(96, 165, 250, 0.35); }

.learning-path {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.learning-path > div {
  padding: 1.2rem;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.055);
}

.learning-path strong {
  display: block;
  color: #fff;
  margin-bottom: 0.35rem;
}

.learning-path p { margin: 0; color: var(--muted); }

.info-card { padding: 1.4rem; }
.info-card ul,
.info-card ol { margin: 0.75rem 0 0 1.25rem; padding: 0; }
.highlight-card {
  border-color: rgba(251, 191, 36, 0.35);
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.12), rgba(255, 255, 255, 0.04));
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.feature {
  padding: 0.8rem;
  border-radius: 14px;
  background: rgba(59, 130, 246, 0.1);
  color: #dbeafe;
  font-weight: 750;
}

.feature span { color: var(--gold); }

.demo-context-strip {
  margin: 1rem 0 0;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(96, 165, 250, 0.35);
  border-radius: 16px;
  background: rgba(59, 130, 246, 0.1);
  color: #dbeafe;
}

.demo-rating {
  max-width: 620px;
  margin: 0 auto;
  padding: 1.4rem;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
}

.rating-title { font-weight: 900; color: #fff; margin-bottom: 0.5rem; }
.rating-stars { font-size: 2rem; letter-spacing: 0.1rem; cursor: pointer; user-select: none; }
.rating-stars span {
  color: rgba(148, 163, 184, 0.55);
  transition: transform 0.15s ease, color 0.15s ease;
}
.rating-stars span:hover,
.rating-stars span.active {
  color: var(--gold);
  transform: scale(1.18);
}
.rating-info { color: var(--muted); margin-top: 0.5rem; }
.rating-info .average { color: var(--gold); font-weight: 900; }
.rating-help { color: var(--muted); font-size: 0.9rem; margin: 0.7rem 0 0; }

.attribution-card {
  padding: 1.5rem;
  text-align: center;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1rem 3rem;
  text-align: center;
  color: var(--muted);
}

.site-footer a { color: #93c5fd; text-decoration: none; font-weight: 800; }

.empty-state {
  grid-column: 1 / -1;
  padding: 2rem;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

.toolbar-card {
  padding: 1.4rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035));
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.input-control {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  color: var(--muted);
  font-weight: 800;
}

.input-control input,
.input-control select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  padding: 0.9rem 1rem;
  font: inherit;
}

.input-control input::placeholder {
  color: #94a3b8;
}

.demo-card-rich {
  min-height: 100%;
}

.card-eyebrow {
  margin: 0.25rem 0 0;
  color: #93c5fd !important;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.demo-badges,
.resource-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}

.mode-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(96, 165, 250, 0.28);
  background: rgba(59, 130, 246, 0.12);
  color: #dbeafe;
  border-radius: 999px;
  padding: 0.42rem 0.72rem;
  font-size: 0.8rem;
  font-weight: 800;
}

.course-pack-card {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

@media (max-width: 1050px) {
  .course-grid,
  .card-grid,
  .demo-grid,
  .stats-grid,
  .learning-path,
  .filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .nav-inner { align-items: flex-start; flex-direction: column; padding: 0.8rem 0; }
  .nav-links { justify-content: flex-start; }
}

@media (max-width: 680px) {
  .container,
  .nav-inner { width: min(100% - 1rem, 1400px); }
  .course-grid,
  .card-grid,
  .demo-grid,
  .stats-grid,
  .learning-path,
  .feature-grid,
  .filter-grid { grid-template-columns: 1fr; }
  .site-hero h1 { letter-spacing: -0.05em; }
  .dropdown-content { left: 0; right: auto; }
}
