/* ==========================================================================
   极乐 (jilespace) — Editorial Swiss Minimalist × Vibe Lab Personal Homepage
   Dual Theme: Warm Alabaster Paper (Light) & Obsidian Charcoal Ink (Dark)
   ========================================================================== */

:root {
  /* Light Theme — Warm Alabaster Paper */
  --bg: #f6f5f0;
  --bg-subtle: #eeece4;
  --surface: #ffffff;
  --surface-elevated: rgba(255, 255, 255, 0.8);
  --surface-hover: #fbfaf7;
  --border: rgba(20, 20, 19, 0.09);
  --border-strong: rgba(20, 20, 19, 0.16);

  --text-primary: #141413;
  --text-secondary: #57554e;
  --text-tertiary: #87847a;

  --accent: #d9522b;
  --accent-soft: rgba(217, 82, 43, 0.11);
  --accent-hover: #bf4420;
  --amber: #c78312;
  --amber-soft: rgba(199, 131, 18, 0.12);
  --status-green: #1d8f5b;
  --status-green-soft: rgba(29, 143, 91, 0.14);

  --spotlight: rgba(217, 82, 43, 0.065);
  --shadow-sm: 0 1px 2px rgba(20, 20, 19, 0.04), 0 4px 12px rgba(20, 20, 19, 0.03);
  --shadow-md: 0 8px 30px rgba(20, 20, 19, 0.06), 0 1px 3px rgba(20, 20, 19, 0.04);
  --shadow-lg: 0 24px 60px rgba(20, 20, 19, 0.12), 0 4px 16px rgba(20, 20, 19, 0.05);

  --heat-0: #eae7de;
  --heat-1: #f0ccb8;
  --heat-2: #e79d7b;
  --heat-3: #df754d;
  --heat-4: #d9522b;

  /* Typography */
  --font-sans: "Plus Jakarta Sans", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-serif: "Instrument Serif", Georgia, "Songti SC", serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Geometry & Motion */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-pill: 999px;
  --container-max: 1140px;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 180ms var(--ease-out-expo);
  --transition-med: 380ms var(--ease-out-expo);
}

[data-theme="dark"] {
  --bg: #0c0c0e;
  --bg-subtle: #141417;
  --surface: #151518;
  --surface-elevated: rgba(21, 21, 24, 0.8);
  --surface-hover: #1b1b20;
  --border: rgba(243, 242, 236, 0.09);
  --border-strong: rgba(243, 242, 236, 0.18);

  --text-primary: #f3f2ec;
  --text-secondary: #a4a199;
  --text-tertiary: #706d66;

  --accent: #eb6d44;
  --accent-soft: rgba(235, 109, 68, 0.15);
  --accent-hover: #f47e57;
  --amber: #f0b245;
  --amber-soft: rgba(240, 178, 69, 0.14);
  --status-green: #32c480;
  --status-green-soft: rgba(50, 196, 128, 0.16);

  --spotlight: rgba(235, 109, 68, 0.1);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(0, 0, 0, 0.24);
  --shadow-md: 0 12px 36px rgba(0, 0, 0, 0.42), 0 1px 3px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 28px 80px rgba(0, 0, 0, 0.65), 0 6px 20px rgba(0, 0, 0, 0.4);

  --heat-0: #1e1e23;
  --heat-1: #48281e;
  --heat-2: #7b3c28;
  --heat-3: #b75333;
  --heat-4: #eb6d44;
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: clip;
  transition: background-color 320ms ease, color 320ms ease;
  position: relative;
}

/* Tactile Paper Grain Overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.026;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.ambient-backdrop {
  position: fixed;
  top: -220px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1240px, 120vw);
  height: 540px;
  background: radial-gradient(
    ellipse at 50% 35%,
    var(--accent-soft) 0%,
    rgba(217, 82, 43, 0.02) 45%,
    transparent 75%
  );
  pointer-events: none;
  z-index: 0;
  filter: blur(42px);
}

::selection {
  background: var(--accent-soft);
  color: var(--accent);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #f3996b);
  z-index: 1200;
  pointer-events: none;
  transition: width 80ms linear;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Floating Pill Header Navigation
   ========================================================================== */

