/* ============================================================
   byte.blog — Global Stylesheet
   Dark & minimal, GSAP-powered animations
   ============================================================ */

/* === CSS Variables === */
:root {
  --bg:           #080808;
  --surface:      #111111;
  --surface-2:    #1a1a1a;
  --border:       #1e1e1e;
  --accent:       #7c6afa;
  --accent-2:     #00d4aa;
  --text:         #f0f0f0;
  --text-muted:   #888888;
  --text-dim:     #444444;
  --font-mono:    'JetBrains Mono', 'Fira Code', monospace;
  --font-sans:    'Inter', system-ui, sans-serif;
  --radius:       12px;
  --radius-sm:    6px;
  --transition:   0.3s ease;
}

/* === Reset === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.65;
  overflow-x: hidden;
}

/* === Typography === */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-2); }
code {
  font-family: var(--font-mono);
  background: var(--surface-2);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-size: 0.875em;
  color: var(--accent-2);
}

/* === Scrollbar === */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #2a2a2a; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #3a3a3a; }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(8, 8, 8, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  color: var(--text);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.nav-logo span { color: var(--accent); }
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a { color: var(--text-muted); font-size: 0.875rem; font-weight: 500; transition: color var(--transition); }
.nav-links a:hover, .nav-links a.active { color: var(--text); }

/* ============================================================
   BLOB BACKGROUND
   ============================================================ */
.blob-container { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.07;
  animation: blobFloat 9s ease-in-out infinite;
}
.blob-1 { width: 650px; height: 650px; background: var(--accent); top: -220px; left: -220px; animation-delay: 0s; }
.blob-2 { width: 550px; height: 550px; background: var(--accent-2); bottom: -220px; right: -220px; animation-delay: -4.5s; }

@keyframes blobFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(35px, -35px) scale(1.06); }
  66%       { transform: translate(-25px, 25px) scale(0.94); }
}

/* ============================================================
   LAYOUT
   ============================================================ */
main, section, article, aside, header, footer, nav { display: block; }
main { position: relative; z-index: 1; padding-top: 68px; }

/* ============================================================
   HOMEPAGE HERO
   ============================================================ */
.hero {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 5rem 2rem 3rem;
  position: relative;
  overflow: hidden;
}

/* Three.js canvas sits behind hero content */
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.hero-inner { max-width: 720px; position: relative; z-index: 1; }

.hero-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  opacity: 0;
  transform: translateY(12px);
}
.hero h1 {
  font-size: clamp(2.8rem, 7vw, 5rem);
  margin-bottom: 1rem;
  opacity: 0;
  transform: translateY(16px);
}
.hero h1 .accent { color: var(--accent); }
.hero-tagline {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
  opacity: 0;
  transform: translateY(12px);
}
.typewriter-container {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--accent-2);
  min-height: 1.6em;
  opacity: 0;
}
.typewriter-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--accent-2);
  margin-left: 2px;
  vertical-align: middle;
  animation: blink 0.8s step-end infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* ============================================================
   FILTER + SEARCH
   ============================================================ */
.controls {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem 2.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(12px);
}
.filter-group { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.filter-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.45rem 1.2rem;
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-sans);
}
.filter-btn:hover { border-color: var(--accent); color: var(--text); }
.filter-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.search-wrap { flex: 1; min-width: 200px; max-width: 300px; position: relative; }
.search-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.45rem 1rem 0.45rem 2.2rem;
  border-radius: 100px;
  font-size: 0.82rem;
  font-family: var(--font-sans);
  outline: none;
  transition: border-color var(--transition);
}
.search-input:focus { border-color: var(--accent); }
.search-input::placeholder { color: var(--text-dim); }
.search-icon {
  position: absolute;
  left: 0.8rem; top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 1rem;
  pointer-events: none;
  line-height: 1;
}

/* ============================================================
   POST GRID
   ============================================================ */
.post-grid {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem 6rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}
.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition);
  opacity: 0;
  transform: translateY(28px);
  text-decoration: none;
  color: inherit;
  transform-style: preserve-3d;
  will-change: transform;
}
.post-card:hover {
  border-color: rgba(124, 106, 250, 0.4);
  box-shadow: 0 16px 48px rgba(124, 106, 250, 0.14);
}

