/* ==========================================================================
   all-in-one — 全站样式
   纯静态，无构建步骤。颜色走语义 token，明暗双主题各自调校对比度。
   首屏是一整块深色（杂志封面感），正文是暖纸色，用细线分隔而非方框。
   ========================================================================== */

/* ---------- 0. 自托管字体 ---------- */

/* 字体文件来自 Google Fonts（SIL Open Font License），下载到本地，页面不请求任何站外资源。 */

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/archivo-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/assets/fonts/space-grotesk-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}

/* ---------- 1. Reset ---------- */

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

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 20px);
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

ul[class],
ol[class] {
  list-style: none;
  padding: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

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

::selection {
  background: var(--accent-soft);
  color: var(--text);
}

/* ---------- 2. Design tokens ---------- */

:root {
  /* 字体 */
  --font-sans: "Space Grotesk", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Noto Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Archivo", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Noto Sans SC", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo,
    Consolas, "Liberation Mono", monospace;

  /* 正文配色 — 暖纸色 */
  --bg: #faf8f3;
  --surface: #ffffff;
  --surface-2: #f1eee6;
  --text: #191712;
  --text-2: #55504a;
  --text-3: #7e786f;
  --border: #e4dfd4;
  --border-strong: #d2ccbe;
  --accent: #c2410c;
  --accent-hover: #9a3412;
  --accent-soft: rgba(194, 65, 12, 0.09);
  --ring: #c2410c;
  --shadow-sm: 0 1px 2px rgba(25, 23, 18, 0.06);
  --shadow-md: 0 6px 20px -6px rgba(25, 23, 18, 0.14), 0 2px 6px -2px rgba(25, 23, 18, 0.07);
  --shadow-lg: 0 28px 56px -28px rgba(25, 23, 18, 0.24);

  /* 首屏深色带：与主题无关，永远是深色 */
  --band-bg: #0c0c0e;
  --band-surface: #16161a;
  --band-text: #f5f3ed;
  --band-text-2: #9e998f;
  --band-border: rgba(255, 255, 255, 0.14);
  --band-accent: #ff6b3d;

  /* 尺寸 */
  --container: 1180px;
  --header-h: 60px;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-full: 999px;

  /* 动效 */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 220ms;

  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0c0c0e;
  --surface: #141417;
  --surface-2: #1d1d21;
  --text: #f1efe9;
  --text-2: #a6a199;
  --text-3: #7d776e;
  --border: #26262b;
  --border-strong: #3a3a41;
  --accent: #ff6b3d;
  --accent-hover: #ff8a63;
  --accent-soft: rgba(255, 107, 61, 0.14);
  --ring: #ff6b3d;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 6px 20px -6px rgba(0, 0, 0, 0.6), 0 2px 6px -2px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 28px 56px -28px rgba(0, 0, 0, 0.8);

  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c0c0e;
    --surface: #141417;
    --surface-2: #1d1d21;
    --text: #f1efe9;
    --text-2: #a6a199;
    --text-3: #7d776e;
    --border: #26262b;
    --border-strong: #3a3a41;
    --accent: #ff6b3d;
    --accent-hover: #ff8a63;
    --accent-soft: rgba(255, 107, 61, 0.14);
    --ring: #ff6b3d;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 6px 20px -6px rgba(0, 0, 0, 0.6), 0 2px 6px -2px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 28px 56px -28px rgba(0, 0, 0, 0.8);

    color-scheme: dark;
  }
}

/* ---------- 3. 布局工具 ---------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 20px;
}

.section {
  padding-block: 52px;
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--accent);
}

.eyebrow-invert {
  color: var(--band-text-2);
}

.eyebrow-invert::before {
  background: var(--band-accent);
}

.section-title {
  font-size: clamp(26px, 4.4vw, 34px);
}

.section-desc {
  color: var(--text-2);
  max-width: 56ch;
}

.icon {
  width: 20px;
  height: 20px;
  flex: none;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* 行内代码 */
:not(pre) > code {
  padding: 2px 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.88em;
  color: var(--text);
}

/* 强调链接 */
.link-accent {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* 返回上级 */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  margin-top: 28px;
  font-size: 14.5px;
  color: var(--accent);
}

.back-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* 额外间距 */
.mt-20 {
  margin-top: 20px;
}

/* 跳到主内容 */
.skip-link {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-sm);
  transition: top var(--dur) var(--ease);
}

