/* ==========================================================================
   海风笔记 — 视觉系统
   深色为默认：机房/图纸的克制感；浅色为纸面阅读模式。
   ========================================================================== */

:root {
  --font-serif: "Source Han Serif SC", "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --font-sans: "Inter", "Segoe UI", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  --max: 1240px;
  --header-h: 74px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

html[data-theme="dark"] {
  --bg: #080d14;
  --bg-2: #0a111b;
  --surface: #0d1520;
  --surface-2: #111b28;
  --text: #e7edf4;
  --text-2: #a9b8c8;
  --muted: #7d90a4;
  --dim: #6b7f94;
  --line: rgba(150, 180, 210, .13);
  --line-2: rgba(150, 180, 210, .26);
  --mint: #63e6be;
  --mint-soft: rgba(99, 230, 190, .10);
  --mint-line: rgba(99, 230, 190, .38);
  --amber: #f2b45e;
  --amber-soft: rgba(242, 180, 94, .10);
  --shadow: 0 40px 90px -50px rgba(0, 0, 0, .95);
  --code-bg: #070c13;
  --on-accent: #04120d;
  --grid: rgba(120, 160, 200, .055);
}

html[data-theme="light"] {
  --bg: #f7f5f0;
  --bg-2: #f1ede4;
  --surface: #fffdf8;
  --surface-2: #f1ede4;
  --text: #141d28;
  --text-2: #3f4c5c;
  --muted: #5f6d7e;
  --dim: #6f7d8e;
  --line: rgba(20, 30, 45, .13);
  --line-2: rgba(20, 30, 45, .24);
  --mint: #0d8664;
  --mint-soft: rgba(13, 134, 100, .08);
  --mint-line: rgba(13, 134, 100, .34);
  --amber: #a2601a;
  --amber-soft: rgba(162, 96, 26, .09);
  --shadow: 0 30px 70px -50px rgba(30, 40, 60, .55);
  --code-bg: #efeae0;
  --on-accent: #fbfffd;
  --grid: rgba(20, 40, 60, .05);
}

/* ---------- 基础 ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(820px 460px at 80% -8%, var(--mint-soft), transparent 70%),
    radial-gradient(600px 400px at 0% 100%, var(--amber-soft), transparent 70%);
  opacity: .8;
}

img { max-width: 100%; display: block; }
h1, h2, h3 { text-wrap: balance; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
::selection { background: var(--mint); color: var(--on-accent); }

:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 3px;
  border-radius: 3px;
}

.skip-link {
  position: fixed;
  top: -60px;
  left: 24px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--mint);
  color: var(--on-accent);
  font-family: var(--font-mono);
  font-size: 12px;
  border-radius: 6px;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 16px; }

.mono-label {
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- 页头 ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
}

.header-inner {
  max-width: var(--max);
  height: 100%;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand-mark { color: var(--mint); display: grid; place-items: center; }
.brand-mark svg { width: 30px; height: 30px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .14em;
}
.brand-text em {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 9px;
  letter-spacing: .06em;
  color: var(--dim);
  white-space: nowrap;
}

.site-nav { display: flex; gap: 6px; margin-left: auto; }
.site-nav a {
  position: relative;
  padding: 8px 14px;
  font-size: 14px;
  color: var(--text-2);
  border-radius: 6px;
  transition: color .2s var(--ease), background .2s var(--ease);
}
.site-nav a:hover { color: var(--text); background: var(--surface); }
.site-nav a.active { color: var(--text); }
.site-nav a.active::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 2px;
  height: 1px;
  background: var(--mint);
}

.theme-toggle {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  color: var(--text-2);
  transition: border-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.theme-toggle:hover { border-color: var(--mint-line); color: var(--mint); transform: rotate(12deg); }
.theme-toggle svg { width: 17px; height: 17px; }
html[data-theme="dark"] .i-sun { display: none; }
html[data-theme="light"] .i-moon { display: none; }

/* ---------- 通用 ---------- */

main { position: relative; z-index: 1; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
}
.pulse {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 0 var(--mint-line);
  animation: pulse 2.8s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 var(--mint-line); }
  70% { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.nw { white-space: nowrap; }

.lede {
  margin: 0 0 34px;
  max-width: 40em;
  font-size: 17px;
  line-height: 1.95;
  color: var(--text-2);
  text-wrap: pretty;
  word-break: auto-phrase;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 13px 24px;
  border-radius: 100px;
  font-size: 14px;
  letter-spacing: .02em;
  border: 1px solid transparent;
  transition: transform .25s var(--ease), background .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease);
}
.btn-arrow { font-family: var(--font-mono); transition: transform .25s var(--ease); }
.btn:hover .btn-arrow { transform: translateX(4px); }
.btn-solid { background: var(--mint); color: var(--on-accent); font-weight: 600; }
.btn-solid:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -14px var(--mint); }
.btn-line { border-color: var(--line-2); color: var(--text-2); }
.btn-line:hover { border-color: var(--mint-line); color: var(--text); transform: translateY(-2px); }

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 76px 32px;
  border-top: 1px solid var(--line);
}
.section-head {
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin-bottom: 38px;
}
.sec-no {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .16em;
  color: var(--mint);
}
.section-head h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: .06em;
}
.head-note {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--dim);
}
.more {
  margin-left: auto;
  font-size: 13px;
  color: var(--text-2);
  display: inline-flex;
  gap: 8px;
  align-items: center;
}
.more span { font-family: var(--font-mono); transition: transform .2s var(--ease); }
.more:hover { color: var(--mint); }
.more:hover span { transform: translateX(4px); }

