/* ========================================
   Design Tokens
   ======================================== */
:root {
  --bg: #09090b;
  --bg-subtle: #111113;
  --bg-card: #16161a;
  --bg-card-hover: #1c1c22;
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);
  --text: #fafafa;
  --text-secondary: #a1a1aa;
  --text-tertiary: #52525b;
  --accent: #818cf8;
  --accent-bright: #a5b4fc;
  --accent-dim: #4f46e5;
  --gradient: linear-gradient(135deg, #818cf8, #c084fc, #f472b6);
  --gradient-subtle: linear-gradient(135deg, rgba(129, 140, 248, 0.15), rgba(192, 132, 252, 0.08));
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --radius: 12px;
  --radius-lg: 20px;
  --max-width: 1200px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

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

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ========================================
   Animations
   ======================================== */
.animate-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.animate-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.concept-grid .animate-in:nth-child(2) { transition-delay: 0.1s; }
.concept-grid .animate-in:nth-child(3) { transition-delay: 0.2s; }
.concept-grid .animate-in:nth-child(4) { transition-delay: 0.3s; }
.concept-grid .animate-in:nth-child(5) { transition-delay: 0.4s; }
.concept-grid .animate-in:nth-child(6) { transition-delay: 0.5s; }

.philosophy-grid .animate-in:nth-child(2) { transition-delay: 0.15s; }
.philosophy-grid .animate-in:nth-child(3) { transition-delay: 0.3s; }

/* ========================================
   Typography
   ======================================== */
.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-label {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.section-header h2 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.section-header p {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ========================================
   Navigation
   ======================================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 0;
  transition: all 0.3s ease;
}
.nav-scrolled {
  background: rgba(9, 9, 11, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 16px;
}

.nav-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  color: white;
}

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

.nav-links a {
  font-size: 14px;
  color: var(--text-secondary);
  transition: color 0.2s;
  font-weight: 500;
}
.nav-links a:hover { color: var(--text); }

.nav-cta {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 8px;
  transition: all 0.2s !important;
}
.nav-cta:hover {
  background: var(--bg-card-hover) !important;
  border-color: var(--border-hover) !important;
}

/* ========================================
   Buttons
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font);
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--gradient);
  color: white;
  box-shadow: 0 0 24px rgba(129, 140, 248, 0.25);
}
.btn-primary:hover {
  box-shadow: 0 0 36px rgba(129, 140, 248, 0.4);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

.btn-large {
  padding: 16px 32px;
  font-size: 16px;
  border-radius: 12px;
}

/* ========================================
   Hero
   ======================================== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  position: relative;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  max-width: 100vw;
  height: 600px;
  background: radial-gradient(ellipse, rgba(129, 140, 248, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--accent);
  background: rgba(129, 140, 248, 0.1);
  border: 1px solid rgba(129, 140, 248, 0.2);
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 32px;
}

.hero-title {
  font-size: clamp(48px, 8vw, 80px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin-bottom: 24px;
}

.hero-subtitle {
  font-size: 20px;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Hero Graph Visual */
.hero-visual {
  margin-top: 80px;
  width: 100%;
  max-width: 600px;
  position: relative;
  overflow: hidden;
}

.memory-graph {
  position: relative;
  width: 100%;
  padding-top: 60%;
}

.graph-edges {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.graph-edges line {
  stroke: rgba(129, 140, 248, 0.15);
  stroke-width: 0.3;
}

.graph-node {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  transition: all 0.3s ease;
}
.graph-node::after {
  content: attr(data-label);
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  color: var(--text-tertiary);
  white-space: nowrap;
  font-weight: 500;
}

.node-episode { background: #818cf8; width: 16px; height: 16px; }
.node-fragment { background: #60a5fa; }
.node-person { background: #f472b6; }
.node-belief { background: #a78bfa; }
.node-emotion { background: #fb923c; }
.node-concept { background: #34d399; }
.node-goal { background: #fbbf24; }

.node-pulse {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid rgba(129, 140, 248, 0.4);
  animation: pulse-ring 2s ease-out infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(2.5); opacity: 0; }
}

/* ========================================
   Philosophy
   ======================================== */
.philosophy {
  padding: 100px 0;
  border-top: 1px solid var(--border);
}

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

.philosophy-card {
  padding: 32px;
  border-radius: var(--radius-lg);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}
.philosophy-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.philosophy-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--gradient-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.philosophy-icon svg {
  width: 24px;
  height: 24px;
  color: var(--accent);
}

.philosophy-card h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.philosophy-card p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ========================================
   Memory Stages
   ======================================== */
.memory-section {
  padding: 120px 0;
}

.stages {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.stage {
  display: flex;
  gap: 40px;
  padding: 40px;
  border-radius: var(--radius-lg);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}
.stage:hover {
  border-color: var(--border-hover);
}

.stage-number {
  font-size: 64px;
  font-weight: 800;
  line-height: 1;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0.4;
  flex-shrink: 0;
  width: 80px;
}

.stage-content h3 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.stage-content > p {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 24px;
}

.stage-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.detail {
  display: flex;
  gap: 16px;
  font-size: 14px;
}

.detail-label {
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
  min-width: 200px;
}

.detail-value {
  color: var(--text-secondary);
}

/* ========================================
   Deep Dive Sections
   ======================================== */
.deep-dive {
  padding: 120px 0;
  border-top: 1px solid var(--border);
}
.deep-dive-alt {
  background: var(--bg-subtle);
}

/* Graph Model */
.graph-model-header {
  margin-bottom: 40px;
}
.graph-model-header h3 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.graph-model-header p {
  font-size: 16px;
  color: var(--text-secondary);
}

.node-type-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.node-type-card {
  display: flex;
  gap: 16px;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}
.node-type-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

.node-type-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
}

.node-type-info h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}
.node-type-info p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 10px;
}

.node-type-meta code {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-tertiary);
  background: rgba(255,255,255,0.03);
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-block;
}

/* Salience */
.salience-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.salience-text .section-label { display: block; }
.salience-text h2 {
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}
.salience-text > p {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
}

.formula-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.formula-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 16px;
}

.formula-eq {
  background: rgba(129, 140, 248, 0.06);
  border: 1px solid rgba(129, 140, 248, 0.15);
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 24px;
  overflow-x: auto;
}
.formula-eq code {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent-bright);
  white-space: normal;
  word-break: break-word;
}
.formula-eq code sub {
  font-size: 10px;
}

.formula-components {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.formula-row {
  display: flex;
  gap: 12px;
  font-size: 14px;
}

.formula-label {
  color: var(--text);
  font-weight: 600;
  min-width: 130px;
  flex-shrink: 0;
}

.formula-desc {
  color: var(--text-tertiary);
  line-height: 1.5;
}

/* Retrieval Pipeline */
.pipeline {
  max-width: 720px;
  margin: 0 auto 48px;
}

.pipeline-step {
  display: flex;
  gap: 20px;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  margin-bottom: 16px;
}

.pipeline-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gradient-subtle);
  border: 1px solid rgba(129, 140, 248, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
}

.pipeline-content h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}
.pipeline-content p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 8px;
}
.pipeline-content p:last-child { margin-bottom: 0; }

.ranking-formula {
  background: rgba(129, 140, 248, 0.06);
  border: 1px solid rgba(129, 140, 248, 0.15);
  border-radius: 6px;
  padding: 10px 14px;
  margin: 8px 0;
}
.ranking-formula code {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent-bright);
}

.pipeline-fork {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.pipeline-path {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pipeline-path-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  text-align: center;
}

.pipeline-step-small {
  margin-bottom: 0;
}

.retrieval-config {
  max-width: 720px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.retrieval-config h4 {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.config-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.config-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.config-label {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  font-weight: 500;
}
.config-value {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.config-desc {
  font-size: 12px;
  color: var(--text-tertiary);
}

/* Compression */
.compression-layers {
  max-width: 640px;
  margin: 0 auto 32px;
}

.compression-layer {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 0;
}

.layer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}

.layer-name {
  font-weight: 700;
  font-size: 15px;
}

.layer-budget {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-tertiary);
}

.layer-content {
  padding: 16px 20px;
  background: var(--bg);
}

.layer-example {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  font-style: italic;
}

.layer-desc {
  padding: 10px 20px;
  font-size: 12px;
  color: var(--text-tertiary);
  background: var(--bg-card);
}

.layer-verbatim { border-color: rgba(129, 140, 248, 0.3); }
.layer-verbatim .layer-name { color: var(--accent); }
.layer-key { border-color: rgba(96, 165, 250, 0.3); }
.layer-key .layer-name { color: #60a5fa; }
.layer-summary { border-color: rgba(251, 191, 36, 0.3); }
.layer-summary .layer-name { color: #fbbf24; }
.layer-impression { border-color: rgba(251, 146, 60, 0.3); }
.layer-impression .layer-name { color: #fb923c; }

.compression-arrow {
  text-align: center;
  font-size: 18px;
  color: var(--text-tertiary);
  padding: 8px;
}

.compression-note {
  max-width: 640px;
  margin: 0 auto;
  padding: 20px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.compression-note p {
  font-size: 14px;
  color: var(--text-tertiary);
  line-height: 1.7;
}

/* ========================================
   Westworld Concepts
   ======================================== */
.westworld {
  padding: 120px 0;
  border-top: 1px solid var(--border);
}

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

.concept-card {
  padding: 28px;
  border-radius: var(--radius);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}
.concept-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.concept-icon {
  font-size: 24px;
  margin-bottom: 16px;
  color: var(--accent);
}

.concept-card h4 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
}

.concept-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ========================================
   Reverie Pipeline
   ======================================== */
.reverie-pipeline {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.reverie-step {
  padding: 24px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.reverie-step-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.reverie-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gradient-subtle);
  border: 1px solid rgba(129, 140, 248, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
}

.reverie-step h4 {
  font-size: 16px;
  font-weight: 600;
}

.reverie-step p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
}

.reverie-code {
  margin-top: 12px;
  background: rgba(129, 140, 248, 0.06);
  border: 1px solid rgba(129, 140, 248, 0.12);
  border-radius: 6px;
  padding: 12px 16px;
}
.reverie-code code {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent-bright);
}

/* ========================================
   Temporal Awareness
   ======================================== */
.temporal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.temporal-card {
  padding: 28px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}
.temporal-card:hover { border-color: var(--border-hover); }

.temporal-icon {
  font-size: 28px;
  margin-bottom: 12px;
}

.temporal-card h4 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 10px;
}
.temporal-card > p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 12px;
}

.temporal-periods {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.period {
  display: flex;
  gap: 10px;
  font-size: 12px;
  align-items: baseline;
}
.period-time {
  font-family: var(--mono);
  color: var(--accent);
  min-width: 90px;
  flex-shrink: 0;
  font-weight: 500;
}
.period-ctx {
  color: var(--text-tertiary);
  font-style: italic;
}

.temporal-examples {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.temporal-example {
  font-size: 13px;
  color: var(--text-secondary);
  background: rgba(255,255,255,0.03);
  padding: 8px 12px;
  border-radius: 6px;
  border-left: 2px solid var(--accent-dim);
  font-style: italic;
}

/* ========================================
   Code Block
   ======================================== */
.code-block {
  max-width: 720px;
  margin: 0 auto 48px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}

.code-header {
  padding: 10px 20px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}
.code-file {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-tertiary);
}

.code-block pre {
  padding: 24px;
  background: #0c0c10;
  overflow-x: auto;
  margin: 0;
  -webkit-overflow-scrolling: touch;
}
.code-block code {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 2;
  color: var(--text-secondary);
}

.code-comment { color: #52525b; }
.code-key { color: #a5b4fc; }
.code-fn { color: #c084fc; }
.code-num { color: #fbbf24; }

/* ========================================
   Decay Examples
   ======================================== */
.decay-examples {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.decay-example {
  display: flex;
  align-items: center;
  gap: 16px;
}

.decay-label {
  font-size: 14px;
  color: var(--text-secondary);
  min-width: 340px;
  flex-shrink: 0;
}

.decay-bar-outer {
  flex: 1;
  height: 8px;
  background: rgba(255,255,255,0.04);
  border-radius: 4px;
  overflow: hidden;
}

.decay-bar-inner {
  height: 100%;
  background: var(--gradient);
  border-radius: 4px;
  transition: width 1s ease;
}

.decay-value {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  min-width: 36px;
  text-align: right;
}

/* ========================================
   Architecture
   ======================================== */
.architecture {
  padding: 120px 0;
  border-top: 1px solid var(--border);
}

.arch-diagram {
  margin-bottom: 64px;
}

.arch-layer {
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-subtle);
}
.arch-layer-primary {
  background: var(--gradient-subtle);
  border-color: rgba(129, 140, 248, 0.2);
}

.arch-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tech-tag {
  font-size: 11px;
  background: rgba(129, 140, 248, 0.15);
  color: var(--accent);
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
}

.arch-items {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.arch-item {
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 14px;
  font-weight: 500;
  flex: 1;
  min-width: 140px;
  text-align: center;
}

.item-desc {
  display: block;
  font-size: 11px;
  color: var(--text-tertiary);
  font-weight: 400;
  margin-top: 2px;
}

.arch-arrow {
  text-align: center;
  font-size: 20px;
  color: var(--text-tertiary);
  padding: 8px;
}

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

.tech-card {
  padding: 24px;
  border-radius: var(--radius);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}
.tech-card:hover {
  border-color: var(--border-hover);
}

.tech-card code {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--accent);
  font-weight: 500;
  display: block;
  margin-bottom: 10px;
}

.tech-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ========================================
   Features
   ======================================== */
.features {
  padding: 120px 0;
  border-top: 1px solid var(--border);
}

.feature-rows {
  display: flex;
  flex-direction: column;
  gap: 80px;
}

.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.feature-row-reverse {
  direction: rtl;
}
.feature-row-reverse > * {
  direction: ltr;
}

.feature-text h3 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.feature-text p {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 20px;
}

.feature-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.feature-tags span {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: rgba(129, 140, 248, 0.1);
  padding: 4px 12px;
  border-radius: 100px;
  border: 1px solid rgba(129, 140, 248, 0.2);
}

/* Channel Stack */
.channel-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.channel-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  border-radius: var(--radius);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}
.channel-card:hover { transform: translateX(4px); border-color: var(--border-hover); }

.channel-icon {
  font-size: 24px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--gradient-subtle);
}

.channel-card span {
  font-weight: 600;
  font-size: 16px;
}

.channel-card small {
  color: var(--text-tertiary);
  font-size: 13px;
  margin-left: auto;
}

/* Diary Preview */
.diary-preview {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.diary-date {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 12px;
}

.diary-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
  font-style: italic;
}

/* Diary Visual */
.diary-visual {
  display: flex;
  justify-content: center;
  position: relative;
  height: 300px;
}

.diary-page {
  width: 220px;
  height: 280px;
  background: #1a1a20;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  z-index: 2;
}

.diary-page-back {
  position: absolute;
  top: 10px;
  left: calc(50% + 8px);
  transform: translateX(-50%) rotate(3deg);
  opacity: 0.5;
  z-index: 1;
}

.diary-line {
  height: 2px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 1px;
}
.diary-line.short { width: 60%; }

/* Timeline */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  padding-left: 24px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  display: flex;
  gap: 16px;
  padding: 12px 0;
  position: relative;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -28px;
  top: 18px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-tertiary);
}

.timeline-item-highlight::before {
  background: var(--accent);
  box-shadow: 0 0 8px rgba(129, 140, 248, 0.4);
}

.timeline-time {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-tertiary);
  width: 48px;
  flex-shrink: 0;
}

.timeline-event {
  font-size: 14px;
  color: var(--text-secondary);
}
.timeline-item-highlight .timeline-event {
  color: var(--text);
  font-weight: 500;
}

/* Social Diagram */
.social-diagram {
  position: relative;
  width: 280px;
  height: 280px;
  margin: 0 auto;
}

.social-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--gradient-subtle);
  border: 1px solid rgba(129, 140, 248, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
}

.social-person {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-110px) rotate(calc(-1 * var(--angle)));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.social-dot {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--border);
}

.social-person span {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}

.social-shield {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: var(--text-tertiary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: 100px;
}

/* ========================================
   Personality
   ======================================== */
.personality-section {
  padding: 120px 0;
  border-top: 1px solid var(--border);
}

.personality-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.personality-text .section-label { display: block; }
.personality-text h2 {
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}
.personality-text > p {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
}

.personality-stats {
  display: flex;
  gap: 32px;
  margin-top: 32px;
}

.stat-value {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 13px;
  color: var(--text-tertiary);
}

/* Persona Card */
.persona-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.persona-avatar {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.persona-info {
  padding: 28px;
}

.persona-info h4 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.persona-role {
  font-size: 14px;
  color: var(--text-tertiary);
  margin-bottom: 12px;
}

.persona-bio {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}

.persona-traits {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.trait {
  display: flex;
  align-items: center;
  gap: 12px;
}

.trait-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
  width: 80px;
}

.trait-bar {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  overflow: hidden;
}

.trait-fill {
  height: 100%;
  background: var(--gradient);
  border-radius: 2px;
  transition: width 1s ease;
}

/* ========================================
   Self Knowledge
   ======================================== */
.self-knowledge {
  padding: 120px 0;
  border-top: 1px solid var(--border);
}

.sk-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.sk-card {
  padding: 28px;
  border-radius: var(--radius);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}
.sk-card:hover {
  border-color: var(--border-hover);
}

.sk-category {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 12px;
}

.sk-card p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ========================================
   Stack
   ======================================== */
.stack {
  padding: 120px 0;
  border-top: 1px solid var(--border);
}

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

.stack-item {
  padding: 24px;
  border-radius: var(--radius);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  text-align: center;
  transition: all 0.3s ease;
}
.stack-item:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.stack-name {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.stack-desc {
  font-size: 13px;
  color: var(--text-tertiary);
  line-height: 1.5;
}

/* ========================================
   CTA
   ======================================== */
.cta {
  padding: 120px 0;
}

.cta-inner {
  text-align: center;
  padding: 80px 40px;
  border-radius: var(--radius-lg);
  background: var(--gradient-subtle);
  border: 1px solid rgba(129, 140, 248, 0.15);
  position: relative;
  overflow: hidden;
}

.cta-inner::before {
  content: '';
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(129, 140, 248, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.cta-inner h2 {
  font-size: clamp(32px, 5vw, 44px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 16px;
  position: relative;
}

.cta-inner p {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 32px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
  position: relative;
}

.cta-inner .btn { position: relative; }

/* ========================================
   Footer
   ======================================== */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 14px;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: 14px;
  color: var(--text-tertiary);
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--text); }

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

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 900px) {
  .philosophy-grid { grid-template-columns: 1fr; }
  .concept-grid { grid-template-columns: repeat(2, 1fr); }
  .tech-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-row, .feature-row-reverse { grid-template-columns: 1fr; direction: ltr; }
  .feature-row-reverse > * { direction: ltr; }
  .personality-layout { grid-template-columns: 1fr; }
  .sk-grid { grid-template-columns: 1fr; }
  .stack-grid { grid-template-columns: repeat(2, 1fr); }
  .temporal-grid { grid-template-columns: 1fr; }
  .decay-label { min-width: auto; flex-shrink: 1; }
  .decay-example { flex-wrap: wrap; }
  .decay-bar-outer { min-width: 80px; }
  .node-type-grid { grid-template-columns: 1fr; }
  .reverie-code code { font-size: 11px; }
  .formula-row { flex-direction: column; gap: 4px; }
  .formula-label { min-width: auto; }
  .period { flex-direction: column; gap: 2px; }
  .period-time { min-width: auto; }
  .ranking-formula code { font-size: 11px; word-break: break-all; }
  .salience-layout { grid-template-columns: 1fr; }
  .pipeline-fork { grid-template-columns: 1fr; }
  .config-grid { grid-template-columns: 1fr; }
  .stage { flex-direction: column; gap: 16px; }
  .stage-number { font-size: 48px; width: auto; }
  .detail { flex-direction: column; gap: 4px; }
  .detail-label { min-width: auto; }
  .footer-inner { flex-direction: column; gap: 16px; text-align: center; }
  .nav-links a:not(.nav-cta) { display: none; }
}

@media (max-width: 600px) {
  .concept-grid { grid-template-columns: 1fr; }
  .tech-grid { grid-template-columns: 1fr; }
  .stack-grid { grid-template-columns: 1fr; }
  .personality-stats { flex-direction: column; gap: 16px; }
  .arch-items { flex-direction: column; }
  .arch-item { min-width: auto; }
  .hero { padding: 100px 16px 60px; }
  .hero-title { font-size: 40px; }
  .hero-subtitle { font-size: 16px; }
  .hero-actions { flex-direction: column; align-items: center; }
  .section-header h2 { font-size: 28px; }
  .section-header p { font-size: 16px; }
  .stage { padding: 24px; }
  .detail-label { min-width: auto; white-space: normal; }
  .pipeline-fork { grid-template-columns: 1fr; }
  .config-grid { grid-template-columns: 1fr; }
  .formula-eq { padding: 12px; }
  .formula-eq code { font-size: 11px; }
  .code-block pre { padding: 16px; }
  .code-block code { font-size: 10px; line-height: 1.8; }
  .compression-layer .layer-header { flex-direction: column; gap: 4px; }
  .feature-text h3 { font-size: 22px; }
  .salience-text h2 { font-size: 28px; }
  .personality-text h2 { font-size: 28px; }
  .channel-card small { display: none; }
  .social-diagram { width: 240px; height: 240px; }
  .social-person { transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-90px) rotate(calc(-1 * var(--angle))); }
  .container { padding: 0 16px; }
}