.site-header {
  position: fixed;
  top: 18px;
  left: 0;
  right: 0;
  z-index: 500;
  padding: 0 20px;
  pointer-events: none;
}

.nav-shell {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 10px 8px 14px;
  border-radius: var(--radius-pill);
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  box-shadow: var(--shadow-sm);
  pointer-events: auto;
  transition: box-shadow var(--transition-med), border-color var(--transition-med), background-color 300ms ease;
}

.site-header.scrolled .nav-shell {
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--text-primary);
  color: var(--bg);
  display: grid;
  place-items: center;
  font-size: 0.76rem;
  font-weight: 700;
  font-family: var(--font-mono);
  transition: transform var(--transition-fast), background-color var(--transition-fast);
}

.brand-link:hover .brand-mark {
  transform: rotate(-8deg) scale(1.06);
  background: var(--accent);
  color: #fff;
}

.brand-text {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.brand-name {
  font-size: 0.96rem;
  font-weight: 700;
}

.brand-sub {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

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

.nav-link {
  position: relative;
  padding: 6px 14px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-pill);
  transition: color var(--transition-fast), background-color var(--transition-fast);
}

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

.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
}

.nav-divider {
  width: 1px;
  height: 14px;
  background: var(--border-strong);
  margin: 0 4px;
}

.nav-link-external {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.nav-ext-arrow {
  font-size: 0.74rem;
  color: var(--text-tertiary);
  transition: transform var(--transition-fast), color var(--transition-fast);
}

.nav-link-external:hover .nav-ext-arrow {
  color: var(--accent);
  transform: translate(1.5px, -1.5px);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cmd-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 11px;
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.cmd-trigger:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.kbd {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-tertiary);
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--text-secondary);
  border: 1px solid transparent;
  transition: all var(--transition-fast);
  font-size: 0.78rem;
  font-weight: 600;
}

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

.icon-btn svg {
  width: 16px;
  height: 16px;
}

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

/* Mobile Nav Drawer */
.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 650;
  background: rgba(12, 12, 14, 0.45);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 260ms ease;
  display: flex;
  justify-content: flex-end;
}

.mobile-drawer.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-drawer-panel {
  width: min(300px, 84vw);
  height: 100%;
  background: var(--surface);
  border-left: 1px solid var(--border);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transform: translateX(100%);
  transition: transform 340ms var(--ease-out-expo);
}

.mobile-drawer.open .mobile-drawer-panel {
  transform: translateX(0);
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.mobile-nav-link {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

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

.mobile-drawer-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 0;
}

.mobile-nav-external {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mobile-nav-external .mono {
  font-size: 0.78rem;
  color: var(--text-tertiary);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero {
  padding: 136px 0 84px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.24fr) minmax(0, 0.96fr);
  gap: 42px;
  align-items: center;
}

.status-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--status-green);
  position: relative;
}

.status-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: var(--status-green-soft);
  animation: pulse-ring 2.4s ease-out infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.75); opacity: 0.9; }
  70% { transform: scale(1.9); opacity: 0; }
  100% { transform: scale(1.9); opacity: 0; }
}

.clock-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text-tertiary);
}

.hero-eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 14px;
}

.hero-title {
  font-size: clamp(1.92rem, 3.5vw, 3.12rem);
  line-height: 1.2;
  letter-spacing: -0.03em;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 14px;
}

.hero-title .emphasis {
  display: block;
}

.hero-title-serif {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.3rem, 2.15vw, 1.78rem);
  color: var(--text-tertiary);
  letter-spacing: 0.005em;
  margin-bottom: 22px;
  line-height: 1.35;
}

.hero-subtitle {
  font-size: 1rem;
  line-height: 1.82;
  color: var(--text-secondary);
  max-width: 56ch;
  margin-bottom: 30px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.hero-quick-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 30px;
}

.hero-quick-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-secondary);
  transition: border-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast), background-color var(--transition-fast);
}

.hero-quick-pill svg {
  width: 14px;
  height: 14px;
  color: var(--text-tertiary);
  flex-shrink: 0;
  transition: color var(--transition-fast);
}

.hero-quick-label {
  font-weight: 600;
  color: var(--text-primary);
}

.hero-quick-val {
  font-size: 0.74rem;
  color: var(--text-tertiary);
}

