:root {
  --bg: #050811;
  --bg-elevated: rgba(13, 20, 38, 0.72);
  --border: rgba(120, 175, 255, 0.16);
  --border-bright: rgba(56, 189, 248, 0.45);
  --text: #e6edf7;
  --muted: #93a4c3;
  --accent: #38bdf8;
  --accent-2: #818cf8;
  --accent-3: #34d399;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: radial-gradient(circle at 20% 0%, #0d1b38 0%, var(--bg) 52%);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.65;
  overflow-x: hidden;
  min-height: 100vh;
}

.mono {
  font-family: var(--mono);
}

#cosmos-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  pointer-events: none;
}

.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(56, 189, 248, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at center, black 35%, transparent 88%);
}

.container {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  background: rgba(5, 8, 17, 0.75);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #030712;
  font-family: var(--mono);
  font-weight: 800;
  font-size: 0.9rem;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.35);
}

.brand-mark.small {
  width: 26px;
  height: 26px;
  font-size: 0.75rem;
}

.brand-sub {
  color: var(--accent);
  font-weight: 500;
}

.nav-links {
  display: flex;
  gap: 28px;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.94rem;
  transition: color 0.2s ease;
}

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

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(52, 211, 153, 0.3);
  background: rgba(16, 185, 129, 0.08);
  color: var(--accent-3);
  font-family: var(--mono);
  font-size: 0.78rem;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-3);
  box-shadow: 0 0 10px var(--accent-3);
  animation: pulse 2s infinite;
}

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

/* Hero */
.hero {
  padding: 96px 0 64px;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-bright);
  background: rgba(56, 189, 248, 0.08);
  color: var(--accent);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(2.1rem, 4.8vw, 3.8rem);
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 22px;
}

.gradient-text {
  background: linear-gradient(90deg, #38bdf8 0%, #818cf8 50%, #34d399 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-desc {
  max-width: 700px;
  margin: 0 auto 36px;
  color: var(--muted);
  font-size: 1.08rem;
}

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

.hero-cta {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 26px;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #030712;
  box-shadow: 0 10px 30px rgba(56, 189, 248, 0.28);
}

.btn-ghost {
  border: 1px solid var(--border-bright);
  color: var(--text);
  background: rgba(13, 20, 38, 0.55);
}

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

.metric-card {
  padding: 20px 16px;
  border-radius: 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.metric-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 4px;
}

.metric-label {
  font-size: 0.85rem;
  color: var(--muted);
}

/* Sections */
.section {
  padding: 72px 0;
}

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

.section-tag {
  display: inline-block;
  color: var(--accent);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.section-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 10px;
}

.section-head p {
  color: var(--muted);
}

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

.glass-card {
  padding: 28px;
  border-radius: 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  backdrop-filter: blur(14px);
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.glass-card:hover {
  border-color: var(--border-bright);
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(3, 8, 22, 0.65);
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent);
  margin-bottom: 18px;
}

.card-icon svg {
  width: 22px;
  height: 22px;
}

.glass-card h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.glass-card p {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 18px;
}

.card-tag {
  display: inline-block;
  font-size: 0.76rem;
  color: var(--accent-3);
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(52, 211, 153, 0.09);
  border: 1px solid rgba(52, 211, 153, 0.22);
}

/* Architecture */
.arch-flow {
  display: flex;
  align-items: stretch;
  gap: 14px;
}

.arch-node {
  flex: 1;
  padding: 24px;
  border-radius: 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}

.arch-step {
  font-size: 0.75rem;
  color: var(--accent-2);
  display: block;
  margin-bottom: 8px;
}

.arch-node h4 {
  font-size: 1.08rem;
  margin-bottom: 8px;
}

.arch-node p {
  font-size: 0.9rem;
  color: var(--muted);
}

.arch-arrow {
  display: flex;
  align-items: center;
  color: var(--accent);
  font-size: 1.4rem;
  font-weight: 700;
}

/* Terminal */
.terminal-window {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-bright);
  background: rgba(7, 11, 23, 0.92);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

.terminal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(17, 26, 48, 0.85);
  border-bottom: 1px solid var(--border);
  gap: 12px;
  flex-wrap: wrap;
}

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

.terminal-dots span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #334155;
}

.terminal-dots span:nth-child(1) { background: #ef4444; }
.terminal-dots span:nth-child(2) { background: #f59e0b; }
.terminal-dots span:nth-child(3) { background: #10b981; }

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

.tab-btn {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  padding: 5px 12px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

.tab-btn.active {
  color: var(--text);
  background: rgba(56, 189, 248, 0.14);
  border-color: var(--border-bright);
}

.copy-btn {
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent);
  border: 1px solid var(--border-bright);
  border-radius: 7px;
  padding: 5px 12px;
  font-size: 0.78rem;
  cursor: pointer;
}

.copy-btn:hover {
  background: rgba(56, 189, 248, 0.22);
}

.terminal-body {
  padding: 22px 24px;
  overflow-x: auto;
  font-size: 0.9rem;
  line-height: 1.7;
  color: #cbd5e1;
}

/* Manifesto */
.manifesto-box {
  padding: 40px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(16, 28, 56, 0.8), rgba(10, 18, 36, 0.88));
  border: 1px solid var(--border-bright);
  text-align: center;
}

.manifesto-box h2 {
  font-size: 1.8rem;
  margin-bottom: 14px;
}

.manifesto-box p {
  max-width: 720px;
  margin: 0 auto 24px;
  color: var(--muted);
}

.manifesto-box strong {
  color: var(--text);
}

.manifesto-tags {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--accent);
  font-size: 0.85rem;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  margin-top: 32px;
  color: var(--muted);
  font-size: 0.88rem;
}

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

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

@media (max-width: 860px) {
  .nav-links { display: none; }
  .metrics-bar { grid-template-columns: repeat(2, 1fr); }
  .cards-grid { grid-template-columns: 1fr; }
  .arch-flow { flex-direction: column; }
  .arch-arrow { justify-content: center; transform: rotate(90deg); }
}
