/* ==========================================================================
   CyberEdu — Minimalist Modern Architectural Stylesheet
   Palette: Porcelain (#F7F8FA) + Pure White + Obsidian (#0A0D14) + Cobalt
   ========================================================================== */

:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-subtle: #f1f4f8;
  --obsidian: #0a0d14;
  --obsidian-soft: #131926;
  --ink: #0b0f19;
  --ink-secondary: #475569;
  --ink-muted: #64748b;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --accent: #2563eb;
  --accent-soft: #eff6ff;
  --emerald: #10b981;
  --emerald-soft: #ecfdf5;
  --amber: #d97706;
  --amber-soft: #fffbeb;
  --danger: #ef4444;

  --font-sans: "Be Vietnam Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  --shadow-xs: 0 1px 2px rgba(10, 13, 20, 0.04);
  --shadow-md: 0 12px 32px -12px rgba(10, 13, 20, 0.08), 0 2px 6px rgba(10, 13, 20, 0.03);
  --shadow-window: 0 24px 64px -20px rgba(10, 13, 20, 0.16), 0 0 0 1px rgba(15, 23, 42, 0.06);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  overflow-x: hidden;
}

/* Subtle Architectural Grid Backdrop */
.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image:
    linear-gradient(to right, rgba(15, 23, 42, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 23, 42, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 85% 55% at 50% 0%, #000 35%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 85% 55% at 50% 0%, #000 35%, transparent 100%);
}

.container {
  width: min(1160px, calc(100% - 40px));
  margin-inline: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font-family: inherit;
}

/* ==========================================================================
   STICKY MINIMAL NAVIGATION
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 14px 20px;
}

.nav-shell {
  max-width: 1160px;
  margin-inline: auto;
  height: 58px;
  padding: 0 10px 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-xs);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--obsidian);
  color: #ffffff;
  display: grid;
  place-items: center;
}

.brand-name {
  font-size: 0.98rem;
  color: var(--ink);
}

.brand-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--ink-muted);
  padding: 2px 8px;
  background: var(--surface-subtle);
  border-radius: var(--radius-pill);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--ink-secondary);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--ink);
  background: var(--surface-subtle);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-switch {
  display: inline-flex;
  padding: 3px;
  background: var(--surface-subtle);
  border-radius: var(--radius-pill);
}

.lang-btn {
  border: none;
  background: transparent;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 5px 9px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s var(--ease);
}

.lang-btn.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(10, 13, 20, 0.08);
}

.btn-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 16px;
  font-size: 0.84rem;
  font-weight: 600;
  background: var(--obsidian);
  color: #ffffff;
  border-radius: var(--radius-pill);
  transition: transform 0.2s var(--ease), background 0.2s var(--ease);
}

.btn-nav:hover {
  background: #1e293b;
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 50%;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
}

.nav-toggle span {
  width: 14px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.2s var(--ease);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
  padding: 72px 0 56px;
  text-align: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.045em;
  color: var(--ink-secondary);
  box-shadow: var(--shadow-xs);
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.16);
}

.hero-title {
  margin: 26px auto 18px;
  max-width: 900px;
  font-size: clamp(2.45rem, 6vw, 4.4rem);
  font-weight: 800;
  line-height: 1.07;
  letter-spacing: -0.04em;
  color: var(--ink);
}

.hero-title-muted {
  color: var(--ink-muted);
}

.hero-sub {
  margin: 0 auto 30px;
  max-width: 760px;
  font-size: clamp(0.98rem, 1.5vw, 1.12rem);
  font-weight: 400;
  color: var(--ink-secondary);
  text-wrap: balance;
}

.hero-cta {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 24px;
  border-radius: var(--radius-pill);
  font-size: 0.92rem;
  font-weight: 600;
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease), background 0.22s var(--ease);
}

.btn-primary {
  background: var(--obsidian);
  color: #ffffff;
  box-shadow: 0 10px 24px -10px rgba(10, 13, 20, 0.45);
}

.btn-primary:hover {
  background: #1a2234;
  transform: translateY(-2px);
}

.btn-ghost {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--border-strong);
  background: var(--surface-subtle);
  transform: translateY(-2px);
}

/* Architectural 4-KPI Strip */
.kpi-strip {
  margin-top: 60px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}

.kpi-item {
  padding: 24px 20px;
  text-align: left;
  border-right: 1px solid var(--border);
}

.kpi-item:last-child {
  border-right: none;
}

.kpi-value {
  font-family: var(--font-sans);
  font-variant-numeric: tabular-nums;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--ink);
  line-height: 1.1;
}

