/* ==========================================================================
   前端技术分享 · isidid.cn
   全站样式：无外部字体、无 CDN、无第三方依赖
   ========================================================================== */

/* ---------- 1. 设计变量 ---------- */
:root {
  --container: 1080px;
  --header-h: 64px;

  --bg: #ffffff;
  --bg-soft: #f5f7fc;
  --surface: #ffffff;
  --surface-2: #f8faff;

  --text: #12161f;
  --text-soft: #545e73;
  --text-faint: #858ea3;

  --border: #e5e9f2;
  --border-strong: #d3dae8;

  --brand: #2f6df6;
  --brand-dark: #1f56d6;
  --brand-2: #7b5cff;
  --brand-soft: rgba(47, 109, 246, 0.09);
  --brand-ring: rgba(47, 109, 246, 0.28);

  --code-bg: #f4f6fc;
  --code-border: #e3e8f4;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 14px 34px -18px rgba(15, 23, 42, 0.28);
  --shadow-lg: 0 30px 70px -40px rgba(15, 23, 42, 0.5);

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;

  --ease: cubic-bezier(0.22, 0.7, 0.3, 1);
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #0b0f17;
  --bg-soft: #0e1420;
  --surface: #121a27;
  --surface-2: #151e2d;
  --text: #e8edf6;
  --text-soft: #9aa7bd;
  --text-faint: #75829a;
  --border: #1f2a3b;
  --border-strong: #2b3850;
  --brand: #6c9bff;
  --brand-dark: #8bb0ff;
  --brand-2: #a48cff;
  --brand-soft: rgba(108, 155, 255, 0.12);
  --brand-ring: rgba(108, 155, 255, 0.35);
  --code-bg: #0f1725;
  --code-border: #202d42;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 18px 40px -22px rgba(0, 0, 0, 0.8);
  --shadow-lg: 0 34px 80px -44px rgba(0, 0, 0, 0.9);
  color-scheme: dark;
}

/* ---------- 2. 基础重置 ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  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;
  text-rendering: optimizeLegibility;
}

body.nav-open {
  overflow: hidden;
}

img,
svg {
  max-width: 100%;
  vertical-align: middle;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 0.6em;
  line-height: 1.28;
  letter-spacing: -0.012em;
  font-weight: 700;
  color: var(--text);
}

p {
  margin: 0 0 1.1em;
}

a {
  color: var(--brand);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

a:hover {
  color: var(--brand-dark);
}

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

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2.4em 0;
}

::selection {
  background: var(--brand);
  color: #fff;
}

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

/* ---------- 3. 通用工具类 ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 50%;
  top: 8px;
  transform: translate(-50%, -160%);
  z-index: 200;
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 14px;
  transition: transform 0.2s var(--ease);
}

.skip-link:focus {
  transform: translate(-50%, 0);
  color: #fff;
}

/* ---------- 4. 站点头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid transparent;
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}

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

.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}

.brand:hover {
  color: var(--text);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.5px;
  box-shadow: 0 6px 16px -8px var(--brand);
}

.brand-name {
  font-size: 16.5px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.site-nav a {
  position: relative;
  padding: 7px 14px;
  border-radius: 999px;
  color: var(--text-soft);
  font-size: 14.5px;
  font-weight: 500;
}

.site-nav a:hover {
  color: var(--text);
  background: var(--bg-soft);
}

.site-nav a.is-active {
  color: var(--brand);
  background: var(--brand-soft);
}

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

.icon-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  color: var(--text-soft);
  cursor: pointer;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease),
    background 0.2s var(--ease);
}

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

.icon-btn svg {
  width: 17px;
  height: 17px;
}

html[data-theme="light"] .icon-sun,
html[data-theme="dark"] .icon-moon {
  display: none;
}

.nav-toggle {
  display: none;
}

/* ---------- 5. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  transition: transform 0.18s var(--ease), box-shadow 0.25s var(--ease),
    background 0.2s var(--ease), color 0.2s var(--ease),
    border-color 0.2s var(--ease);
}

.btn svg {
  width: 16px;
  height: 16px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  box-shadow: 0 12px 26px -14px var(--brand);
}

.btn-primary:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 18px 34px -16px var(--brand);
}

/* 深色模式下主按钮使用浅色渐变，文字改为深色以保证对比度 */
html[data-theme="dark"] .btn-primary {
  color: #0a1220;
}

