/* ==========================================================================
   建站手记 · 前台样式
   ========================================================================== */

:root {
  --ink: #0e1a2f;
  --text: #33415c;
  --muted: #77839b;
  --line: #e3e8f1;
  --bg: #f5f7fb;
  --card: #ffffff;
  --brand: #1a45c4;
  --brand-deep: #0f2a6b;
  --brand-soft: #eef3ff;
  --accent: #d9552f;
  --radius: 6px;
  --wrap: 1180px;
  --shadow-sm: 0 1px 2px rgba(14, 26, 47, .04);
  --shadow-md: 0 10px 30px -16px rgba(14, 26, 47, .18);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: #12308c; }
img { max-width: 100%; height: auto; }
ul, ol { margin: 0; padding: 0; }
li { list-style: none; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------------------
   顶部导航
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  min-height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 4px;
  background: linear-gradient(140deg, #1a45c4, #0f2a6b);
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0;
  box-shadow: 0 4px 12px -6px rgba(26, 69, 196, .55);
}

.brand-mark-sm {
  width: 26px;
  height: 26px;
  font-size: 13px;
}

.brand-text { display: block; }
.brand-text strong { display: block; font-size: 17px; color: var(--ink); letter-spacing: .01em; line-height: 22px; }
.brand-text small {
  display: block;
  font-size: 9px;
  letter-spacing: .22em;
  color: var(--muted);
  line-height: 12px;
  margin-top: 3px;
}

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

.main-nav a {
  position: relative;
  padding: 8px 12px;
  color: var(--text);
  font-size: 14px;
  border-radius: 4px;
}

.main-nav a:hover { color: var(--ink); background: #f2f5fb; }

.main-nav a.is-active { color: var(--brand); font-weight: 600; }

.main-nav a.is-active::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 2px;
  height: 2px;
  background: var(--brand);
  border-radius: 2px;
}

.nav-search {
  display: flex;
  align-items: center;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  overflow: hidden;
  transition: border-color .18s;
}

.nav-search:focus-within { border-color: var(--brand); }

.nav-search input {
  width: 190px;
  border: 0;
  outline: 0;
  padding: 8px 12px;
  font-size: 13px;
  font-family: inherit;
  color: var(--ink);
  background: transparent;
}

.nav-search button {
  border: 0;
  border-left: 1px solid var(--line);
  background: #f7f9fd;
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  padding: 8px 14px;
  cursor: pointer;
  transition: background .18s, color .18s;
}

.nav-search button:hover { background: var(--brand); color: #fff; }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, #0a1528 0%, #10254f 52%, #173a80 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .055) 0 1px, transparent 1px 72px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .045) 0 1px, transparent 1px 72px);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, .85), rgba(0, 0, 0, .2) 70%, transparent);
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, .85), rgba(0, 0, 0, .2) 70%, transparent);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  top: -30%;
  right: -8%;
  width: 620px;
  height: 620px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(72, 118, 232, .38), rgba(72, 118, 232, 0) 65%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, .85fr);
  gap: 56px;
  align-items: center;
  padding-top: 64px;
  padding-bottom: 72px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  letter-spacing: .18em;
  color: #a7bbec;
}

.hero-kicker::before {
  content: "";
  width: 26px;
  height: 1px;
  background: rgba(167, 187, 236, .6);
}

.hero h1 {
  margin: 18px 0 18px;
  font-size: clamp(30px, 3.6vw, 46px);
  line-height: 1.22;
  letter-spacing: .015em;
  font-weight: 600;
  color: #fff;
}

.hero-desc {
  max-width: 540px;
  margin: 0 0 28px;
  font-size: 15px;
  line-height: 1.9;
  color: #b8c6e4;
}

.hero-search {
  display: flex;
  max-width: 520px;
  border-radius: 4px;
  overflow: hidden;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .18);
}

.hero-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 13px 16px;
  color: #fff;
  font-size: 14px;
  font-family: inherit;
}