.kpi-label {
  margin-top: 6px;
  font-size: 0.83rem;
  color: var(--ink-muted);
}

/* ==========================================================================
   SHARED SECTION RHYTHM
   ========================================================================== */
.section {
  padding: 76px 0;
  scroll-margin-top: 76px;
}

.section-head {
  margin-bottom: 32px;
}

.section-index {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 10px;
}

.section-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.section-title {
  margin: 0;
  font-size: clamp(1.65rem, 3.2vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.14;
  color: var(--ink);
}

.section-note {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink-muted);
}

/* ==========================================================================
   01 / INTERACTIVE SPLIT-SCREEN WORKSPACE
   ========================================================================== */
.workspace-frame {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-window);
}

.ws-topbar {
  min-height: 50px;
  padding: 10px 18px;
  background: var(--obsidian);
  color: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.ws-dots {
  display: flex;
  gap: 7px;
}

.ws-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
}

.ws-title {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.84rem;
  font-weight: 600;
  color: #f8fafc;
}

.ws-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: 5px;
  background: rgba(37, 99, 235, 0.25);
  color: #93c5fd;
  border: 1px solid rgba(147, 197, 253, 0.25);
}

.ws-status {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #94a3b8;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald);
}

.ws-mini-lang {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: #f8fafc;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s var(--ease);
}

.ws-mini-lang:hover {
  background: rgba(255, 255, 255, 0.15);
}

.ws-grid {
  display: grid;
  grid-template-columns: 1fr 1.08fr;
  min-height: 480px;
}

.ws-pane {
  display: flex;
  flex-direction: column;
}

.ws-docs {
  padding: 22px;
  border-right: 1px solid var(--border);
  background: var(--surface);
  gap: 18px;
}

.pane-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.pane-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  color: var(--ink-muted);
}

.pane-meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 2px 8px;
  border-radius: 5px;
}

.docs-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.docs-step-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink);
}

.docs-text {
  margin: 0;
  font-size: 0.86rem;
  color: var(--ink-secondary);
  line-height: 1.55;
}

.code-preview {
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--ink);
  overflow-x: auto;
}

.hl-danger {
  color: var(--accent);
  font-weight: 600;
}

.cheat-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.try-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  text-align: left;
  transition: all 0.2s var(--ease);
}

.try-btn:hover {
  border-color: var(--ink);
  transform: translateY(-1px);
}

.try-btn-primary {
  border-color: rgba(37, 99, 235, 0.35);
  background: #f8fbff;
}

.try-btn-primary:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.try-cmd {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink);
  font-weight: 500;
}

.try-chip {
  font-size: 0.73rem;
  font-weight: 600;
  color: var(--ink-secondary);
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--surface-subtle);
  white-space: nowrap;
}

.try-chip-accent {
  background: var(--obsidian);
  color: #ffffff;
}

/* Flag Form */
.docs-flag-block {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.flag-form {
  display: flex;
  gap: 8px;
}

.flag-input {
  flex: 1;
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ink);
  background: var(--surface);
  outline: none;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.flag-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.flag-input.is-pulsed {
  border-color: var(--emerald);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}

.flag-submit {
  height: 40px;
  padding: 0 16px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--obsidian);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s var(--ease);
}

.flag-submit:hover {
  background: var(--accent);
}

.flag-feedback {
  font-size: 0.78rem;
  font-weight: 500;
  min-height: 18px;
}

.flag-feedback.is-ok {
  color: #059669;
}

.flag-feedback.is-err {
  color: var(--danger);
}

.defense-unlock {
  margin-top: 4px;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--emerald-soft);
  border: 1px solid rgba(16, 185, 129, 0.32);
  animation: fadeSlideUp 0.35s var(--ease);
}

.defense-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  font-weight: 700;
  color: #065f46;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.defense-badge {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--emerald);
  color: #ffffff;
}

.defense-code {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.73rem;
  color: #064e3b;
  overflow-x: auto;
}

