/* ==========================================================================
   FLATLAND — 2D Autonomous World Simulation
   Theme inspired by Omarchy (Beautiful, fun & agentic)
   Open-Source ALife Ecosystem
   ========================================================================== */

:root, [data-theme="tokyo-night"] {
  --bg: #0f111a;
  --bg-subtle: #141724;
  --surface: #1a1d2d;
  --surface-hover: #22263a;
  --surface-active: #2a3048;
  --border-subtle: #24293d;
  --border-strong: #3b4261;
  --text: #c0caf5;
  --text-secondary: #7982a9;
  --text-muted: #565f89;
  --brand: #7aa2f7;
  --brand-dim: #3d59a1;
  --primary: #c0caf5;
  --primary-foreground: #0f111a;
  --accent-green: #9ece6a;
  --accent-red: #f7768e;
  --accent-yellow: #e0af68;
  --accent-cyan: #7dcfff;
  --accent-purple: #bb9af7;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Consolas, Menlo, monospace;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --dither-color: rgba(122, 162, 247, 0.08);
}

[data-theme="hackerman"] {
  --bg: #050a07;
  --bg-subtle: #08120c;
  --surface: #0e1c14;
  --surface-hover: #14281d;
  --surface-active: #1a3426;
  --border-subtle: rgba(104, 255, 155, 0.15);
  --border-strong: rgba(104, 255, 155, 0.38);
  --text: #d9ffe5;
  --text-secondary: #8bb899;
  --text-muted: #4e7359;
  --brand: #68ff9b;
  --brand-dim: #2f8a4f;
  --primary: #68ff9b;
  --primary-foreground: #020905;
  --accent-green: #68ff9b;
  --accent-red: #ff7b72;
  --accent-yellow: #facc15;
  --accent-cyan: #38bdf8;
  --accent-purple: #c084fc;
  --dither-color: rgba(104, 255, 155, 0.08);
}

[data-theme="nord"] {
  --bg: #14171e;
  --bg-subtle: #1a1e27;
  --surface: #222733;
  --surface-hover: #29303f;
  --surface-active: #323b4d;
  --border-subtle: #2e3440;
  --border-strong: #434c5e;
  --text: #eceff4;
  --text-secondary: #d8dee9;
  --text-muted: #616e88;
  --brand: #88c0d0;
  --brand-dim: #5e81ac;
  --primary: #88c0d0;
  --primary-foreground: #14171e;
  --accent-green: #a3be8c;
  --accent-red: #bf616a;
  --accent-yellow: #ebcb8b;
  --accent-cyan: #8fbcbb;
  --accent-purple: #b48ead;
  --dither-color: rgba(136, 192, 208, 0.08);
}

[data-theme="retro"] {
  --bg: #191716;
  --bg-subtle: #201e1c;
  --surface: #2a2624;
  --surface-hover: #36312e;
  --surface-active: #453e3a;
  --border-subtle: #3a3430;
  --border-strong: #524a44;
  --text: #f2e9e1;
  --text-secondary: #c9b9af;
  --text-muted: #7c726a;
  --brand: #fabd2f;
  --brand-dim: #b57614;
  --primary: #fabd2f;
  --primary-foreground: #191716;
  --accent-green: #b8bb26;
  --accent-red: #fb4934;
  --accent-yellow: #fabd2f;
  --accent-cyan: #83a598;
  --accent-purple: #d3869b;
  --dither-color: rgba(250, 189, 47, 0.08);
}

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

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

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color 0.2s, color 0.2s;
  position: relative;
}

/* Omarchy Pixel Scatter Background Pattern */
.pixel-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: 
    radial-gradient(var(--dither-color) 1px, transparent 1px),
    radial-gradient(var(--dither-color) 1px, transparent 1px);
  background-size: 24px 24px;
  background-position: 0 0, 12px 12px;
  opacity: 0.85;
}