html[data-theme="dark"] .btn-primary:hover {
  color: #0a1220;
}

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

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

/* ---------- 6. 首页 Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 92px 0 76px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.hero::before {
  content: "";
  position: absolute;
  inset: -220px -10% auto;
  height: 620px;
  background:
    radial-gradient(42% 55% at 26% 45%, var(--brand-soft), transparent 72%),
    radial-gradient(38% 48% at 74% 26%, rgba(123, 92, 255, 0.14), transparent 72%);
  pointer-events: none;
}

.hero .container {
  position: relative;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  padding: 5px 14px 5px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-soft);
  font-size: 13px;
  box-shadow: var(--shadow-sm);
  animation: rise 0.7s var(--ease) both;
}

.hero-tag .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.15);
}

.hero h1 {
  max-width: 17em;
  margin-bottom: 20px;
  font-size: clamp(2.1rem, 5.2vw, 3.35rem);
  line-height: 1.18;
  letter-spacing: -0.03em;
  animation: rise 0.7s 0.05s var(--ease) both;
}

.hero h1 .grad {
  background: linear-gradient(120deg, var(--brand), var(--brand-2) 70%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  max-width: 34em;
  margin-bottom: 32px;
  color: var(--text-soft);
  font-size: clamp(1rem, 1.6vw, 1.09rem);
  line-height: 1.85;
  animation: rise 0.7s 0.1s var(--ease) both;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  animation: rise 0.7s 0.16s var(--ease) both;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px dashed var(--border);
  animation: rise 0.7s 0.22s var(--ease) both;
}

.hero-stats div {
  min-width: 96px;
}

.hero-stats dt {
  color: var(--text-faint);
  font-size: 13px;
  letter-spacing: 0.02em;
}

.hero-stats dd {
  margin: 2px 0 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hero-stats dd span {
  color: var(--text-faint);
  font-size: 13px;
  font-weight: 500;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- 7. 区块与标题 ---------- */
.section {
  padding: 72px 0;
}

.section-soft {
  background: var(--bg-soft);
  border-block: 1px solid var(--border);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 34px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2.4vw, 1.6rem);
}

.eyebrow {
  display: block;
  margin-bottom: 8px;
  color: var(--brand);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.section-head p {
  margin: 6px 0 0;
  color: var(--text-soft);
  font-size: 15px;
}

.link-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  font-size: 14.5px;
  font-weight: 600;
  white-space: nowrap;
}

.link-more svg {
  width: 15px;
  height: 15px;
  transition: transform 0.2s var(--ease);
}

.link-more:hover svg {
  transform: translateX(3px);
}

/* ---------- 8. 文章卡片 ---------- */
.post-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.post-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease),
    border-color 0.28s var(--ease);
}

.post-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.card-cover {
  position: relative;
  display: flex;
  align-items: flex-end;
  height: 132px;
  padding: 16px 18px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(
    rgba(255, 255, 255, 0.5) 1px,
    transparent 1px
  );
  background-size: 16px 16px;
  opacity: 0.35;
  -webkit-mask-image: linear-gradient(to top left, #000, transparent 70%);
  mask-image: linear-gradient(to top left, #000, transparent 70%);
}

.card-cover code {
  position: relative;
  z-index: 1;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.94);
}

.cover-a {
  background: linear-gradient(135deg, #2f6df6, #6f8cff 45%, #7b5cff);
}
.cover-b {
  background: linear-gradient(135deg, #0e9488, #22b8a6 50%, #67d3a5);
}
.cover-c {
  background: linear-gradient(135deg, #e0692f, #f0904a 50%, #f4b860);
}
.cover-d {
  background: linear-gradient(135deg, #4b4fd6, #7a63e8 50%, #c06ee0);
}

.post-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 20px 22px 22px;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--text-faint);
  font-size: 13px;
}

.post-meta .sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--border-strong);
}

.post-card h3 {
  margin-bottom: 10px;
  font-size: 18.5px;
  line-height: 1.45;
}

.post-card h3 a {
  color: var(--text);
}

.post-card h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.post-card:hover h3 a {
  color: var(--brand);
}

.post-card p {
  margin-bottom: 16px;
  color: var(--text-soft);
  font-size: 14.5px;
  line-height: 1.75;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
}

.tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.8;
}