.skill-boost {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgba(16, 185, 129, 0.35);
}

.skill-boost-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.73rem;
  font-weight: 600;
  color: #065f46;
  margin-bottom: 5px;
}

.skill-boost-val {
  font-family: var(--font-mono);
  color: #047857;
}

.skill-boost-track {
  height: 7px;
  background: rgba(16, 185, 129, 0.18);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.skill-boost-fill {
  height: 100%;
  width: 65%;
  background: var(--emerald);
  border-radius: var(--radius-pill);
  transition: width 0.8s var(--ease);
}

/* RIGHT: Terminal + Mentor */
.ws-right {
  display: grid;
  grid-template-rows: 1fr auto;
  background: #0d1119;
}

.ws-terminal {
  padding: 18px 20px 14px;
  background: #0d1119;
  color: #e2e8f0;
  min-height: 300px;
}

.pane-header-dark {
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.pane-tag-dark {
  color: #94a3b8;
}

.term-reset {
  border: none;
  background: transparent;
  color: #94a3b8;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
}

.term-reset:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.term-output {
  flex: 1;
  padding: 14px 0;
  font-family: var(--font-mono);
  font-size: 0.79rem;
  line-height: 1.65;
  overflow-y: auto;
  max-height: 235px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.term-line {
  white-space: pre-wrap;
  word-break: break-word;
}

.term-line.is-cmd {
  color: #f8fafc;
}

.term-line.is-muted {
  color: #64748b;
}

.term-line.is-ok {
  color: #34d399;
}

.term-line.is-err {
  color: #fb7185;
}

.term-line.is-flag {
  color: #fde047;
  font-weight: 600;
}

.term-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.term-prompt {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--emerald);
  white-space: nowrap;
}

.term-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: #f8fafc;
  font-family: var(--font-mono);
  font-size: 0.79rem;
  outline: none;
}

.term-input::placeholder {
  color: #475569;
}

/* AI Mentor Panel */
.ws-mentor {
  padding: 16px 20px 18px;
  background: #fafbfd;
  border-top: 1px solid var(--border);
  gap: 10px;
}

.mentor-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.anti-spoiler-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  color: #059669;
  background: var(--emerald-soft);
  padding: 2px 7px;
  border-radius: 5px;
}

.hint-pills {
  display: inline-flex;
  gap: 4px;
  background: var(--surface-subtle);
  padding: 3px;
  border-radius: 8px;
}

.hint-pill {
  border: none;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-muted);
  padding: 4px 9px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}

.hint-pill.is-active {
  background: var(--obsidian);
  color: #ffffff;
}

.mentor-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mentor-level-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
}

.mentor-text {
  margin: 0;
  font-size: 0.84rem;
  color: var(--ink-secondary);
  line-height: 1.5;
}

/* Closed 4-Step Loop Strip */
.loop-strip {
  margin-top: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  flex-wrap: wrap;
}

.loop-node {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink);
}

.loop-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-muted);
  background: var(--surface-subtle);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.loop-node-accent .loop-num {
  background: var(--obsidian);
  color: #ffffff;
}

.loop-arrow {
  color: var(--border-strong);
  font-family: var(--font-mono);
}

/* ==========================================================================
   02 / 4 BARRIERS -> 4 BREAKTHROUGHS
   ========================================================================== */
.shift-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.shift-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.shift-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.shift-card-featured {
  background: var(--obsidian);
  border-color: var(--obsidian);
  color: #f8fafc;
}

.shift-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.shift-tag-old {
  color: var(--ink-muted);
}

.shift-card-featured .shift-tag-old {
  color: #94a3b8;
}

.shift-tag-new {
  color: var(--accent);
}

.shift-card-featured .shift-tag-new {
  color: #60a5fa;
}

.shift-before h3 {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-muted);
  text-decoration: line-through;
  text-decoration-color: rgba(100, 116, 139, 0.45);
}

.shift-card-featured .shift-before h3 {
  color: #94a3b8;
}

.shift-divider {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--border-strong);
}

.shift-card-featured .shift-divider {
  color: rgba(255, 255, 255, 0.25);
}

.shift-after h4 {
  margin: 0 0 6px;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.shift-after p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--ink-secondary);
}