.hero-quick-arrow {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  transition: transform var(--transition-fast), color var(--transition-fast);
}

.hero-quick-pill:hover {
  border-color: var(--accent-border);
  background: var(--surface-hover);
  transform: translateY(-1px);
}

.hero-quick-pill:hover svg,
.hero-quick-pill:hover .hero-quick-arrow {
  color: var(--accent);
}

.hero-quick-pill:hover .hero-quick-arrow {
  transform: translate(1.5px, -1.5px);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 22px;
  border-radius: var(--radius-pill);
  font-size: 0.89rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: transform var(--transition-fast), background-color var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast), color var(--transition-fast);
}

.btn:active {
  transform: scale(0.975);
}

.btn svg {
  width: 16px;
  height: 16px;
  transition: transform var(--transition-fast);
}

.btn-primary {
  background: var(--text-primary);
  color: var(--bg);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--accent);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 10px 26px var(--accent-soft);
}

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

.btn-secondary {
  background: var(--surface);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--surface-hover);
  border-color: var(--text-tertiary);
  transform: translateY(-2px);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  max-width: 520px;
}

.stat-value {
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--text-primary);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  margin-top: 4px;
}

/* Hero Right — Editorial Vibe Lab Console Card */
.hero-visual {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.console-card {
  background: #131316;
  color: #f3f2ec;
  border: 1px solid rgba(243, 242, 236, 0.12);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transition: transform var(--transition-med), box-shadow var(--transition-med);
}

.console-card:hover {
  transform: translateY(-3px);
}

.console-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.035);
  border-bottom: 1px solid rgba(243, 242, 236, 0.08);
}

.console-dots {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.console-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(243, 242, 236, 0.22);
}

.console-dots span:first-child { background: #e86a42; }
.console-dots span:nth-child(2) { background: #e5b555; }
.console-dots span:nth-child(3) { background: #4bc184; }

.console-title {
  font-size: 0.73rem;
  color: rgba(243, 242, 236, 0.56);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.console-live {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: #eb6d44;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: rgba(235, 109, 68, 0.14);
  border: 1px solid rgba(235, 109, 68, 0.28);
  flex-shrink: 0;
}

.console-body {
  padding: 18px 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 13px;
  font-size: 0.78rem;
  line-height: 1.55;
}

.console-entry {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.console-cmd {
  color: #eb6d44;
  font-weight: 500;
}

.console-out {
  color: rgba(243, 242, 236, 0.84);
  font-family: var(--font-sans);
  font-size: 0.83rem;
}

.console-canvas-wrap {
  position: relative;
  height: 118px;
  border-top: 1px solid rgba(243, 242, 236, 0.08);
  background: #0e0e11;
}

.console-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.console-canvas-meta {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  color: rgba(243, 242, 236, 0.38);
  pointer-events: none;
}

/* Now Card */
.now-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.now-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.now-tag {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  font-weight: 600;
}

.now-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.now-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.83rem;
}

.now-key {
  color: var(--text-tertiary);
  flex-shrink: 0;
  font-size: 0.77rem;
}

.now-val {
  color: var(--text-primary);
  font-weight: 500;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sound-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 500;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  transition: all var(--transition-fast);
}

.sound-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.sound-btn.playing {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: rgba(217, 82, 43, 0.35);
}

.eq-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 11px;
}

.eq-bars span {
  width: 2px;
  height: 4px;
  border-radius: 2px;
  background: currentColor;
}

.eq-bars span:nth-child(2) { height: 8px; }
.eq-bars span:nth-child(3) { height: 5px; }

.sound-btn.playing .eq-bars span {
  animation: eq-bounce 900ms ease-in-out infinite;
}

.sound-btn.playing .eq-bars span:nth-child(2) { animation-delay: 180ms; }
.sound-btn.playing .eq-bars span:nth-child(3) { animation-delay: 360ms; }

@keyframes eq-bounce {
  0%, 100% { height: 3px; }
  50% { height: 11px; }
}

/* ==========================================================================
   Sections & Spotlight Cards
   ========================================================================== */

.section {
  padding: 84px 0;
  position: relative;
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 36px;
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

.section-kicker::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--accent);
}

.section-title {
  font-size: clamp(1.68rem, 2.9vw, 2.3rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 58ch;
  margin-top: 8px;
}

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: border-color var(--transition-fast), transform var(--transition-med), box-shadow var(--transition-med);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    420px circle at var(--mx, 50%) var(--my, 50%),
    var(--spotlight),
    transparent 65%
  );
  opacity: 0;
  pointer-events: none;
  transition: opacity 320ms ease;
}

.card:hover::before {
  opacity: 1;
}

.card:hover {
  border-color: var(--border-strong);
}

/* ==========================================================================
   01 / About Bento Grid
   ========================================================================== */

.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
}