.tag-muted {
  background: var(--bg-soft);
  color: var(--text-soft);
}

/* ---------- 9. 专题卡片 ---------- */
.topic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.topic {
  padding: 24px 24px 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}

.topic:hover {
  transform: translateY(-2px);
  border-color: var(--brand-ring);
}

.topic-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand);
}

.topic-icon svg {
  width: 20px;
  height: 20px;
}

.topic h3 {
  margin-bottom: 6px;
  font-size: 16px;
}

.topic p {
  margin: 0;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.8;
}

/* ---------- 10. 关于本站条 ---------- */
.about-band {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 48px;
  align-items: center;
}

.about-band h2 {
  font-size: clamp(1.5rem, 3vw, 1.9rem);
}

.about-band p {
  color: var(--text-soft);
}

.about-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.about-list li {
  display: flex;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 14.5px;
  color: var(--text-soft);
}

.about-list li:last-child {
  border-bottom: 0;
}

.about-list svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 3px;
  color: var(--brand);
}

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

/* ---------- 11. 页脚与备案信息 ---------- */
.site-footer {
  padding: 56px 0 34px;
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  font-size: 14px;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 40px;
  padding-bottom: 32px;
}

.footer-brand {
  max-width: 320px;
}

.footer-brand .brand {
  margin-bottom: 12px;
}

.footer-brand p {
  margin: 0;
  color: var(--text-soft);
  font-size: 13.5px;
  line-height: 1.85;
}

.footer-cols {
  display: flex;
  flex-wrap: wrap;
  gap: 64px;
}

.footer-col h4 {
  margin-bottom: 12px;
  color: var(--text-faint);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.footer-col ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-col li + li {
  margin-top: 9px;
}

.footer-col a {
  color: var(--text-soft);
  font-size: 13.5px;
}

.footer-col a:hover {
  color: var(--brand);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 13px;
}

.footer-bottom p {
  margin: 0;
}

.beian {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 14px;
}

.beian a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-soft);
  font-size: 13px;
}

.beian a:hover {
  color: var(--brand);
}

.beian img {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.beian .divider {
  color: var(--border-strong);
}

/* ---------- 12. 文章页 ---------- */
.reading-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 150;
  height: 3px;
  background: transparent;
  pointer-events: none;
}

.reading-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  transition: width 0.1s linear;
}

.article-main {
  padding: 44px 0 88px;
}

.article {
  max-width: 780px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 26px;
  color: var(--text-faint);
  font-size: 13px;
}

.breadcrumb a {
  color: var(--text-soft);
}

.breadcrumb a:hover {
  color: var(--brand);
}

.breadcrumb .current {
  max-width: 26em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.article-header {
  padding-bottom: 30px;
  margin-bottom: 38px;
  border-bottom: 1px solid var(--border);
}

.article-header h1 {
  margin-bottom: 16px;
  font-size: clamp(1.75rem, 4vw, 2.4rem);
  line-height: 1.35;
  letter-spacing: -0.025em;
}

.article-lead {
  margin-bottom: 22px;
  color: var(--text-soft);
  font-size: 16.5px;
  line-height: 1.85;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--text-faint);
  font-size: 13.5px;
}

.article-meta .sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--border-strong);
}

