/* ==============================================================================
   YUME SKILLS HUB - DESIGN SYSTEM & STYLESHEET
   Domain: skills.yume.tech
   Author: Yume Tech Engineering Team
   Aesthetic: Cyberpunk Precision / Terminal Engineering
   ============================================================================== */

:root {
  /* Color Palette - Dark Cyber (Default) */
  --bg-primary: #07090e;
  --bg-secondary: #0d1117;
  --bg-tertiary: #141a24;
  --bg-elevated: #1b2332;
  --bg-glass: rgba(13, 17, 23, 0.85);

  --border-subtle: #212836;
  --border-medium: #303b50;
  --border-accent: rgba(0, 240, 255, 0.35);

  --text-main: #f0f6fc;
  --text-muted: #8b949e;
  --text-dim: #586069;

  --cyan: #00f0ff;
  --cyan-glow: rgba(0, 240, 255, 0.25);
  --cyan-dim: rgba(0, 240, 255, 0.12);

  --emerald: #00f5a0;
  --emerald-glow: rgba(0, 245, 160, 0.25);
  --emerald-dim: rgba(0, 245, 160, 0.12);

  --purple: #a855f7;
  --purple-glow: rgba(168, 85, 247, 0.25);
  --purple-dim: rgba(168, 85, 247, 0.12);

  --amber: #f59e0b;
  --amber-dim: rgba(245, 158, 11, 0.15);

  --red: #ef4444;
  --red-dim: rgba(239, 68, 68, 0.15);

  /* Typography */
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  --font-heading: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Spacing Grid (8pt System) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-cyber: 0 0 20px rgba(0, 240, 255, 0.12);
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

[data-theme="light"] {
  --bg-primary: #f6f8fa;
  --bg-secondary: #ffffff;
  --bg-tertiary: #eaeef2;
  --bg-elevated: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.9);

  --border-subtle: #d0d7de;
  --border-medium: #afb8c1;
  --border-accent: rgba(0, 140, 255, 0.4);

  --text-main: #1f2328;
  --text-muted: #57606a;
  --text-dim: #8c959f;

  --cyan: #0969da;
  --cyan-glow: rgba(9, 105, 218, 0.15);
  --cyan-dim: rgba(9, 105, 218, 0.08);

  --emerald: #1a7f37;
  --emerald-glow: rgba(26, 127, 55, 0.15);
  --emerald-dim: rgba(26, 127, 55, 0.08);

  --purple: #8250df;
  --purple-glow: rgba(130, 80, 223, 0.15);
  --purple-dim: rgba(130, 80, 223, 0.08);

  --amber: #9a6700;
  --amber-dim: rgba(154, 103, 0, 0.1);

  --red: #cf222e;
  --red-dim: rgba(207, 34, 46, 0.1);

  --shadow-cyber: 0 4px 20px rgba(9, 105, 218, 0.1);
  --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.08);
}

/* ==============================================================================
   Reset & Global Baseline
   ============================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(0, 240, 255, 0.03) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(168, 85, 247, 0.03) 0%, transparent 40%),
    linear-gradient(to right, rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 32px 32px, 32px 32px;
}

a {
  color: var(--cyan);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  text-decoration: underline;
}

code, pre {
  font-family: var(--font-mono);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

/* ==============================================================================
   System Telemetry Bar (Top)
   ============================================================================== */
.system-telemetry-bar {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  position: relative;
  z-index: 100;
}

.telemetry-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px var(--space-6);
  flex-wrap: wrap;
  gap: var(--space-3);
}

.telemetry-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.telemetry-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 8px var(--emerald);
  animation: pulse-telemetry 2s infinite ease-in-out;
}

@keyframes pulse-telemetry {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.telemetry-badge {
  background: var(--cyan-dim);
  color: var(--cyan);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-accent);
  font-weight: 600;
}