.bento-philosophy,
.bento-location,
.bento-stack,
.bento-rhythm {
  min-width: 0;
}

.bento-philosophy {
  grid-column: span 8;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
}

.bento-location {
  grid-column: span 4;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  background-image: radial-gradient(var(--border) 1px, transparent 1px);
  background-size: 18px 18px;
}

.bento-stack {
  grid-column: span 6;
}

.bento-rhythm {
  grid-column: span 6;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
}

.card-heading {
  font-size: 1.22rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.35;
  margin-bottom: 12px;
}

.prose {
  font-size: 0.93rem;
  color: var(--text-secondary);
  line-height: 1.82;
}

.prose + .prose {
  margin-top: 12px;
}

.principles-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.principle-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.principle-num {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--accent);
}

.principle-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.principle-desc {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  line-height: 1.55;
}

/* Radar Pulse Box */
.radar-box {
  position: relative;
  height: 138px;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  overflow: hidden;
  display: grid;
  place-items: center;
}

.radar-rings {
  position: absolute;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  border: 1px dashed var(--border-strong);
  opacity: 0.55;
}

.radar-rings::before,
.radar-rings::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--border);
  inset: 36px;
}

.radar-rings::after {
  inset: 74px;
  border-color: var(--border-strong);
}

.radar-pin {
  position: relative;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px var(--accent-soft);
  z-index: 2;
}

.radar-pin::after {
  content: "";
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  opacity: 0;
  animation: radar-wave 3s ease-out infinite;
}

@keyframes radar-wave {
  0% { transform: scale(0.45); opacity: 0.75; }
  100% { transform: scale(2.4); opacity: 0; }
}

