/* ═══════════════════════════════════════════════
   数字生命 · DIGITAL LIFE
   前端主题 —— 深空 / 玻璃拟态 / 渐变光晕
   ═══════════════════════════════════════════════ */

:root {
  --bg: #05070d;
  --bg-2: #0a0f1c;
  --surface: rgba(148, 163, 184, 0.05);
  --surface-hover: rgba(148, 163, 184, 0.09);
  --border: rgba(148, 163, 184, 0.14);
  --border-strong: rgba(148, 163, 184, 0.28);
  --text: #e6edf7;
  --text-dim: #97a3b8;
  --text-faint: #5b6779;
  --cyan: #22d3ee;
  --violet: #a78bfa;
  --pink: #e879f9;
  --gradient: linear-gradient(120deg, var(--cyan), #818cf8 52%, var(--pink));
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC",
               "Microsoft YaHei", "Noto Sans SC", "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Code", Consolas,
               "PingFang SC", monospace;
  --radius: 16px;
  --radius-sm: 10px;
  --header-h: 72px;
  --container: 1180px;
  --ease: cubic-bezier(.22, .8, .3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
}
a, button, input, textarea, select, label { touch-action: manipulation; }

::selection { background: rgba(34, 211, 238, .28); color: #fff; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(34,211,238,.4), rgba(167,139,250,.4));
  border-radius: 8px;
  border: 2px solid var(--bg);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

.mono { font-family: var(--font-mono); }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}

/* ───────── 无障碍 ───────── */
.skip-link {
  position: fixed; top: -48px; left: 16px; z-index: 200;
  padding: 10px 20px; border-radius: 0 0 12px 12px;
  background: var(--gradient); color: #04070d;
  font-size: 13.5px; font-weight: 600;
  transition: top .3s var(--ease);
}
.skip-link:focus { top: 0; }

a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ───────── 阅读进度条 ───────── */
.read-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px;
  z-index: 150; background: transparent; pointer-events: none;
}
.read-progress i {
  display: block; height: 100%; width: 0;
  background: var(--gradient);
  box-shadow: 0 0 12px rgba(34, 211, 238, .7);
  transition: width .12s linear;
}

/* ───────── 代码块复制按钮 ───────── */
.article-body pre { position: relative; }
.copy-code-btn {
  position: absolute; top: 10px; right: 12px;
  padding: 4px 12px; border-radius: 8px;
  background: rgba(148, 163, 184, .1);
  border: 1px solid var(--border);
  color: var(--text-dim); font-size: 11px;
  font-family: var(--font-mono); letter-spacing: .08em;
  cursor: pointer; opacity: 0;
  transition: opacity .25s, color .25s, border-color .25s;
}
.article-body pre:hover .copy-code-btn,
.copy-code-btn:focus-visible { opacity: 1; }
.copy-code-btn:hover { color: var(--cyan); border-color: rgba(34, 211, 238, .4); }

/* ───────── 背景层 ───────── */
.bg-grid {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background-image:
    linear-gradient(rgba(148,163,184,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148,163,184,.05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 40%, transparent 100%);
}

/* 用径向渐变代替 filter:blur —— 大面积 blur + 动画在 Edge 下会引发整页闪烁。
   光晕保持完全静态：无限动画会迫使浏览器持续重绘巨大图层，是闪屏根源 */
.bg-glow {
  position: fixed; z-index: -3; pointer-events: none;
}
.bg-glow-1 {
  width: 900px; height: 900px; top: -420px; left: -300px;
  background: radial-gradient(circle at 50% 50%, rgba(14,165,233,.16) 0%, rgba(14,165,233,.07) 34%, transparent 68%);
}
.bg-glow-2 {
  width: 1000px; height: 1000px; top: -6%; right: -420px;
  background: radial-gradient(circle at 50% 50%, rgba(124,58,237,.15) 0%, rgba(124,58,237,.06) 34%, transparent 68%);
}

/* ───────── 顶栏 ───────── */
/* 不动态切换 backdrop-filter（Edge 下会闪屏），改用纯半透明底色 */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--header-h);
  transition: background-color .35s, border-color .35s, box-shadow .35s;
  border-bottom: 1px solid transparent;
  background: transparent;
}
.site-header.scrolled {
  background: linear-gradient(180deg, rgba(5, 7, 13, .98), rgba(5, 7, 13, .96));
  border-bottom-color: var(--border);
  box-shadow: 0 10px 34px rgba(2, 6, 16, .45);
}
.header-inner {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px;
}