.skip-link:focus-visible {
  top: 12px;
}

/* ---------- 4. 按钮 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  touch-action: manipulation;
  white-space: nowrap;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease),
    color var(--dur) var(--ease), transform var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease);
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: var(--shadow-md);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-ghost:hover {
  border-color: var(--text-3);
  background: var(--surface-2);
}

.btn .icon {
  width: 18px;
  height: 18px;
  transition: transform var(--dur) var(--ease);
}

.btn:hover .icon-arrow {
  transform: translateX(3px);
}

/* 深色带里的按钮 */
.hero .btn-ghost {
  color: var(--band-text);
  border-color: var(--band-border);
}

.hero .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

/* 图标按钮 */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-2);
  cursor: pointer;
  touch-action: manipulation;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease),
    background var(--dur) var(--ease);
}

.icon-btn:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--surface-2);
}

/* ---------- 5. 头部导航 ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}

.site-header.is-scrolled {
  border-bottom-color: var(--border);
  background: color-mix(in srgb, var(--bg) 93%, transparent);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  gap: 9px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.02em;
  margin-right: auto;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--text);
  color: var(--bg);
}

.brand-mark .icon {
  width: 15px;
  height: 15px;
  stroke-width: 2;
}

/* 导航 */
.nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  padding: 10px 20px 22px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}

.nav-scrim {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  z-index: 45;
  background: rgba(9, 9, 11, 0.42);
  animation: fade-in 200ms var(--ease);
}

.nav-scrim[hidden] {
  display: none;
}

@keyframes nav-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-size: 15px;
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}

.nav-link:hover {
  color: var(--text);
  background: var(--surface-2);
}

.nav-link[aria-current="page"] {
  color: var(--accent);
  font-weight: 500;
}

.nav-link[aria-current="page"]::after {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-2);
  cursor: pointer;
  touch-action: manipulation;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.nav-toggle:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.nav-toggle .icon-close {
  display: none;
}

.nav-toggle[aria-expanded="true"] .icon-close {
  display: block;
}

.nav-toggle[aria-expanded="true"] .icon-menu {
  display: none;
}

/* 主题图标切换 */
.icon-moon {
  display: none;
}

:root[data-theme="dark"] .icon-sun {
  display: none;
}

:root[data-theme="dark"] .icon-moon {
  display: block;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-sun {
    display: none;
  }

  :root:not([data-theme="light"]) .icon-moon {
    display: block;
  }
}

/* 首屏是深色带时，顶部导航跟随深色，滚动后才切回正文色 */
.has-hero-band .site-header:not(.is-scrolled) {
  background: transparent;
}

.has-hero-band .site-header:not(.is-scrolled) .brand {
  color: var(--band-text);
}

.has-hero-band .site-header:not(.is-scrolled) .brand-mark {
  background: var(--band-text);
  color: var(--band-bg);
}

.has-hero-band .site-header:not(.is-scrolled) .icon-btn,
.has-hero-band .site-header:not(.is-scrolled) .nav-toggle {
  color: var(--band-text-2);
  border-color: var(--band-border);
}

.has-hero-band .site-header:not(.is-scrolled) .icon-btn:hover,
.has-hero-band .site-header:not(.is-scrolled) .nav-toggle:hover {
  color: var(--band-text);
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
}

/* ---------- 6. Hero：深色带 ---------- */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--band-bg);
  color: var(--band-text);
  padding-block: 44px 0;
}

/* 深色带要盖到导航底下，导航才是深色底上的浅色字 */
.has-hero-band .hero {
  margin-top: calc(var(--header-h) * -1);
  padding-top: calc(var(--header-h) + 44px);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 100% 78% at 50% 0%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 100% 78% at 50% 0%, #000 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  top: -320px;
  left: 50%;
  width: 900px;
  height: 620px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(255, 107, 61, 0.15), transparent);
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-title {
  margin-block: 18px 0;
  font-size: clamp(34px, 7.6vw, 92px);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.035em;
  color: var(--band-text);
}

.hero-title em {
  font-style: normal;
  color: var(--band-accent);
}

.hero-body {
  display: grid;
  gap: 40px;
  margin-top: 44px;
}

.hero-lede {
  max-width: 46ch;
  font-size: clamp(15.5px, 2.2vw, 17px);
  color: var(--band-text-2);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 18px;
  margin-top: 22px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--band-text-2);
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.5);
  animation: pulse 2.4s var(--ease) infinite;
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 7px rgba(74, 222, 128, 0);
  }
}

