/* ==========================================================================
   Xiaolong Space v2.2 — Precision AI Lab & Future-Tech Design System
   Blueprint grids, interactive neural canvas, obsidian AI console, spotlight FX.
   ========================================================================== */

:root {
  color-scheme: light;
  --bg: #f4f7fb;
  --bg-subtle: #eaf0f8;
  --bg-muted: #dfe7f4;
  --surface: #ffffff;
  --surface-glass: rgba(244, 247, 251, 0.82);
  --text: #0b1120;
  --text-secondary: #475569;
  --muted: #64748b;
  --border: rgba(15, 23, 42, 0.09);
  --border-strong: rgba(37, 99, 235, 0.30);
  --grid-line: rgba(37, 99, 235, 0.065);
  --ring: rgba(59, 130, 246, 0.22);
  --brand: #2563eb;
  --brand-cyan: #06b6d4;
  --brand-violet: #7c3aed;
  --brand-soft: rgba(37, 99, 235, 0.09);
  --brand-grad: linear-gradient(135deg, #0ea5e9 0%, #2563eb 48%, #7c3aed 100%);
  --text-grad: linear-gradient(110deg, #0284c7 0%, #2563eb 42%, #7c3aed 82%, #06b6d4 100%);
  --primary-bg: #2563eb;
  --primary-fg: #ffffff;
  --success: #10b981;
  --warning: #d97706;
  --danger: #e11d48;
  --spot-glow: rgba(37, 99, 235, 0.11);
  --shadow-xs: 0 1px 2px rgba(11, 17, 32, 0.04);
  --shadow-sm: 0 4px 16px rgba(15, 23, 42, 0.05), 0 1px 3px rgba(15, 23, 42, 0.03);
  --shadow-md: 0 16px 40px rgba(15, 23, 42, 0.08), 0 4px 12px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 28px 68px rgba(11, 17, 32, 0.14), 0 6px 20px rgba(15, 23, 42, 0.05);
  --shadow-brand: 0 10px 28px rgba(37, 99, 235, 0.30);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;
  --mono: ui-monospace, "Cascadia Code", "JetBrains Mono", SFMono-Regular, Consolas, monospace;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Inter, system-ui, sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html.dark {
  color-scheme: dark;
  --bg: #05070e;
  --bg-subtle: #0c1120;
  --bg-muted: #141c32;
  --surface: #0b101d;
  --surface-glass: rgba(5, 7, 14, 0.82);
  --text: #f1f5f9;
  --text-secondary: #94a3b8;
  --muted: #6e7f9a;
  --border: rgba(148, 163, 184, 0.15);
  --border-strong: rgba(56, 189, 248, 0.42);
  --grid-line: rgba(56, 189, 248, 0.06);
  --ring: rgba(56, 189, 248, 0.28);
  --brand: #38bdf8;
  --brand-cyan: #22d3ee;
  --brand-violet: #a78bfa;
  --brand-soft: rgba(56, 189, 248, 0.14);
  --brand-grad: linear-gradient(135deg, #06b6d4 0%, #3b82f6 50%, #8b5cf6 100%);
  --text-grad: linear-gradient(110deg, #22d3ee 0%, #60a5fa 42%, #c084fc 85%, #38bdf8 100%);
  --spot-glow: rgba(56, 189, 248, 0.14);
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 6px 20px rgba(0, 0, 0, 0.45);
  --shadow-md: 0 18px 44px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 32px 76px rgba(0, 0, 0, 0.72);
  --shadow-brand: 0 10px 30px rgba(6, 182, 212, 0.30);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0; min-width: 320px; min-height: 100svh;
  background: var(--bg); color: var(--text);
  font-size: 15.5px; line-height: 1.65;
  transition: background-color 0.25s ease, color 0.25s ease;
}

#app { min-height: 100svh; display: flex; flex-direction: column; }

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button, a, input, textarea, select { touch-action: manipulation; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: not-allowed; opacity: 0.45; }
img { max-width: 100%; display: block; object-fit: cover; }
h1, h2, h3, h4, p { margin: 0; }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip {
  position: fixed; top: -80px; left: 16px; z-index: 300;
  padding: 10px 16px; border-radius: var(--radius-sm);
  background: var(--brand-grad); color: #fff; font-size: 13px; font-weight: 600;
}
.skip:focus { top: 12px; }

.icon { width: 18px; height: 18px; flex-shrink: 0; vertical-align: middle; }
.muted { color: var(--muted); }
.mono-meta { font-family: var(--mono); font-size: 12px; letter-spacing: 0.02em; }

.container {
  width: 100%; max-width: 1320px;
  margin: 0 auto; padding: 0 36px;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 12px; font-weight: 650;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--brand); margin-bottom: 10px;
}
.eyebrow-dot {
  width: 7px; height: 7px; border-radius: 2px;
  background: var(--brand-grad);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.55);
}

.gradient-name {
  background: var(--text-grad);
  background-size: 200% auto;
  background-clip: text; -webkit-background-clip: text; color: transparent;
  animation: gradFlow 8s linear infinite;
}
@keyframes gradFlow { to { background-position: 200% center; } }

/* ---------- Spatial Warp Transition Veil & Page Enter Motion ---------- */
#warp-veil {
  position: fixed; inset: 0; z-index: 400; pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at 50% 48%, rgba(56, 189, 248, 0.34), rgba(37, 99, 235, 0.22) 38%, var(--bg) 78%);
  backdrop-filter: blur(0px);
  transition: opacity 0.36s cubic-bezier(0.22, 1, 0.36, 1), backdrop-filter 0.36s ease;
}
#warp-veil.active {
  opacity: 1;
  backdrop-filter: blur(18px);
}