.logo { display: flex; align-items: center; gap: 12px; }
.logo-mark {
  width: 38px; height: 38px; border-radius: 11px; position: relative; flex: none;
  background: rgba(148,163,184,.06);
  border: 1px solid var(--border-strong);
  display: grid; place-items: center;
}
.logo-mark i {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2.5px solid transparent;
  background: linear-gradient(var(--bg-2), var(--bg-2)) padding-box, var(--gradient) border-box;
  position: relative;
}
.logo-mark i::after {
  content: ""; position: absolute; inset: 3.2px; border-radius: 50%;
  background: var(--gradient);
  animation: corePulse 2.6s ease-in-out infinite;
}
@keyframes corePulse {
  0%, 100% { opacity: .65; transform: scale(.82); }
  50% { opacity: 1; transform: scale(1.05); }
}
.logo-text { display: flex; flex-direction: column; line-height: 1.2; }
.logo-text strong { font-size: 19px; letter-spacing: .06em; font-weight: 700; }
.logo-text small {
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .34em;
  color: var(--text-faint);
}

.site-nav { display: flex; align-items: center; gap: 6px; }
.site-nav a {
  position: relative;
  padding: 9px 16px; border-radius: 999px;
  font-size: 14.5px; color: var(--text-dim);
  transition: color .25s, background .25s;
}
.site-nav a:hover { color: var(--text); background: var(--surface-hover); }
.site-nav a.active {
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
}
.site-nav a.active::before {
  content: ""; position: absolute; left: 16px; right: 16px; bottom: 5px; height: 2px;
  border-radius: 2px; background: var(--gradient);
}

.nav-toggle { display: none; background: none; border: none; width: 40px; height: 40px; position: relative; }
.nav-toggle span {
  display: block; width: 20px; height: 2px; margin: 4px auto;
  background: var(--text); border-radius: 2px;
  transition: transform .3s, opacity .3s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ───────── Hero ───────── */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex; align-items: center;
  padding: calc(var(--header-h) + 40px) 0 60px;
  overflow: hidden;
}
#heroCanvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .8; }
.hero-inner { position: relative; z-index: 1; width: 100%; }

.hero-tag {
  font-size: 12.5px; letter-spacing: .28em;
  color: var(--cyan);
  margin-bottom: 22px;
  text-shadow: 0 0 24px rgba(34, 211, 238, .5);
}
.hero-title {
  font-size: clamp(52px, 9vw, 108px);
  font-weight: 800; letter-spacing: .04em; line-height: 1.08;
}
.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.cursor {
  display: inline-block; margin-left: 10px; color: var(--cyan);
  animation: blink 1.5s infinite;
  -webkit-text-fill-color: var(--cyan);
}
/* 相邻关键帧取常量值，各浏览器都表现为干净的硬切换；节奏放缓到 1.5s */
@keyframes blink {
  0%, 54% { opacity: 1; }
  55%, 100% { opacity: 0; }
}

.hero-sub {
  margin-top: 26px; max-width: 560px;
  font-size: 17px; color: var(--text-dim);
}
.hero-actions { margin-top: 38px; display: flex; gap: 16px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 13px 28px; border-radius: 999px;
  font-size: 15px; font-weight: 600; letter-spacing: .02em;
  border: 1px solid transparent;
  transition: transform .25s var(--ease), box-shadow .25s, background .25s, border-color .25s;
}
.btn:active { transform: scale(.97); }
.btn-primary {
  background: var(--gradient); color: #04070d;
  box-shadow: 0 8px 30px rgba(34, 211, 238, .28);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(129, 140, 248, .4); }
.btn-ghost {
  color: var(--text); border-color: var(--border-strong);
  background: rgba(148,163,184,.04);
}
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); transform: translateY(-2px); }
.btn-sm { padding: 9px 18px; font-size: 13.5px; }

.hero-stats {
  margin-top: 64px;
  display: flex; gap: clamp(24px, 5vw, 64px); flex-wrap: wrap;
}
.stat dt {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .22em;
  color: var(--text-faint); margin-bottom: 6px;
}
.stat dd { font-size: 20px; color: var(--text); }
.stat .mono {
  font-size: 26px; font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-scroll {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .3em;
  color: var(--text-faint); z-index: 1;
}
.hero-scroll span {
  width: 1px; height: 42px;
  background: linear-gradient(180deg, var(--cyan), transparent);
  animation: scrollPulse 1.8s ease-in-out infinite;
}
@keyframes scrollPulse {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ───────── 通用 Section ───────── */
.page-main { padding-top: 0; }
.section { padding: 72px 0; }

.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 20px; margin-bottom: 36px;
}
.section-title { font-size: clamp(24px, 3.4vw, 32px); font-weight: 700; letter-spacing: .02em; }
.section-title em {
  font-family: var(--font-mono); font-style: normal; font-weight: 400;
  font-size: 12px; letter-spacing: .22em; color: var(--text-faint);
}
.section-num {
  font-size: 13px; color: var(--cyan); margin-right: 12px;
  text-shadow: 0 0 18px rgba(34,211,238,.6);
}
.section-more {
  font-family: var(--font-mono); font-size: 13px; color: var(--text-dim);
  white-space: nowrap; transition: color .25s;
}
.section-more:hover { color: var(--cyan); }

/* ───────── 卡片：精选 ───────── */
.featured-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.feature-card {
  position: relative; overflow: hidden;
  padding: 34px 32px 28px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform .35s var(--ease), border-color .35s, box-shadow .35s;
}
.feature-card:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, .4);
  box-shadow: 0 18px 50px rgba(2, 8, 20, .6), 0 0 0 1px rgba(34,211,238,.12), 0 0 44px rgba(34,211,238,.09);
}
.feature-glow {
  position: absolute; top: -80px; right: -80px;
  width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(129,140,248,.22), transparent 70%);
  filter: blur(30px); pointer-events: none;
  transition: opacity .35s; opacity: .7;
}
.feature-card:hover .feature-glow { opacity: 1; }
.feature-card h3 { font-size: 22px; margin: 16px 0 12px; line-height: 1.4; }