/* ---------- 7. 终端 ---------- */

.terminal {
  background: var(--band-surface);
  border: 1px solid var(--band-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 30px 70px -34px rgba(0, 0, 0, 0.95);
  font-family: var(--font-mono);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--band-border);
}

.terminal-dots {
  display: inline-flex;
  gap: 6px;
}

.terminal-dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #3a3a42;
}

.terminal-dots i:nth-child(1) {
  background: #ff5f57;
}

.terminal-dots i:nth-child(2) {
  background: #febc2e;
}

.terminal-dots i:nth-child(3) {
  background: #28c840;
}

.terminal-title {
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--band-text-2);
}

.terminal-body {
  padding: 16px 16px 18px;
  font-size: 12.5px;
  line-height: 2.1;
  color: var(--band-text-2);
}

.terminal-body p {
  display: flex;
  align-items: baseline;
  gap: 8px;
  white-space: nowrap;
}

.t-time {
  color: #55555f;
  flex: none;
}

.t-cmd {
  color: var(--band-accent);
  flex: none;
}

.t-label {
  color: var(--band-text);
  flex: none;
}

/* 引线：虚线占位，把值推到右边 */
.t-dots {
  flex: 1;
  height: 1px;
  align-self: center;
  min-width: 12px;
  margin: 0 4px;
  background-image: linear-gradient(90deg, #3c3c46 40%, transparent 0);
  background-size: 5px 1px;
}

.t-val {
  color: var(--band-text-2);
  flex: none;
}

.t-ok {
  color: #4ade80;
  flex: none;
}

.terminal-body p:last-child::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 13px;
  margin-left: 7px;
  background: var(--band-accent);
  animation: blink 1.1s steps(2, start) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* ---------- 8. 首屏数据条 ---------- */

.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  margin-top: 56px;
  background: var(--band-border);
  border-top: 1px solid var(--band-border);
}

.hero-stat {
  padding: 18px 18px 20px;
  background: var(--band-bg);
}

.hero-stat dt {
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--band-text-2);
}

.hero-stat dd {
  font-family: var(--font-display);
  font-size: clamp(25px, 3vw, 32px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--band-text);
  font-variant-numeric: tabular-nums;
}

/* ---------- 9. 入口条目：编辑式，细线分隔 ---------- */

.entries {
  border-top: 1px solid var(--border);
}

.entry {
  border-bottom: 1px solid var(--border);
}

.entry-link {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 2px 16px;
  padding: 24px 2px;
  align-items: start;
}

.entry-index {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-3);
  padding-top: 5px;
  transition: color var(--dur) var(--ease);
}

.entry-main {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.entry-title {
  font-size: clamp(20px, 2.4vw, 26px);
  transition: color var(--dur) var(--ease);
}

.entry-desc {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--text-2);
  max-width: 58ch;
}

.entry-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 10px;
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-3);
}

.entry-chip + .entry-chip::before {
  content: "·";
  margin-right: 10px;
  color: var(--border-strong);
}

.entry-aside {
  grid-column: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 10px;
}

.entry-count {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-3);
}

.entry-arrow {
  width: 18px;
  height: 18px;
  color: var(--text-3);
  transition: transform var(--dur) var(--ease), color var(--dur) var(--ease);
}

.entry-link:hover .entry-arrow {
  transform: translateX(5px);
  color: var(--accent);
}

.entry-link:hover .entry-index {
  color: var(--accent);
}

.entry-link:hover .entry-title {
  color: var(--accent);
}

/* ---------- 10. 最新动态 ---------- */

.latest-grid {
  display: grid;
  gap: 34px;
}

.feed-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 2px;
  border-bottom: 1px solid var(--border);
}

.feed-head h3 {
  font-size: 17px;
  letter-spacing: -0.01em;
}

.feed-more {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 13.5px;
  color: var(--text-3);
  transition: color var(--dur) var(--ease);
}

.feed-more:hover {
  color: var(--accent);
}

.post-list {
  display: flex;
  flex-direction: column;
}

.post-item + .post-item {
  border-top: 1px solid var(--border);
}

.post-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 3px 14px;
  padding: 15px 0;
  transition: opacity var(--dur) var(--ease);
}