.hero-search input::placeholder { color: #93a5ca; }

.hero-search button {
  border: 0;
  padding: 0 22px;
  background: #fff;
  color: var(--brand-deep);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .18s, color .18s;
}

.hero-search button:hover { background: #e8eeff; }

.hero-stats {
  display: flex;
  gap: 44px;
  margin-top: 34px;
}

.hero-stat { display: flex; flex-direction: column; }
.hero-stat strong {
  font-size: 22px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #fff;
  letter-spacing: .02em;
}
.hero-stat span { font-size: 12px; color: #8ea3d0; margin-top: 2px; letter-spacing: .08em; }

.hero-side { display: flex; align-items: center; }

.hero-panel {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .055);
  border-radius: 6px;
  padding: 22px 24px;
  backdrop-filter: blur(6px);
}

.hero-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  font-size: 12px;
  letter-spacing: .14em;
  color: #a7bbec;
}

.hero-panel-head a { color: #a7bbec; }
.hero-panel-head a:hover { color: #fff; }

.hero-list { padding-top: 6px; }

.hero-list li {
  display: flex;
  gap: 14px;
  align-items: baseline;
  justify-content: space-between;
  padding: 11px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}

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

.hero-list a {
  color: #dbe5fb;
  font-size: 13.5px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-list a:hover { color: #fff; }

.hero-list time {
  flex: none;
  font-size: 11px;
  font-family: var(--font-mono);
  color: #7f93bd;
}

.hero-panel-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  font-size: 11.5px;
  color: #8ea3d0;
  letter-spacing: .04em;
}

.hero-panel-foot a { color: #dbe5fb; }
.hero-panel-foot a:hover { color: #fff; }

/* --------------------------------------------------------------------------
   布局
   -------------------------------------------------------------------------- */
.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 42px;
  padding-top: 44px;
  padding-bottom: 64px;
  align-items: start;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 42px;
  padding-top: 32px;
  padding-bottom: 64px;
  align-items: start;
}

.col-main { min-width: 0; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.section-head h2 {
  position: relative;
  margin: 0;
  padding-left: 12px;
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: .01em;
  line-height: 1.4;
}

.section-head h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 3px;
  border-radius: 2px;
  background: var(--brand);
}

.section-head span { font-size: 12.5px; color: var(--muted); }

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

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

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

.post-card-body { padding: 22px 24px 16px; display: block; color: inherit; }

.post-card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }

.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 11px;
  letter-spacing: .06em;
  line-height: 1.7;
}

.tag-dark {
  background: #fdf0ea;
  color: #b8441f;
}

.post-card h3 {
  margin: 0 0 10px;
  font-size: 19px;
  line-height: 1.55;
  font-weight: 600;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-body p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-foot {
  margin-top: auto;
  padding: 12px 24px;
  border-top: 1px solid #eef2f8;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 11.5px;
  color: #8d99ae;
  font-variant-numeric: tabular-nums;
}

/* 列表式文章行 */
.post-list {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 4px 28px;
}

.post-row {
  display: flex;
  gap: 28px;
  align-items: center;
  padding: 26px 0;
  border-bottom: 1px solid #eef2f8;
}

.post-row:last-child { border-bottom: 0; }

.post-row-main { flex: 1; min-width: 0; }

.post-row h3 {
  margin: 0 0 8px;
  font-size: 19px;
  line-height: 1.5;
  font-weight: 600;
}

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

.post-row p {
  margin: 0 0 10px;
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-row-meta {
  display: flex;
  gap: 18px;
  font-size: 11.5px;
  color: #909cb2;
  font-variant-numeric: tabular-nums;
}

.post-row-link {
  flex: none;
  align-self: center;
  padding: 8px 16px;
  border: 1px solid #d6e0f2;
  border-radius: 4px;
  font-size: 12.5px;
  color: var(--brand);
  background: #fff;
  transition: all .18s;
  white-space: nowrap;
}

.post-row-link:hover { background: var(--brand); border-color: var(--brand); color: #fff; }

/* 分页 */
.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.pager-btn, .pager-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
  transition: all .16s;
}

.pager-btn:hover, .pager-num:hover { border-color: var(--brand); color: var(--brand); }

.pager-num.is-current {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  font-weight: 600;
}

.pager-btn.is-disabled { color: #b6bfd0; background: #fafbfe; cursor: not-allowed; }
.pager-gap { color: #b6bfd0; padding: 0 2px; }

/* 空状态 */
.empty-state {
  background: #fff;
  border: 1px dashed #d9e1ee;
  border-radius: var(--radius);
  padding: 48px 24px;
  text-align: center;
}
.empty-state strong { display: block; font-size: 16px; color: var(--ink); margin-bottom: 8px; }
.empty-state p { margin: 0; font-size: 13.5px; color: var(--muted); }

/* --------------------------------------------------------------------------
   页面头
   -------------------------------------------------------------------------- */
.page-head {
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 34px 0 32px;
}

.page-head h1 {
  margin: 10px 0 10px;
  font-size: clamp(24px, 2.6vw, 31px);
  line-height: 1.35;
  color: var(--ink);
  font-weight: 600;
  letter-spacing: .01em;
}

.page-head p {
  margin: 0;
  max-width: 720px;
  font-size: 14px;
  line-height: 1.85;
  color: var(--muted);
}

.page-head-meta {
  display: inline-block;
  margin-top: 16px;
  font-size: 12px;
  color: #909cb2;
  border-left: 2px solid var(--line);
  padding-left: 10px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 6px;
}

.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb span { color: #c3ccdc; }
.breadcrumb em { font-style: normal; color: #9aa5ba; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.breadcrumb-light { margin-bottom: 0; }

.page-search {
  display: flex;
  max-width: 520px;
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
}

.page-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 11px 14px;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink);
}

.page-search button {
  border: 0;
  padding: 0 20px;
  background: var(--brand);
  color: #fff;
  font-family: inherit;
  font-size: 13.5px;
  cursor: pointer;
}

.page-search button:hover { background: #12308c; }

/* --------------------------------------------------------------------------
   文章页
   -------------------------------------------------------------------------- */
.post {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px 44px 40px;
  box-shadow: var(--shadow-sm);
}

.post-head { padding-bottom: 24px; border-bottom: 1px solid #eef2f8; }

.post-head h1 {
  margin: 0 0 16px;
  font-size: clamp(25px, 2.8vw, 33px);
  line-height: 1.42;
  color: var(--ink);
  font-weight: 600;
  letter-spacing: .01em;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: #8d99ae;
  font-variant-numeric: tabular-nums;
}

.post-meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #c8d2e4;
}

.post-content {
  padding-top: 26px;
  font-size: 16px;
  line-height: 1.95;
  color: #2f3b52;
  word-wrap: break-word;
}

.post-content p { margin: 0 0 18px; }

.post-content h2 {
  margin: 38px 0 14px;
  padding-left: 12px;
  border-left: 3px solid var(--brand);
  font-size: 20px;
  line-height: 1.6;
  font-weight: 600;
  color: var(--ink);
}

.post-content h2:first-child { margin-top: 4px; }

.post-content h3 {
  margin: 28px 0 12px;
  font-size: 17.5px;
  font-weight: 600;
  color: var(--ink);
}

.post-content ul, .post-content ol { margin: 0 0 20px; padding-left: 22px; }

.post-content ul li { list-style: none; position: relative; padding-left: 14px; margin-bottom: 9px; }

.post-content ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 5px;
  height: 5px;
  border-radius: 1px;
  background: var(--brand);
  transform: rotate(45deg);
  opacity: .55;
}

.post-content ol { counter-reset: item; }

.post-content ol li {
  list-style: none;
  counter-increment: item;
  position: relative;
  padding-left: 26px;
  margin-bottom: 10px;
}

.post-content ol li::before {
  content: counter(item);
  position: absolute;
  left: 0;
  top: 2px;
  width: 18px;
  height: 18px;
  line-height: 18px;
  border-radius: 3px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 11px;
  font-family: var(--font-mono);
  text-align: center;
}

.post-content strong { color: var(--ink); font-weight: 600; }

.post-content pre {
  margin: 0 0 22px;
  padding: 18px 20px;
  background: #0e1a2f;
  border-radius: 6px;
  border-left: 3px solid #2f5fd0;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.85;
  color: #d7e3ff;
}

.post-content pre code { background: transparent; color: inherit; padding: 0; font-size: inherit; }

.post-content code {
  font-family: var(--font-mono);
  font-size: .92em;
  background: #eef2f9;
  color: #1b3a7a;
  padding: 2px 5px;
  border-radius: 3px;
}

.post-content blockquote {
  margin: 0 0 22px;
  padding: 14px 18px;
  background: #f7f9fd;
  border-left: 3px solid #d7deeb;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.9;
}

.post-content img { border-radius: 4px; margin: 6px 0 22px; }

.post-tail { margin-top: 36px; }

.post-copyright {
  margin: 0;
  padding-top: 18px;
  border-top: 1px solid #eef2f8;
  font-size: 12.5px;
  color: #909cb2;
}

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

.post-nav-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fcfdff;
  transition: border-color .18s, background .18s;
}

.post-nav-item:hover { border-color: #cfd9ea; background: #f7faff; }
.post-nav-item.is-empty { color: #a7b3c6; pointer-events: none; }

.post-nav-label {
  font-size: 11px;
  letter-spacing: .1em;
  color: #98a4b9;
}

.post-nav-title {
  font-size: 13.5px;
  color: var(--ink);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-nav-right { text-align: right; }

.related { margin-top: 42px; }

.related-list { border-top: 1px solid #eef2f8; }

.related-item {
  display: flex;
  gap: 18px;
  align-items: baseline;
  padding: 13px 0;
  border-bottom: 1px solid #eef2f8;
}

.related-item time {
  flex: none;
  font-size: 11.5px;
  font-family: var(--font-mono);
  color: #98a4b9;
}

.related-item strong {
  font-size: 14px;
  font-weight: 400;
  color: var(--text);
  line-height: 1.6;
}

.related-item:hover strong { color: var(--brand); }

/* --------------------------------------------------------------------------
   侧边栏
   -------------------------------------------------------------------------- */
.col-side { min-width: 0; }

.side-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}

.side-title {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .12em;
  color: var(--ink);
  padding-bottom: 10px;
  border-bottom: 1px solid #eef2f8;
}

.side-author-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }

.avatar-mono {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 50%;
  background: linear-gradient(140deg, #1a45c4, #0f2a6b);
  color: #fff;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: .02em;
}

.side-author-name { display: flex; flex-direction: column; line-height: 1.3; }
.side-author-name strong { font-size: 15px; color: var(--ink); }
.side-author-name small { font-size: 11.5px; color: var(--muted); margin-top: 3px; letter-spacing: .06em; }

.side-author-intro { margin: 0 0 14px; font-size: 13px; line-height: 1.85; color: var(--muted); }

.side-author-links { display: flex; gap: 16px; font-size: 12.5px; }

.hot-list li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid #f2f5fa;
}

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

.hot-index {
  flex: none;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--brand);
  opacity: .75;
}

.hot-list a {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  line-height: 1.65;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.hot-views { flex: none; font-size: 10.5px; color: #a7b3c6; font-variant-numeric: tabular-nums; }

.cat-list li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 0;
  font-size: 13.5px;
  color: var(--text);
  border-bottom: 1px dashed #eef2f8;
}

.cat-list li:last-child a { border-bottom: 0; padding-bottom: 0; }
.cat-list a:hover { color: var(--brand); }
.cat-list em { font-style: normal; font-size: 11.5px; color: #a7b3c6; font-variant-numeric: tabular-nums; }

.side-note { background: #fbfcff; border-style: dashed; }
.side-note p { margin: 0 0 12px; font-size: 12.5px; line-height: 1.9; color: var(--muted); }
.side-note-link { font-size: 12.5px; }

/* --------------------------------------------------------------------------
   归档
   -------------------------------------------------------------------------- */
.archive-year-block { margin-bottom: 36px; }

.archive-year {
  margin: 0 0 18px;
  font-size: 30px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: .02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.archive-year em {
  font-style: normal;
  font-size: 12px;
  color: var(--muted);
  margin-left: 6px;
  letter-spacing: .1em;
}

.archive-month {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 24px;
  margin-bottom: 14px;
}

.archive-month-label {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eef2f8;
  font-size: 14px;
  color: var(--ink);
  font-weight: 600;
}

.archive-month-label em {
  font-style: normal;
  font-size: 11.5px;
  font-weight: 400;
  color: #98a4b9;
}

.archive-list { padding-top: 4px; }

.archive-list li {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 8px 0;
}

.archive-list time {
  flex: none;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: #98a4b9;
}

.archive-list a {
  flex: 1;
  min-width: 0;
  font-size: 13.5px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.archive-views { flex: none; font-size: 11px; color: #aab4c6; font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------------------
   关于 / 联系
   -------------------------------------------------------------------------- */
.page-article {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px 44px 40px;
  box-shadow: var(--shadow-sm);
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 32px;
  padding-top: 26px;
  border-top: 1px solid #eef2f8;
}

.about-stats > div {
  padding: 16px 18px;
  background: #f8faff;
  border-radius: 4px;
  border-left: 2px solid var(--brand);
}

.about-stats strong {
  display: block;
  font-size: 22px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
}

.about-stats span { font-size: 12px; color: var(--muted); letter-spacing: .04em; }

.about-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 22px;
  padding: 24px 26px;
  background: linear-gradient(135deg, #10254f, #173a80);
  border-radius: 5px;
  color: #fff;
}

.about-cta strong { display: block; font-size: 15.5px; margin-bottom: 4px; }
.about-cta p { margin: 0; font-size: 12.5px; color: #b8c6e4; font-family: var(--font-mono); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 4px;
  background: var(--brand);
  color: #fff;
  font-size: 13.5px;
  border: 1px solid var(--brand);
  cursor: pointer;
  font-family: inherit;
  transition: all .18s;
}

.btn:hover { background: #12308c; border-color: #12308c; color: #fff; }

.about-cta .btn {
  background: #fff;
  color: var(--brand-deep);
  border-color: #fff;
  flex: none;
}

.about-cta .btn:hover { background: #e8eeff; color: var(--brand-deep); }

.btn-ghost {
  background: #fff;
  color: var(--text);
  border-color: var(--line);
  font-size: 12.5px;
  padding: 8px 14px;
}

.btn-ghost:hover { background: #fff; border-color: var(--brand); color: var(--brand); }

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 34px;
}

.contact-card {
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fcfdff;
}

.contact-label {
  font-size: 11px;
  letter-spacing: .18em;
  color: var(--muted);
}

.contact-value {
  display: block;
  margin: 8px 0 8px;
  font-size: 24px;
  color: var(--ink);
  letter-spacing: .02em;
  word-break: break-all;
  line-height: 1.3;
}

.contact-card p { margin: 0 0 14px; font-size: 12.5px; color: var(--muted); line-height: 1.8; }

/* --------------------------------------------------------------------------
   404
   -------------------------------------------------------------------------- */
.error-page {
  display: flex;
  align-items: center;
  min-height: 62vh;
  padding: 60px 0;
}

.error-inner { text-align: center; max-width: 620px; margin: 0 auto; }

.error-code {
  display: block;
  font-family: var(--font-mono);
  font-size: 62px;
  font-weight: 600;
  letter-spacing: .1em;
  color: #d3dced;
  line-height: 1;
}

.error-inner h1 { margin: 18px 0 10px; font-size: 24px; color: var(--ink); font-weight: 600; }
.error-inner > p { margin: 0; font-size: 14px; color: var(--muted); }

.error-search {
  max-width: 440px;
  margin: 24px auto 0;
  border-color: var(--line);
  background: #fff;
}

.error-search input { color: var(--ink); background: #fff; }
.error-search input::placeholder { color: #a7b3c6; }
.error-search button { background: var(--brand); color: #fff; }
.error-search button:hover { background: #12308c; }

.error-links { display: flex; justify-content: center; gap: 22px; margin-top: 22px; font-size: 13px; }

/* --------------------------------------------------------------------------
   页脚
   -------------------------------------------------------------------------- */
.site-footer {
  margin-top: 20px;
  background: #0c1829;
  color: #a7b6d1;
  padding-top: 46px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 44px;
  padding-bottom: 38px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
  color: #fff;
}

.footer-brand strong { font-size: 15.5px; letter-spacing: .02em; }

.footer-about p { margin: 0; font-size: 13px; line-height: 1.9; color: #8fa0bd; max-width: 380px; }

.footer-col h4 {
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .16em;
  color: #7f92b3;
}

.footer-col ul li { font-size: 13px; line-height: 2.1; color: #a7b6d1; }
.footer-col ul a { color: #a7b6d1; }
.footer-col ul a:hover { color: #fff; }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px 24px 22px;
  border-top: 1px solid rgba(255, 255, 255, .07);
  font-size: 12px;
  color: #75869f;
}

.footer-meta { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-meta a { color: #75869f; }
.footer-meta a:hover { color: #dbe5f5; }
.footer-admin { opacity: .75; }

/* --------------------------------------------------------------------------
   响应式
   -------------------------------------------------------------------------- */
@media (max-width: 1080px) {
  .content-grid, .article-layout { grid-template-columns: minmax(0, 1fr) 280px; gap: 30px; }
  .hero-inner { gap: 36px; }
}

@media (max-width: 920px) {
  .hero-inner { grid-template-columns: 1fr; padding-top: 48px; padding-bottom: 52px; }
  .hero-side { display: none; }
  .content-grid, .article-layout { grid-template-columns: 1fr; }
  .col-side { margin-top: 8px; }
  .nav-search { display: none; }
  .post { padding: 30px 28px; }
  .page-article { padding: 30px 28px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
}

@media (max-width: 720px) {
  .wrap { padding: 0 18px; }
  .header-inner { min-height: 60px; gap: 12px; }
  .main-nav { margin-left: auto; gap: 0; }
  .main-nav a { padding: 6px 8px; font-size: 13px; }
  .main-nav a.is-active::after { left: 8px; right: 8px; }
  .brand-text small { display: none; }
  .hero h1 { font-size: 28px; }
  .hero-stats { gap: 26px; }
  .hero-stat strong { font-size: 19px; }
  .post-grid { grid-template-columns: 1fr; }
  .post-row { flex-direction: column; align-items: flex-start; gap: 12px; }
  .post-row-link { align-self: flex-start; }
  .post-list { padding: 2px 18px; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav-right { text-align: left; }
  .about-stats { grid-template-columns: 1fr; }
  .about-cta { flex-direction: column; align-items: flex-start; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .post-row-meta { gap: 12px; }
}

@media (max-width: 420px) {
  .hero-search input { padding: 12px 12px; }
  .hero-search button { padding: 0 14px; font-size: 13px; }
  .post-card h3 { font-size: 17.5px; }
  .contact-value { font-size: 20px; }
}

/* 焦点可见 */
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid rgba(26, 69, 196, .55);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