/* ==============================================================================
   Main Header & Navigation
   ============================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--transition-normal);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
}

.logo-symbol {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 18px;
  box-shadow: 0 0 14px var(--cyan-glow);
}

.brand-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 20px;
  color: var(--text-main);
  letter-spacing: -0.5px;
}

.brand-title .brand-sub {
  color: var(--cyan);
  font-weight: 600;
}

.brand-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-medium);
  color: var(--text-muted);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.nav-link {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
  padding: 6px 0;
  position: relative;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-main);
  text-decoration: none;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--cyan);
  border-radius: var(--radius-full);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.btn-ctrl {
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  color: var(--text-main);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-ctrl:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.btn-quick-install {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--cyan);
  color: #07090e;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 13px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 0 12px var(--cyan-glow);
}

.btn-quick-install:hover {
  background: #38f4ff;
  transform: translateY(-1px);
  box-shadow: 0 0 18px var(--cyan-glow);
}

.mobile-menu-toggle {
  display: none;
}

/* ==============================================================================
   Hero Section
   ============================================================================== */
.hero-section {
  padding: var(--space-16) 0 var(--space-12);
  position: relative;
}

.hero-content {
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-accent);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--cyan);
  margin-bottom: var(--space-6);
  box-shadow: 0 0 12px var(--cyan-dim);
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 1.6rem + 2.5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1.2px;
  margin-bottom: var(--space-6);
  color: var(--text-main);
}

.gradient-text {
  background: linear-gradient(135deg, var(--cyan) 0%, #38bdf8 50%, var(--purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: clamp(1.05rem, 0.95rem + 0.5vw, 1.25rem);
  color: var(--text-muted);
  max-width: 780px;
  margin: 0 auto var(--space-8);
  line-height: 1.7;
}

.hero-desc strong {
  color: var(--text-main);
}

.hero-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-12);
}

.metric-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  text-align: center;
  transition: all var(--transition-fast);
}

.metric-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-cyber);
}

.metric-number {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 700;
  color: var(--cyan);
  margin-bottom: 2px;
}

.metric-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

/* ==============================================================================
   Master Installation Hub (Interactive Multi-Platform Box)
   ============================================================================== */
.install-hub-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card), var(--shadow-cyber);
  overflow: hidden;
  margin-bottom: var(--space-16);
  position: relative;
}

.install-hub-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--purple), var(--emerald));
}

.hub-header {
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
  background: var(--bg-tertiary);
}

.hub-title {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
}

.hub-title-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--emerald);
  background: var(--emerald-dim);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0, 245, 160, 0.3);
}

.platform-tabs {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  padding: var(--space-3) var(--space-6);
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-subtle);
}

.tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--text-main);
  background: var(--bg-elevated);
}

.tab-btn.active {
  background: var(--bg-secondary);
  color: var(--cyan);
  border-color: var(--border-accent);
  box-shadow: 0 0 10px var(--cyan-dim);
}

.tab-pane {
  display: none;
  padding: var(--space-6);
}

.tab-pane.active {
  display: block;
  animation: fadeIn 200ms ease;
}

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

.command-box {
  background: #040608;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  position: relative;
  overflow: hidden;
}

.command-box code {
  color: #38bdf8;
  font-size: 14px;
  line-height: 1.5;
  word-break: break-all;
  user-select: all;
}

.command-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

.btn-copy {
  background: var(--bg-elevated);
  border: 1px solid var(--border-medium);
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.btn-copy:hover {
  background: var(--cyan);
  color: #040608;
  border-color: var(--cyan);
  box-shadow: 0 0 10px var(--cyan-glow);
}

.btn-copy.copied {
  background: var(--emerald) !important;
  color: #040608 !important;
  border-color: var(--emerald) !important;
}

.btn-sim-run {
  background: var(--purple-dim);
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #d8b4fe;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.btn-sim-run:hover {
  background: var(--purple);
  color: #ffffff;
  border-color: var(--purple);
  box-shadow: 0 0 10px var(--purple-glow);
}

.install-notes {
  margin-top: var(--space-4);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-3);
  font-size: 13px;
  color: var(--text-muted);
}

