/* ============================================================
   base.css — reset / 字体 / 排版基线 / 全局元素
   ============================================================ */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
               "Noto Sans SC", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: var(--f-body);
  line-height: 1.72;
  color: var(--txt-2);
  background: var(--bg-1);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-variant-numeric: tabular-nums;
  overflow-x: clip; /* 用 clip 而非 hidden:不会把 overflow-y 强制变为 auto,从而保持 html 为滚动容器 */
}

/* 全局神经/血管 motif 背景:极淡的网格 + 两团辉光,固定不滚动 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(900px 600px at 88% -8%, rgba(77,124,255,.10), transparent 60%),
    radial-gradient(800px 700px at -6% 12%, rgba(52,215,200,.08), transparent 55%),
    var(--bg-1);
  pointer-events: none;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(120,150,210,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120,150,210,.045) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 78%);
  pointer-events: none;
}
[data-theme="light"] body::after { opacity: .5; }

h1, h2, h3, h4, h5 { color: var(--txt-1); line-height: 1.28; font-weight: 700; margin: 0; }
h2 { letter-spacing: -.01em; }
p { margin: 0 0 var(--s-3); }

a { color: var(--c-teal); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--c-teal-soft); }

strong, b { color: var(--txt-1); font-weight: 700; }
em { font-style: normal; color: var(--c-teal); }

ul, ol { margin: 0 0 var(--s-3); padding-left: 1.25em; }
li { margin: .25em 0; }

code, kbd {
  font-family: "SF Mono", "JetBrains Mono", "Roboto Mono", Consolas, monospace;
  font-size: .9em;
  background: var(--panel-2);
  padding: .1em .4em;
  border-radius: var(--r-xs);
  color: var(--c-teal-soft);
}

hr { border: 0; height: 1px; background: var(--line); margin: var(--s-6) 0; }

img, svg { max-width: 100%; }
svg text { font-family: inherit; }

::selection { background: rgba(52,215,200,.28); color: var(--txt-1); }

/* 滚动条 */
* { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: var(--panel-hover); background-clip: content-box; }

/* 无障碍:跳转链接 */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 999;
  background: var(--c-teal); color: var(--txt-on-accent);
  padding: var(--s-2) var(--s-4); border-radius: 0 0 var(--r-sm) 0; font-weight: 700;
}
.skip-link:focus { left: 0; }

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

/* 工具类 */
.u-mono { font-family: var(--f-num); font-variant-numeric: tabular-nums; }
.u-accent { color: var(--c-teal); }
.u-muted { color: var(--txt-3); }
.u-center { text-align: center; }
.u-nowrap { white-space: nowrap; }
.kicker {
  font-family: var(--f-num);
  font-size: var(--f-xs);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--c-teal);
  font-weight: 600;
}
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* 注:此前的 [data-reveal] 入场动画已移除——运行中的逐元素动画会把元素提升为
   独立合成层,在部分无头/截图环境下动画时钟停滞会导致内容不被捕获(隐身风险)。
   为保证任何环境下内容都稳定可见,改为静态呈现;data-reveal 属性保留为惰性标记,
   便于日后需要时统一挂接更安全的动画方案。*/