/* 3D tilt glare overlay */
.card-glare {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  z-index: 1;
}
.card-meta { display: flex; align-items: center; gap: 0.75rem; }

.category-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}
.tag-tech    { background: rgba(124, 106, 250, 0.12); color: var(--accent); }
.tag-visual  { background: rgba(0, 212, 170, 0.12);   color: var(--accent-2); }
.tag-general { background: rgba(255, 255, 255, 0.06); color: var(--text-muted); }

.card-date { font-size: 0.78rem; color: var(--text-dim); font-family: var(--font-mono); }
.card-title { font-size: 1.15rem; font-weight: 700; line-height: 1.35; color: var(--text); }
.post-card:hover .card-title { color: #fff; }
.card-excerpt { font-size: 0.875rem; color: var(--text-muted); line-height: 1.65; flex: 1; }
.card-footer { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.25rem; }
.read-time { font-size: 0.78rem; color: var(--text-dim); font-family: var(--font-mono); }
.card-arrow { margin-left: auto; color: var(--accent); font-size: 1.1rem; transition: transform var(--transition); }
.post-card:hover .card-arrow { transform: translateX(5px); }

.no-results {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  grid-column: 1 / -1;
  display: none;
}

/* ============================================================
   READING PROGRESS BAR
   ============================================================ */
.progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  width: 0%;
  z-index: 200;
  transition: width 0.08s linear;
  border-radius: 0 2px 2px 0;
}

/* ============================================================
   POST HERO
   ============================================================ */
.post-hero {
  min-height: 52vh;
  display: flex;
  align-items: flex-end;
  padding: 6rem 2rem 3.5rem;
  position: relative;
  overflow: hidden;
}
.post-hero-bg { position: absolute; inset: 0; z-index: 0; will-change: transform; }
.post-hero-bg.tech {
  background:
    radial-gradient(ellipse at 20% 50%, rgba(124, 106, 250, 0.22) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 40%, rgba(0, 212, 170, 0.08) 0%, transparent 55%);
}
.post-hero-bg.visual {
  background:
    radial-gradient(ellipse at 50% 20%, rgba(0, 212, 170, 0.22) 0%, transparent 60%),
    radial-gradient(ellipse at 60% 80%, rgba(124, 106, 250, 0.12) 0%, transparent 55%);
}
.post-hero-content {
  position: relative;
  z-index: 1;
  max-width: 820px;
  margin: 0 auto;
  width: 100%;
}
.post-hero-content .category-tag { margin-bottom: 1.1rem; display: inline-block; }
.post-hero-content h1 { font-size: clamp(2rem, 5vw, 3.6rem); margin-bottom: 1.25rem; line-height: 1.15; }
.post-meta-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  flex-wrap: wrap;
}

/* ============================================================
   POST LAYOUT
   ============================================================ */
.post-layout {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3.5rem 2rem 6rem;
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 4rem;
  align-items: start;
}
@media (max-width: 900px) {
  .post-layout { grid-template-columns: 1fr; }
  .post-toc { display: none; }
}

.post-body { min-width: 0; }
.post-body h2 {
  font-size: 1.7rem;
  margin: 3rem 0 1rem;
  color: var(--text);
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.post-body h3 { font-size: 1.2rem; margin: 2rem 0 0.75rem; color: var(--text); }
.post-body p  { margin-bottom: 1.25rem; color: var(--text-muted); }
.post-body ul, .post-body ol { margin: 0 0 1.25rem 1.5rem; color: var(--text-muted); }
.post-body li { margin-bottom: 0.5rem; line-height: 1.75; }

.post-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  background: var(--surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-muted);
  font-style: italic;
}
.post-body pre {
  margin: 1.75rem 0;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  border: 1px solid var(--border);
}
.post-body pre code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: 0.875rem;
  line-height: 1.6;
}

.tip-box {
  background: rgba(124, 106, 250, 0.07);
  border: 1px solid rgba(124, 106, 250, 0.18);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin: 1.75rem 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.65;
}
.tip-box strong { color: var(--accent); }