/* Ambient Autonomous Creatures Background Canvas */
.bg-creatures-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  opacity: 0.65;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

code, .code-inline {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--bg-subtle);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  color: var(--brand);
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   Header & Nav (Omarchy Pixel Container Style)
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(15, 17, 26, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 0.2s, border-color 0.2s;
}

[data-theme="hackerman"] .site-header {
  background-color: rgba(5, 10, 7, 0.88);
}
[data-theme="nord"] .site-header {
  background-color: rgba(20, 23, 30, 0.88);
}
[data-theme="retro"] .site-header {
  background-color: rgba(25, 23, 22, 0.88);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 58px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
  gap: 16px;
  width: 100%;
  box-sizing: border-box;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text);
  flex-shrink: 0;
  white-space: nowrap;
}

.brand-mark svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 6px 7px;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}

.nav-link:hover {
  color: var(--text);
  background-color: var(--surface);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

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

.mobile-nav-drawer {
  display: none;
  background: var(--surface);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  padding: 12px 20px 20px;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.45);
}

.mobile-nav-drawer.open {
  display: block;
}

.mobile-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 0;
}

.mobile-nav-link {
  display: block;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.15s;
}

.mobile-nav-link:hover,
.mobile-nav-link:focus {
  color: var(--text);
  background-color: var(--bg-subtle);
}

.mobile-nav-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 8px 0;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  border: 1px solid transparent;
  transition: all 0.15s;
}

.icon-btn:hover {
  color: var(--text);
  background-color: var(--surface);
  border-color: var(--border-subtle);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--primary);
  color: var(--primary-foreground);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  transition: transform 0.15s, opacity 0.15s;
  white-space: nowrap;
}

.btn-primary:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
  white-space: nowrap;
}

.btn-secondary:hover {
  background-color: var(--surface-hover);
  border-color: var(--brand);
}

/* ==========================================================================
   Hero Section (Omarchy Center Wordmark & Retro Ethos)
   ========================================================================== */
.hero {
  padding: 64px 0 54px 0;
  text-align: center;
}

.announcement-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 12px;
  margin-bottom: 32px;
  transition: all 0.15s;
}

.announcement-pill:hover {
  border-color: var(--brand);
  color: var(--text);
}

.announcement-pill .pill-badge {
  background: var(--brand);
  color: var(--bg);
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
}

/* Big Pixel Wordmark Header */
.wordmark-wrap {
  margin: 0 auto 28px auto;
  max-width: 680px;
}

.pixel-wordmark {
  font-family: var(--font-mono);
  font-size: clamp(48px, 8.5vw, 92px);
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  color: var(--primary);
  text-shadow: 
    0 2px 0 var(--border-strong),
    0 4px 18px rgba(0, 0, 0, 0.6);
  user-select: none;
}

.hero-tagline {
  font-size: clamp(22px, 3.2vw, 32px);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

.hero-desc {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto 36px auto;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

/* Quick Clone Terminal Box */
.terminal-box {
  max-width: 680px;
  margin: 0 auto 48px auto;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.terminal-cmd {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.terminal-prompt {
  color: var(--brand);
  user-select: none;
}

.copy-btn {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 10px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
}

.copy-btn:hover {
  background: var(--surface-hover);
  color: var(--text);
  border-color: var(--brand);
}

/* ==========================================================================
   Hero Viewport / High-Resolution Simulation Mockup
   ========================================================================== */
.viewport-frame {
  max-width: 1080px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.7);
}

.viewport-bar {
  background: var(--bg-subtle);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 11px;
  gap: 8px;
  overflow: hidden;
  min-width: 0;
}

.window-dots {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.window-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--border-strong);
}

.viewport-url {
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1 1 auto;
  text-align: center;
}

.viewport-status {
  color: var(--accent-green);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  white-space: nowrap;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
}

.viewport-canvas-wrap {
  position: relative;
  background: #000000;
  cursor: pointer;
}

.viewport-canvas-wrap img {
  width: 100%;
  height: auto;
  display: block;
}

/* ==========================================================================
   Sections & Layout
   ========================================================================== */
.section {
  padding: 80px 0;
  border-top: 1px solid var(--border-subtle);
  position: relative;
  z-index: 1;
  scroll-margin-top: 68px;
}

.section-head {
  max-width: 680px;
  margin: 0 auto 48px auto;
  text-align: center;
}

.section-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 10px;
}

.section-title {
  font-size: clamp(24px, 3.5vw, 34px);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 14px;
}

.section-desc {
  font-size: 15px;
  color: var(--text-secondary);
}

/* ==========================================================================
   Interactive Mini Simulation Sandbox
   ========================================================================== */
.sandbox-card {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5);
}

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

