:root {
  --shell: min(1240px, calc(100vw - 48px));
  --header-h: 76px;
  --ease: cubic-bezier(.2,.75,.2,1);
  --section-space: clamp(96px, 10vw, 168px);
  color-scheme: dark;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, -apple-system, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; overflow-x: hidden; }
body, button, a { font: inherit; }
img { display: block; width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { color: inherit; cursor: pointer; }
figure, h1, h2, h3, p, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.shell { width: var(--shell); margin-inline: auto; }
.skip-link {
  position: fixed; z-index: 1000; top: 12px; left: 12px; padding: 10px 14px;
  background: #fff; color: #07090d; border-radius: 6px; transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

.scroll-progress { position: fixed; z-index: 999; inset: 0 0 auto; height: 3px; pointer-events: none; }
.scroll-progress span { display: block; width: 0; height: 100%; background: currentColor; }

.nav-toggle {
  display: none; width: 44px; height: 44px; padding: 0; border: 0; background: transparent;
  align-items: center; justify-content: center; flex-direction: column; gap: 6px;
}
.nav-toggle span { width: 20px; height: 1.5px; background: currentColor; transition: transform .3s var(--ease); }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.75px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.75px) rotate(-45deg); }

.theme-jump {
  position: fixed; z-index: 120; right: 18px; bottom: 18px; display: flex; align-items: center; gap: 4px;
  padding: 5px; border-radius: 999px; backdrop-filter: blur(18px); box-shadow: 0 12px 40px rgba(0,0,0,.18);
}
.theme-jump > span { padding: 0 10px; font-size: 12px; white-space: nowrap; }
.theme-jump a {
  width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%;
  font-size: 13px; font-weight: 800; transition: transform .25s ease, background .25s ease, color .25s ease;
}
.theme-jump a:hover { transform: translateY(-2px); }
.theme-jump a[aria-current="page"] { pointer-events: none; }

.concept-back {
  display: inline-flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 700;
}
.concept-back::before { content: "←"; transition: transform .25s ease; }
.concept-back:hover::before { transform: translateX(-4px); }

.section-kicker { display: flex; align-items: center; gap: 12px; font-size: 12px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.section-kicker::before { content: ""; width: 34px; height: 1px; background: currentColor; }

.data-note { font-size: 13px; line-height: 1.75; opacity: .72; }
.data-note strong { font-weight: 700; }

.motion-ready [data-reveal] {
  opacity: 0; transform: translate3d(0, 34px, 0); filter: blur(7px);
  transition: opacity .8s var(--ease), transform .8s var(--ease), filter .8s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}
.motion-ready [data-reveal="left"] { transform: translate3d(-38px, 0, 0); }
.motion-ready [data-reveal="right"] { transform: translate3d(38px, 0, 0); }
.motion-ready [data-reveal="scale"] { transform: scale(.96); }
.motion-ready [data-reveal].is-visible { opacity: 1; transform: none; filter: none; }

[data-parallax] { transform: translate3d(var(--px, 0), var(--py, 0), 0); transition: transform .4s var(--ease); will-change: transform; }

.site-footer a { transition: opacity .2s ease; }
.site-footer a:hover { opacity: .65; }

@media (max-width: 920px) {
  :root { --shell: min(100% - 32px, 760px); --header-h: 68px; --section-space: 86px; }
  .nav-toggle { display: flex; }
  [data-nav] {
    position: fixed; z-index: 200; inset: var(--header-h) 12px auto; display: grid !important;
    gap: 0 !important; padding: 10px; border-radius: 18px; opacity: 0; transform: translateY(-12px);
    visibility: hidden; pointer-events: none; transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
  }
  [data-nav].is-open { opacity: 1; transform: none; visibility: visible; pointer-events: auto; }
  [data-nav] a { padding: 13px 14px !important; border-radius: 10px; }
  .theme-jump { right: 10px; bottom: 10px; }
  .theme-jump > span { display: none; }
}

@media (max-width: 560px) {
  :root { --shell: calc(100% - 24px); --section-space: 72px; }
  .section-kicker { font-size: 11px; }
  .theme-jump a { width: 34px; height: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .motion-ready [data-reveal] { opacity: 1; transform: none; filter: none; }
}