.note-box {
  background: rgba(0, 212, 170, 0.05);
  border: 1px solid rgba(0, 212, 170, 0.15);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin: 1.75rem 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.65;
}
.note-box strong { color: var(--accent-2); }

/* ============================================================
   TABLE OF CONTENTS
   ============================================================ */
.post-toc {
  position: sticky;
  top: 88px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.toc-title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.toc-list { list-style: none; }
.toc-item { margin-bottom: 0.3rem; }
.toc-link {
  font-size: 0.83rem;
  color: var(--text-dim);
  display: block;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  border-left: 2px solid transparent;
  transition: all var(--transition);
  line-height: 1.4;
}
.toc-link:hover { color: var(--text); background: var(--surface-2); }
.toc-link.active { color: var(--accent); border-left-color: var(--accent); background: rgba(124, 106, 250, 0.08); }

/* ============================================================
   RELATED POSTS
   ============================================================ */
.related-posts {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 2rem 6rem;
  border-top: 1px solid var(--border);
}
.related-posts h3 {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1.5rem;
}
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }

/* ============================================================
   BACK BUTTON
   ============================================================ */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 2rem;
  transition: color var(--transition);
}
.back-btn:hover { color: var(--text); }

/* ============================================================
   ABOUT
   ============================================================ */
.about-section { max-width: 780px; margin: 0 auto; padding: 6rem 2rem; }
.about-header { display: flex; align-items: center; gap: 2.5rem; margin-bottom: 2.5rem; }
.avatar-ring-about {
  width: 96px; height: 96px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  padding: 3px;
  flex-shrink: 0;
}
.avatar-inner {
  width: 100%; height: 100%;
  border-radius: 50%;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}
.about-section h1 { font-size: 2.4rem; margin-bottom: 0.4rem; }
.about-links { display: flex; gap: 0.75rem; margin-top: 2rem; flex-wrap: wrap; }
.about-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.5rem 1.1rem;
  border-radius: 100px;
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: all var(--transition);
}
.about-link:hover { border-color: var(--accent); color: var(--text); }

/* ============================================================
   DEMO BOXES (post 002)
   ============================================================ */