.sandbox-btns {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.chip-btn {
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s;
}

.chip-btn:hover, .chip-btn.active {
  color: var(--text);
  border-color: var(--brand);
  background: var(--surface-hover);
}

.sandbox-viewport {
  position: relative;
  width: 100%;
  height: 360px;
  background: #08090d;
  cursor: crosshair;
}

#alife-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.canvas-caption {
  position: absolute;
  bottom: 10px;
  left: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  pointer-events: none;
}

/* ==========================================================================
   Open Source Principles (3-Col Grid)
   ========================================================================== */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-box {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: all 0.15s;
}

.feature-box:hover {
  border-color: var(--border-strong);
  background: var(--surface-hover);
  transform: translateY(-2px);
}

.feature-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--brand);
  margin-bottom: 8px;
}

.feature-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}

.feature-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ==========================================================================
   Systems & God Laws Architecture Grid
   ========================================================================== */
.systems-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.system-card {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.system-card:hover {
  border-color: var(--brand);
  background: var(--surface-hover);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  transform: translateY(-2px);
}

.system-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.system-card-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--brand);
  text-transform: uppercase;
}

.system-card-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.system-card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.35;
}

.system-card-desc {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 20px;
}

.system-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.system-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text);
  white-space: nowrap;
}

.system-pill.accent {
  border-color: var(--brand-dim);
  color: var(--brand);
}

.system-pill.green {
  border-color: rgba(158, 206, 106, 0.3);
  color: var(--accent-green);
}

.system-pill.red {
  border-color: rgba(247, 118, 142, 0.3);
  color: var(--accent-red);
}

/* ==========================================================================
   Geometric Caste Hierarchy Explorer
   ========================================================================== */
.caste-panel {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.caste-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.caste-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  text-align: left;
  transition: all 0.15s;
}

.caste-btn:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.caste-btn.active {
  background: var(--bg-subtle);
  border-color: var(--brand);
  color: var(--text);
}

.caste-glyph {
  font-family: var(--font-mono);
  font-size: 15px;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: var(--surface-hover);
}

.caste-btn.active .caste-glyph {
  background: var(--brand);
  color: var(--bg);
}

.caste-name {
  font-size: 13px;
  font-weight: 600;
  display: block;
}

.caste-sub {
  font-size: 10px;
  color: var(--text-muted);
}

.caste-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 28px;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  align-items: center;
}

.caste-shape {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}

.caste-shape svg {
  width: 120px;
  height: 120px;
  margin-bottom: 12px;
}

.caste-math {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 6px;
  background: var(--surface-hover);
  border-radius: 3px;
  color: var(--brand);
}

.caste-heading {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.caste-role {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--brand);
  margin-bottom: 12px;
}