/* ───────── 卡片：文章网格 ───────── */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.post-card {
  display: flex; flex-direction: column;
  padding: 26px 24px 20px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform .35s var(--ease), border-color .35s, box-shadow .35s, background .35s;
}
.post-card:hover {
  transform: translateY(-5px);
  background: var(--surface-hover);
  border-color: rgba(129, 140, 248, .45);
  box-shadow: 0 16px 44px rgba(2, 8, 20, .55);
}
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.post-card h3 { font-size: 18px; margin: 15px 0 10px; line-height: 1.45; }
.post-card .card-summary {
  color: var(--text-dim); font-size: 14px; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card-foot {
  display: flex; align-items: center; gap: 14px;
  margin-top: 18px; padding-top: 14px;
  border-top: 1px dashed var(--border);
  font-size: 11.5px; color: var(--text-faint); letter-spacing: .08em;
}
.card-foot .read-link { margin-left: auto; color: var(--cyan); transition: transform .25s; }
.post-card:hover .read-link, .feature-card:hover .read-link { transform: translateX(4px); }

.chip {
  display: inline-flex; align-items: center;
  padding: 3px 12px; border-radius: 999px;
  font-size: 11.5px; letter-spacing: .05em;
  color: var(--cyan);
  background: rgba(34, 211, 238, .09);
  border: 1px solid rgba(34, 211, 238, .28);
  white-space: nowrap;
}
.pin { color: var(--pink); font-size: 11px; letter-spacing: .14em; }
.card-meta { display: flex; justify-content: space-between; align-items: center; }

/* ───────── 列表页 ───────── */
.page-head {
  padding: calc(var(--header-h) + 70px) 0 10px;
  text-align: center;
}
.page-head h1 { font-size: clamp(38px, 6vw, 60px); font-weight: 800; letter-spacing: .04em; }
.page-head > .container > .mono { color: var(--cyan); letter-spacing: .28em; font-size: 12px; }
.page-head-sub { margin-top: 14px; color: var(--text-dim); font-size: 16px; }

.search-bar {
  margin: 34px auto 0; max-width: 560px;
  display: flex; align-items: center; gap: 10px;
  padding: 8px 8px 8px 18px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: border-color .3s, box-shadow .3s;
}
.search-bar:focus-within {
  border-color: rgba(34,211,238,.5);
  box-shadow: 0 0 0 4px rgba(34,211,238,.08);
}
.search-icon { color: var(--text-faint); font-size: 18px; }
.search-bar input[type="search"] {
  flex: 1; min-width: 0; background: none; border: none; outline: none;
  color: var(--text); font-size: 14.5px; font-family: inherit;
}
.search-bar input::placeholder { color: var(--text-faint); }

.filter-row {
  margin-top: 22px;
  display: flex; justify-content: center; gap: 10px; flex-wrap: wrap;
}
.filter-chip {
  padding: 7px 18px; border-radius: 999px;
  font-size: 13.5px; color: var(--text-dim);
  border: 1px solid var(--border);
  transition: all .25s;
}
.filter-chip:hover { color: var(--text); border-color: var(--border-strong); }
.filter-chip.active {
  color: #04070d; font-weight: 600;
  background: var(--gradient); border-color: transparent;
}

.result-line { color: var(--text-faint); font-size: 12.5px; letter-spacing: .1em; margin-bottom: 22px; }

.post-list { display: flex; flex-direction: column; gap: 14px; }
.post-row {
  display: flex; align-items: center; gap: 26px;
  padding: 24px 28px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform .3s var(--ease), border-color .3s, background .3s;
}
.post-row:hover {
  transform: translateX(6px);
  background: var(--surface-hover);
  border-color: rgba(34, 211, 238, .35);
}
.row-date {
  flex: none; text-align: center; line-height: 1.25;
  padding-right: 26px; border-right: 1px dashed var(--border);
}
.row-day { display: block; font-size: 22px; font-weight: 700; color: var(--cyan); }
.row-year { font-size: 11px; color: var(--text-faint); letter-spacing: .2em; }
.row-body { flex: 1; min-width: 0; }
.row-body h3 { font-size: 18.5px; margin-bottom: 6px; }
.row-body p { color: var(--text-dim); font-size: 14px; }
.row-body .card-foot { margin-top: 10px; padding-top: 10px; }
.row-arrow { flex: none; color: var(--text-faint); font-size: 20px; transition: color .3s, transform .3s; }
.post-row:hover .row-arrow { color: var(--cyan); transform: translateX(4px); }

/* 分页 */
.pagination {
  margin-top: 44px;
  display: flex; justify-content: center; align-items: center; gap: 8px; flex-wrap: wrap;
}
.page-btn {
  min-width: 42px; height: 42px; padding: 0 14px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px; font-size: 13px;
  color: var(--text-dim); border: 1px solid var(--border);
  transition: all .25s;
}
.page-btn:hover { color: var(--text); border-color: var(--border-strong); transform: translateY(-2px); }
.page-btn.current {
  color: #04070d; font-weight: 700;
  background: var(--gradient); border-color: transparent;
}
.page-dots { color: var(--text-faint); padding: 0 4px; }

/* ───────── 文章页 ───────── */
.article-page { padding-top: calc(var(--header-h) + 56px); }
.article-head { max-width: 820px; }
.crumbs { font-size: 12px; color: var(--text-faint); letter-spacing: .12em; margin-bottom: 20px; }
.crumbs a { color: var(--text-dim); transition: color .25s; }
.crumbs a:hover { color: var(--cyan); }
.crumbs a:last-child { color: var(--cyan); }

.article-title {
  font-size: clamp(30px, 4.6vw, 46px);
  font-weight: 800; line-height: 1.3; letter-spacing: .01em;
}
.article-meta {
  margin-top: 18px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 12px; color: var(--text-faint); letter-spacing: .1em;
}
.article-lead {
  margin-top: 26px;
  padding: 18px 22px;
  border-left: 3px solid;
  border-image: var(--gradient) 1;
  background: var(--surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-dim); font-size: 15.5px;
}

.article-body { max-width: 820px; margin-top: 44px; font-size: 16.5px; }

.article-body h2, .article-body h3, .article-body h4 {
  margin: 2em 0 .7em; font-weight: 700; line-height: 1.4;
  scroll-margin-top: calc(var(--header-h) + 20px);
}
.article-body h2 {
  font-size: 26px; padding-left: 16px; position: relative;
}
.article-body h2::before {
  content: ""; position: absolute; left: 0; top: 7px; bottom: 7px; width: 4px;
  border-radius: 4px; background: var(--gradient);
}
.article-body h3 { font-size: 21px; }
.article-body h3::before { content: "/ "; color: var(--cyan); font-family: var(--font-mono); }
.article-body h4 { font-size: 18px; }

.article-body p { margin: 1em 0; color: #c9d3e3; }

.article-body a {
  color: var(--cyan);
  border-bottom: 1px dashed rgba(34, 211, 238, .5);
  transition: border-color .25s, color .25s;
}
.article-body a:hover { color: #7ee7f8; border-bottom-style: solid; }

.article-body strong { color: #fff; font-weight: 700; }

.article-body ul, .article-body ol { margin: 1em 0; padding-left: 26px; color: #c9d3e3; }
.article-body li { margin: .45em 0; }
.article-body ul li::marker { color: var(--cyan); }
.article-body ol li::marker { color: var(--violet); font-family: var(--font-mono); font-size: .9em; }

.article-body blockquote {
  margin: 1.4em 0; padding: 18px 24px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(34,211,238,.07), rgba(167,139,250,.07));
  border: 1px solid rgba(129, 140, 248, .25);
  color: var(--text-dim);
  position: relative;
}
.article-body blockquote p { margin: 0; }

.article-body code {
  font-family: var(--font-mono); font-size: .88em;
}
.article-body :not(pre) > code {
  padding: 2px 8px; border-radius: 6px;
  color: #7ee7f8;
  background: rgba(34, 211, 238, .1);
  border: 1px solid rgba(34, 211, 238, .2);
}
.article-body pre {
  margin: 1.4em 0; padding: 22px 24px;
  border-radius: var(--radius-sm); overflow-x: auto;
  background: #070b14;
  border: 1px solid var(--border);
  position: relative;
}
.article-body pre::before {
  content: "CODE"; position: absolute; top: 10px; right: 14px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .25em;
  color: var(--text-faint);
}
.article-body pre code {
  font-size: 13.5px; line-height: 1.7; color: #b7c5dd;
  background: none; border: none; padding: 0;
}

.article-body hr {
  margin: 2.4em auto; border: none; height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
}
.article-body img { border-radius: var(--radius-sm); border: 1px solid var(--border); margin: 1.2em auto; }
.article-body del { color: var(--text-faint); }

.article-end { max-width: 820px; margin: 40px auto 0; padding-bottom: 30px; }
.end-line {
  text-align: center; font-size: 11px; letter-spacing: .3em;
  color: var(--text-faint);
  margin: 30px 0;
}
.adjacent { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.adj-card {
  display: flex; flex-direction: column; gap: 8px;
  padding: 20px 22px;
  border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--border);
  transition: border-color .3s, transform .3s;
}
.adj-card.right { text-align: right; }
.adj-card:hover { border-color: rgba(34,211,238,.4); transform: translateY(-3px); }
.adj-card strong { font-size: 14.5px; font-weight: 600; line-height: 1.5; }
.adj-label { font-size: 10.5px; letter-spacing: .2em; color: var(--cyan); }
.adj-card.placeholder { background: none; border-color: transparent; }

/* ───────── 关于页 ───────── */
.about-wrap { max-width: 820px; display: flex; flex-direction: column; gap: 22px; }
.about-block {
  padding: 30px 32px;
  border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
}
.about-block h2 { font-size: 20px; margin-bottom: 14px; }
/* 关于页自定义 Markdown 内容的排版 */
.about-custom p { color: var(--text-dim); margin: .7em 0; }
.about-custom ul, .about-custom ol { margin: .8em 0; padding-left: 26px; color: var(--text-dim); }
.about-custom li { margin: .4em 0; }
.about-custom ul li::marker { color: var(--cyan); }
.about-custom ol li::marker { color: var(--violet); font-family: var(--font-mono); font-size: .9em; }
.about-custom blockquote {
  margin: 1em 0; padding: 14px 20px;
  border-left: 3px solid var(--cyan);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: rgba(34, 211, 238, .06);
}
.about-custom blockquote p { margin: 0; }
.about-custom code {
  font-family: var(--font-mono); font-size: .88em;
  padding: 2px 8px; border-radius: 6px;
  color: #7ee7f8; background: rgba(34, 211, 238, .1);
  border: 1px solid rgba(34, 211, 238, .2);
}
.about-custom a { color: var(--cyan); border-bottom: 1px dashed rgba(34, 211, 238, .5); }
.about-custom a:hover { color: #7ee7f8; border-bottom-style: solid; }
.about-custom strong { color: #fff; }
.about-custom hr { margin: 1.6em 0; border: none; height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent); }
.about-block h2 .mono { color: var(--cyan); font-size: 13px; margin-right: 8px; }
.about-block p { color: var(--text-dim); margin: .6em 0; }
.about-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.about-list li {
  padding-left: 20px; position: relative; color: var(--text-dim);
}
.about-list li::before {
  content: "▸"; position: absolute; left: 0; color: var(--cyan);
}
.about-list strong { color: var(--text); }
.about-cta {
  text-align: center; padding: 40px 20px 30px;
  border-top: 1px dashed var(--border);
}
.about-cta .mono { color: var(--text-faint); font-size: 12px; letter-spacing: .26em; margin-bottom: 18px; }

/* ───────── 首页介绍带 ───────── */
.intro-band {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center;
  padding: 48px;
  border-radius: calc(var(--radius) + 6px);
  background: linear-gradient(135deg, rgba(34,211,238,.06), rgba(167,139,250,.06) 55%, rgba(232,121,249,.05));
  border: 1px solid var(--border);
  position: relative; overflow: hidden;
}
.intro-band::after {
  content: ""; position: absolute; top: -120px; right: -120px;
  width: 300px; height: 300px; border-radius: 50%;
  background: radial-gradient(circle, rgba(129,140,248,.25), transparent 70%);
  filter: blur(40px);
}
.intro-label { color: var(--cyan); font-size: 12px; letter-spacing: .26em; margin-bottom: 14px; }
.intro-text h2 { font-size: clamp(24px, 3vw, 30px); line-height: 1.4; margin-bottom: 14px; }
.intro-text p { color: var(--text-dim); margin-bottom: 24px; max-width: 480px; }
.intro-code pre {
  padding: 26px 28px; border-radius: var(--radius-sm);
  background: rgba(4, 8, 16, .75);
  border: 1px solid var(--border);
  font-size: 13px; line-height: 1.8; color: #b7c5dd;
  overflow-x: auto;
  box-shadow: 0 20px 50px rgba(2, 6, 16, .5);
}
.c-key { color: var(--pink); } .c-cls { color: var(--cyan); }
.c-str { color: #a5f3c4; } .c-fn { color: #fbbf24; }
.c-var { color: var(--violet); } .c-bool { color: #f472b6; }
.c-cm { color: var(--text-faint); }

/* ───────── 空状态 ───────── */
.empty-state {
  grid-column: 1 / -1;
  text-align: center; padding: 70px 24px;
  border-radius: var(--radius);
  border: 1px dashed var(--border-strong);
}
.empty-state .mono { color: var(--text-faint); font-size: 13px; letter-spacing: .2em; margin-bottom: 12px; }
.empty-state p { color: var(--text-dim); margin: .5em 0; }
.empty-state .btn { margin-top: 18px; }

/* ───────── 评论区 ───────── */
.comments {
  max-width: 820px;
  margin: 56px auto 0;
  padding-bottom: 30px;
}
.comments-head { margin-bottom: 24px; }
.comments-head h2 { font-size: 22px; font-weight: 700; }
.comments-num {
  background: var(--gradient);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 26px;
}
.comments-head em {
  font-style: normal; font-size: 11px; letter-spacing: .24em; color: var(--text-faint);
}

.comment-flash {
  margin-bottom: 20px; padding: 12px 18px;
  border-radius: var(--radius-sm); font-size: 14px; border: 1px solid;
  animation: flashIn .4s var(--ease);
}
@keyframes flashIn { from { opacity: 0; transform: translateY(-8px); } }
.comment-flash.ok { color: #34d399; background: rgba(52,211,153,.07); border-color: rgba(52,211,153,.35); }
.comment-flash.err { color: #f87171; background: rgba(248,113,113,.07); border-color: rgba(248,113,113,.35); }

.comment-form {
  padding: 24px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  margin-bottom: 36px;
}
.comment-form-row { display: grid; grid-template-columns: 240px; }
.comment-field { display: block; margin-bottom: 16px; }
.comment-field > span {
  display: block; margin-bottom: 8px;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .22em;
  color: var(--text-faint);
}
.comment-field input,
.comment-field textarea {
  width: 100%; padding: 11px 14px;
  background: rgba(4, 8, 16, .6);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text); font-size: 14.5px; font-family: inherit;
  outline: none;
  transition: border-color .25s, box-shadow .25s;
}
.comment-field input:focus,
.comment-field textarea:focus {
  border-color: rgba(34, 211, 238, .55);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, .08);
}
.comment-field input::placeholder,
.comment-field textarea::placeholder { color: var(--text-faint); }
.comment-field textarea { resize: vertical; line-height: 1.8; min-height: 100px; }
.comment-form-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
.comment-hint { font-size: 10.5px; color: var(--text-faint); letter-spacing: .1em; }

.comments-closed {
  padding: 22px; text-align: center;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  color: var(--text-faint); font-size: 12px; letter-spacing: .18em;
  margin-bottom: 36px;
}

.comment-list { list-style: none; display: flex; flex-direction: column; gap: 18px; }
.comment-item {
  display: flex; gap: 16px;
  padding: 20px 22px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: border-color .3s;
}
.comment-item:hover { border-color: var(--border-strong); }
.comment-avatar {
  flex: none; width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--gradient);
  color: #04070d; font-weight: 700; font-size: 17px;
  box-shadow: 0 4px 16px rgba(129, 140, 248, .3);
}
.comment-main { flex: 1; min-width: 0; }
.comment-meta {
  display: flex; align-items: baseline; gap: 12px; margin-bottom: 6px;
}
.comment-author { font-size: 14.5px; }
.comment-meta time { font-size: 11px; color: var(--text-faint); letter-spacing: .08em; }
.comment-content {
  color: var(--text-dim); font-size: 14.5px;
  word-break: break-word;
}
.comment-empty {
  text-align: center; padding: 34px 20px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--text-faint); font-size: 12px; letter-spacing: .16em;
}

/* ───────── 数字生命计划 ───────── */
.plan-count { color: var(--cyan); }
.page-head-sub .plan-count { font-size: 20px; }

.plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.plan-card {
  display: flex; flex-direction: column;
  padding: 26px 24px 20px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform .35s var(--ease), border-color .35s, box-shadow .35s, background .35s;
}
.plan-card:hover {
  transform: translateY(-5px);
  background: var(--surface-hover);
  border-color: rgba(34, 211, 238, .4);
  box-shadow: 0 16px 44px rgba(2, 8, 20, .55);
}
.plan-card-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.plan-avatar {
  flex: none; width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: var(--gradient);
  color: #04070d; font-weight: 800; font-size: 21px;
  box-shadow: 0 6px 20px rgba(129, 140, 248, .35);
}
.plan-card-title { min-width: 0; }
.plan-card-title h3 {
  font-size: 17.5px; line-height: 1.4;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.plan-id { font-size: 10.5px; color: var(--text-faint); letter-spacing: .18em; }
.plan-intro {
  color: var(--text-dim); font-size: 14px; flex: 1; min-height: 44px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.plan-visit {
  margin-top: 18px; padding-top: 14px;
  border-top: 1px dashed var(--border);
  font-size: 13px;
  display: flex; gap: 18px; align-items: center;
}
.plan-visit .mono { color: var(--cyan); letter-spacing: .08em; transition: transform .25s, text-shadow .25s; display: inline-block; }
.plan-card:hover .plan-visit .mono { transform: translateX(4px); text-shadow: 0 0 18px rgba(34,211,238,.6); }
.plan-archive-link .mono { color: var(--text-dim); }
.plan-archive-link:hover .mono { color: var(--violet); text-shadow: 0 0 14px rgba(167,139,250,.5); }

.plan-cta {
  margin-top: 56px;
  display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap;
  padding: 44px 44px;
  border-radius: calc(var(--radius) + 6px);
  background: linear-gradient(135deg, rgba(34,211,238,.07), rgba(167,139,250,.06) 55%, rgba(232,121,249,.05));
  border: 1px solid var(--border);
  position: relative; overflow: hidden;
}
.plan-cta::after {
  content: ""; position: absolute; bottom: -120px; right: -100px;
  width: 280px; height: 280px; border-radius: 50%;
  background: radial-gradient(circle, rgba(34,211,238,.18), transparent 70%);
  filter: blur(30px); pointer-events: none;
}
.plan-cta-text h2 { font-size: clamp(22px, 3vw, 28px); margin-bottom: 12px; }
.plan-cta-text p { color: var(--text-dim); max-width: 560px; }

/* 申请页 */
.apply-wrap {
  max-width: 1080px;
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: start;
}
.apply-sec-title { font-size: 19px; margin-bottom: 18px; }
.apply-sec-title .mono { color: var(--cyan); font-size: 13px; margin-right: 8px; }
.apply-side-col { position: sticky; top: calc(var(--header-h) + 20px); }

.apply-notes { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.apply-notes li {
  position: relative; padding: 12px 16px 12px 34px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-dim); font-size: 14px;
}
.apply-notes li::before {
  content: "▸"; position: absolute; left: 15px; top: 12px; color: var(--cyan);
}

.apply-codebox {
  margin-top: 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #070b14;
  overflow: hidden;
}
.codebox-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(148, 163, 184, .05);
}
.codebox-head .mono { font-size: 10.5px; letter-spacing: .24em; color: var(--text-faint); }
.copy-btn {
  background: rgba(34, 211, 238, .1);
  border: 1px solid rgba(34, 211, 238, .3);
  color: var(--cyan);
  padding: 5px 14px; border-radius: 999px; font-size: 12px;
  transition: background .25s, box-shadow .25s;
}
.copy-btn:hover { background: rgba(34, 211, 238, .18); box-shadow: 0 0 16px rgba(34,211,238,.25); }
.apply-codebox pre {
  padding: 16px; font-size: 12.5px; line-height: 1.7;
  color: #7ee7f8; white-space: pre-wrap; word-break: break-all;
}
.codebox-tip { padding: 0 16px 14px; font-size: 12px; color: var(--text-faint); }
.intro-counter { font-style: normal; float: right; color: var(--cyan); }

/* ───────── 页脚 ───────── */
.site-footer {
  margin-top: 60px;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, transparent, rgba(10, 15, 28, .8));
}
.footer-inner {
  padding: 44px 28px;
  display: flex; justify-content: space-between; align-items: flex-start; gap: 30px; flex-wrap: wrap;
}
.footer-logo { font-size: 18px; font-weight: 700; letter-spacing: .04em; }
.footer-logo em { font-family: var(--font-mono); font-style: normal; font-size: 11px; color: var(--text-faint); letter-spacing: .2em; }
.footer-brand p { margin-top: 10px; color: var(--text-faint); font-size: 13px; max-width: 380px; }
.footer-meta { text-align: right; font-family: var(--font-mono); font-size: 11.5px; color: var(--text-faint); letter-spacing: .12em; }
.footer-meta p { margin: 6px 0; }
.footer-links a { color: var(--text-dim); transition: color .25s; }
.footer-links a:hover { color: var(--cyan); }
.footer-links span { margin: 0 8px; color: var(--text-faint); }
.status-dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: #34d399; margin-right: 8px;
  box-shadow: 0 0 10px rgba(52, 211, 153, .9);
  animation: corePulse 2s ease-in-out infinite;
}

/* ───────── 回到顶部 ───────── */
.back-top {
  position: fixed; right: 26px; bottom: 26px; z-index: 90;
  width: 46px; height: 46px; border-radius: 14px;
  background: rgba(10, 15, 28, .92);
  border: 1px solid var(--border-strong);
  color: var(--cyan); font-size: 18px;
  opacity: 0; pointer-events: none; transform: translateY(14px);
  transition: all .35s var(--ease);
}
.back-top.show { opacity: 1; pointer-events: auto; transform: none; }
.back-top:hover { border-color: var(--cyan); box-shadow: 0 0 24px rgba(34,211,238,.3); }

/* ───────── 入场动画（仅在 JS 可用时启用，避免内容被隐藏） ───────── */
.js .reveal {
  opacity: 0; transform: translateY(26px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.js .reveal.in { opacity: 1; transform: none; }
.d1 { transition-delay: .12s; } .d2 { transition-delay: .24s; }
.d3 { transition-delay: .36s; } .d4 { transition-delay: .48s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ───────── 响应式 ───────── */
@media (max-width: 960px) {
  .post-grid { grid-template-columns: 1fr 1fr; }
  .featured-grid { grid-template-columns: 1fr; }
  .intro-band { grid-template-columns: 1fr; padding: 36px 28px; }
}
@media (max-width: 720px) {
  .container { padding: 0 20px; }
  .section { padding: 52px 0; }
  .post-grid { grid-template-columns: 1fr; gap: 16px; }

  .nav-toggle { display: block; }
  .site-nav {
    position: fixed; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    padding: 14px 20px calc(20px + env(safe-area-inset-bottom, 0px));
    background: #070b13;
    border-bottom: 1px solid var(--border);
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: transform .3s var(--ease), opacity .3s;
  }
  .site-nav.open { transform: none; opacity: 1; pointer-events: auto; }
  .site-nav a { padding: 14px 18px; border-radius: 12px; font-size: 16px; }

  .hero { min-height: 86vh; min-height: 86svh; padding-bottom: 90px; }
  .hero-scroll { display: none; }
  .hero-sub { font-size: 15.5px; }
  .hero-actions { margin-top: 30px; }
  .hero-actions .btn { flex: 1; justify-content: center; min-width: 140px; }
  .hero-stats {
    margin-top: 44px;
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 16px;
  }
  .stat .mono { font-size: 22px; }
  .stat dd { font-size: 16px; }

  .section-head { flex-wrap: wrap; align-items: center; }
  .post-row { flex-direction: column; align-items: flex-start; gap: 12px; padding: 20px; }
  .row-date { border-right: none; padding-right: 0; border-bottom: 1px dashed var(--border); padding-bottom: 10px; display: flex; gap: 10px; align-items: baseline; }
  .row-arrow { display: none; }

  /* 移动端输入框 16px：避免 iOS Safari 聚焦时自动放大页面 */
  .search-bar input[type="search"],
  .comment-field input,
  .comment-field textarea { font-size: 16px; }

  .page-head { padding-top: calc(var(--header-h) + 46px); }
  .search-bar { margin-top: 26px; }
  .filter-row { gap: 8px; }
  .filter-chip { padding: 8px 16px; font-size: 14px; }

  .article-title { font-size: clamp(26px, 7.2vw, 34px); }
  .article-body { font-size: 15.5px; }
  .article-body h2 { font-size: 22px; }
  .article-body h3 { font-size: 18.5px; }
  .article-body pre { padding: 18px 16px; font-size: 12.5px; }
  .article-lead { padding: 14px 16px; font-size: 14.5px; }

  .adjacent { grid-template-columns: 1fr; }
  .adj-card.right { text-align: left; }

  .comments { margin-top: 44px; }
  .comment-form { padding: 18px 16px; }
  .comment-form-row { grid-template-columns: 1fr; }
  .comment-form-foot { flex-wrap: wrap; }
  .comment-item { padding: 16px; gap: 12px; }
  .comment-avatar { width: 34px; height: 34px; border-radius: 10px; font-size: 15px; }

  .intro-band { padding: 28px 20px; }
  .intro-code pre { font-size: 11.5px; }
  .about-block { padding: 24px 20px; }

  .plan-grid { grid-template-columns: 1fr; gap: 16px; }
  .plan-cta { padding: 30px 22px; margin-top: 40px; }
  .apply-wrap { grid-template-columns: 1fr; gap: 30px; }
  .apply-side-col { position: static; }
  .apply-notes li { padding: 10px 14px 10px 32px; font-size: 13.5px; }
  .footer-links a { color: var(--cyan); }

  .footer-inner { padding: 34px 20px calc(34px + env(safe-area-inset-bottom, 0px)); }
  .footer-meta { text-align: left; }
  .footer-brand p { max-width: none; }

  .back-top { right: 16px; bottom: 16px; width: 42px; height: 42px; }
}