.demo-box {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin: 2rem 0;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  user-select: none;
  transition: border-color var(--transition);
}
.demo-box:hover { border-color: rgba(124, 106, 250, 0.25); }
.demo-box::after {
  content: 'click to play';
  position: absolute;
  bottom: 0.75rem; right: 1rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.demo-label {
  position: absolute;
  top: 0.75rem; left: 1rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ============================================================
   AI UPSKILLING ROADMAP
   ============================================================ */

/* Hero gradient for upskilling page */
.post-hero-bg.upskilling {
  background:
    radial-gradient(ellipse at 30% 40%, rgba(124, 106, 250, 0.2) 0%, transparent 55%),
    radial-gradient(ellipse at 70% 70%, rgba(0, 212, 170, 0.15) 0%, transparent 55%);
}

/* Upskilling intro banner on homepage */
.upskilling-banner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem 2rem;
}
.upskilling-banner-inner {
  background: linear-gradient(135deg, rgba(124,106,250,0.08) 0%, rgba(0,212,170,0.06) 100%);
  border: 1px solid rgba(124,106,250,0.2);
  border-radius: var(--radius);
  padding: 1.25rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.upskilling-banner-inner p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}
.upskilling-banner-inner p strong { color: var(--text); }
.upskilling-banner-link {
  font-size: 0.875rem;
  color: var(--accent);
  white-space: nowrap;
  transition: gap var(--transition);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.upskilling-banner-link:hover { gap: 0.6rem; color: var(--accent-2); }

/* ============================================================
   GAME ROADMAP
   ============================================================ */

.game-roadmap-wrap {
  max-width: 1000px;
  margin: 0 auto;
  padding: 3rem 2rem 6rem;
}

/* Header stats */
.roadmap-header {
  text-align: center;
  margin-bottom: 4rem;
}
.roadmap-header p {
  color: var(--text-muted);
  font-size: 1rem;
  margin: 0.5rem 0 2rem;
}
.roadmap-stats {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.roadmap-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 1.5rem;
  text-align: center;
  min-width: 110px;
}
.roadmap-stat .stat-val {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}
.roadmap-stat .stat-label {
  display: block;
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 0.35rem;
}

/* Track container */
.game-track {
  position: relative;
}

/* Static dim centre line */
.game-track::before {
  content: '';
  position: absolute;
  left: 50%; top: 36px; bottom: 36px;
  transform: translateX(-50%);
  width: 2px;
  background: var(--border);
  z-index: 0;
}

/* Animated glowing fill line */
.track-line-fill {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 36px;
  width: 2px;
  height: 0;
  background: linear-gradient(to bottom, var(--accent), var(--accent-2));
  box-shadow: 0 0 10px rgba(124,106,250,0.7), 0 0 24px rgba(124,106,250,0.3);
  border-radius: 2px;
  z-index: 1;
}

/* Individual step — 3-column grid: card | node | card */
.game-step {
  display: grid;
  grid-template-columns: 1fr 90px 1fr;
  align-items: center;
  gap: 0 1.5rem;
  margin-bottom: 2.5rem;
  position: relative;
  z-index: 2;
}

/* Odd steps: right side card */
.game-step.step-right .step-node-wrap { grid-column: 2; }
.game-step.step-right .step-card-wrap { grid-column: 3; }
.game-step.step-right .step-spacer    { grid-column: 1; }
/* Even steps: left side card */
.game-step.step-left .step-node-wrap  { grid-column: 2; }
.game-step.step-left .step-card-wrap  { grid-column: 1; }
.game-step.step-left .step-spacer     { grid-column: 3; }

/* Node wrapper */
.step-node-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  grid-row: 1;
}

/* Node circle */
.step-node {
  width: 76px; height: 76px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
  z-index: 3;
}
.step-node.available {
  background: linear-gradient(145deg, var(--accent) 0%, #5340d4 100%);
  box-shadow: 0 0 28px rgba(124,106,250,0.55), 0 0 60px rgba(124,106,250,0.2);
  animation: nodeFloat 3.5s ease-in-out infinite;
  cursor: pointer;
}
.step-node.locked {
  background: var(--surface-2);
  border: 2px solid var(--border);
}

/* Ripple rings on available nodes */
.step-node.available::before,
.step-node.available::after {
  content: '';
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  opacity: 0;
  animation: nodeRipple 2.5s ease-out infinite;
}
.step-node.available::after { animation-delay: 1.25s; }

@keyframes nodeRipple {
  0%   { transform: scale(0.82); opacity: 0.75; }
  100% { transform: scale(1.65); opacity: 0;    }
}
@keyframes nodeFloat {
  0%, 100% { transform: translateY(0)   scale(1);    }
  50%       { transform: translateY(-8px) scale(1.04); }
}

.node-num {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}
.node-tag {
  font-family: var(--font-mono);
  font-size: 0.48rem;
  color: rgba(255,255,255,0.65);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 3px;
}
.node-lock { font-size: 1.3rem; opacity: 0.35; }

/* Card wrapper */
.step-card-wrap { grid-row: 1; }

/* Game card */
.game-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.game-card.available {
  border: 1px solid rgba(124,106,250,0.22);
}
.game-card.available:hover {
  border-color: rgba(124,106,250,0.5);
  box-shadow: 0 10px 36px rgba(124,106,250,0.14);
  transform: translateY(-3px);
}
.game-card.locked {
  border: 1px solid var(--border);
  opacity: 0.5;
}

/* Gradient top stripe on available cards */
.game-card.available::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.game-card-level {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--accent);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.45rem;
}
.game-card.locked .game-card-level { color: var(--text-dim); }

.game-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.45rem;
  line-height: 1.3;
}
.game-card p {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1rem;
}
.game-card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

/* Difficulty dots */
.difficulty {
  display: flex;
  align-items: center;
  gap: 4px;
}
.diff-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-right: 2px;
}
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.dot.on  { background: var(--accent); box-shadow: 0 0 4px rgba(124,106,250,0.5); }
.dot.off { background: var(--border); }

.game-time {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
}