/* ---------- 首页 Hero ---------- */

.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 64px 32px 72px;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr);
  gap: 64px;
  align-items: center;
  min-height: min(790px, calc(100vh - var(--header-h)));
}
.hero-copy { min-width: 0; }

.hero-copy h1 {
  margin: 0 0 30px;
  font-family: var(--font-serif);
  font-size: clamp(44px, 5.4vw, 76px);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: .01em;
  text-wrap: balance;
}
.hero-copy h1 em {
  font-style: normal;
  color: var(--mint);
  border-bottom: .045em solid var(--mint-line);
  padding-bottom: .02em;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 54px; }

.hero-stats { display: flex; gap: 46px; margin: 0; padding-top: 26px; border-top: 1px solid var(--line); }
.hero-stats div { display: flex; flex-direction: column-reverse; gap: 6px; }
.hero-stats dt {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--dim);
}
.hero-stats dd {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 26px;
  line-height: 1;
  color: var(--text);
}
.hero-stats .stat-date { font-family: var(--font-mono); font-size: 17px; letter-spacing: .02em; }

.hero-figure {
  margin: 0;
  padding: 18px 18px 12px;
  background: #070c13;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  position: relative;
  min-width: 0;
}
.hero-figure::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 16px;
  pointer-events: none;
  background: linear-gradient(140deg, rgba(99, 230, 190, .06), transparent 40%);
}
.hero-figure svg { width: 100%; height: auto; }
.hero-figure figcaption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 6px 2px;
  border-top: 1px solid rgba(150, 180, 210, .14);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .08em;
  color: #6d8196;
}
.flow { animation: dash 5s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -100; } }

/* ---------- 最新文章 ---------- */

.feature {
  display: grid;
  grid-template-columns: .92fr 1.08fr;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: var(--surface);
  transition: border-color .3s var(--ease), transform .3s var(--ease), box-shadow .3s var(--ease);
}
.feature:hover {
  border-color: var(--mint-line);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.feature-cover { display: block; background: #070c13; overflow: hidden; }
.feature-cover img {
  width: 100%; height: 100%;
  object-fit: contain;
  aspect-ratio: 16 / 9;
  transition: transform .6s var(--ease);
}
.feature:hover .feature-cover img { transform: scale(1.03); }
.feature-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  padding: 46px 48px;
}
.feature-body h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1.4;
  font-weight: 700;
}
.feature-summary { font-size: 15px; line-height: 1.9; color: var(--text-2); }
.read-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--mint);
}
.read-more span { transition: transform .2s var(--ease); }
.feature:hover .read-more span { transform: translateX(4px); }

.post-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--dim);
}
.post-meta .dot { color: var(--line-2); }
.meta-tags { display: inline-flex; gap: 6px; margin-left: 6px; }
.tag {
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 100px;
  color: var(--text-2);
  font-size: 10px;
  letter-spacing: .04em;
}

/* ---------- 文章索引 ---------- */