.post-title {
  grid-column: 1;
  font-size: 15.5px;
  font-weight: 500;
  line-height: 1.5;
  transition: color var(--dur) var(--ease);
}

.post-link:hover .post-title {
  color: var(--accent);
}

.post-desc {
  grid-column: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-3);
}

.post-meta {
  grid-column: 1;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-3);
}

.post-tag {
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--surface-2);
  color: var(--text-2);
  font-family: var(--font-sans);
  font-size: 11.5px;
}

.post-arrow {
  grid-column: 2;
  grid-row: 1 / span 3;
  align-self: center;
  width: 16px;
  height: 16px;
  color: var(--text-3);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.post-link:hover .post-arrow {
  opacity: 1;
  transform: translateX(0);
  color: var(--accent);
}

/* 目录类条目：不可点，悬停不做高亮 */
.post-link-static {
  cursor: default;
}

.post-link-static:hover .post-title {
  color: inherit;
}

/* ---------- 11. 索引页 ---------- */

.page-head {
  padding-block: 44px 36px;
  border-bottom: 1px solid var(--border);
}

.page-head h1 {
  margin-block: 14px 12px;
  font-size: clamp(28px, 6.4vw, 48px);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.page-head p {
  color: var(--text-2);
  max-width: 60ch;
}

.notice {
  display: flex;
  gap: 12px;
  padding: 16px 18px;
  margin-top: 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  font-size: 14.5px;
  color: var(--text-2);
}

.notice .icon {
  color: var(--accent);
  margin-top: 3px;
}

/* ---------- 12. 关于 ---------- */

.about {
  display: grid;
  gap: 26px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.about h2 {
  font-size: clamp(23px, 3.6vw, 32px);
  margin-block: 10px 0;
}

.about p {
  color: var(--text-2);
  max-width: 62ch;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 16px;
}

.tag {
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--surface-2);
  font-size: 13px;
  color: var(--text-2);
}

/* ---------- 13. 页脚 ---------- */

.site-footer {
  margin-top: 24px;
  border-top: 1px solid var(--border);
  padding-block: 30px 38px;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 40ch;
}

.footer-tagline {
  font-size: 14px;
  color: var(--text-3);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
}

.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  font-size: 14px;
  color: var(--text-2);
  transition: color var(--dur) var(--ease);
}

.footer-link:hover {
  color: var(--accent);
}

.footer-link .icon {
  width: 15px;
  height: 15px;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 18px;
  margin-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-3);
}

/* ---------- 14. 回到顶部 ---------- */

.to-top {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 40;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-md);
  color: var(--text-2);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease),
    visibility var(--dur) var(--ease), color var(--dur) var(--ease);
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.to-top:hover {
  color: var(--accent);
}

/* ---------- 15. 滚动进场 ---------- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 520ms var(--ease), transform 520ms var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* 进场延迟（配合 data-reveal 使用） */
.reveal-d1 {
  --reveal-delay: 60ms;
}

.reveal-d2 {
  --reveal-delay: 80ms;
}

.reveal-d3 {
  --reveal-delay: 120ms;
}

/* 列表区与上方的间距 */
.list-spaced {
  margin-top: 36px;
}

/* ---------- 16. 断点 ---------- */

@media (max-width: 1023px) {
  /* 有 JS：菜单由汉堡按钮控制 */
  .js .nav {
    display: none;
  }

  .js .nav.is-open {
    display: block;
    animation: nav-in 200ms var(--ease);
  }

  /* 无 JS：导航直接静态展开在头部下方，保证可达 */
  :root:not(.js) .nav {
    position: static;
    box-shadow: none;
  }
}

@media (min-width: 480px) {
  .container {
    padding-inline: 24px;
  }

  .hero-stat {
    padding: 20px 22px 22px;
  }
}

@media (min-width: 768px) {
  :root {
    --header-h: 68px;
  }

  .section {
    padding-block: 64px;
  }

  .hero {
    padding-block: 56px 0;
  }

  .has-hero-band .hero {
    padding-top: calc(var(--header-h) + 56px);
  }

  .hero-stats {
    grid-template-columns: repeat(4, 1fr);
  }

  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }
}

@media (min-width: 900px) {
  .entry-link {
    grid-template-columns: 62px minmax(0, 1fr) auto;
    gap: 0 28px;
    padding: 30px 2px;
  }

  .entry-aside {
    grid-column: 3;
    justify-content: flex-end;
    margin-top: 0;
    gap: 22px;
  }

  .about {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: 56px;
    align-items: start;
  }
}