.article-meta .tag {
  font-size: 11.5px;
}

/* 正文排版 */
.prose {
  font-size: 16.5px;
  line-height: 1.92;
  color: var(--text);
}

.prose > *:first-child {
  margin-top: 0;
}

.prose h2 {
  position: relative;
  margin: 2.2em 0 0.75em;
  padding-left: 15px;
  font-size: 1.34em;
  scroll-margin-top: 92px;
}

.prose h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.22em;
  bottom: 0.22em;
  width: 4px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--brand), var(--brand-2));
}

.prose h3 {
  margin: 1.8em 0 0.6em;
  font-size: 1.12em;
  scroll-margin-top: 92px;
}

.prose p {
  margin-bottom: 1.25em;
}

.prose a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--brand-ring);
}

.prose a:hover {
  text-decoration-color: var(--brand);
}

.prose strong {
  font-weight: 650;
}

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

.prose li {
  margin-bottom: 0.5em;
}

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

.prose blockquote {
  margin: 1.8em 0;
  padding: 16px 22px;
  border-left: 3px solid var(--brand);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--bg-soft);
  color: var(--text-soft);
  font-size: 0.97em;
}

.prose blockquote p:last-child {
  margin-bottom: 0;
}

.prose :not(pre) > code {
  padding: 0.15em 0.42em;
  border: 1px solid var(--code-border);
  border-radius: 6px;
  background: var(--code-bg);
  color: var(--brand-dark);
  font-family: var(--font-mono);
  font-size: 0.875em;
  word-break: break-word;
}

.prose pre {
  position: relative;
  margin: 1.6em 0;
  padding: 20px 22px;
  overflow-x: auto;
  border: 1px solid var(--code-border);
  border-radius: var(--radius-sm);
  background: var(--code-bg);
  font-size: 13.6px;
  line-height: 1.75;
  tab-size: 2;
}

.prose pre code {
  font-family: var(--font-mono);
  color: var(--text);
}

.copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 4px 10px;
  border: 1px solid var(--code-border);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text-faint);
  font-family: var(--font-sans);
  font-size: 12px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s var(--ease), color 0.2s var(--ease);
}

.prose pre:hover .copy-btn,
.copy-btn:focus-visible {
  opacity: 1;
}

.copy-btn:hover {
  color: var(--brand);
}

.copy-btn.is-done {
  color: #16a34a;
  border-color: rgba(22, 163, 74, 0.4);
}

.prose table {
  width: 100%;
  margin: 1.6em 0;
  border-collapse: collapse;
  font-size: 14.5px;
}

.prose th,
.prose td {
  padding: 10px 14px;
  border: 1px solid var(--border);
  text-align: left;
}

.prose th {
  background: var(--bg-soft);
  font-weight: 600;
}

.prose tbody tr:nth-child(even) {
  background: color-mix(in srgb, var(--bg-soft) 60%, transparent);
}

.prose hr {
  margin: 2.6em 0;
}

.article-footer {
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.article-footer .tag-row {
  margin-bottom: 28px;
}

.post-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.post-nav a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.post-nav a:hover {
  border-color: var(--brand-ring);
  transform: translateY(-2px);
}

.post-nav .dir {
  color: var(--text-faint);
  font-size: 12px;
}

.post-nav .title {
  color: var(--text);
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.5;
}

.post-nav .next {
  text-align: right;
  grid-column: 2;
}

.back-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 32px;
  font-size: 14.5px;
  font-weight: 500;
}

/* ---------- 13. 关于页 / 404 ---------- */
.page-head {
  padding: 64px 0 40px;
  border-bottom: 1px solid var(--border);
}

.page-head h1 {
  font-size: clamp(1.9rem, 4vw, 2.5rem);
  margin-bottom: 12px;
}

.page-head p {
  max-width: 40em;
  margin: 0;
  color: var(--text-soft);
  font-size: 16px;
}

.page-body {
  padding: 52px 0 84px;
}