.post-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.post-list li { border-bottom: 1px solid var(--line); }
.post-list a {
  display: grid;
  grid-template-columns: 56px 1fr 210px 24px;
  gap: 20px;
  align-items: center;
  padding: 26px 8px;
  transition: background .25s var(--ease), padding .25s var(--ease);
}
.post-list a:hover { background: var(--surface); padding-left: 18px; padding-right: 14px; }
.idx {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--dim);
  transition: color .2s var(--ease);
}
.post-list a:hover .idx { color: var(--mint); }
.pl-main { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.pl-title {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.45;
  transition: color .2s var(--ease);
}
.post-list a:hover .pl-title { color: var(--mint); }
.pl-sum {
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--muted);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}
.pl-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--dim);
}
.pl-tags { color: var(--muted); }
.pl-arrow { font-family: var(--font-mono); color: var(--dim); transition: transform .2s var(--ease), color .2s var(--ease); }
.post-list a:hover .pl-arrow { transform: translate(3px, -3px); color: var(--mint); }

/* ---------- 关于小节 ---------- */

.about-band { max-width: var(--max); margin: 0 auto; padding: 0 32px 96px; }
.about-card {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 40px;
  align-items: center;
  padding: 42px 48px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(120deg, var(--surface), transparent);
}
.about-emblem-badge {
  position: relative;
  width: 132px; height: 132px;
  border-radius: 50%;
  border: 1px solid var(--mint-line);
  display: grid;
  place-items: center;
  color: var(--mint);
  background:
    radial-gradient(circle at 50% 28%, var(--mint-soft), transparent 68%),
    var(--surface);
}
.about-emblem-badge::after {
  content: "";
  position: absolute;
  top: 18px; right: 22px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--amber);
}
.badge-char {
  font-family: var(--font-serif);
  font-size: 52px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: .04em;
}
.about-text h2 {
  margin: 0 0 14px;
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: .04em;
}
.about-text p:not(.mono-label) { margin: 0 0 16px; font-size: 14.5px; line-height: 1.9; color: var(--text-2); max-width: 62ch; }
.text-link { font-size: 13px; color: var(--mint); display: inline-flex; gap: 8px; }
.text-link span { transition: transform .2s var(--ease); }
.text-link:hover span { transform: translateX(4px); }

/* ---------- 页脚 ---------- */

.site-footer { border-top: 1px solid var(--line); background: var(--bg-2); position: relative; z-index: 1; }
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 54px 32px 40px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: end;
}
.footer-logo { margin: 0; font-family: var(--font-serif); font-size: 20px; letter-spacing: .18em; }
.footer-sub { margin: 8px 0 0; font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em; color: var(--dim); }
.footer-nav { display: flex; gap: 22px; font-size: 13px; color: var(--text-2); }
.footer-nav a:hover { color: var(--mint); }
.footer-legal {
  grid-column: 1 / -1;
  margin: 18px 0 0;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .04em;
  color: var(--dim);
  display: flex;
  gap: 8px;
}

/* ---------- 文章页 ---------- */

.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60; background: transparent; }
.progress span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--mint), var(--amber));
  transition: width .1s linear;
}

.article {
  max-width: 1120px;
  margin: 0 auto;
  padding: 46px 32px 110px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 72px;
}
.article-main { min-width: 0; }

.crumbs {
  display: flex;
  gap: 10px;
  margin-bottom: 32px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--dim);
}
.crumbs a:hover { color: var(--mint); }

.article-head { margin-bottom: 34px; }
.article-head h1 {
  margin: 18px 0 22px;
  font-family: var(--font-serif);
  font-size: clamp(32px, 3.6vw, 46px);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: .02em;
}
.article-lede {
  margin: 0 0 22px;
  font-size: 16px;
  line-height: 1.95;
  color: var(--text-2);
  max-width: 46em;
  text-wrap: balance;
  word-break: auto-phrase;
}
.article-metabar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .04em;
  color: var(--dim);
}
.article-metabar .dot { color: var(--line-2); }
.article-metabar .byline-name { color: var(--text-2); }
.article-metabar .meta-tags { margin-left: 4px; }

.article-cover { margin: 0 0 48px; }
.article-cover img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #070c13;
}
.article-cover figcaption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .06em;
  color: var(--dim);
}

/* 正文 */

.prose {
  font-size: 17px;
  word-break: auto-phrase;
  line-height: 2.02;
  color: var(--text-2);
  counter-reset: h2;
}
.prose > *:first-child { margin-top: 0; }
.prose p { margin: 0 0 1.5em; }
.prose strong { color: var(--text); font-weight: 600; }
.prose em { font-style: normal; color: var(--text); background: linear-gradient(transparent 70%, var(--mint-soft) 0); }

