/* ===== 基础重置 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: var(--font-sans);
  background: var(--bg) var(--bg-pattern);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background var(--transition-slow), color var(--transition-slow);
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image: var(--bg-dots);
  background-size: var(--bg-dots-size);
  opacity: var(--bg-dots-opacity);
}

/* ===== 选中文字 ===== */
::selection {
  background: var(--accent);
  color: #fff;
}

/* ===== 滚动条 ===== */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 9999px;
  transition: background var(--transition-fast);
}
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ===== 聚焦样式 ===== */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ===== 链接 ===== */
a { color: inherit; text-decoration: none; }

/* ===== 标题 ===== */
h1 { font-size: 28px; font-weight: 800; letter-spacing: -0.6px; line-height: 1.25; }
h2 { font-size: 22px; font-weight: 700; letter-spacing: -0.4px; line-height: 1.3; }
h3 { font-size: 18px; font-weight: 650; letter-spacing: -0.2px; line-height: 1.35; }
h4 { font-size: 15px; font-weight: 600; letter-spacing: -0.1px; }