.shift-card-featured .shift-after p {
  color: #cbd5e1;
}

/* ==========================================================================
   03 / MARKET BENCHMARK
   ========================================================================== */
.metric-tabs {
  display: inline-flex;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  gap: 4px;
  flex-wrap: wrap;
}

.metric-tab {
  border: none;
  background: transparent;
  color: var(--ink-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s var(--ease);
}

.metric-tab.is-active {
  background: var(--obsidian);
  color: #ffffff;
}

.compare-layout {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 20px;
}

.chart-panel,
.matrix-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  gap: 10px;
}

.chart-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
}

.chart-scale {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-muted);
}

.bar-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.bar-item {
  display: grid;
  grid-template-columns: 130px 1fr 40px;
  align-items: center;
  gap: 12px;
}

.bar-name {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink-secondary);
}

.bar-item.is-cyberedu .bar-name {
  color: var(--ink);
  font-weight: 700;
}

.bar-track {
  height: 12px;
  background: var(--surface-subtle);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  width: 0;
  border-radius: var(--radius-pill);
  background: #94a3b8;
  transition: width 0.65s var(--ease);
}

.bar-item.is-cyberedu .bar-fill {
  background: linear-gradient(90deg, var(--obsidian) 0%, var(--accent) 100%);
}

.bar-score {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  text-align: right;
  color: var(--ink-secondary);
}

.bar-item.is-cyberedu .bar-score {
  color: var(--accent);
}

/* Signal Matrix */
.matrix-panel {
  overflow-x: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}

.matrix-legend {
  font-family: var(--font-mono);
  font-size: 0.71rem;
  color: var(--ink-muted);
  padding-top: 4px;
}

.mini-matrix tbody tr {
  transition: background 0.18s var(--ease);
}

.mini-matrix tbody tr:not(.row-highlight):hover td {
  background: var(--bg);
}

.mini-matrix {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.mini-matrix th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
  padding: 0 8px 14px;
  border-bottom: 1px solid var(--border);
}

.mini-matrix td {
  padding: 13px 8px;
  border-bottom: 1px solid var(--surface-subtle);
  color: var(--ink-secondary);
}

.mini-matrix tr:last-child td {
  border-bottom: none;
}

.row-highlight td {
  background: #f8fbff;
  color: var(--ink);
}