.radar-coords {
  position: absolute;
  bottom: 10px;
  left: 12px;
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  background: var(--surface-elevated);
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.location-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.location-city {
  font-size: 1.06rem;
  font-weight: 700;
}

.location-status {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.location-time {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.location-time-label {
  font-size: 0.7rem;
  color: var(--text-tertiary);
  letter-spacing: 0.05em;
}

.location-time-value {
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Toolbox Stack */
.stack-groups {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 14px;
}

.stack-group-name {
  font-size: 0.72rem;
  letter-spacing: 0.07em;
  color: var(--text-tertiary);
  margin-bottom: 7px;
  font-weight: 600;
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.skill-pill {
  font-size: 0.79rem;
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  user-select: none;
}

.skill-pill:hover {
  color: var(--text-primary);
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-1px);
}

/* Build Rhythm Heatmap */
.rhythm-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.rhythm-total {
  text-align: right;
  flex-shrink: 0;
}

.rhythm-total strong {
  display: block;
  font-size: 1.25rem;
  line-height: 1.1;
  color: var(--accent);
}

.rhythm-total span {
  font-size: 0.74rem;
  color: var(--text-tertiary);
}

.heatmap-wrap {
  position: relative;
  overflow-x: auto;
  max-width: 100%;
  padding: 6px 0 4px;
}

.heatmap-grid {
  display: grid;
  grid-template-rows: repeat(7, 1fr);
  grid-auto-flow: column;
  gap: 4px;
  width: 100%;
}

.heat-cell {
  aspect-ratio: 1;
  border-radius: 3px;
  background: var(--heat-0);
  transition: transform 140ms ease;
  cursor: pointer;
}

.heat-cell[data-level="1"] { background: var(--heat-1); }
.heat-cell[data-level="2"] { background: var(--heat-2); }
.heat-cell[data-level="3"] { background: var(--heat-3); }
.heat-cell[data-level="4"] { background: var(--heat-4); }

.heat-cell:hover {
  transform: scale(1.28);
  z-index: 3;
}

.heatmap-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.76rem;
  color: var(--text-tertiary);
}

.heat-legend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.heat-swatch {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.heat-readout {
  min-height: 1.4em;
  color: var(--text-secondary);
}

/* ==========================================================================
   02 / Vibe Code Projects Showroom (Featured + Archive)
   ========================================================================== */

.filter-bar {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 5px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
}

.filter-btn {
  padding: 6px 13px;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.filter-btn:hover {
  color: var(--text-primary);
}

.filter-btn.active {
  background: var(--text-primary);
  color: var(--bg);
}

.filter-count {
  font-size: 0.7rem;
  opacity: 0.65;
}

.sub-block-label {
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sub-block-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

#archiveBlock {
  margin-top: 38px;
}

/* Featured 3-Column Flagship Showcase */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.project-card {
  padding: 0;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.project-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #111114;
  border-bottom: 1px solid var(--border);
}

.project-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.project-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 500;
  background: rgba(16, 16, 19, 0.76);
  color: #f6f5f0;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.featured-star-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.71rem;
  font-weight: 600;
  background: rgba(217, 82, 43, 0.9);
  color: #ffffff;
}

.project-body {
  padding: 20px 22px 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
}

.project-dir {
  font-size: 0.72rem;
  color: var(--text-tertiary);
}

.project-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.project-title {
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.32;
}

.project-arrow {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.project-card:hover .project-arrow,
.archive-card:hover .project-arrow {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: translate(2px, -2px);
}

.project-tagline {
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.65;
  flex: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.tag-chip {
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--bg-subtle);
  color: var(--text-tertiary);
  border: 1px solid var(--border);
}

.project-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.card-action-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.79rem;
  font-weight: 600;
  color: var(--accent);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  transition: all var(--transition-fast);
}

.card-action-link:hover {
  background: var(--accent);
  color: #ffffff;
}

.card-action-muted {
  font-size: 0.76rem;
  color: var(--text-tertiary);
}

.card-private-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
}

.card-private-pill svg {
  width: 12px;
  height: 12px;
  opacity: 0.72;
}

/* Archive Showroom Grid (All Other Projects) */
.archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 18px;
}

/* Balanced 3 + 2 + 2 Editorial Bento when all 7 archive items are visible */
.archive-grid.bento-7 {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.archive-grid.bento-7 > .archive-card {
  grid-column: span 2;
}

.archive-grid.bento-7 > .archive-card:nth-child(n + 4) {
  grid-column: span 3;
}

.archive-card-body-split {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex: 1;
}

.archive-card-main {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.archive-qr-thumb {
  width: 78px;
  height: 78px;
  padding: 6px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid rgba(20, 20, 19, 0.1);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.archive-card:hover .archive-qr-thumb {
  transform: scale(1.06);
}

.archive-qr-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.archive-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  cursor: pointer;
  padding: 22px;
}

.archive-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.archive-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.73rem;
  font-weight: 600;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.cat-pill svg {
  width: 13px;
  height: 13px;
  color: var(--accent);
}

.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-tertiary);
  font-size: 0.94rem;
}

/* ==========================================================================
   03 / Ads × AI Workflow Pillars
   ========================================================================== */

.workflow-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.workflow-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.workflow-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.workflow-step {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.workflow-tag {
  font-size: 0.72rem;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--text-tertiary);
}

.workflow-title {
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.32;
}

.workflow-summary {
  font-size: 0.89rem;
  color: var(--text-secondary);
  line-height: 1.72;
}

.workflow-points {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.workflow-points li {
  position: relative;
  padding-left: 15px;
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.workflow-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.75;
}

/* ==========================================================================
   04 / Contact Section (Email Only: websites@email.cn)
   ========================================================================== */

.contact-card {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 44px;
  padding: 40px;
  align-items: start;
}

.contact-headline {
  font-size: clamp(1.55rem, 2.6vw, 2.12rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.28;
  margin-bottom: 14px;
}

.contact-headline span {
  display: block;
  color: var(--accent);
}

.contact-desc {
  font-size: 0.94rem;
  color: var(--text-secondary);
  margin-bottom: 26px;
}

.email-spotlight-card {
  padding: 22px 24px;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  border: 1px solid var(--border-strong);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.email-spotlight-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.email-spotlight-label {
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  font-weight: 600;
}

.email-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--status-green);
  box-shadow: 0 0 0 4px var(--status-green-soft);
}

.email-spotlight-addr {
  font-size: clamp(1.2rem, 2.2vw, 1.55rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  word-break: break-all;
  transition: color var(--transition-fast);
}

.email-spotlight-addr:hover {
  color: var(--accent);
}

.email-spotlight-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 4px;
}

.elsewhere-block {
  margin-top: 22px;
}

.elsewhere-label {
  font-size: 0.73rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  font-weight: 600;
  margin-bottom: 10px;
}

.elsewhere-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.elsewhere-card {
  display: flex;
  flex-direction: column;
  padding: 15px 16px;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  transition: transform var(--transition-fast), border-color var(--transition-fast), background-color var(--transition-fast);
}

.elsewhere-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-border);
  background: var(--surface-hover);
}

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

.elsewhere-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--text-primary);
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.elsewhere-icon svg {
  width: 15px;
  height: 15px;
}