.info-card {
  padding: 28px 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.info-card h2 {
  font-size: 1.15rem;
  margin-bottom: 18px;
}

.info-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}

.info-table th,
.info-table td {
  padding: 12px 0;
  border-bottom: 1px dashed var(--border);
  text-align: left;
  vertical-align: top;
}

.info-table tr:last-child th,
.info-table tr:last-child td {
  border-bottom: 0;
}

.info-table th {
  width: 8.5em;
  color: var(--text-faint);
  font-weight: 500;
}

.info-table td {
  color: var(--text);
}

/* 关于页中 info-table 位于 .prose 内，覆盖正文表格样式 */
.prose .info-table th,
.prose .info-table td,
.prose .info-table tbody tr:nth-child(even) {
  padding: 12px 0;
  border: 0;
  border-bottom: 1px dashed var(--border);
  background: transparent;
  text-align: left;
}

.prose .info-table th {
  width: 8.5em;
  color: var(--text-faint);
  font-weight: 500;
}

.prose .info-table tr:last-child th,
.prose .info-table tr:last-child td {
  border-bottom: 0;
}

.info-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
  align-items: start;
}

.notice {
  margin-top: 24px;
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.85;
}

.notice strong {
  color: var(--text);
}

.error-page {
  display: grid;
  place-items: center;
  min-height: calc(100vh - var(--header-h) - 220px);
  padding: 80px 0;
  text-align: center;
}

.error-code {
  display: block;
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: clamp(4rem, 14vw, 7rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  background: linear-gradient(120deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.error-page h1 {
  font-size: clamp(1.4rem, 3vw, 1.8rem);
}

.error-page p {
  max-width: 26em;
  margin: 0 auto 28px;
  color: var(--text-soft);
}

/* ---------- 14. 滚动入场 ---------- */
.will-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.will-reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- 15. 响应式 ---------- */
@media (max-width: 900px) {
  .about-band {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .topic-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --header-h: 58px;
  }

  .container {
    padding-inline: 18px;
  }

  .hero {
    padding: 60px 0 52px;
  }

  .hero-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 28px;
    margin-top: 38px;
  }

  .section {
    padding: 52px 0;
  }

  .section-head {
    flex-wrap: wrap;
    gap: 14px;
  }

  .post-grid {
    grid-template-columns: 1fr;
  }

  .footer-top {
    flex-direction: column;
    gap: 28px;
  }

  .footer-cols {
    gap: 48px;
  }

  .nav-toggle {
    display: grid;
  }

  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    margin: 0;
    padding: 14px 18px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
    box-shadow: var(--shadow-md);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s var(--ease), transform 0.22s var(--ease),
      visibility 0.22s;
  }

  .site-nav.is-open {
    transform: none;
    opacity: 1;
    visibility: visible;
  }

  .site-nav a {
    padding: 11px 14px;
    border-radius: 10px;
    font-size: 15px;
  }

  .article-main {
    padding: 30px 0 64px;
  }

  .article-header {
    margin-bottom: 30px;
  }

  .post-nav {
    grid-template-columns: 1fr;
  }

  .post-nav .next {
    grid-column: 1;
  }

  .prose {
    font-size: 16px;
    line-height: 1.88;
  }

  .prose th,
  .prose td {
    padding: 8px 10px;
    font-size: 13.5px;
  }

  .prose pre {
    padding: 16px 16px;
    font-size: 13px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 420px) {
  .brand-name {
    font-size: 15px;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .beian .divider {
    display: none;
  }

  .post-card-body {
    padding: 18px 18px 20px;
  }

  .info-card {
    padding: 22px 20px;
  }
}

/* ---------- 16. 动效与打印 ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

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

  .will-reveal {
    opacity: 1;
    transform: none;
  }
}

@media print {
  .site-header,
  .site-nav,
  .reading-progress,
  .site-footer,
  .post-nav,
  .copy-btn {
    display: none !important;
  }

  body {
    color: #000;
    background: #fff;
  }

  .article {
    max-width: none;
  }
}