@media (min-width: 1024px) {
  .container {
    padding-inline: 32px;
  }

  .hero-body {
    grid-template-columns: minmax(0, 1fr) minmax(400px, 0.88fr);
    gap: 64px;
    align-items: start;
  }

  /* 桌面端：横向导航。深色带上的链接跟着变浅色 */
  .nav {
    position: static;
    display: block;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
    animation: none;
  }

  .nav-list {
    flex-direction: row;
    align-items: center;
    gap: 4px;
  }

  .nav-link {
    min-height: 40px;
    padding: 0 13px;
    font-size: 14.5px;
  }

  .nav-link[aria-current="page"]::after {
    display: none;
  }

  .nav-toggle {
    display: none;
  }

  .has-hero-band .site-header:not(.is-scrolled) .nav-link {
    color: var(--band-text-2);
  }

  .has-hero-band .site-header:not(.is-scrolled) .nav-link:hover {
    color: var(--band-text);
    background: rgba(255, 255, 255, 0.08);
  }

  .has-hero-band .site-header:not(.is-scrolled) .nav-link[aria-current="page"] {
    color: var(--band-accent);
  }

  .latest-grid {
    grid-template-columns: 1fr 1fr;
    gap: 48px;
  }

  .to-top {
    right: 28px;
    bottom: 28px;
  }
}

@media (min-width: 1440px) {
  .container {
    padding-inline: 40px;
  }
}

/* ---------- 17. 无障碍 / 动效偏好 ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

@media print {
  .site-header,
  .to-top,
  .hero {
    display: none;
  }
}

/* ---------- 10.1 文章正文 ---------- */

.prose {
  max-width: 72ch;
  color: var(--text-2);
  line-height: 1.8;
}

.prose > * + * {
  margin-top: 1.1em;
}

.prose h2 {
  margin-top: 2em;
  font-size: 20px;
  color: var(--text);
}

.prose h3 {
  margin-top: 1.6em;
  font-size: 17px;
  color: var(--text);
}

.prose strong {
  font-weight: 600;
  color: var(--text);
}

.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose ul,
.prose ol {
  padding-left: 1.4em;
}

.prose li + li {
  margin-top: 0.4em;
}

.prose li::marker {
  color: var(--text-3);
}

.prose blockquote {
  padding-left: 16px;
  border-left: 3px solid var(--border-strong);
  color: var(--text);
}

.prose hr {
  margin-block: 2.2em;
  border: 0;
  border-top: 1px solid var(--border);
}

.prose pre {
  padding: 16px 18px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--text);
}

.prose pre code {
  padding: 0;
  background: none;
  border: 0;
  font-size: inherit;
}



/* ---------- 17. 私人板块口令门 ---------- */

/* 锁定时藏正文，解锁后藏入口，两边靠 <html> 上的 class 切换 */
html.is-locked [data-private-content] {
  display: none;
}

html.is-unlocked [data-private-gate] {
  display: none;
}

.gate {
  padding-block: 64px 88px;
}

.gate-card {
  max-width: 520px;
  margin-inline: auto;
  padding: 36px 30px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  text-align: center;
}

.gate-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin: 0 auto 18px;
  border-radius: 15px;
  background: var(--accent-soft);
  color: var(--accent);
}

.gate-icon .icon {
  width: 24px;
  height: 24px;
}

.gate-card .eyebrow {
  justify-content: center;
}

.gate-title {
  font-size: clamp(22px, 4.6vw, 30px);
  margin-block: 10px 12px;
}

.gate-desc {
  color: var(--text-2);
  font-size: 14.5px;
  max-width: 42ch;
  margin-inline: auto;
}

.gate-form {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}

.gate-input {
  flex: 1;
  min-width: 0;
  min-height: 46px;
  padding: 0 18px;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-full);
  font-size: 15px;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.gate-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.gate-error {
  display: none;
  margin-top: 14px;
  color: #e5484d;
  font-size: 14px;
}

.gate-error.is-shown {
  display: block;
}

/* 锁定按钮 */
.lock-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease),
    background var(--dur) var(--ease);
}

.lock-btn:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
  color: var(--text);
}

.lock-btn .icon {
  width: 14px;
  height: 14px;
}

@media (max-width: 479px) {
  .gate-form {
    flex-direction: column;
  }
}