/* Play / Locked buttons */
.play-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: linear-gradient(135deg, var(--accent), #5340d4);
  color: #fff !important;
  padding: 0.52rem 1.3rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 18px rgba(124,106,250,0.4);
}
.play-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 26px rgba(124,106,250,0.6);
}
.locked-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: transparent;
  color: var(--text-dim);
  padding: 0.52rem 1.3rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--border);
  pointer-events: none;
  cursor: default;
}

/* Responsive — collapse to left-aligned single column */
@media (max-width: 700px) {
  .game-track::before,
  .track-line-fill { left: 38px; transform: none; }

  .game-step {
    grid-template-columns: 76px 1fr;
    grid-template-rows: auto;
    gap: 0 1rem;
  }
  .game-step.step-right .step-node-wrap,
  .game-step.step-left  .step-node-wrap { grid-column: 1; grid-row: 1; }
  .game-step.step-right .step-card-wrap,
  .game-step.step-left  .step-card-wrap { grid-column: 2; grid-row: 1; }
  .game-step .step-spacer { display: none; }
}

/* Coming Soon topic page */
.coming-soon-wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 3rem 2rem 6rem;
}
.coming-soon-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  text-align: center;
  margin-bottom: 2rem;
}
.coming-soon-card .cs-icon { font-size: 2.5rem; display: block; margin-bottom: 1rem; }
.coming-soon-card h2 { font-size: 1.4rem; margin-bottom: 0.75rem; }
.coming-soon-card p { color: var(--text-muted); font-size: 0.9rem; }

.coming-soon-outline {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
}
.coming-soon-outline h3 {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}
.coming-soon-outline ul {
  list-style: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.8;
}
.coming-soon-outline ul li::before { content: '→  '; color: var(--accent); }

/* Topic page (lessons) */
.lesson-body { min-width: 0; }
.lesson-body h2 {
  font-size: 1.6rem;
  margin: 2.75rem 0 0.9rem;
  color: var(--text);
  padding-top: 0.9rem;
  border-top: 1px solid var(--border);
}
.lesson-body h3 { font-size: 1.1rem; margin: 1.75rem 0 0.6rem; color: var(--text); }
.lesson-body p  { margin-bottom: 1.2rem; color: var(--text-muted); line-height: 1.75; }
.lesson-body ul,
.lesson-body ol { margin: 0 0 1.25rem 1.5rem; color: var(--text-muted); line-height: 1.8; }
.lesson-body li { margin-bottom: 0.4rem; }
.lesson-body pre {
  margin: 1.5rem 0;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  border: 1px solid var(--border);
}
.lesson-body pre code { background: none; padding: 0; font-size: 0.875rem; line-height: 1.6; }
.lesson-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  background: var(--surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-muted);
  font-style: italic;
}

/* Vocab table */
.vocab-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0 1.75rem;
  font-size: 0.875rem;
}
.vocab-table th {
  text-align: left;
  padding: 0.6rem 1rem;
  background: var(--surface-2);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  border-bottom: 1px solid var(--border);
}
.vocab-table td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  vertical-align: top;
}
.vocab-table td:first-child {
  font-family: var(--font-mono);
  color: var(--accent-2);
  white-space: nowrap;
}
.vocab-table tr:last-child td { border-bottom: none; }

/* Next lesson nudge */
.next-lesson {
  margin-top: 3rem;
  background: linear-gradient(135deg, rgba(124,106,250,0.07), rgba(0,212,170,0.05));
  border: 1px solid rgba(124,106,250,0.2);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.next-lesson p { margin: 0; color: var(--text-muted); font-size: 0.9rem; }
.next-lesson strong { color: var(--text); display: block; font-size: 1rem; }
.next-lesson a { font-size: 0.875rem; color: var(--accent); font-weight: 600; white-space: nowrap; }

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  text-align: center;
  padding: 2rem;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.78rem;
  font-family: var(--font-mono);
  position: relative;
  z-index: 1;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 640px) {
  .nav { padding: 1rem 1.25rem; }
  .controls { flex-direction: column; align-items: flex-start; }
  .search-wrap { max-width: 100%; width: 100%; }
  .hero h1 { font-size: 2.4rem; }
  .about-header { flex-direction: column; text-align: center; }
  .post-meta-row { gap: 0.75rem; }
}