.prose h2 {
  counter-increment: h2;
  margin: 2.6em 0 .9em;
  font-family: var(--font-serif);
  font-size: 27px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: .02em;
  color: var(--text);
}
.prose h2::before {
  content: counter(h2, decimal-leading-zero);
  margin-right: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .06em;
  color: var(--mint);
  vertical-align: 3px;
}
.prose h3 {
  margin: 2em 0 .7em;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: .01em;
}
.prose h4 { margin: 1.8em 0 .6em; font-size: 16px; color: var(--text); }

.prose ul, .prose ol { margin: 0 0 1.6em; padding-left: 1.4em; }
.prose li { margin: .55em 0; padding-left: .25em; }
.prose li::marker { color: var(--mint); font-family: var(--font-mono); font-size: .85em; }

.prose a {
  color: var(--text);
  border-bottom: 1px solid var(--mint-line);
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.prose a:hover { color: var(--mint); border-color: var(--mint); }

.prose code {
  font-family: var(--font-mono);
  font-size: .86em;
  padding: .12em .4em;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--text);
  white-space: nowrap;
}

.prose blockquote {
  margin: 2em 0;
  padding: 6px 0 6px 24px;
  border-left: 2px solid var(--amber);
  color: var(--muted);
}
.prose blockquote p { margin: 0; }

.prose hr {
  margin: 3.2em 0;
  border: none;
  border-top: 1px dashed var(--line-2);
}

.prose img { margin: 2em 0; border-radius: 10px; border: 1px solid var(--line); }

/* 代码块 */

.code-block {
  position: relative;
  margin: 2.1em 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--code-bg);
  overflow: hidden;
}
.code-block::before {
  content: attr(data-lang);
  position: absolute;
  top: 10px;
  right: 64px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--dim);
  pointer-events: none;
}
.code-block pre {
  margin: 0;
  padding: 20px 22px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.85;
  color: var(--text);
  tab-size: 2;
}
.code-block code { border: 0; background: none; padding: 0; font-size: inherit; white-space: pre; }
.tok-comment { color: var(--dim); font-style: italic; }

.copy-btn {
  position: absolute;
  top: 7px;
  right: 8px;
  z-index: 2;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .06em;
  cursor: pointer;
  opacity: 0;
  transition: opacity .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.code-block:hover .copy-btn, .copy-btn:focus-visible { opacity: 1; }
.copy-btn:hover { color: var(--mint); border-color: var(--mint-line); }
.copy-btn.done { color: var(--mint); opacity: 1; }

/* 提示框 */

.callout {
  margin: 2em 0;
  padding: 20px 24px 6px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--mint);
  border-radius: 0 10px 10px 0;
  background: var(--mint-soft);
}
.callout-warn { border-left-color: var(--amber); background: var(--amber-soft); }
.callout-label {
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--mint);
}
.callout-warn .callout-label { color: var(--amber); }
.callout-title { display: block; margin-bottom: 8px; font-weight: 600; color: var(--text); }
.callout-body { font-size: 15.5px; line-height: 1.9; color: var(--text-2); }
.callout-body p { margin: 0 0 14px; }
.callout-body ul, .callout-body ol { margin: 0 0 14px; }

/* 表格 */

.table-wrap { margin: 2em 0; overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.7; }
.prose thead th {
  padding: 12px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: left;
  white-space: nowrap;
}
.prose tbody td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose tbody tr:last-child td { border-bottom: 0; }
.prose tbody tr:hover td { background: var(--mint-soft); }

/* 文末与翻页 */