.elsewhere-arrow {
  font-size: 0.82rem;
  color: var(--text-tertiary);
  transition: transform var(--transition-fast), color var(--transition-fast);
}

.elsewhere-card:hover .elsewhere-icon {
  color: var(--accent);
  border-color: var(--accent-border);
}

.elsewhere-card:hover .elsewhere-arrow {
  color: var(--accent);
  transform: translate(2px, -2px);
}

.elsewhere-card-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.015em;
}

.elsewhere-card-value {
  font-size: 0.74rem;
  color: var(--accent);
  margin-top: 2px;
}

.elsewhere-card-desc {
  font-size: 0.79rem;
  line-height: 1.5;
  color: var(--text-tertiary);
  margin-top: 6px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.form-head {
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  font-weight: 600;
}

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

.field label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.field input,
.field textarea {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--text-primary);
  font: inherit;
  font-size: 0.91rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
}

.field textarea {
  min-height: 112px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  background: var(--surface);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 2px;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  padding: 34px 0 54px;
  border-top: 1px solid var(--border);
  margin-top: 28px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.82rem;
  color: var(--text-tertiary);
}

.footer-left,
.footer-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.footer-sep {
  opacity: 0.45;
}

.footer-icp {
  font-size: 0.78rem;
  color: var(--text-tertiary);
  transition: color var(--transition-fast);
}

.footer-icp:hover {
  color: var(--text-primary);
}

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

.footer-ext-link {
  color: var(--text-secondary);
  font-weight: 500;
  transition: color var(--transition-fast);
}

.footer-ext-link:hover {
  color: var(--accent);
}

.back-top {
  color: var(--text-secondary);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: color var(--transition-fast);
}

.back-top:hover {
  color: var(--accent);
}

/* ==========================================================================
   Modals (Project Detail, MiniApp QR & Command Palette)
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 800;
  background: rgba(12, 12, 14, 0.58);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-dialog {
  width: min(740px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  transform: translateY(16px) scale(0.98);
  transition: transform 320ms var(--ease-out-expo);
  position: relative;
}

.modal-backdrop.open .modal-dialog {
  transform: translateY(0) scale(1);
}

.modal-top-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 24px;
  background: var(--surface-elevated);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.modal-reading-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: var(--accent);
}

.modal-content {
  padding: 26px 30px 32px;
}

.modal-cover {
  width: 100%;
  aspect-ratio: 16 / 8.8;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  margin-bottom: 22px;
  overflow: hidden;
  background: #111114;
}

.modal-title {
  font-size: clamp(1.4rem, 2.5vw, 1.88rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.25;
  margin-bottom: 10px;
}

.modal-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 15px 16px;
  margin: 18px 0 22px;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
}

.meta-cell-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
}

.meta-cell-val {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 3px;
  word-break: break-word;
}

.modal-section-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  font-weight: 700;
  margin: 20px 0 8px;
}

.modal-highlights {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.modal-highlights li {
  position: relative;
  padding-left: 16px;
  font-size: 0.92rem;
  color: var(--text-secondary);
}

.modal-highlights li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

/* Crisp WeChat MiniApp QR Card inside Modal (always high-contrast light quiet zone) */
.modal-qr-box {
  margin-top: 22px;
  padding: 20px;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 20px;
}