.pill {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.71rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

.pill-good {
  background: var(--emerald-soft);
  color: #047857;
}

.pill-accent {
  background: var(--accent-soft);
  color: var(--accent);
}

.pill-warn {
  background: var(--amber-soft);
  color: var(--amber);
}

.sym-yes {
  color: var(--emerald);
  font-size: 1rem;
  text-align: center;
}

.sym-mid {
  color: var(--amber);
  font-size: 0.95rem;
  text-align: center;
}

.sym-no {
  color: var(--border-strong);
  text-align: center;
}

.mini-matrix th:nth-child(4),
.mini-matrix th:nth-child(5) {
  text-align: center;
}

/* ==========================================================================
   04 / ARCHITECTURE & 0Đ MODEL
   ========================================================================== */
.arch-bento {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 20px;
}

.arch-stack-card,
.pillars-card,
.hardening-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.card-kicker {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  margin-bottom: 16px;
}

.layer-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.layer-row {
  width: 100%;
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
  transition: all 0.22s var(--ease);
}

.layer-row:hover {
  border-color: var(--ink-muted);
}

.layer-row.is-active {
  background: var(--obsidian);
  border-color: var(--obsidian);
  color: #ffffff;
}

.layer-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.layer-row.is-active .layer-num {
  color: #60a5fa;
}

.layer-name {
  font-size: 0.9rem;
  font-weight: 700;
}

.layer-tech {
  font-family: var(--font-mono);
  font-size: 0.73rem;
  color: var(--ink-muted);
}

.layer-row.is-active .layer-tech {
  color: #cbd5e1;
}

.layer-detail {
  margin-top: 16px;
  padding: 14px 16px;
  background: var(--surface-subtle);
  border-radius: var(--radius-md);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.84rem;
  color: var(--ink-secondary);
}

.layer-detail-dot {
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.arch-right-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.pillars-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.pillar-box {
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
  border: 1px solid var(--border);
}

.pillar-box-dark {
  background: var(--obsidian);
  border-color: var(--obsidian);
  color: #ffffff;
}

.pillar-val {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.pillar-desc {
  font-size: 0.78rem;
  color: var(--ink-secondary);
  line-height: 1.45;
}

.pillar-box-dark .pillar-desc {
  color: #cbd5e1;
}

.flag-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sec-chip {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--ink);
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  padding: 6px 11px;
  border-radius: 8px;
}

/* ==========================================================================
   05 / 4-LEVEL ROADMAP & 6 LABS
   ========================================================================== */
.levels-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.level-card {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.level-card-dark {
  background: var(--obsidian);
  border-color: var(--obsidian);
  color: #ffffff;
}

.level-step {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.level-card-dark .level-step {
  color: #60a5fa;
}

.level-card h3 {
  margin: 8px 0 6px;
  font-size: 1.05rem;
  font-weight: 700;
}

.level-card p {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--ink-muted);
}

.level-card-dark p {
  color: #94a3b8;
}

.labs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.lab-card {
  display: block;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: transform 0.22s var(--ease), border-color 0.22s var(--ease), box-shadow 0.22s var(--ease);
}

.lab-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.lab-card-playable {
  border-color: rgba(37, 99, 235, 0.45);
  background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
}

.lab-card-playable:hover {
  border-color: var(--accent);
}

.lab-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.lab-id {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.lab-card-playable .lab-id {
  color: var(--accent);
}

.lab-time {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-secondary);
  background: var(--surface-subtle);
  padding: 2px 8px;
  border-radius: 5px;
}

.lab-card-playable .lab-time {
  background: var(--obsidian);
  color: #ffffff;
}

.lab-card h4 {
  margin: 0 0 6px;
  font-size: 0.96rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.lab-card p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--ink-secondary);
}

/* ==========================================================================
   06 / TEAM & ECOSYSTEM
   ========================================================================== */
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.member-card {
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: transform 0.22s var(--ease), border-color 0.22s var(--ease);
}

.member-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
}

.member-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.member-avatar {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--obsidian);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  display: grid;
  place-items: center;
}

.member-id {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-muted);
  background: var(--surface-subtle);
  padding: 3px 8px;
  border-radius: 6px;
}

.member-card h3 {
  margin: 0 0 6px;
  font-size: 0.96rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.member-card p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--ink-secondary);
  line-height: 1.48;
}

.ecosystem-strip {
  margin-top: 20px;
  padding: 18px 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.eco-title {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
}

.eco-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.eco-pill {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-secondary);
  background: var(--surface-subtle);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
}

.eco-pill.is-current {
  background: var(--obsidian);
  color: #ffffff;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  padding: 28px 0 48px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--ink-muted);
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.footer-left strong {
  color: var(--ink);
}

.footer-right {
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

/* ==========================================================================
   REVEAL ANIMATIONS
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 1024px) {
  .compare-layout,
  .arch-bento {
    grid-template-columns: 1fr;
  }

  .shift-grid,
  .levels-row,
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .labs-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 860px) {
  .ws-grid {
    grid-template-columns: 1fr;
  }

  .ws-docs {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
}

@media (max-width: 768px) {
  .site-header {
    padding: 10px 14px;
  }

  .nav-shell {
    position: relative;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 10px;
    flex-direction: column;
    align-items: stretch;
    box-shadow: var(--shadow-md);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    padding: 10px 14px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .btn-nav,
  .brand-tag {
    display: none;
  }

  .hero {
    padding: 46px 0 36px;
  }

  .kpi-strip {
    grid-template-columns: repeat(2, 1fr);
    margin-top: 40px;
  }

  .kpi-item:nth-child(2) {
    border-right: none;
  }

  .kpi-item:nth-child(1),
  .kpi-item:nth-child(2) {
    border-bottom: 1px solid var(--border);
  }

  .section {
    padding: 52px 0;
  }

  .shift-grid,
  .levels-row,
  .labs-grid,
  .team-grid,
  .pillars-grid {
    grid-template-columns: 1fr;
  }

  .bar-item {
    grid-template-columns: 104px 1fr 34px;
  }

  .layer-row {
    grid-template-columns: 28px 1fr;
  }

  .layer-tech {
    grid-column: 2;
  }

  .loop-arrow {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