.caste-bio {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.caste-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.caste-stat-pill {
  background: var(--surface);
  padding: 8px 10px;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
}

.caste-stat-lbl {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.caste-stat-val {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

/* ==========================================================================
   The Sphere Presets Explorer
   ========================================================================== */
.presets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.preset-chip {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 14px;
  cursor: pointer;
  transition: all 0.15s;
}

.preset-chip:hover {
  border-color: var(--border-strong);
  background: var(--surface-hover);
}

.preset-chip.active {
  border-color: var(--brand);
  background: var(--surface-active);
}

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

.preset-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.preset-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  padding: 1px 5px;
  background: var(--surface-hover);
  border-radius: 3px;
  color: var(--text-muted);
}

.preset-chip.active .preset-tag {
  background: var(--brand);
  color: var(--bg);
}

.preset-desc-short {
  font-size: 11px;
  color: var(--text-secondary);
}

.preset-dashboard {
  background: var(--bg-subtle);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 24px;
}

.preset-dash-title {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--brand);
  margin-bottom: 4px;
}

.preset-dash-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.dash-meters {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.dash-meter {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px;
}

.dash-meter-lbl {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.dash-meter-val {
  color: var(--text);
  font-weight: 700;
}

.dash-track {
  height: 5px;
  background: var(--surface-hover);
  border-radius: 999px;
  overflow: hidden;
}

.dash-fill {
  height: 100%;
  background: var(--brand);
  transition: width 0.3s;
}

/* ==========================================================================
   Screenshots Gallery (Clean Aspect Ratios)
   ========================================================================== */
.gallery-featured {
  margin-bottom: 20px;
}

.gallery-card {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: all 0.2s;
}

.gallery-card:hover {
  border-color: var(--brand);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
  transform: translateY(-2px);
}

.gallery-card img {
  width: 100%;
  height: auto;
  display: block;
}

.gallery-card-foot {
  padding: 12px 18px;
  background: var(--bg-subtle);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 12px;
}

.gallery-card-foot span:first-child {
  color: var(--text);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.gallery-badge {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 3px;
  background: var(--surface-hover);
  border: 1px solid var(--border-strong);
  color: var(--brand);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.gallery-badge.live {
  border-color: rgba(158, 206, 106, 0.4);
  color: var(--accent-green);
}

.gallery-badge.tui {
  border-color: rgba(125, 207, 255, 0.4);
  color: var(--accent-cyan);
}

.gallery-badge.god {
  border-color: rgba(187, 154, 247, 0.4);
  color: var(--accent-purple);
}

.gallery-card-foot span:last-child {
  color: var(--text-muted);
}

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.gallery-grid .gallery-card {
  display: flex;
  flex-direction: column;
}

.gallery-grid .gallery-card img {
  height: 380px;
  object-fit: cover;
  object-position: top center;
}

.gallery-trio {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
}

.gallery-trio .gallery-card {
  display: flex;
  flex-direction: column;
}

.gallery-trio .gallery-card img {
  height: 360px;
  object-fit: cover;
  object-position: top center;
}

.gallery-trio .gallery-card.mobile-card img {
  object-fit: contain;
  background: #07080c;
}

/* ==========================================================================
   Quickstart / Code Block
   ========================================================================== */
.quickstart-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.code-window {
  background: var(--bg-subtle);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 12px;
}

.code-window-bar {
  padding: 8px 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-secondary);
}

.code-body {
  padding: 18px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.code-body .cmd {
  color: var(--text);
  font-weight: 600;
}

.code-body .hl {
  color: var(--brand);
}

.code-body .cmt {
  color: var(--text-muted);
}

/* ==========================================================================
   CTA Banner
   ========================================================================== */
.cta-box {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 54px 24px;
  text-align: center;
}

.cta-box h2 {
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 12px;
}

.cta-box p {
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto 30px auto;
  font-size: 15px;
}

/* ==========================================================================
   Bottom Music Player & Theme Key Indicator (Omarchy Style)
   ========================================================================== */
.omarchy-audio-badge {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(15, 17, 26, 0.9);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  backdrop-filter: blur(12px);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  cursor: pointer;
  user-select: none;
  transition: all 0.15s;
}

.omarchy-audio-badge:hover {
  border-color: var(--brand);
  color: var(--text);
}

.sound-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
  width: 14px;
}

.sound-bar {
  width: 2px;
  background: var(--brand);
  height: 3px;
  transition: height 0.2s;
}

.omarchy-audio-badge.playing .sound-bar:nth-child(1) { animation: sound1 0.6s infinite alternate; }
.omarchy-audio-badge.playing .sound-bar:nth-child(2) { animation: sound2 0.8s infinite alternate; }
.omarchy-audio-badge.playing .sound-bar:nth-child(3) { animation: sound3 0.5s infinite alternate; }
.omarchy-audio-badge.playing .sound-bar:nth-child(4) { animation: sound4 0.7s infinite alternate; }

@keyframes sound1 { 0% { height: 2px; } 100% { height: 12px; } }
@keyframes sound2 { 0% { height: 3px; } 100% { height: 10px; } }
@keyframes sound3 { 0% { height: 1px; } 100% { height: 12px; } }
@keyframes sound4 { 0% { height: 4px; } 100% { height: 8px; } }

/* Theme Indicator Toast */
.theme-hint {
  position: fixed;
  top: 72px;
  right: 20px;
  padding: 6px 12px;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  z-index: 90;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}

.theme-hint.show {
  opacity: 1;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 48px 0 32px 0;
  background: var(--bg-subtle);
  font-size: 13px;
}

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

.footer-links {
  display: flex;
  gap: 20px;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 12px;
}

.footer-links a {
  color: var(--text-secondary);
}

.footer-links a:hover {
  color: var(--text);
}

.footer-credit {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.6;
}

.footer-credit a {
  color: var(--brand);
}

/* ==========================================================================
   Modal Lightbox
   ========================================================================== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal.open {
  display: flex;
}

.modal-content {
  max-width: 1200px;
  max-height: 90vh;
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-strong);
}

.modal-content img {
  width: 100%;
  height: auto;
  max-height: 85vh;
  object-fit: contain;
  display: block;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.demo-short-text { display: none; }
.demo-full-text { display: inline; }

/* Responsive */
@media (max-width: 1060px) {
  .nav-menu { display: none !important; }
  .mobile-menu-toggle { display: inline-flex !important; }
}

@media (max-width: 860px) {
  .grid-3 { grid-template-columns: 1fr; }
  .systems-grid { grid-template-columns: 1fr; }
  .caste-panel { grid-template-columns: 1fr; }
  .caste-card { grid-template-columns: 1fr; }
  .dash-meters { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-trio { grid-template-columns: 1fr; }
  .quickstart-grid { grid-template-columns: 1fr; }
  .omarchy-audio-badge { display: none; }
}

@media (max-width: 560px) {
  .container { padding: 0 16px; }
  .header-inner { height: 52px; padding: 0 12px; gap: 6px; }
  .brand-mark { gap: 6px; }
  .brand-mark span { font-size: 13px; }
  .brand-mark svg { width: 20px; height: 20px; }
  .header-right { gap: 6px; }
  .header-right .icon-btn { width: 32px; height: 32px; }
  .header-right a.icon-btn[aria-label="GitHub Repository"] { display: none; }
  .header-right .btn-primary { padding: 6px 10px; font-size: 11px; gap: 4px; }
  .demo-full-text { display: none; }
  .demo-short-text { display: inline; }
  .viewport-status { display: none; }
  .announcement-pill { max-width: 100%; font-size: 11px; gap: 6px; padding: 4px 10px; }
  .hero-actions { flex-direction: column; width: 100%; }
  .hero-actions a { width: 100%; justify-content: center; }
  .terminal-box { flex-direction: column; align-items: stretch; gap: 8px; width: 100%; max-width: 100%; box-sizing: border-box; }
  .terminal-cmd { font-size: 11px; white-space: normal; word-break: break-all; }
  .copy-btn { width: 100%; padding: 6px; text-align: center; }
  .dash-meters { grid-template-columns: 1fr; }
}