.modal-qr-mat {
  width: 136px;
  height: 136px;
  padding: 10px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid rgba(20, 20, 19, 0.08);
  flex-shrink: 0;
}

.modal-qr-mat img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.modal-qr-info h4 {
  font-size: 0.98rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.modal-qr-info p {
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.modal-footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

/* Command Palette Dialog */
.cmd-dialog {
  width: min(560px, 100%);
  align-self: start;
  margin-top: 11vh;
  overflow: hidden;
}

.cmd-input-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.cmd-input-wrap svg {
  width: 18px;
  height: 18px;
  color: var(--text-tertiary);
  flex-shrink: 0;
}

.cmd-input {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font: inherit;
  font-size: 0.98rem;
}

.cmd-input:focus {
  outline: none;
}

.cmd-list {
  max-height: 360px;
  overflow-y: auto;
  padding: 10px;
}

.cmd-group-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-tertiary);
  letter-spacing: 0.05em;
  padding: 8px 12px 4px;
}

.cmd-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-align: left;
  transition: background-color 120ms ease, color 120ms ease;
}

.cmd-item.selected,
.cmd-item:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
}

.cmd-item-badge {
  font-size: 0.73rem;
  color: var(--text-tertiary);
}

.cmd-empty {
  padding: 28px 16px;
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-tertiary);
}

/* Toast Notification */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: var(--radius-pill);
  background: var(--text-primary);
  color: var(--bg);
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  transform: translateY(14px);
  opacity: 0;
  transition: transform 280ms var(--ease-out-expo), opacity 240ms ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

/* ==========================================================================
   Scroll Reveal
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 620ms var(--ease-out-expo), transform 620ms var(--ease-out-expo);
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .status-dot::after,
  .radar-pin::after,
  .sound-btn.playing .eq-bars span { animation: none; }
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 1020px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .bento-philosophy,
  .bento-location,
  .bento-stack,
  .bento-rhythm {
    grid-column: span 12;
  }

  .featured-grid,
  .workflow-grid {
    grid-template-columns: 1fr;
  }

  .archive-grid.bento-7 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .archive-grid.bento-7 > .archive-card,
  .archive-grid.bento-7 > .archive-card:nth-child(n + 4) {
    grid-column: span 1;
  }

  .contact-card {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 28px;
  }
}

@media (max-width: 760px) {
  .container {
    padding: 0 18px;
  }

  .site-header {
    top: 12px;
    padding: 0 14px;
  }

  .nav-shell {
    padding: 6px 8px 6px 12px;
    gap: 8px;
  }

  .nav-actions {
    gap: 4px;
  }

  .cmd-trigger {
    padding: 6px 9px;
    gap: 5px;
  }

  .nav-links,
  .cmd-trigger .cmd-text,
  .cmd-trigger .kbd,
  .brand-sub {
    display: none;
  }

  .mobile-menu-btn {
    display: grid;
  }

  .hero {
    padding: 104px 0 56px;
  }

  .hero-title {
    font-size: clamp(1.65rem, 7.2vw, 2.15rem);
  }

  .hero-stats {
    gap: 12px;
  }

  .stat-value {
    font-size: 1.32rem;
  }

  .section {
    padding: 58px 0;
  }

  .card {
    padding: 20px;
    border-radius: 18px;
  }

  .heatmap-grid {
    gap: 2.5px;
  }

  .principles-row {
    grid-template-columns: 1fr;
  }

  .archive-grid,
  .archive-grid.bento-7 {
    grid-template-columns: 1fr;
  }

  .archive-grid.bento-7 > .archive-card,
  .archive-grid.bento-7 > .archive-card:nth-child(n + 4) {
    grid-column: span 1;
  }

  .contact-card {
    padding: 22px;
  }

  .elsewhere-grid {
    grid-template-columns: 1fr;
  }

  .modal-content {
    padding: 22px 20px 26px;
  }

  .modal-meta-grid {
    grid-template-columns: 1fr;
  }

  .modal-qr-box {
    flex-direction: column;
    text-align: center;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