.spatial-stage {
  animation: spatialIn 0.42s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes spatialIn {
  from { opacity: 0; transform: translateY(14px) scale(0.99); filter: blur(4px); }
  to   { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

/* ---------- STAGE 1: 100svh Full-Screen Spatial Entrance Portal (/) ---------- */
.portal-page { overflow-x: hidden; }
.portal-shell {
  position: relative;
  min-height: 100svh;
  width: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    radial-gradient(62% 62% at 50% 44%, rgba(37, 99, 235, 0.14), transparent 68%),
    radial-gradient(45% 55% at 15% 18%, rgba(6, 182, 212, 0.14), transparent 64%),
    radial-gradient(45% 55% at 85% 22%, rgba(124, 58, 237, 0.14), transparent 64%),
    var(--surface);
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease, filter 0.4s ease;
}
html.dark .portal-shell {
  background:
    radial-gradient(58% 60% at 50% 44%, rgba(37, 99, 235, 0.22), transparent 68%),
    radial-gradient(45% 55% at 14% 16%, rgba(6, 182, 212, 0.20), transparent 62%),
    radial-gradient(45% 55% at 86% 20%, rgba(139, 92, 246, 0.22), transparent 62%),
    #05070e;
}
.portal-shell.portal-warping {
  transform: scale(1.07);
  opacity: 0;
  filter: blur(10px);
}

.portal-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 0;
}
.portal-grid-bg {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 75% 75% at 50% 48%, #000 32%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 75% 75% at 50% 48%, #000 32%, transparent 100%);
}
.portal-art-aura {
  position: absolute; right: -2%; bottom: -4%; width: min(46vw, 620px); height: auto;
  pointer-events: none; z-index: 0;
  opacity: 0.22; filter: invert(0.96) hue-rotate(185deg) saturate(1.45) contrast(1.06);
  mix-blend-mode: multiply;
  mask-image: radial-gradient(ellipse 46% 46% at 64% 58%, #000 0%, rgba(0, 0, 0, 0.5) 45%, transparent 74%);
  -webkit-mask-image: radial-gradient(ellipse 46% 46% at 64% 58%, #000 0%, rgba(0, 0, 0, 0.5) 45%, transparent 74%);
}
html.dark .portal-art-aura {
  opacity: 0.42; filter: none; mix-blend-mode: screen;
}

.portal-topbar {
  position: relative; z-index: 5;
  width: 100%; max-width: 1360px; margin: 0 auto;
  padding: 18px 36px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.portal-hud-top { display: flex; align-items: center; gap: 10px; }
.portal-clock {
  display: inline-flex; align-items: center; gap: 7px;
  height: 36px; padding: 0 13px; border-radius: 10px;
  background: var(--surface-glass); backdrop-filter: blur(14px);
  border: 1px solid var(--border); color: var(--muted);
}
.portal-clock b { color: var(--text); font-weight: 700; }

.portal-center {
  position: relative; z-index: 2;
  width: 100%; max-width: 900px; margin: auto;
  padding: 12px 28px 98px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}

.portal-identity {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  margin-bottom: 18px;
}
.portal-avatar-ring {
  padding: 3.5px; border-radius: 26px;
  background: var(--brand-grad);
  box-shadow: 0 16px 42px rgba(37, 99, 235, 0.24), 0 0 0 8px rgba(37, 99, 235, 0.06);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.portal-avatar-ring:hover { transform: scale(1.04); }
.portal-avatar-ring img { width: 82px; height: 82px; border-radius: 22.5px; background: #ffffff; }

.portal-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  height: 30px; padding: 0 14px; border-radius: 999px;
  background: var(--surface-glass); backdrop-filter: blur(16px);
  border: 1px solid rgba(37, 99, 235, 0.22);
  font-size: 12.5px; font-weight: 600; color: var(--text-secondary);
}
.portal-kicker .mono-meta { color: var(--brand); font-weight: 700; }

.portal-title {
  font-size: clamp(40px, 5.4vw, 68px);
  font-weight: 840; letter-spacing: -0.04em; line-height: 1.08;
  margin-bottom: 14px;
}
.portal-headline {
  font-size: clamp(19px, 2vw, 24px);
  font-weight: 640; color: var(--text); letter-spacing: -0.015em; margin-bottom: 6px;
}
.portal-desc {
  font-size: 15px; color: var(--text-secondary); max-width: 560px; line-height: 1.7;
}
.portal-tags {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
  margin-top: 18px;
}

.portal-stream {
  margin-top: 18px;
  display: inline-flex; align-items: center; gap: 9px;
  max-width: min(92vw, 580px);
  height: 38px; padding: 0 16px; border-radius: 999px;
  background: rgba(11, 16, 29, 0.88);
  border: 1px solid rgba(56, 189, 248, 0.32);
  box-shadow: 0 10px 28px rgba(11, 17, 32, 0.16);
  color: #e2e8f0; font-family: var(--mono); font-size: 12.5px;
}
.stream-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #22d3ee;
  box-shadow: 0 0 10px #22d3ee; flex-shrink: 0;
}
.portal-stream .prompt { color: #22d3ee; font-weight: 700; }
.portal-stream .stream-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.portal-telemetry {
  margin-top: 20px;
  display: inline-flex; align-items: center; gap: 22px;
  padding: 10px 24px; border-radius: 16px;
  background: var(--surface-glass); backdrop-filter: blur(18px);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.pt-item { display: flex; flex-direction: column; align-items: center; gap: 1px; transition: transform 0.16s ease; }
a.pt-item:hover { transform: translateY(-1px); }
.pt-item strong {
  display: flex; align-items: baseline; gap: 4px;
  font-size: 22px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.pt-item strong small { font-family: var(--mono); font-size: 10.5px; font-weight: 650; color: var(--brand); }
.pt-item span { font-size: 11.5px; color: var(--muted); }
.pt-div { width: 1px; height: 28px; background: var(--border); display: block; }

.portal-cta { margin-top: 26px; display: flex; flex-direction: column; align-items: center; gap: 11px; }
.portal-enter-btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; gap: 12px;
  height: 54px; padding: 0 32px; border-radius: 999px;
  background: var(--brand-grad); color: #ffffff;
  font-size: 16px; font-weight: 700; letter-spacing: 0.01em;
  box-shadow: 0 14px 38px rgba(37, 99, 235, 0.36), 0 0 0 1px rgba(255, 255, 255, 0.25) inset;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.22s ease, filter 0.22s ease;
}
.portal-enter-btn::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.34) 50%, transparent 80%);
  transform: translateX(-100%);
  animation: sheen 3.6s ease-in-out infinite;
}
@keyframes sheen { 0%, 55% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
.portal-enter-btn:hover {
  transform: translateY(-2px) scale(1.02);
  filter: brightness(1.06);
  box-shadow: 0 20px 48px rgba(37, 99, 235, 0.45), 0 0 0 6px rgba(56, 189, 248, 0.16);
}
.enter-arrow { display: inline-flex; transition: transform 0.2s ease; }
.portal-enter-btn:hover .enter-arrow { transform: translateX(4px); }

.portal-hint { font-size: 11px; color: var(--muted); opacity: 0.85; }
.portal-hint kbd {
  padding: 1px 6px; border-radius: 5px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-secondary); font-family: var(--mono);
}

.portal-foot-icp {
  position: relative; z-index: 2; text-align: center;
  padding-bottom: 6px; font-size: 11px; color: var(--muted); opacity: 0.72;
}

/* ---------- VisionOS Floating Spatial Glass Dock ---------- */
.vision-dock {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 150;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.76);
  backdrop-filter: saturate(200%) blur(28px);
  -webkit-backdrop-filter: saturate(200%) blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow:
    0 20px 50px rgba(15, 23, 42, 0.14),
    0 4px 12px rgba(15, 23, 42, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
  max-width: calc(100vw - 20px);
}
html.dark .vision-dock {
  background: rgba(13, 19, 34, 0.78);
  border-color: rgba(148, 163, 184, 0.22);
  box-shadow:
    0 24px 56px rgba(0, 0, 0, 0.60),
    0 0 0 1px rgba(56, 189, 248, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.10);
}

.dock-item {
  position: relative;
  display: inline-flex; align-items: center; gap: 7px;
  height: 44px; padding: 0 14px; border-radius: 16px;
  color: var(--text-secondary); font-size: 13.5px; font-weight: 600;
  white-space: nowrap;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}
.dock-item:hover {
  transform: translateY(-4px) scale(1.04);
  background: var(--bg-subtle);
  color: var(--text);
}
.dock-item.active {
  background: var(--brand-grad);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.34);
}
.dock-item.active:hover { transform: translateY(-3px) scale(1.03); color: #ffffff; }

.dock-ic { position: relative; display: inline-flex; align-items: center; }
.dock-ic .icon { width: 17px; height: 17px; }
.dock-badge {
  padding: 1px 6px; border-radius: 999px;
  background: var(--bg-subtle); border: 1px solid var(--border); color: var(--muted);
  font-style: normal; font-family: var(--mono); font-size: 10.5px; font-weight: 700;
  line-height: 1.35;
}
.dock-item.active .dock-badge { background: rgba(255, 255, 255, 0.24); border-color: transparent; color: #ffffff; }
.dock-sep { width: 1px; height: 24px; background: var(--border); margin: 0 4px; flex-shrink: 0; }

/* ---------- Space Hub Banner & Lab Tabs ---------- */
.hub-head-row {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
}
.hub-quick-cards { display: flex; gap: 10px; }
.hub-stat-pill {
  min-width: 96px; padding: 12px 16px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-xs);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  transition: all 0.18s ease;
}
.hub-stat-pill:hover { border-color: var(--border-strong); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.hub-stat-pill strong { font-size: 22px; font-weight: 800; color: var(--brand); line-height: 1.1; font-variant-numeric: tabular-nums; }
.hub-stat-pill span { font-size: 11.5px; color: var(--muted); }

.lab-tabs {
  display: inline-flex; flex-wrap: wrap; gap: 6px;
  padding: 5px; border-radius: 14px;
  background: var(--bg-subtle); border: 1px solid var(--border);
}
.lab-tab {
  height: 36px; padding: 0 16px; border-radius: 10px;
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13.5px; font-weight: 620; color: var(--text-secondary);
  transition: all 0.18s ease;
}
.lab-tab .icon { width: 15px; height: 15px; }
.lab-tab em {
  font-style: normal; font-family: var(--mono); font-size: 11px;
  padding: 1px 7px; border-radius: 999px;
  background: var(--bg-muted); color: var(--muted);
}
.lab-tab:hover { color: var(--text); }
.lab-tab.active {
  background: var(--surface); color: var(--brand); box-shadow: var(--shadow-xs);
}
.lab-tab.active em { background: var(--brand-soft); color: var(--brand); }

/* Extra bottom clearance on inner footer so floating VisionOS Dock never covers links */
.site-footer { padding-bottom: 104px; }

/* ---------- Top Scroll Progress Laser Beam & Reveal Motion ---------- */
#scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2.5px; z-index: 200;
  background: linear-gradient(90deg, #06b6d4 0%, #3b82f6 50%, #8b5cf6 100%);
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.55);
  transform-origin: left center; transform: scaleX(0);
  pointer-events: none;
}

.tilt-card {
  will-change: transform;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.22s ease, box-shadow 0.22s ease;
}

[data-reveal] {
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-reveal].revealed { opacity: 1; transform: translateY(0); }

/* ---------- Cursor-Reactive Tech Card Spotlight ---------- */
.fx-card { position: relative; }
.fx-card::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  pointer-events: none; opacity: 0; transition: opacity 0.25s ease;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), var(--spot-glow), transparent 68%);
  z-index: 2;
}
.fx-card.fx-hot::after { opacity: 1; }

/* ---------- Boot ---------- */
.boot {
  flex: 1; min-height: 70svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; padding: 32px; text-align: center; color: var(--muted);
}
.boot h1 { font-size: 22px; color: var(--text); }
.boot-spinner {
  width: 24px; height: 24px; border-radius: 50%;
  border: 2.5px solid var(--border); border-top-color: var(--brand);
  animation: spin 0.75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 20px; border-radius: 12px;
  border: 1px solid transparent; font-size: 14.5px; font-weight: 600;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.btn .icon { width: 16px; height: 16px; }
.btn:active:not(:disabled) { transform: scale(0.98); }

.btn-primary, .btn-dark {
  background: var(--brand-grad); color: #ffffff;
  box-shadow: var(--shadow-brand);
}
.btn-primary:hover:not(:disabled), .btn-dark:hover:not(:disabled) {
  transform: translateY(-1px); filter: brightness(1.07);
  box-shadow: 0 14px 34px rgba(37, 99, 235, 0.38);
}

.btn-glow {
  background: linear-gradient(135deg, #22d3ee 0%, #3b82f6 52%, #8b5cf6 100%);
  color: #ffffff;
  box-shadow: 0 10px 30px rgba(34, 211, 238, 0.32);
}
.btn-glow:hover:not(:disabled) {
  transform: translateY(-1px); filter: brightness(1.08);
  box-shadow: 0 14px 36px rgba(34, 211, 238, 0.44);
}

.btn-dock-ghost {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  color: #f8fafc;
}
.btn-dock-ghost:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(56, 189, 248, 0.45);
}

.btn-white, .btn-light {
  background: var(--surface); color: var(--text);
  border-color: var(--border); box-shadow: var(--shadow-xs);
}
.btn-white:hover:not(:disabled), .btn-light:hover:not(:disabled) {
  border-color: var(--border-strong); color: var(--brand);
  transform: translateY(-1px); box-shadow: var(--shadow-sm);
}

.btn-soft {
  background: var(--brand-soft); color: var(--brand); border-color: transparent;
}
.btn-soft:hover:not(:disabled) { background: var(--brand-grad); color: #ffffff; }

.btn-tone {
  background: var(--tone-bg, var(--brand-soft)); color: var(--tone, var(--brand));
  border-color: color-mix(in srgb, var(--tone, var(--brand)) 18%, transparent);
}
.btn-tone:hover:not(:disabled) { background: var(--tone, var(--brand)); color: #ffffff; }

.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover:not(:disabled) { background: var(--bg-subtle); color: var(--text); }

.btn-lg { height: 48px; padding: 0 24px; font-size: 15px; border-radius: 13px; }
.btn-sm { height: 34px; padding: 0 14px; font-size: 13px; border-radius: 9px; }
.btn-sm .icon { width: 14px; height: 14px; }

.icon-btn {
  width: 38px; height: 38px; border-radius: 10px;
  display: inline-grid; place-items: center; color: var(--text-secondary);
  border: 1px solid transparent; transition: all 0.18s ease;
}
.icon-btn:hover:not(:disabled) { background: var(--bg-subtle); color: var(--text); }

.theme-toggle .theme-moon { display: none; }
html.dark .theme-toggle .theme-sun { display: none; }
html.dark .theme-toggle .theme-moon { display: inline-flex; }
.theme-icon { display: inline-flex; }

.chip {
  display: inline-flex; align-items: center; height: 24px; padding: 0 10px;
  border-radius: 999px; background: var(--brand-soft); color: var(--brand);
  font-size: 12px; font-weight: 600;
}

/* ---------- Header Navigation ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60; height: 66px;
  background: var(--surface-glass);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1320px; height: 100%; margin: 0 auto; padding: 0 36px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 760; font-size: 16px; letter-spacing: -0.02em; white-space: nowrap;
}
.brand img {
  width: 34px; height: 34px; border-radius: 10px;
  border: 1.5px solid var(--brand); background: #ffffff;
  box-shadow: 0 0 12px rgba(37, 99, 235, 0.16);
}
.brand-tag {
  font-style: normal; font-family: var(--mono); font-size: 10.5px; font-weight: 700;
  padding: 2px 7px; border-radius: 6px; white-space: nowrap;
  background: #0b1120; color: #38bdf8; letter-spacing: 0.06em;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.site-nav {
  display: flex; align-items: center; gap: 4px;
  padding: 4px; border-radius: 12px;
  background: var(--bg-subtle); border: 1px solid var(--border);
}
.site-nav a {
  padding: 6px 18px; border-radius: 8px;
  font-size: 14px; font-weight: 560; color: var(--text-secondary);
  transition: all 0.18s ease;
}
.site-nav a:hover { color: var(--text); }
.site-nav a.active {
  background: var(--surface); color: var(--brand); font-weight: 680;
  box-shadow: var(--shadow-xs);
}

.header-actions { display: flex; align-items: center; gap: 8px; }
.cmdk-trigger {
  height: 36px; padding: 0 10px 0 12px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--border);
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--muted);
  transition: all 0.18s ease;
}
.cmdk-trigger .icon { width: 15px; height: 15px; color: var(--brand); }
.cmdk-trigger kbd {
  font-family: var(--mono); font-size: 10.5px;
  padding: 2px 6px; border-radius: 5px;
  background: var(--bg-subtle); border: 1px solid var(--border); color: var(--text-secondary);
}
.cmdk-trigger:hover { border-color: var(--border-strong); color: var(--text); box-shadow: var(--shadow-xs); }
.menu-btn { display: none; }

/* ---------- Hero Band: Precision Blueprint + Neural Canvas + AI Console ---------- */
.home { flex: 1; }

.hero-band {
  position: relative; overflow: hidden;
  padding: 44px 0 54px;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(55% 85% at 6% 0%, rgba(14, 165, 233, 0.15), transparent 62%),
    radial-gradient(55% 85% at 94% 8%, rgba(124, 58, 237, 0.16), transparent 62%),
    radial-gradient(45% 65% at 52% 100%, rgba(37, 99, 235, 0.10), transparent 65%),
    var(--surface);
}
html.dark .hero-band {
  background:
    radial-gradient(55% 85% at 6% 0%, rgba(6, 182, 212, 0.20), transparent 62%),
    radial-gradient(55% 85% at 94% 8%, rgba(139, 92, 246, 0.24), transparent 62%),
    radial-gradient(45% 65% at 52% 100%, rgba(37, 99, 235, 0.16), transparent 65%),
    #070a14;
}

.hero-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 0;
}

.hero-grid-bg {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 88% 85% at 50% 42%, #000 35%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 88% 85% at 50% 42%, #000 35%, transparent 100%);
}

.hero-stage {
  position: relative; z-index: 1;
  padding-top: 22px; padding-bottom: 22px;
}

.crosshair {
  position: absolute; font-family: var(--mono); font-size: 14px; font-weight: 300;
  color: var(--brand); opacity: 0.42; pointer-events: none; line-height: 1;
}
.ch-tl { top: 0; left: 26px; }
.ch-tr { top: 0; right: 26px; }
.ch-bl { bottom: 0; left: 26px; }
.ch-br { bottom: 0; right: 26px; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 44px;
  align-items: center;
}

.hero-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  height: 32px; padding: 0 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid rgba(37, 99, 235, 0.20);
  box-shadow: var(--shadow-xs);
  font-size: 13px; font-weight: 600; color: var(--text-secondary);
  margin-bottom: 20px;
}
.hero-kicker .mono-meta { color: var(--brand); font-weight: 700; }
.kicker-sep { opacity: 0.35; }

.pulse, .pulse-cyan {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.pulse {
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.20);
  animation: pulseDot 2.4s ease-in-out infinite;
}
.pulse-cyan {
  background: #22d3ee;
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.85);
  animation: pulseDot 2s ease-in-out infinite;
}
@keyframes pulseDot { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }

.hero-left h1 {
  font-size: clamp(38px, 4.4vw, 58px);
  font-weight: 820; letter-spacing: -0.035em; line-height: 1.12;
  margin-bottom: 16px;
}
.hero-headline {
  font-size: clamp(19px, 1.9vw, 23px);
  font-weight: 620; color: var(--text); letter-spacing: -0.015em;
  line-height: 1.45; margin-bottom: 10px;
}
.hero-desc {
  font-size: 15.5px; color: var(--text-secondary); line-height: 1.75; max-width: 540px;
}

.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.hero-tag {
  display: inline-flex; align-items: center; height: 30px; padding: 0 12px;
  border-radius: 8px; font-size: 12.5px; font-weight: 600;
  border: 1px solid transparent;
}
.hero-tag.tone-0 { background: rgba(37, 99, 235, 0.09); color: #1d4ed8; border-color: rgba(37, 99, 235, 0.18); }
.hero-tag.tone-1 { background: rgba(124, 58, 237, 0.09); color: #6d28d9; border-color: rgba(124, 58, 237, 0.18); }
.hero-tag.tone-2 { background: rgba(6, 182, 212, 0.10); color: #0e7490; border-color: rgba(6, 182, 212, 0.22); }
.hero-tag.tone-3 { background: rgba(5, 150, 105, 0.09); color: #047857; border-color: rgba(5, 150, 105, 0.18); }
html.dark .hero-tag.tone-0 { background: rgba(59, 130, 246, 0.18); color: #93c5fd; }
html.dark .hero-tag.tone-1 { background: rgba(139, 92, 246, 0.18); color: #c4b5fd; }
html.dark .hero-tag.tone-2 { background: rgba(34, 211, 238, 0.16); color: #67e8f9; }
html.dark .hero-tag.tone-3 { background: rgba(16, 185, 129, 0.16); color: #6ee7b7; }

.hero-cta { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

/* ---------- Obsidian High-Tech AI Console Card ---------- */
.hero-right { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

.ai-console {
  border-radius: var(--radius-xl);
  background:
    radial-gradient(85% 90% at 100% 0%, rgba(56, 189, 248, 0.18), transparent 60%),
    radial-gradient(75% 80% at 0% 100%, rgba(139, 92, 246, 0.20), transparent 60%),
    #0b101d;
  color: #f1f5f9;
  border: 1px solid rgba(56, 189, 248, 0.26);
  box-shadow: 0 24px 60px rgba(11, 17, 32, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
  --spot-glow: rgba(56, 189, 248, 0.18);
}

.console-bar {
  height: 40px; padding: 0 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(255, 255, 255, 0.03);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.console-dots { display: flex; gap: 6px; }
.console-dots i { width: 9px; height: 9px; border-radius: 50%; display: block; background: rgba(148, 163, 184, 0.35); }
.console-dots i:first-child { background: #fb7185; }
.console-dots i:nth-child(2) { background: #fbbf24; }
.console-dots i:nth-child(3) { background: #34d399; }
.console-title {
  font-family: var(--mono); font-size: 11.5px; color: #94a3b8;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.console-live {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 10.5px; font-weight: 700; color: #67e8f9;
  letter-spacing: 0.06em;
}

.console-profile {
  padding: 20px 22px 16px;
  display: flex; align-items: center; gap: 16px;
}
.console-avatar {
  padding: 2.5px; border-radius: 18px;
  background: linear-gradient(135deg, #22d3ee, #3b82f6, #a855f7);
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.28);
  flex-shrink: 0;
}
.console-avatar img { width: 68px; height: 68px; border-radius: 15.5px; background: #ffffff; }
.console-id { min-width: 0; }
.console-id strong { display: block; font-size: 18px; font-weight: 740; color: #ffffff; letter-spacing: -0.015em; }
.console-id p { font-size: 13px; color: #94a3b8; margin-top: 2px; }

.signal-bars {
  margin-top: 8px; display: inline-flex; align-items: flex-end; gap: 3px; height: 14px;
}
.signal-bars i {
  width: 3px; border-radius: 2px; background: linear-gradient(180deg, #22d3ee, #818cf8);
  animation: eq 1.2s ease-in-out infinite alternate;
}
.signal-bars i:nth-child(1) { height: 6px; animation-delay: 0s; }
.signal-bars i:nth-child(2) { height: 13px; animation-delay: 0.15s; }
.signal-bars i:nth-child(3) { height: 9px; animation-delay: 0.3s; }
.signal-bars i:nth-child(4) { height: 14px; animation-delay: 0.45s; }
.signal-bars i:nth-child(5) { height: 7px; animation-delay: 0.6s; }
.signal-bars span {
  margin-left: 6px; font-family: var(--mono); font-size: 10px;
  color: #67e8f9; letter-spacing: 0.08em; line-height: 1;
}
@keyframes eq { from { transform: scaleY(0.35); opacity: 0.55; } to { transform: scaleY(1); opacity: 1; } }

.console-stream {
  margin: 0 20px 18px; padding: 12px 14px; border-radius: 12px;
  background: rgba(2, 6, 23, 0.66);
  border: 1px solid rgba(56, 189, 248, 0.18);
  font-family: var(--mono); font-size: 12.5px; line-height: 1.6;
  min-height: 46px; display: flex; align-items: center;
}
.stream-line { display: flex; align-items: center; gap: 8px; min-width: 0; color: #e2e8f0; }
.stream-line .prompt { color: #22d3ee; font-weight: 700; flex-shrink: 0; }
.stream-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cursor {
  display: inline-block; width: 7px; height: 15px; background: #22d3ee;
  flex-shrink: 0; animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.console-hud {
  display: grid; grid-template-columns: 1.25fr 1fr 1fr;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(255, 255, 255, 0.025);
}
.hud-cell {
  padding: 14px 16px; display: flex; flex-direction: column; gap: 3px;
  border-right: 1px solid rgba(148, 163, 184, 0.12);
  transition: background-color 0.16s ease;
}
.hud-cell:last-child { border-right: 0; }
a.hud-cell:hover { background: rgba(56, 189, 248, 0.09); }
.hud-label { font-size: 11px; color: #94a3b8; font-weight: 500; }
.hud-val {
  display: flex; align-items: baseline; gap: 4px;
  font-size: 24px; font-weight: 780; letter-spacing: -0.03em; line-height: 1.1;
  font-variant-numeric: tabular-nums; color: #ffffff;
}
.hud-days .hud-val {
  background: linear-gradient(90deg, #22d3ee, #818cf8);
  background-clip: text; -webkit-background-clip: text; color: transparent;
}
.hud-val small { font-family: var(--mono); font-size: 10.5px; font-weight: 600; color: #94a3b8; -webkit-text-fill-color: #94a3b8; }

/* Paired Mini Tech Modules */
.bento-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.bento-mini {
  padding: 18px 20px; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.bento-mini:hover { transform: translateY(-2px); border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.bento-mini-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.bento-mini-top .mono-meta { color: var(--muted); opacity: 0.65; }
.bento-mini-ic { width: 34px; height: 34px; border-radius: 10px; display: inline-grid; place-items: center; }
.bento-mini.card-indigo .bento-mini-ic { background: rgba(79, 70, 229, 0.11); color: #4f46e5; }
.bento-mini.card-cyan .bento-mini-ic   { background: rgba(6, 182, 212, 0.12); color: #0891b2; }
html.dark .bento-mini.card-indigo .bento-mini-ic { background: rgba(129, 140, 248, 0.18); color: #a5b4fc; }
html.dark .bento-mini.card-cyan .bento-mini-ic   { background: rgba(34, 211, 238, 0.18); color: #67e8f9; }
.bento-mini h3 { font-size: 15px; font-weight: 700; margin-bottom: 3px; }
.bento-mini p { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }

/* ---------- Infinite Scrolling Tech Ticker ---------- */
.ticker-band {
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  padding: 13px 0;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.ticker-track {
  display: flex; align-items: center; gap: 36px; width: max-content;
  animation: ticker 34s linear infinite;
}
.ticker-band:hover .ticker-track { animation-play-state: paused; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.ticker-item {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 12.5px; font-weight: 600;
  color: var(--text-secondary); white-space: nowrap; letter-spacing: 0.03em;
}
.ticker-item i {
  width: 6px; height: 6px; border-radius: 2px;
  background: var(--brand-grad); transform: rotate(45deg);
}

/* ---------- Home Sections ---------- */
.home-section { padding-top: 64px; }
.home-section:last-child { padding-bottom: 72px; }

.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; margin-bottom: 26px;
}
.section-head h2 {
  font-size: clamp(24px, 2.8vw, 32px); font-weight: 800;
  letter-spacing: -0.03em; line-height: 1.2;
}
.section-desc { margin-top: 6px; color: var(--text-secondary); font-size: 15px; }

.link-pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 38px; padding: 0 16px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--border);
  font-size: 13.5px; font-weight: 600; color: var(--text);
  white-space: nowrap; box-shadow: var(--shadow-xs);
  transition: all 0.18s ease;
}
.link-pill .icon { width: 15px; height: 15px; transition: transform 0.18s ease; }
.link-pill:hover { border-color: var(--border-strong); color: var(--brand); }
.link-pill:hover .icon { transform: translateX(3px); }

/* ---------- Spotlight Featured Article ---------- */
.article-spotlight {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  border-radius: var(--radius-xl); overflow: hidden;
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-md); margin-bottom: 22px;
  text-align: left; width: 100%;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.article-spotlight:hover {
  transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow-lg);
}
.spotlight-cover { position: relative; min-height: 310px; background: #0b101d; overflow: hidden; }
.spotlight-cover img { width: 100%; height: 100%; transition: transform 0.45s ease; }
.article-spotlight:hover .spotlight-cover img { transform: scale(1.04); }
.spotlight-ribbon {
  position: absolute; top: 18px; left: 18px;
  display: inline-flex; align-items: center; gap: 8px;
  height: 30px; padding: 0 12px; border-radius: 8px;
  background: rgba(11, 16, 29, 0.82); backdrop-filter: blur(10px);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #f8fafc; font-family: var(--mono); font-size: 11.5px; font-weight: 650;
}

.spotlight-body {
  padding: 36px 38px; display: flex; flex-direction: column; justify-content: center; gap: 14px;
}
.mono-badge {
  display: inline-flex; align-items: center; height: 24px; padding: 0 10px;
  border-radius: 6px; background: var(--bg-subtle); border: 1px solid var(--border);
  font-family: var(--mono); font-size: 11.5px; font-weight: 650; color: var(--brand);
}
.spotlight-body h3 {
  font-size: clamp(22px, 2.2vw, 28px); font-weight: 780;
  letter-spacing: -0.025em; line-height: 1.35;
}
.article-spotlight:hover .spotlight-body h3 { color: var(--brand); }
.spotlight-summary {
  font-size: 15px; color: var(--text-secondary); line-height: 1.78;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.spotlight-foot {
  margin-top: 8px; padding-top: 18px; border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.read-cta { display: inline-flex; align-items: center; gap: 6px; font-size: 14.5px; font-weight: 680; color: var(--brand); }
.read-cta .icon { width: 16px; height: 16px; transition: transform 0.18s ease; }
.article-spotlight:hover .read-cta .icon { transform: translateX(4px); }
.source-tag { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }

/* ---------- Article Grid & List ---------- */
.article-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.article-list { display: flex; flex-direction: column; gap: 16px; }
.article-card {
  display: flex; align-items: center; gap: 24px; padding: 18px;
  border-radius: var(--radius-lg); background: var(--surface);
  border: 1px solid var(--border); box-shadow: var(--shadow-xs);
  text-align: left; width: 100%; overflow: hidden;
  transition: all 0.22s ease;
}
.article-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.article-cover {
  position: relative; width: 240px; aspect-ratio: 16 / 10;
  border-radius: var(--radius-md); overflow: hidden;
  background: var(--bg-subtle); border: 1px solid var(--border);
  flex-shrink: 0; display: grid; place-items: center;
}
.article-cover img { width: 100%; height: 100%; transition: transform 0.35s ease; }
.article-card:hover .article-cover img { transform: scale(1.04); }
.card-seq {
  position: absolute; top: 10px; right: 10px;
  padding: 2px 7px; border-radius: 6px;
  background: rgba(11, 16, 29, 0.72); backdrop-filter: blur(8px);
  color: #e2e8f0; font-family: var(--mono); font-size: 11px; font-weight: 700;
}
.cover-fallback { color: var(--muted); opacity: 0.45; }
.cover-fallback .icon { width: 28px; height: 28px; }

.article-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.article-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: var(--muted); }
.article-card h3 {
  font-size: 17px; font-weight: 720; letter-spacing: -0.015em; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.article-card:hover h3 { color: var(--brand); }
.article-summary {
  font-size: 14px; color: var(--text-secondary); line-height: 1.65;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.article-more {
  margin-top: 4px; display: inline-flex; align-items: center; gap: 5px;
  font-size: 13.5px; font-weight: 650; color: var(--brand);
}
.article-more .icon { width: 14px; height: 14px; transition: transform 0.18s ease; }
.article-card:hover .article-more .icon { transform: translateX(4px); }

.article-grid .article-card { flex-direction: column; align-items: stretch; gap: 16px; padding: 16px; }
.article-grid .article-cover { width: 100%; }
.article-grid .article-more { margin-top: auto; padding-top: 8px; }

/* ---------- Product Modules (AI LAB 2x2 Bento) ---------- */
.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.product-card {
  --tone: #0284c7; --tone-bg: rgba(2, 132, 199, 0.10); --tone-wash: rgba(2, 132, 199, 0.12);
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; padding: 28px;
  border-radius: var(--radius-xl); background: var(--surface);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  transition: all 0.22s ease;
}
.product-glow {
  position: absolute; top: -60px; right: -50px; width: 240px; height: 240px; border-radius: 50%;
  background: radial-gradient(circle, var(--tone-wash) 0%, transparent 70%);
  pointer-events: none; transition: transform 0.35s ease;
}
.product-grid-tex {
  position: absolute; top: 0; right: 0; width: 160px; height: 120px; pointer-events: none;
  background-image: radial-gradient(color-mix(in srgb, var(--tone) 26%, transparent) 1px, transparent 1px);
  background-size: 14px 14px;
  mask-image: radial-gradient(circle at 100% 0%, #000, transparent 74%);
  -webkit-mask-image: radial-gradient(circle at 100% 0%, #000, transparent 74%);
}
.product-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--tone) 42%, transparent);
  box-shadow: var(--shadow-md);
}
.product-card:hover .product-glow { transform: scale(1.25); }

.product-card.accent-purple { --tone: #7c3aed; --tone-bg: rgba(124, 58, 237, 0.11); --tone-wash: rgba(124, 58, 237, 0.16); }
.product-card.accent-green  { --tone: #059669; --tone-bg: rgba(5, 150, 105, 0.11);  --tone-wash: rgba(16, 185, 129, 0.16); }
.product-card.accent-yellow { --tone: #d97706; --tone-bg: rgba(217, 119, 6, 0.12);  --tone-wash: rgba(245, 158, 11, 0.17); }
.product-card.accent-cyan   { --tone: #0284c7; --tone-bg: rgba(2, 132, 199, 0.11);  --tone-wash: rgba(14, 165, 233, 0.16); }
.product-card.accent-paper,
.product-card.accent-gray   { --tone: #4f46e5; --tone-bg: rgba(79, 70, 229, 0.10);  --tone-wash: rgba(79, 70, 229, 0.14); }
html.dark .product-card.accent-purple { --tone: #c4b5fd; --tone-bg: rgba(139, 92, 246, 0.20); --tone-wash: rgba(139, 92, 246, 0.24); }
html.dark .product-card.accent-green  { --tone: #6ee7b7; --tone-bg: rgba(16, 185, 129, 0.20); --tone-wash: rgba(16, 185, 129, 0.22); }
html.dark .product-card.accent-yellow { --tone: #fcd34d; --tone-bg: rgba(245, 158, 11, 0.20); --tone-wash: rgba(245, 158, 11, 0.22); }
html.dark .product-card.accent-cyan   { --tone: #7dd3fc; --tone-bg: rgba(14, 165, 233, 0.20); --tone-wash: rgba(14, 165, 233, 0.24); }

.product-cover {
  position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-md);
  overflow: hidden; border: 1px solid var(--border); margin-bottom: 18px;
}
.product-cover img { width: 100%; height: 100%; }

.product-top {
  position: relative; display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 16px;
}
.product-badges { display: flex; align-items: center; gap: 10px; min-width: 0; }
.product-icon-badge {
  width: 40px; height: 40px; border-radius: 11px;
  background: var(--tone-bg); color: var(--tone);
  border: 1px solid color-mix(in srgb, var(--tone) 20%, transparent);
  display: inline-grid; place-items: center; flex-shrink: 0;
}
.product-id { font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--muted); }
.product-status {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; color: var(--text-secondary);
  padding: 4px 11px; border-radius: 999px;
  background: var(--bg-subtle); border: 1px solid var(--border); flex-shrink: 0;
}
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--tone); box-shadow: 0 0 8px var(--tone); }

.product-card h3 { position: relative; font-size: 21px; font-weight: 760; letter-spacing: -0.02em; margin-bottom: 10px; }
.product-card h3 a:hover { color: var(--tone); }
.product-desc {
  position: relative; font-size: 14.5px; color: var(--text-secondary); line-height: 1.72;
  margin-bottom: 18px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.product-cmd {
  position: relative; align-self: flex-start;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 11px; border-radius: 8px;
  background: var(--bg-subtle); border: 1px solid var(--border);
  font-family: var(--mono); font-size: 12px; color: var(--text-secondary);
  margin-bottom: 20px; max-width: 100%;
}
.product-cmd span { color: var(--tone); font-weight: 700; }
.product-cmd code { font-family: inherit; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.product-foot {
  position: relative; margin-top: auto; padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.product-meta { color: var(--muted); display: flex; gap: 6px; }

/* ---------- NEW Module 1: AI Bento Architecture Matrix ---------- */
.bento-matrix {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 20px;
}
.bento-card {
  border-radius: var(--radius-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 28px;
  overflow: hidden;
  transition: border-color 0.22s ease, box-shadow 0.22s ease;
}
.bento-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); }

.bento-radar { grid-column: span 7; display: flex; flex-direction: column; gap: 20px; }
.bento-card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
}
.bento-card-head .eyebrow { margin-bottom: 0; }

.radar-tabs {
  display: inline-flex; flex-wrap: wrap; gap: 4px;
  padding: 4px; border-radius: 11px;
  background: var(--bg-subtle); border: 1px solid var(--border);
}
.radar-tab {
  height: 30px; padding: 0 12px; border-radius: 7px;
  font-size: 12.5px; font-weight: 600; color: var(--text-secondary);
  transition: all 0.16s ease;
}
.radar-tab:hover { color: var(--text); }
.radar-tab.active {
  background: var(--surface); color: var(--brand);
  box-shadow: var(--shadow-xs);
}

.radar-panel { display: flex; flex-direction: column; gap: 16px; }
.radar-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.radar-count { color: var(--muted); }
.radar-summary { font-size: 15.5px; color: var(--text-secondary); line-height: 1.75; }
.radar-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.tool-chip {
  height: 28px; padding: 0 11px; border-radius: 8px;
  background: var(--bg-subtle); border: 1px solid var(--border);
  font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--text);
  display: inline-flex; align-items: center;
}
.radar-links {
  margin-top: 4px; padding-top: 16px; border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 8px;
}
.radar-links-label { color: var(--muted); margin-bottom: 2px; }
.radar-article {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 11px 14px; border-radius: 12px;
  background: var(--bg-subtle); border: 1px solid transparent;
  transition: all 0.18s ease;
}
.radar-article:hover {
  background: var(--brand-soft); border-color: var(--border-strong);
  transform: translateX(3px);
}
.radar-art-title {
  font-size: 14px; font-weight: 650; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.radar-art-date {
  display: inline-flex; align-items: center; gap: 5px;
  color: var(--brand); flex-shrink: 0;
}
.radar-art-date .icon { width: 13px; height: 13px; }

/* Dark Obsidian Pulse Card with Bespoke 3D Optical Glass Art */
.bento-pulse {
  grid-column: span 5;
  position: relative;
  background: #070b16;
  color: #f8fafc;
  border-color: rgba(56, 189, 248, 0.28);
  box-shadow: 0 22px 54px rgba(11, 17, 32, 0.24);
  --spot-glow: rgba(56, 189, 248, 0.18);
}
.bento-art-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: right center;
  opacity: 0.48; pointer-events: none;
  mask-image: linear-gradient(125deg, rgba(0, 0, 0, 0.12) 0%, rgba(0, 0, 0, 0.85) 100%);
  -webkit-mask-image: linear-gradient(125deg, rgba(0, 0, 0, 0.12) 0%, rgba(0, 0, 0, 0.85) 100%);
}
.bento-pulse-inner {
  position: relative; z-index: 1; height: 100%;
  display: flex; flex-direction: column; gap: 12px;
}
.pulse-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pulse-eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 11.5px; font-weight: 700;
  color: #67e8f9; letter-spacing: 0.08em;
}
.pulse-clock { color: #94a3b8; }
.pulse-clock b { color: #f8fafc; font-weight: 700; }
.bento-pulse h3 { font-size: 22px; font-weight: 780; color: #ffffff; letter-spacing: -0.02em; }
.bento-pulse p { font-size: 13.5px; color: #94a3b8; line-height: 1.65; }

.heatmap-wrap {
  margin-top: 6px; padding: 14px; border-radius: 14px;
  background: rgba(7, 11, 22, 0.72); backdrop-filter: blur(12px);
  border: 1px solid rgba(148, 163, 184, 0.16);
}
.heatmap-head {
  display: flex; justify-content: space-between; color: #94a3b8;
  font-size: 10.5px; margin-bottom: 10px;
}
.heatmap-grid {
  display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 5px;
}
.hm-cell {
  aspect-ratio: 1; border-radius: 4px; display: block;
  background: rgba(148, 163, 184, 0.14);
  transition: transform 0.15s ease;
}
.hm-cell:hover { transform: scale(1.25); }
.hm-cell.lvl-1 { background: rgba(56, 189, 248, 0.30); }
.hm-cell.lvl-2 { background: rgba(56, 189, 248, 0.72); box-shadow: 0 0 8px rgba(56, 189, 248, 0.45); }
.hm-cell.lvl-3 { background: linear-gradient(135deg, #22d3ee, #818cf8); box-shadow: 0 0 10px rgba(34, 211, 238, 0.65); }

.pulse-stats {
  margin-top: auto; padding-top: 14px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
}
.pulse-stats strong {
  display: block; font-size: 22px; font-weight: 800; color: #ffffff;
  font-variant-numeric: tabular-nums; line-height: 1.15;
}
.pulse-stats span { font-size: 11.5px; color: #94a3b8; }

.bento-stack, .bento-manifesto, .bento-nexus { grid-column: span 4; display: flex; flex-direction: column; gap: 12px; }
.bento-stack h3 { font-size: 18px; font-weight: 740; }
.stack-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.stack-pill {
  padding: 6px 12px; border-radius: 9px;
  background: var(--bg-subtle); border: 1px solid var(--border);
  font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--text);
  transition: all 0.18s ease;
}
.stack-pill:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-1px); }

.bento-manifesto {
  background:
    radial-gradient(80% 80% at 100% 0%, rgba(124, 58, 237, 0.09), transparent 65%),
    var(--surface);
}
.bento-manifesto blockquote {
  margin: 0; font-size: 19px; font-weight: 750; line-height: 1.45;
  letter-spacing: -0.02em; color: var(--text);
}
.manifesto-sub { font-size: 13.5px; color: var(--text-secondary); line-height: 1.7; margin-top: auto; }

.nexus-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: auto; }
.nexus-tile {
  padding: 13px 12px; border-radius: 12px;
  background: var(--bg-subtle); border: 1px solid var(--border);
  display: flex; align-items: center; gap: 9px;
  font-size: 13px; font-weight: 620; color: var(--text);
  transition: all 0.18s ease;
}
.nexus-tile .icon { width: 16px; height: 16px; color: var(--brand); }
.nexus-tile:hover { background: var(--brand-soft); border-color: var(--border-strong); color: var(--brand); transform: translateY(-1px); }

/* ---------- NEW Module 2: Interactive Prompt Deck ---------- */
.prompt-deck {
  display: grid; grid-template-columns: 310px minmax(0, 1fr);
  border-radius: var(--radius-xl); overflow: hidden;
  background: #090e1c; color: #f1f5f9;
  border: 1px solid rgba(56, 189, 248, 0.25);
  box-shadow: 0 24px 64px rgba(11, 17, 32, 0.22);
  --spot-glow: rgba(56, 189, 248, 0.15);
}
.prompt-tabs {
  padding: 16px; border-right: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(255, 255, 255, 0.02);
  display: flex; flex-direction: column; gap: 8px;
}
.prompt-tab {
  width: 100%; padding: 14px; border-radius: 13px; text-align: left;
  display: flex; align-items: flex-start; gap: 12px;
  border: 1px solid transparent; transition: all 0.18s ease;
}
.prompt-tab:hover { background: rgba(255, 255, 255, 0.04); }
.prompt-tab.active {
  background: rgba(56, 189, 248, 0.11);
  border-color: rgba(56, 189, 248, 0.32);
}
.prompt-num {
  padding: 3px 7px; border-radius: 6px;
  background: rgba(148, 163, 184, 0.12); color: #94a3b8; font-weight: 700;
}
.prompt-tab.active .prompt-num { background: rgba(34, 211, 238, 0.20); color: #67e8f9; }
.prompt-tab-copy { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.prompt-tab-copy strong { font-size: 14px; font-weight: 680; color: #f8fafc; }
.prompt-tab-copy small { font-size: 12px; color: #94a3b8; }

.prompt-stage {
  padding: 26px 28px; display: flex; flex-direction: column; gap: 18px; min-width: 0;
}
.prompt-stage-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.prompt-tag {
  display: inline-block; font-family: var(--mono); font-size: 11px; font-weight: 700;
  color: #67e8f9; margin-bottom: 6px;
}
.prompt-stage-head h3 { font-size: 20px; font-weight: 760; color: #ffffff; margin-bottom: 4px; }
.prompt-stage-head p { font-size: 13.5px; color: #94a3b8; }
.prompt-code {
  margin: 0; padding: 18px 20px; border-radius: 14px;
  background: rgba(2, 6, 23, 0.72); border: 1px solid rgba(148, 163, 184, 0.16);
  font-family: var(--mono); font-size: 13px; line-height: 1.78; color: #cbd5e1;
  white-space: pre-wrap; word-break: break-word; overflow-x: auto;
}
.prompt-stage-foot {
  margin-top: auto; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: 11px; color: #64748b;
}

/* ---------- NEW Module 3: Horizontal Evolution Milestone Strip ---------- */
.milestone-strip {
  position: relative;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px;
}
.milestone-line {
  position: absolute; top: 34px; left: 24px; right: 24px; height: 2px;
  background: linear-gradient(90deg, #06b6d4, #3b82f6, #8b5cf6);
  opacity: 0.28; pointer-events: none;
}
.milestone-card {
  --tone: #2563eb;
  padding: 24px; border-radius: var(--radius-xl);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 10px;
  transition: all 0.2s ease;
}
.milestone-card.accent-purple { --tone: #7c3aed; }
.milestone-card.accent-green  { --tone: #059669; }
.milestone-card.accent-yellow { --tone: #d97706; }
.milestone-card.accent-gray   { --tone: #64748b; }
.milestone-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--tone) 40%, transparent); box-shadow: var(--shadow-md); }
.milestone-dot-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.milestone-dot {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--tone); box-shadow: 0 0 0 5px color-mix(in srgb, var(--tone) 18%, transparent);
}
.milestone-dot-row .mono-meta { color: var(--muted); }
.milestone-label {
  align-self: flex-start; padding: 3px 10px; border-radius: 6px;
  background: color-mix(in srgb, var(--tone) 10%, transparent); color: var(--tone);
  font-family: var(--mono); font-size: 11.5px; font-weight: 650;
}
.milestone-card h3 { font-size: 17.5px; font-weight: 740; line-height: 1.38; }
.milestone-card p {
  font-size: 14px; color: var(--text-secondary); line-height: 1.7;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* ---------- Obsidian High-Tech Connect Dock ---------- */
.connect-dock {
  position: relative; overflow: hidden;
  padding: 50px 52px; border-radius: var(--radius-xl);
  background: #070b16;
  color: #f8fafc;
  border: 1px solid rgba(56, 189, 248, 0.30);
  box-shadow: 0 28px 72px rgba(7, 11, 22, 0.28);
  display: flex; align-items: center; justify-content: space-between; gap: 36px;
  --spot-glow: rgba(56, 189, 248, 0.16);
}
.connect-art {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: right center;
  opacity: 0.72; pointer-events: none;
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0.65) 55%, rgba(0, 0, 0, 0.95) 100%);
  -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0.65) 55%, rgba(0, 0, 0, 0.95) 100%);
}
.connect-grid-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(56, 189, 248, 0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(56, 189, 248, 0.08) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.7), transparent 85%);
  -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.7), transparent 85%);
}
.connect-copy { position: relative; z-index: 1; max-width: 660px; }
.connect-copy .eyebrow { color: #38bdf8; }
.connect-copy h2 { font-size: clamp(22px, 2.4vw, 30px); font-weight: 800; letter-spacing: -0.025em; margin-bottom: 10px; color: #ffffff; }
.connect-copy p:last-child { font-size: 15px; color: #94a3b8; line-height: 1.75; }
.connect-actions { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 12px; flex-shrink: 0; }

/* ---------- Inner Pages Banner & Controls ---------- */
.page { flex: 1; }
.page-banner {
  position: relative; overflow: hidden;
  padding: 46px 0 36px; border-bottom: 1px solid var(--border);
  background:
    radial-gradient(50% 90% at 10% 0%, rgba(14, 165, 233, 0.13), transparent 68%),
    radial-gradient(45% 90% at 90% 0%, rgba(124, 58, 237, 0.13), transparent 68%),
    var(--surface);
}
.page-banner .container { position: relative; z-index: 1; }
.page-banner h1 { font-size: clamp(32px, 4vw, 46px); font-weight: 820; letter-spacing: -0.03em; line-height: 1.15; margin-bottom: 12px; }
.page-desc { font-size: 16px; color: var(--text-secondary); line-height: 1.75; white-space: pre-line; max-width: 720px; }
.page-content { padding-top: 36px; padding-bottom: 72px; }

.toolbar { margin-top: 26px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.search { position: relative; flex: 1; max-width: 520px; display: flex; align-items: center; }
.search > .icon { position: absolute; left: 15px; width: 17px; height: 17px; color: var(--brand); pointer-events: none; }
.search input {
  width: 100%; height: 44px; padding: 0 74px 0 44px;
  border-radius: 12px; border: 1px solid var(--border);
  background: var(--bg); font-size: 14.5px; outline: none; transition: all 0.18s ease;
}
.search input::-webkit-search-cancel-button { display: none; }
.search input::placeholder { color: var(--muted); }
.search input:focus { background: var(--surface); border-color: var(--brand); box-shadow: 0 0 0 4px var(--ring); }
.search kbd {
  position: absolute; right: 12px; padding: 2px 7px; border-radius: 6px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--muted); font-size: 11px; font-family: var(--mono); pointer-events: none;
}
.search-clear {
  position: absolute; right: 9px; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; color: var(--muted);
}
.search-clear:hover { background: var(--bg-muted); color: var(--text); }
.search-clear .icon { width: 14px; height: 14px; }

.segmented { display: inline-flex; padding: 4px; border-radius: 12px; background: var(--bg-subtle); border: 1px solid var(--border); }
.segmented button {
  height: 34px; padding: 0 14px; border-radius: 8px;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13.5px; font-weight: 560; color: var(--muted); transition: all 0.16s ease;
}
.segmented button .icon { width: 15px; height: 15px; }
.segmented button.selected { background: var(--surface); color: var(--brand); font-weight: 680; box-shadow: var(--shadow-xs); }

.tag-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.filter-pill {
  height: 32px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text-secondary); font-size: 13px; font-weight: 560; transition: all 0.16s ease;
}
.filter-pill:hover { border-color: var(--border-strong); color: var(--brand); }
.filter-pill.active { background: var(--brand-grad); border-color: transparent; color: #ffffff; }

.load-more { margin-top: 40px; text-align: center; }
.results-count { margin-top: 28px; text-align: center; color: var(--muted); }
.pagination { margin-top: 40px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.page-num { min-width: 36px; height: 36px; padding: 0 10px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--text-secondary); }
.page-num:hover { background: var(--bg-subtle); color: var(--text); }
.page-num.active { background: var(--brand-grad); color: #ffffff; box-shadow: var(--shadow-brand); }

/* ---------- About & Timeline ---------- */
.about-banner { padding: 48px 0 56px; }
.about-panel {
  display: grid; grid-template-columns: 260px 1fr; gap: 52px; align-items: center;
  padding: 44px; border-radius: var(--radius-xl);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-md);
}
.portrait { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.portrait-frame {
  width: 100%; aspect-ratio: 1; padding: 3.5px; border-radius: 26px;
  background: var(--brand-grad); box-shadow: 0 18px 42px rgba(37, 99, 235, 0.22);
}
.portrait-frame img { width: 100%; height: 100%; border-radius: 22.5px; background: #ffffff; }
.portrait-status {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  background: var(--bg-subtle); border: 1px solid var(--border);
  font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--text-secondary);
}
.about-copy { min-width: 0; }
.about-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.about-copy h1 { font-size: clamp(32px, 4vw, 44px); font-weight: 820; letter-spacing: -0.03em; margin-bottom: 6px; }
.about-subtitle { font-size: 17.5px; font-weight: 620; color: var(--brand); margin-bottom: 20px; }
.bio { display: flex; flex-direction: column; gap: 14px; font-size: 16px; line-height: 1.85; color: var(--text-secondary); }
.about-actions { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; }

.timeline { position: relative; padding-left: 36px; display: flex; flex-direction: column; gap: 18px; }
.timeline::before { content: ''; position: absolute; top: 10px; bottom: 10px; left: 8px; width: 2px; background: var(--border); }
.timeline-progress {
  position: absolute; top: 10px; bottom: 10px; left: 8px; width: 2px;
  background: var(--brand-grad); transform: scaleY(var(--timeline-progress, 0));
  transform-origin: top; transition: transform 0.2s ease-out;
}
.timeline-item {
  --tone: #2563eb; position: relative; padding: 26px 30px; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-xs);
  transition: all 0.2s ease;
}
.timeline-item.accent-purple { --tone: #7c3aed; }
.timeline-item.accent-green  { --tone: #059669; }
.timeline-item.accent-yellow { --tone: #d97706; }
.timeline-item.accent-gray   { --tone: #64748b; }
.timeline-item:hover, .timeline-item.is-current { border-color: color-mix(in srgb, var(--tone) 40%, transparent); box-shadow: var(--shadow-md); }
.timeline-item::before {
  content: ''; position: absolute; left: -34px; top: 30px; width: 14px; height: 14px;
  border-radius: 50%; background: var(--surface); border: 3px solid var(--tone); transition: all 0.2s ease;
}
.timeline-item.is-current::before { background: var(--tone); box-shadow: 0 0 0 5px color-mix(in srgb, var(--tone) 22%, transparent); }
.timeline-label {
  display: inline-flex; padding: 3px 11px; border-radius: 6px;
  background: color-mix(in srgb, var(--tone) 11%, transparent); color: var(--tone);
  font-family: var(--mono); font-size: 12px; font-weight: 650; margin-bottom: 10px;
}
.timeline-item h3 { font-size: 18.5px; font-weight: 740; letter-spacing: -0.015em; margin-bottom: 8px; }
.timeline-item p { font-size: 15px; color: var(--text-secondary); line-height: 1.78; }

.about-main.motion-ready .about-reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1); }
.about-main.motion-ready .about-reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- Empty, 404 & Footer ---------- */
.empty {
  padding: 68px 24px; border-radius: var(--radius-xl);
  border: 1px dashed var(--border-strong); background: var(--surface); text-align: center;
}
.empty-icon { width: 48px; height: 48px; border-radius: 14px; background: var(--brand-soft); color: var(--brand); display: inline-grid; place-items: center; margin-bottom: 14px; }
.empty h2 { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.empty p { font-size: 14.5px; color: var(--muted); }
.not-found { text-align: center; padding: 96px 24px; display: flex; flex-direction: column; align-items: center; gap: 14px; }

.site-footer { margin-top: auto; border-top: 1px solid var(--border); background: var(--surface); padding: 40px 36px 32px; }
.footer-inner, .footer-bottom { max-width: 1320px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.footer-brand { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.footer-brand img { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--border); background: #fff; }
.footer-brand strong { font-weight: 720; margin-right: 8px; }
.footer-brand span { color: var(--muted); }
.footer-links { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; font-size: 13.5px; font-weight: 550; color: var(--text-secondary); }
.footer-links a { display: inline-flex; align-items: center; gap: 5px; transition: color 0.16s ease; }
.footer-links a .icon { width: 14px; height: 14px; }
.footer-links a:hover { color: var(--brand); }
.footer-bottom { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--muted); }
.icp-footer a:hover { color: var(--brand); text-decoration: underline; }

/* ---------- Contact Dialog, Command Palette (Ctrl+K) & Toast ---------- */
dialog#contact {
  width: min(92vw, 440px); padding: 30px; border-radius: var(--radius-xl);
  border: 1px solid var(--border); background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg);
}
dialog#contact::backdrop, dialog#cmdk::backdrop { background: rgba(5, 8, 18, 0.54); backdrop-filter: blur(8px); }
.dialog-eyebrow { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 0.1em; color: var(--brand); margin-bottom: 4px; }
dialog#contact h2 { font-size: 22px; font-weight: 780; letter-spacing: -0.02em; margin-bottom: 18px; }
.dialog-close { float: right; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; color: var(--muted); }
.dialog-close:hover { background: var(--bg-subtle); color: var(--text); }
.contact-row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--radius-md); background: var(--bg-subtle); border: 1px solid var(--border); margin-top: 10px; transition: border-color 0.18s ease; }
a.contact-row:hover { border-color: var(--border-strong); }
.contact-icon { width: 38px; height: 38px; border-radius: 11px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; flex-shrink: 0; }
.contact-detail { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.contact-detail small { font-size: 11.5px; color: var(--muted); }
.contact-detail strong { font-size: 14.5px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; }
.contact-go { color: var(--muted); width: 16px; height: 16px; }
.contact-empty { font-size: 14px; color: var(--muted); padding: 8px 0; }

dialog#cmdk {
  width: min(94vw, 620px); padding: 0; border-radius: 20px; overflow: hidden;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  box-shadow: var(--shadow-lg);
}
.cmdk-head {
  display: flex; align-items: center; gap: 12px; padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.cmdk-search-ic {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--brand-soft); color: var(--brand);
  display: grid; place-items: center; font-family: var(--mono); font-size: 14px; font-weight: 700;
}
.cmdk-head input { flex: 1; border: 0; background: transparent; outline: none; font-size: 15px; }
.cmdk-head kbd {
  font-family: var(--mono); font-size: 11px; padding: 3px 7px; border-radius: 6px;
  background: var(--bg-subtle); border: 1px solid var(--border); color: var(--muted);
}
.cmdk-list { max-height: 380px; overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 3px; }
.cmdk-item {
  width: 100%; padding: 10px 12px; border-radius: 11px; text-align: left;
  display: flex; align-items: center; gap: 12px; transition: background-color 0.12s ease;
}
.cmdk-item:hover, .cmdk-item.active { background: var(--brand-soft); }
.cmdk-ic { color: var(--brand); display: inline-flex; flex-shrink: 0; }
.cmdk-ic .icon { width: 16px; height: 16px; }
.cmdk-title { flex: 1; min-width: 0; font-size: 14px; font-weight: 560; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmdk-kind { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--bg-subtle); color: var(--text-secondary); flex-shrink: 0; }
.cmdk-meta { font-family: var(--mono); font-size: 11.5px; color: var(--muted); max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmdk-empty { padding: 36px; text-align: center; font-size: 14px; color: var(--muted); }
.cmdk-foot {
  padding: 10px 18px; border-top: 1px solid var(--border); background: var(--bg-subtle);
  display: flex; align-items: center; gap: 18px; font-family: var(--mono); font-size: 11px; color: var(--muted);
}
.cmdk-foot span:last-child { margin-left: auto; }

#toast {
  position: fixed; bottom: 26px; left: 50%; transform: translate(-50%, 16px);
  opacity: 0; pointer-events: none; z-index: 260;
  display: inline-flex; align-items: center; gap: 10px;
  max-width: min(92vw, 520px); padding: 12px 20px; border-radius: 999px;
  background: #0b101d; color: #ffffff; border: 1px solid rgba(56, 189, 248, 0.30);
  box-shadow: var(--shadow-lg); font-size: 13.5px; font-weight: 550;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
html.dark #toast { background: #f8fafc; color: #0b1120; }
#toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast-dot { width: 8px; height: 8px; border-radius: 50%; background: #38bdf8; flex-shrink: 0; }
#toast.toast-success .toast-dot { background: #34d399; }
#toast.toast-error .toast-dot { background: #fb7185; }
.toast-action { margin-left: 4px; padding: 3px 11px; border-radius: 999px; background: rgba(255, 255, 255, 0.16); color: inherit; font-size: 12px; font-weight: 650; }
html.dark .toast-action { background: rgba(15, 23, 42, 0.14); }

/* ---------- Responsive ---------- */
@media (max-width: 1140px) {
  .container, .header-inner { padding-left: 24px; padding-right: 24px; }
  .hero-grid { gap: 28px; }
  .spotlight-body { padding: 26px; }
}

@media (max-width: 1020px) {
  .bento-radar, .bento-pulse { grid-column: span 12; }
  .bento-stack, .bento-manifesto, .bento-nexus { grid-column: span 6; }
  .bento-nexus { grid-column: span 12; }
  .prompt-deck { grid-template-columns: 1fr; }
  .prompt-tabs { border-right: 0; border-bottom: 1px solid rgba(148, 163, 184, 0.14); flex-direction: row; overflow-x: auto; }
  .prompt-tab { min-width: 220px; }
  .milestone-strip { grid-template-columns: 1fr; }
  .milestone-line { display: none; }
}

@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .article-spotlight { grid-template-columns: 1fr; }
  .spotlight-cover { min-height: 240px; }
  .article-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .connect-dock { flex-direction: column; align-items: flex-start; padding: 32px; }
  .about-panel { grid-template-columns: 200px 1fr; gap: 32px; padding: 32px; }
  .cmdk-trigger span, .cmdk-trigger kbd { display: none; }
  .cmdk-trigger { padding: 0 10px; }
}

@media (max-width: 760px) {
  .portal-topbar { padding: 14px 16px 0; }
  .portal-clock { display: none; }
  .portal-center { padding: 12px 16px 104px; }
  .portal-telemetry { gap: 14px; padding: 10px 16px; }
  .portal-enter-btn { height: 48px; padding: 0 26px; font-size: 15px; }
  .portal-hint { display: none; }
  .vision-dock { bottom: 26px; padding: 5px 6px; gap: 2px; border-radius: 18px; }
  .dock-item { height: 42px; padding: 0 11px; gap: 0; border-radius: 13px; flex-direction: column; justify-content: center; }
  .dock-label { font-size: 10px; margin-top: 2px; }
  .dock-badge { display: none; }
  .dock-util, .dock-sep { display: none; }
  .hub-quick-cards { width: 100%; }
  .hub-stat-pill { flex: 1; }
  .container, .header-inner { padding-left: 16px; padding-right: 16px; }
  .brand-tag { display: none; }
  .header-actions { gap: 4px; }
  .site-footer { padding: 32px 16px 26px; }
  .menu-btn { display: inline-grid; }
  .header-contact span { display: none; }
  .header-contact { padding: 0 10px; }
  .site-nav {
    display: none; position: absolute; top: 66px; left: 0; right: 0;
    padding: 12px 16px; border-radius: 0; border-left: 0; border-right: 0;
    background: var(--surface); box-shadow: var(--shadow-md); justify-content: space-around;
  }
  .site-nav.open { display: flex; }
  .hero-band { padding: 28px 0 38px; }
  .crosshair { display: none; }
  .hero-cta .btn { width: 100%; }
  .console-hud { grid-template-columns: 1fr 1fr; }
  .hud-days { grid-column: 1 / -1; border-right: 0; border-bottom: 1px solid rgba(148, 163, 184, 0.12); }
  .bento-pair { grid-template-columns: 1fr; }
  .home-section { padding-top: 46px; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .search { max-width: none; }
  .search kbd { display: none; }
  .segmented { align-self: flex-end; }
  .article-grid, .product-grid { grid-template-columns: 1fr; }
  .bento-stack, .bento-manifesto, .bento-nexus { grid-column: span 12; }
  .bento-card { padding: 20px; }
  .prompt-stage { padding: 20px; }
  .connect-dock { padding: 30px 22px; }
  .article-card { padding: 14px; gap: 14px; }
  .article-cover { width: 118px; aspect-ratio: 4 / 3; }
  .article-grid .article-cover { width: 100%; aspect-ratio: 16 / 10; }
  .about-panel { grid-template-columns: 1fr; padding: 24px 20px; gap: 24px; }
  .portrait { max-width: 170px; margin: 0 auto; }
  .footer-inner, .footer-bottom { flex-direction: column; align-items: flex-start; }
  .cmdk-meta { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