.article-end {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  margin: 4em 0 0;
  padding: 26px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.end-mark { color: var(--mint); font-size: 18px; line-height: 1.6; }
.article-end p { margin: 0; font-size: 13px; line-height: 1.9; color: var(--muted); }

.pager { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 44px; }
.pager-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.pager-item span { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.pager-item strong { font-family: var(--font-serif); font-size: 15px; font-weight: 700; line-height: 1.6; }
.pager-item:hover { border-color: var(--mint-line); background: var(--surface); }
.pager-next { text-align: right; align-items: flex-end; }
.pager-empty { border: 1px dashed var(--line); }

/* 目录 */

.article-aside { position: relative; }
.toc { position: sticky; top: calc(var(--header-h) + 28px); }
.toc-label {
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--dim);
}
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc li { margin: 0; }
.toc a {
  display: block;
  padding: 5px 0 5px 14px;
  margin-left: -1px;
  border-left: 1px solid transparent;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--muted);
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.toc-h3 a { padding-left: 26px; font-size: 12px; }
.toc a:hover { color: var(--text); }
.toc a.active { color: var(--mint); border-left-color: var(--mint); }

.aside-note {
  margin-top: 34px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
.aside-note p { margin: 0; font-size: 11.5px; line-height: 1.8; color: var(--muted); }
.aside-note .mono-label { margin-bottom: 8px; }

/* ---------- 文章列表页 ---------- */

.page-head {
  max-width: var(--max);
  margin: 0 auto;
  padding: 76px 32px 40px;
}
.page-head h1 {
  margin: 0 0 22px;
  font-family: var(--font-serif);
  font-size: clamp(42px, 5vw, 64px);
  font-weight: 700;
  letter-spacing: .04em;
}
.page-lede { margin: 0; max-width: 46em; font-size: 15.5px; line-height: 1.95; color: var(--text-2); text-wrap: balance; word-break: auto-phrase; }

.filter-bar {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: transparent;
  color: var(--text-2);
  font-size: 12.5px;
  cursor: pointer;
  transition: border-color .2s var(--ease), color .2s var(--ease), background .2s var(--ease);
}
.chip span { font-family: var(--font-mono); font-size: 9.5px; color: var(--dim); }
.chip:hover { border-color: var(--line-2); color: var(--text); }
.chip.is-active { border-color: var(--mint-line); background: var(--mint-soft); color: var(--mint); }
.chip.is-active span { color: var(--mint); }

.filter-status {
  max-width: var(--max);
  margin: 18px auto 0;
  padding: 0 32px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .1em;
  color: var(--dim);
}

.card-grid {
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px 32px 96px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.card {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface);
  transition: border-color .3s var(--ease), transform .3s var(--ease), box-shadow .3s var(--ease);
}
.card:hover { border-color: var(--mint-line); transform: translateY(-4px); box-shadow: var(--shadow); }
.card.is-hidden { display: none; }
.card-link { display: flex; flex-direction: column; height: 100%; min-width: 0; }
.card-cover { display: block; background: #070c13; }
.card-cover img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .6s var(--ease); }
.card:hover .card-cover img { transform: scale(1.04); }
.card-body { display: flex; flex-direction: column; gap: 12px; padding: 22px 24px 26px; flex: 1; }
.card-body h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.55;
}
.card-sum {
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-body .read-more { margin-top: auto; }

.empty-state {
  max-width: var(--max);
  margin: -60px auto 0;
  padding: 0 32px 80px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--dim);
}

/* ---------- 关于页 ---------- */

.about-hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 72px 32px 80px;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 72px;
  align-items: start;
  border-bottom: 1px solid var(--line);
}
.about-portrait { position: sticky; top: calc(var(--header-h) + 40px); }
.about-portrait img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 16%;
  border-radius: 14px;
  border: 1px solid var(--line-2);
  background: #0a111b;
}
.about-emblem .emblem-frame {
  aspect-ratio: 4 / 5;
  border: 1px solid var(--line);
  border-radius: 14px;
  display: grid;
  place-items: center;
  padding: 26px;
  color: var(--mint);
  background:
    radial-gradient(120% 80% at 75% 8%, var(--mint-soft), transparent 62%),
    linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 28px 28px,
    var(--surface);
}
.about-emblem .emblem-frame svg { width: 100%; height: auto; max-width: 280px; }

.portrait-tag {
  display: block;
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .24em;
  color: var(--dim);
}
.about-intro h1 {
  margin: 0 0 26px;
  font-family: var(--font-serif);
  font-size: clamp(34px, 4vw, 50px);
  line-height: 1.3;
  letter-spacing: .03em;
}
.about-intro p { margin: 0 0 20px; font-size: 15.5px; line-height: 2; color: var(--text-2); max-width: 60ch; }

.about-section { max-width: var(--max); margin: 0 auto; padding: 64px 32px; border-bottom: 1px solid var(--line); }
.about-section-head { display: flex; align-items: baseline; gap: 18px; margin-bottom: 36px; }
.about-section-head h2 { margin: 0; font-family: var(--font-serif); font-size: 26px; letter-spacing: .05em; }

.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.about-block { padding: 30px 32px; background: var(--bg); }
.about-block h3 { margin: 0 0 12px; font-size: 16px; color: var(--text); }
.about-block p { margin: 0; font-size: 13.5px; line-height: 1.95; color: var(--muted); }

.topic-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.topic-list li { display: flex; flex-direction: column; gap: 6px; padding: 24px 28px; background: var(--bg); }
.topic-en { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .16em; color: var(--dim); }
.topic-cn { font-family: var(--font-serif); font-size: 18px; }

