/* ═══════════════════════════════════════════
   墨迹博客 · 暗黑主题公共样式
   ═══════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Noto+Sans+SC:wght@300;400;500;700;900&display=swap');

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

:root {
  --bg: #06060e;
  --surface: rgba(14,14,28,0.85);
  --border: rgba(255,255,255,0.06);
  --text: #e8e8f0;
  --text-muted: #7878a0;
  --accent: #6c8cff;
  --accent-2: #00e4a0;
  --accent-3: #ff6cab;
  --accent-4: #ffc14d;
  --g1: linear-gradient(135deg, #6c8cff 0%, #00e4a0 100%);
  --g2: linear-gradient(135deg, #ff6cab 0%, #ffc14d 100%);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', 'Noto Sans SC', system-ui, sans-serif;
  background: var(--bg); color: var(--text);
  overflow-x: hidden; line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

::selection { background: var(--accent); color: #fff; }
a { color: inherit; }

/* Canvas */
#canvas { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }

/* Nav */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  padding: 1rem 2rem;
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(6,6,14,0.6);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: all 0.4s;
}
nav.scrolled { padding: 0.7rem 2rem; background: rgba(6,6,14,0.92); }
.nav-left { display: flex; align-items: center; gap: 2.5rem; }
.logo { font-size: 1.3rem; font-weight: 800; letter-spacing: -0.02em; }
.logo span { background: var(--g1); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.nav-links { display: flex; gap: 1.8rem; list-style: none; }
.nav-links a {
  color: var(--text-muted); text-decoration: none; font-size: 0.85rem; font-weight: 500;
  transition: color 0.3s; position: relative; padding-bottom: 4px;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); }
.nav-links a.active::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0;
  height: 2px; background: var(--accent); border-radius: 1px;
}

.menu-btn {
  display: none; background: none; border: none; cursor: pointer;
  width: 32px; height: 32px; flex-direction: column; justify-content: center; gap: 5px;
}
.menu-btn span { display: block; width: 20px; height: 2px; background: var(--text); }

/* Buttons */
.btn {
  padding: 0.8rem 1.8rem; border-radius: 10px; font-size: 0.95rem; font-weight: 600;
  cursor: pointer; transition: all 0.3s; border: none; text-decoration: none;
  display: inline-flex; align-items: center; gap: 0.5rem;
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 4px 24px rgba(108,140,255,0.3); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(108,140,255,0.5); }
.btn-ghost { background: transparent; color: var(--text-muted); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--accent); color: var(--text); transform: translateY(-2px); }

/* Reveal */
.reveal {
  opacity: 0; transform: translateY(30px);
  transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Animations */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes breathe { 0%,100% { transform: scale(1); opacity: 0.3; } 50% { transform: scale(1.1); opacity: 0.6; } }

/* Responsive */
@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: absolute; top: 60px; left: 0; right: 0;
    background: rgba(6,6,14,0.96); backdrop-filter: blur(20px);
    padding: 1.5rem 2rem; gap: 1rem;
    border-bottom: 1px solid var(--border);
  }
  .menu-btn { display: flex; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