.note-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.note-item svg {
  color: var(--cyan);
  flex-shrink: 0;
  margin-top: 3px;
}

/* ==============================================================================
   Live Interactive Terminal Simulator
   ============================================================================== */
.terminal-section {
  padding: var(--space-12) 0;
}

.section-head {
  text-align: center;
  margin-bottom: var(--space-10);
}

.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--space-2);
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 1.4rem + 1.2vw, 2.5rem);
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.5px;
}

.section-desc {
  color: var(--text-muted);
  max-width: 650px;
  margin: var(--space-2) auto 0;
  font-size: 15px;
}

.terminal-window {
  background: #05070a;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 25px rgba(0, 240, 255, 0.08);
  overflow: hidden;
  font-family: var(--font-mono);
}

.terminal-titlebar {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.terminal-controls {
  display: flex;
  gap: 8px;
}

.term-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.term-dot.red { background: #ff5f56; }
.term-dot.yellow { background: #ffbd2e; }
.term-dot.green { background: #27c93f; }

.terminal-session-info {
  font-size: 12px;
  color: var(--text-muted);
}

.terminal-presets {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  padding: var(--space-3) var(--space-5);
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-subtle);
}

.preset-chip {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.preset-chip:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  background: var(--cyan-dim);
}

.terminal-body {
  padding: var(--space-5);
  min-height: 340px;
  max-height: 480px;
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.6;
}

.term-line {
  margin-bottom: 4px;
  word-break: break-all;
}

.term-line.cmd { color: #f0f6fc; font-weight: 600; }
.term-line.info { color: #38bdf8; }
.term-line.success { color: #4ade80; }
.term-line.warn { color: #fbbf24; }
.term-line.purple { color: #c084fc; }
.term-line.dim { color: #64748b; }
.term-line.cyan { color: #00f0ff; }

.term-prompt {
  color: var(--emerald);
  margin-right: 8px;
}

.terminal-input-bar {
  display: flex;
  align-items: center;
  padding: var(--space-3) var(--space-5);
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
}

.terminal-input-bar input {
  background: transparent;
  border: none;
  outline: none;
  color: #f0f6fc;
  font-family: var(--font-mono);
  font-size: 13px;
  width: 100%;
}

/* ==============================================================================
   8 Specialist Disciplines (Master Skill Index)
   ============================================================================== */
.disciplines-section {
  padding: var(--space-16) 0;
}

.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-8);
  flex-wrap: wrap;
  gap: var(--space-4);
}

.search-input-wrap {
  position: relative;
  min-width: 280px;
}

.search-input-wrap input {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 10px 14px 10px 38px;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition-fast);
}

.search-input-wrap input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 10px var(--cyan-dim);
}

.search-input-wrap svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
}

.disciplines-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: var(--space-6);
}

.discipline-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.discipline-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow-cyber);
}

.disc-head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.disc-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--cyan-dim);
  border: 1px solid var(--border-accent);
  color: var(--cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.disc-title {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 700;
  color: var(--text-main);
}

.disc-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: var(--space-4);
  line-height: 1.5;
}

.skills-pill-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.skill-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 3px 7px;
  border-radius: var(--radius-sm);
}

.skill-pill.highlight {
  background: var(--cyan-dim);
  border-color: var(--cyan);
  color: var(--cyan);
}

/* ==============================================================================
   6 Hard Architectural Gates
   ============================================================================== */
.gates-section {
  padding: var(--space-16) 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.gates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: var(--space-6);
}

.gate-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  position: relative;
  transition: all var(--transition-fast);
}

.gate-card:hover {
  border-color: var(--emerald);
  box-shadow: 0 0 15px var(--emerald-dim);
}