.tool-list { list-style: none; margin: 0; padding: 0; }
.tool-list li {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: 24px;
  align-items: baseline;
  padding: 18px 4px;
  border-bottom: 1px solid var(--line);
}
.tool-name { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; color: var(--mint); }
.tool-desc { font-size: 14px; color: var(--text); }
.tool-tags { font-size: 12px; color: var(--dim); text-align: right; }

.principles { margin: 0; padding-left: 1.3em; }
.principles li { margin: 0 0 18px; font-size: 15px; line-height: 1.95; color: var(--text-2); }
.principles li::marker { color: var(--mint); font-family: var(--font-mono); }
.principles strong { color: var(--text); }

.contact-band {
  max-width: var(--max);
  margin: 72px auto;
  padding: 56px 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  border: 1px solid var(--mint-line);
  border-radius: 18px;
  background: linear-gradient(120deg, var(--mint-soft), transparent 60%), var(--surface);
}
.contact-band h2 { margin: 0 0 10px; font-family: var(--font-serif); font-size: 28px; letter-spacing: .03em; }
.contact-band p:not(.mono-label) { margin: 0; font-size: 14px; color: var(--text-2); }

/* ---------- 动效 ---------- */

.js .reveal { opacity: 0; transform: translateY(18px); }
.js .reveal.in { opacity: 1; transform: none; transition: opacity .7s var(--ease), transform .7s var(--ease); }

@media (hover: none) {
  .copy-btn { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- 响应式 ---------- */

@media (max-width: 1080px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 44px; min-height: 0; padding-top: 56px; }
  .hero-figure { max-width: 620px; }
  .article { grid-template-columns: 1fr; gap: 0; }
  .article-aside { display: none; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .about-hero { grid-template-columns: 240px 1fr; gap: 48px; }
}

@media (max-width: 860px) {
  :root { --header-h: 66px; }
  .header-inner { padding: 0 22px; gap: 16px; }
  .brand-text em { display: none; }
  .section, .page-head, .filter-bar, .filter-status, .card-grid, .about-band, .about-section, .footer-inner { padding-left: 22px; padding-right: 22px; }
  .hero { padding: 44px 22px 56px; }
  .feature { grid-template-columns: minmax(0, 1fr); }
  .feature-cover img { aspect-ratio: 16 / 8; }
  .feature-body { padding: 32px 28px 38px; }
  .post-list a { grid-template-columns: 40px 1fr 20px; gap: 14px; }
  .pl-meta { display: none; }
  .post-list a:hover { padding-left: 8px; }
  .about-card { grid-template-columns: 1fr; padding: 32px 28px; }
  .about-emblem-badge { width: 96px; height: 96px; }
  .badge-char { font-size: 38px; }
  .footer-inner { grid-template-columns: 1fr; align-items: start; }
  .footer-nav { flex-wrap: wrap; }
  .about-hero { grid-template-columns: 1fr; gap: 36px; }
  .about-portrait { position: static; max-width: 240px; }
  .about-grid, .topic-list { grid-template-columns: 1fr; }
  .tool-list li { grid-template-columns: 1fr; gap: 6px; }
  .tool-tags { text-align: left; }
  .contact-band { flex-direction: column; align-items: flex-start; margin: 48px 22px; padding: 36px 28px; }
  .article { padding: 32px 22px 80px; }
  .article-head h1 { font-size: 30px; }
  .prose { font-size: 16px; line-height: 1.95; }
  .prose h2 { font-size: 23px; }
}

@media (max-width: 620px) {
  .site-nav a { padding: 8px 9px; font-size: 13px; }
  .hero-stats { gap: 28px; }
  .hero-copy h1 { font-size: 40px; }
  .card-grid { grid-template-columns: 1fr; }
  .pager { grid-template-columns: 1fr; }
  .pager-next { text-align: left; align-items: flex-start; }
  .pager-empty { display: none; }
  .article-cover { margin-bottom: 32px; }
  .callout { padding: 18px 18px 4px; }
  .prose table { font-size: 13px; }
  .prose thead th, .prose tbody td { padding: 10px 12px; }
}

/* ---------- 打印 ---------- */

@media print {
  .site-header, .site-footer, .article-aside, .progress, .pager, .copy-btn, .theme-toggle { display: none !important; }
  body { background: #fff; color: #000; }
  body::before { display: none; }
  .article { display: block; padding: 0; }
  .prose { color: #111; font-size: 11pt; }
  .article-cover { display: none; }
  a { color: #111; }
}
