:root {
  --bg: #141410;
  --surface: #1c1c18;
  --surface-hover: #262620;
  --text-main: #f0ece4;
  --text-sub: #9a9085;
  --text-light: #6b6560;
  --border: #2a2824;
  --accent: #e8a87c;
  --accent-light: #f5c8a4;
  --accent-hover: #d49464;
  --radius: 12px;
  --radius-sm: 8px;
  --font-main: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --font-display: "Noto Serif SC", "Times New Roman", serif;
  --transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font-main); background: var(--bg); color: var(--text-main); line-height: 1.6; -webkit-font-smoothing: antialiased; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-light); }

#theme-switch {
  position: fixed; top: 20px; right: 20px; z-index: 999;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(12px);
  color: var(--text-main);
  font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
#theme-switch:hover { background: var(--accent); color: #000; border-color: var(--accent); transform: scale(1.08); }

header {
  padding: 3.5rem 1.5rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
header::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.5;
}
.header-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(212,165,116,0.06) 0%, transparent 60%);
  pointer-events: none;
}
.site-title {
  font-family: var(--font-display);
  font-size: 2rem; font-weight: 200;
  letter-spacing: 0.35em;
  color: var(--text-main);
  position: relative;
}
.site-title .accent {
  font-weight: 400;
  background: linear-gradient(135deg, var(--accent-light), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.site-subtitle {
  font-size: 0.85rem; font-weight: 300;
  letter-spacing: 0.35em;
  color: var(--text-light);
  margin-top: 0.5rem;
}
.site-stats {
  font-size: 0.78rem;
  color: var(--text-light);
  letter-spacing: 0.08em;
  margin-top: 0.8rem;
}
.header-nav {
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}
.nav-link {
  position: relative;
  color: var(--text-light);
  text-decoration: none;
  text-transform: lowercase;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  transition: var(--transition);
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.nav-link:hover::after {
  transform: scaleX(1);
  transform-origin: left center;
}
.nav-link:hover { color: var(--accent); }
.nav-link.active { color: var(--accent); font-weight: 600; }
.nav-link.active::after { transform: scaleX(1); }
.nav-sep {
  color: var(--border);
  font-size: 0.75rem;
  user-select: none;
}

.loading-state, .error-state {
  text-align: center; padding: 6rem 0;
  color: var(--text-sub);
  font-size: 1rem;
}
.loading-spinner {
  width: 32px; height: 32px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}
@keyframes spin { to { transform: rotate(360deg); } }
.error-state { color: var(--accent); }

footer {
  text-align: center;
  padding: 2rem 0 4rem;
  color: var(--text-light);
  font-size: 0.82rem;
  letter-spacing: 0.05em;
}
footer::before {
  content: '';
  display: block;
  width: 40px; height: 1px;
  background: var(--border);
  margin: 0 auto 1.5rem;
}