.gate-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--emerald);
  background: var(--emerald-dim);
  border: 1px solid rgba(0, 245, 160, 0.3);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  display: inline-block;
  margin-bottom: var(--space-3);
}

.gate-title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: var(--space-3);
}

.gate-body {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.6;
}

.gate-body ul {
  padding-left: 20px;
  margin-top: 8px;
}

.gate-body li {
  margin-bottom: 4px;
}

/* ==============================================================================
   6 Execution Modes
   ============================================================================== */
.modes-section {
  padding: var(--space-16) 0;
}

.modes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: var(--space-6);
}

.mode-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.mode-letter {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--purple);
  background: var(--purple-dim);
  border: 1px solid rgba(168, 85, 247, 0.3);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  display: inline-block;
  margin-bottom: var(--space-3);
}

.mode-name {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: var(--space-2);
}

.mode-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}

.mode-command {
  background: #040608;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #38bdf8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.mode-command span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-mini-copy {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
}

.btn-mini-copy:hover {
  color: var(--cyan);
}

/* ==============================================================================
   File-First Artifacts Explorer (`docs/architecture/`)
   ============================================================================== */
.artifacts-section {
  padding: var(--space-16) 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.artifacts-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: var(--space-6);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.file-tree-sidebar {
  border-right: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
  padding: var(--space-5);
}

.tree-folder-title {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--cyan);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: var(--space-4);
}

.tree-file-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tree-file-item {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-fast);
}

.tree-file-item:hover {
  background: var(--bg-elevated);
  color: var(--text-main);
}

.tree-file-item.active {
  background: var(--cyan-dim);
  color: var(--cyan);
  border-left: 2px solid var(--cyan);
}

.file-preview-pane {
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  background: #05070a;
}

.file-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border-subtle);
}

.file-badge-info {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--emerald);
}

.file-preview-content {
  font-family: var(--font-mono);
  font-size: 13px;
  color: #e6edf3;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-y: auto;
  max-height: 400px;
}

/* ==============================================================================
   Raw SKILL.md Inspector Section
   ============================================================================== */
.raw-skill-section {
  padding: var(--space-16) 0;
}

.raw-skill-box {
  background: #05070a;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.raw-skill-header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
  padding: var(--space-4) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.raw-header-left {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.raw-search-input {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 12px;
  outline: none;
}

.raw-search-input:focus {
  border-color: var(--cyan);
}

.raw-code-container {
  max-height: 550px;
  overflow-y: auto;
  padding: var(--space-5);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  color: #d1d7e0;
  background: #040508;
}

/* ==============================================================================
   REST API & Deployment Endpoints
   ============================================================================== */
.endpoints-section {
  padding: var(--space-16) 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
}

.endpoints-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-4);
}

.endpoint-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.endpoint-method {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: var(--radius-sm);
  background: var(--emerald-dim);
  color: var(--emerald);
  border: 1px solid rgba(0, 245, 160, 0.3);
}

.endpoint-path {
  font-family: var(--font-mono);
  font-size: 13px;
  color: #38bdf8;
  margin-left: 8px;
}

/* ==============================================================================
   Footer
   ============================================================================== */
.site-footer {
  background: #040608;
  border-top: 1px solid var(--border-subtle);
  padding: var(--space-12) 0 var(--space-8);
  color: var(--text-muted);
  font-size: 14px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-6);
  margin-bottom: var(--space-8);
}

.footer-copy {
  font-size: 13px;
  color: var(--text-dim);
}

/* ==============================================================================
   Responsive Queries
   ============================================================================== */
@media (max-width: 900px) {
  .artifacts-layout {
    grid-template-columns: 1fr;
  }
  
  .file-tree-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
  }

  .main-nav {
    display: none;
  }
}

@media (max-width: 640px) {
  .header-actions .btn-quick-install {
    display: none;
  }
  
  .command-box {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .command-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .disciplines-grid, .gates-grid, .modes-grid {
    grid-template-columns: 1fr;
  }
}
