/* ==========================================================================
   安遥的博客 — 样式表
   主题：Firefly 风格的玻璃拟态 / 壁纸横幅 / 三栏布局
   ========================================================================== */

/* ---------- 1. 变量与重置 ---------- */
:root {
  --hue: 215;
  --primary: hsl(var(--hue) 72% 52%);
  --primary-dark: hsl(var(--hue) 72% 44%);
  --primary-light: hsl(var(--hue) 85% 62%);
  --primary-soft: hsl(var(--hue) 80% 96%);
  --primary-a10: hsl(var(--hue) 72% 52% / .10);
  --primary-a20: hsl(var(--hue) 72% 52% / .20);

  --page-bg: hsl(var(--hue) 22% 96.5%);
  --page-bg-2: hsl(var(--hue) 30% 99%);
  --card-bg: rgba(255, 255, 255, .74);
  --card-bg-solid: #ffffff;
  --card-border: rgba(16, 24, 40, .07);
  --card-shadow: 0 4px 24px rgba(18, 30, 54, .055);
  --card-shadow-hover: 0 14px 40px rgba(18, 30, 54, .12);

  --text-1: #1d2430;
  --text-2: #59616f;
  --text-3: #8b93a2;
  --line: rgba(16, 24, 40, .08);
  --glass: rgba(255, 255, 255, .62);
  --glass-strong: rgba(255, 255, 255, .86);
  --code-bg: hsl(var(--hue) 30% 96%);

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --nav-h: 60px;
  --banner-home: 62vh;
  --banner-page: 34vh;
  --page-w: 1440px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

[data-theme="dark"] {
  --primary: hsl(var(--hue) 78% 68%);
  --primary-dark: hsl(var(--hue) 78% 62%);
  --primary-soft: hsl(var(--hue) 30% 20%);
  --primary-a10: hsl(var(--hue) 78% 68% / .14);
  --primary-a20: hsl(var(--hue) 78% 68% / .26);

  --page-bg: hsl(var(--hue) 16% 10%);
  --page-bg-2: hsl(var(--hue) 16% 12%);
  --card-bg: rgba(30, 34, 42, .68);
  --card-bg-solid: #1e222a;
  --card-border: rgba(255, 255, 255, .07);
  --card-shadow: 0 4px 24px rgba(0, 0, 0, .28);
  --card-shadow-hover: 0 16px 44px rgba(0, 0, 0, .45);

  --text-1: #e7eaf1;
  --text-2: #a6afbe;
  --text-3: #757e8d;
  --line: rgba(255, 255, 255, .09);
  --glass: rgba(20, 23, 30, .62);
  --glass-strong: rgba(20, 23, 30, .9);
  --code-bg: hsl(var(--hue) 20% 16%);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scrollbar-gutter: stable;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-1);
  background: var(--page-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }
ul, ol { margin: 0; padding: 0; }
h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 700; line-height: 1.35; letter-spacing: -.01em; }
p { margin: 0; }
::selection { background: var(--primary-a20); color: var(--text-1); }

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

/* 滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--text-3) 40%, transparent);
  border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover { background: color-mix(in srgb, var(--text-3) 70%, transparent); }

/* ---------- 2. 背景层 ---------- */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(60rem 40rem at 12% -8%, hsl(var(--hue) 90% 88% / .55), transparent 60%),
    radial-gradient(50rem 34rem at 96% 4%, hsl(calc(var(--hue) + 40) 90% 90% / .45), transparent 62%),
    var(--page-bg);
}
[data-theme="dark"] .banner-media { filter: brightness(.72) saturate(.92); }
[data-theme="dark"] body[data-page="post"] .banner-media { filter: blur(3px) brightness(.72) saturate(.92); }
[data-theme="dark"] .banner::before {
  background: linear-gradient(180deg,
    rgba(6, 9, 16, .5) 0%,
    rgba(6, 9, 16, .3) 24%,
    rgba(6, 9, 16, .36) 54%,
    rgba(6, 9, 16, .6) 78%,
    var(--page-bg) 100%);
}
[data-theme="dark"] .bg-layer {
  background:
    radial-gradient(60rem 40rem at 10% -10%, hsl(var(--hue) 60% 26% / .5), transparent 62%),
    radial-gradient(48rem 32rem at 96% 0%, hsl(calc(var(--hue) + 40) 60% 24% / .38), transparent 60%),
    var(--page-bg);
}
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .5;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 75%);
}

/* ---------- 3. 顶部导航 ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background .35s var(--ease), box-shadow .35s var(--ease),
    border-color .35s var(--ease), backdrop-filter .35s var(--ease);
  border-bottom: 1px solid transparent;
}
.navbar:not(.is-solid) {
  background-image: linear-gradient(180deg, rgba(8, 12, 22, .38) 0%, rgba(8, 12, 22, .10) 68%, transparent 100%);
}
.navbar:not(.is-solid) .icon-btn svg { filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .45)); }
.navbar-inner {
  width: 100%;
  max-width: var(--page-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: .02em;
  flex-shrink: 0;
}
.nav-brand .logo {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: .95rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary-light), var(--primary-dark));
  box-shadow: 0 4px 12px var(--primary-a20);
}
.nav-brand .brand-text { color: #fff; transition: color .3s; text-shadow: 0 1px 12px rgba(0, 0, 0, .28); }

.nav-links {
  display: flex;
  align-items: center;
  gap: .15rem;
  margin-left: auto;
  list-style: none;
}
.nav-links a {
  position: relative;
  display: block;
  padding: .45rem .7rem;
  font-size: .9rem;
  border-radius: 8px;
  color: rgba(255, 255, 255, .88);
  transition: color .25s, background .25s;
  text-shadow: 0 1px 10px rgba(0, 0, 0, .25);
  white-space: nowrap;
}
.nav-links a:hover { color: #fff; background: rgba(255, 255, 255, .14); }
.nav-links a.active { color: #fff; font-weight: 600; }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  transform: translateX(-50%);
  background: currentColor;
}

.nav-actions { display: flex; align-items: center; gap: .3rem; margin-left: .6rem; }
.icon-btn {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: rgba(255, 255, 255, .9);
  transition: background .25s, color .25s, transform .25s;
}
.icon-btn:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.icon-btn svg { width: 18px; height: 18px; }

/* 滚动后 / 子页面：玻璃态 */
.navbar.is-solid {
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  backdrop-filter: blur(16px) saturate(180%);
  border-bottom-color: var(--line);
  box-shadow: 0 2px 20px rgba(18, 30, 54, .06);
}
.navbar.is-solid .nav-brand .brand-text { color: var(--text-1); text-shadow: none; }
.navbar.is-solid .nav-links a { color: var(--text-2); text-shadow: none; }
.navbar.is-solid .nav-links a:hover { color: var(--primary); background: var(--primary-a10); }
.navbar.is-solid .nav-links a.active { color: var(--primary); }
.navbar.is-solid .icon-btn { color: var(--text-2); }
.navbar.is-solid .icon-btn:hover { color: var(--primary); background: var(--primary-a10); }

.nav-toggle { display: none; }

/* ---------- 4. 横幅 ---------- */
.banner {
  position: relative;
  height: var(--banner-home);
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  isolation: isolate;
}
.banner-media {
  position: absolute;
  inset: -10% 0 -10% 0;
  z-index: -2;
  background-image: var(--wallpaper);
  background-size: cover;
  background-position: center 42%;
  transform: translate3d(0, var(--parallax, 0px), 0) scale(1.02);
  will-change: transform;
  transition: opacity .6s var(--ease), filter .6s var(--ease);
}
body[data-wallpaper="off"] .banner-media { opacity: 0; }
body[data-wallpaper="off"] .banner {
  background:
    radial-gradient(circle at 20% 20%, hsl(calc(var(--hue) + 30) 80% 62% / .9), transparent 55%),
    radial-gradient(circle at 85% 30%, hsl(calc(var(--hue) + 70) 78% 60% / .75), transparent 50%),
    linear-gradient(135deg, hsl(var(--hue) 62% 44%), hsl(calc(var(--hue) + 40) 55% 34%));
}
body[data-wallpaper="off"] .banner::before {
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, .06) 55%, rgba(0, 0, 0, .18) 82%, var(--page-bg) 96%);
}
.banner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg,
    rgba(12, 18, 30, .28) 0%,
    rgba(12, 18, 30, .06) 22%,
    rgba(12, 18, 30, .12) 52%,
    rgba(12, 18, 30, .40) 76%,
    color-mix(in srgb, var(--page-bg) 88%, transparent) 94%,
    var(--page-bg) 100%);
}
.banner::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 44% 42% at 50% 44%, rgba(10, 16, 28, .26), transparent 72%),
    radial-gradient(ellipse 75% 65% at 50% 40%, transparent 40%, rgba(8, 12, 22, .26) 100%);
}

.banner-content {
  position: relative;
  text-align: center;
  padding: 0 1.5rem;
  color: #fff;
  transform: translateY(-4vh);
  animation: bannerIn 1s var(--ease) both;
}
@keyframes bannerIn {
  from { opacity: 0; transform: translateY(calc(-4vh + 24px)); }
  to { opacity: 1; transform: translateY(-4vh); }
}

.banner-avatar {
  width: 84px;
  height: 84px;
  margin: 0 auto 1.1rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: .05em;
  color: #fff;
  background: linear-gradient(140deg, rgba(255, 255, 255, .3), rgba(255, 255, 255, .08));
  border: 1.5px solid rgba(255, 255, 255, .55);
  box-shadow: 0 8px 32px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .5);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.banner-title {
  font-size: clamp(2.2rem, 5.2vw, 3.6rem);
  font-weight: 800;
  letter-spacing: .06em;
  text-shadow: 0 4px 30px rgba(0, 0, 0, .32);
  margin-bottom: .55rem;
}
.banner-subtitle {
  margin-left: auto;
  margin-right: auto;
  max-width: 62ch;
  font-size: clamp(.95rem, 1.6vw, 1.15rem);
  color: rgba(255, 255, 255, .92);
  letter-spacing: .08em;
  text-shadow: 0 2px 16px rgba(0, 0, 0, .35);
  min-height: 1.7em;
}
.banner.no-sub .banner-subtitle { display: none; }
.banner-subtitle .caret {
  display: inline-block;
  width: 1px;
  height: 1em;
  margin-left: 2px;
  vertical-align: -.12em;
  background: rgba(255, 255, 255, .9);
  animation: blink 1.1s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.banner-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  margin-top: 1.6rem;
  font-size: .82rem;
  color: rgba(255, 255, 255, .85);
  letter-spacing: .04em;
}
.banner-meta span { display: inline-flex; align-items: center; gap: .35rem; }
.banner-meta svg { width: 14px; height: 14px; opacity: .8; }

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 2.2rem;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  color: rgba(255, 255, 255, .8);
  font-size: .72rem;
  letter-spacing: .18em;
  animation: floatY 2.4s ease-in-out infinite;
}
.scroll-hint svg { width: 18px; height: 18px; }
@keyframes floatY {
  0%, 100% { transform: translate(-50%, 0); opacity: .8; }
  50% { transform: translate(-50%, 8px); opacity: 1; }
}

/* 子页面横幅：标题可能换成 2~3 行，用 auto 高度并给固定导航栏留出空间，避免压到导航栏后面 */
body[data-page]:not([data-page="home"]) .banner {
  height: auto;
  min-height: 300px;
  padding: calc(var(--nav-h) + 1.4rem) 1rem 2.6rem;
}
body:not([data-page="home"]) .banner-content {
  /* 子页面横幅矮，不能再沿用首页那条 -4vh 的上移终态，否则长标题会钻到导航栏后面 */
  animation-name: bannerInPage;
}
@keyframes bannerInPage {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
body:not([data-page="home"]) .banner-title {
  font-size: clamp(1.7rem, 3.4vw, 2.45rem);
  max-width: 22ch;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.4;
}
body[data-page="post"] .banner-media { filter: blur(3px) saturate(.92); transform: scale(1.06); }
body[data-page="post"] .banner::before {
  background: linear-gradient(180deg,
    rgba(10, 14, 24, .58) 0%,
    rgba(10, 14, 24, .40) 30%,
    rgba(10, 14, 24, .46) 62%,
    rgba(10, 14, 24, .40) 78%,
    var(--page-bg) 100%);
}
body[data-page="post"] .banner::after { opacity: .5; }
body[data-page="post"] .banner-title { max-width: 26ch; }
body:not([data-page="home"]) .banner-subtitle { font-size: .95rem; }
body:not([data-page="home"]) .scroll-hint { display: none; }

/* ---------- 5. 布局 ---------- */
.page-wrap {
  position: relative;
  z-index: 1;
  max-width: var(--page-w);
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}
body[data-page="home"] .page-wrap { margin-top: .6rem; }
body:not([data-page="home"]) .page-wrap { margin-top: -2.2rem; }

.layout {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr) 300px;
  gap: 1.25rem;
  align-items: start;
}
.layout.no-right { grid-template-columns: 268px minmax(0, 1fr); max-width: 1160px; margin: 0 auto; }
.layout.no-left { grid-template-columns: minmax(0, 1fr) 300px; }

.col-left, .col-right {
  position: sticky;
  top: calc(var(--nav-h) + 1rem);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: calc(100vh - var(--nav-h) - 2rem);
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: .5rem;
  scrollbar-width: thin;
}
.col-left > *, .col-right > * { flex-shrink: 0; }
.col-left::-webkit-scrollbar, .col-right::-webkit-scrollbar { width: 4px; }
.col-left::-webkit-scrollbar-thumb, .col-right::-webkit-scrollbar-thumb { background: transparent; border-radius: 99px; }
.col-left:hover::-webkit-scrollbar-thumb, .col-right:hover::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--text-3) 35%, transparent);
}
.col-main { min-width: 0; display: flex; flex-direction: column; gap: 1.25rem; }
.col-right-extra { display: flex; flex-direction: column; gap: 1rem; }

/* ---------- 6. 卡片 ---------- */
.card {
  position: relative;
  background: var(--card-bg);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  transition: box-shadow .35s var(--ease), transform .35s var(--ease), border-color .35s;
}
body[data-card="flat"] .card { box-shadow: none; }
body[data-card="flat"] .card:hover { box-shadow: none; }
body[data-card="tint"] .card { background: color-mix(in srgb, var(--primary) 6%, var(--card-bg)); }

.widget { padding: 1.05rem 1.1rem; }
.widget-head {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .9rem;
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .02em;
}
.widget-head svg { width: 16px; height: 16px; color: var(--primary); }
.widget-head .more {
  margin-left: auto;
  font-size: .75rem;
  font-weight: 500;
  color: var(--text-3);
  display: inline-flex;
  align-items: center;
  gap: .2rem;
  transition: color .2s;
}
.widget-head .more:hover { color: var(--primary); }

/* ---------- 7. 个人资料卡 ---------- */
.profile-card { padding: 1.5rem 1.1rem 1.15rem; text-align: center; overflow: hidden; }
.profile-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 78px;
  background:
    radial-gradient(circle at 30% 120%, var(--primary-a20), transparent 70%),
    linear-gradient(120deg, hsl(var(--hue) 80% 92%), hsl(calc(var(--hue) + 45) 85% 93%));
  opacity: .9;
}
[data-theme="dark"] .profile-card::before {
  background:
    radial-gradient(circle at 30% 120%, var(--primary-a20), transparent 70%),
    linear-gradient(120deg, hsl(var(--hue) 40% 22%), hsl(calc(var(--hue) + 45) 40% 20%));
}
.profile-avatar {
  position: relative;
  width: 76px;
  height: 76px;
  margin: 0 auto .7rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(140deg, var(--primary-light), var(--primary-dark));
  border: 3px solid var(--card-bg-solid);
  box-shadow: 0 6px 20px var(--primary-a20);
}
.profile-avatar .status-dot {
  position: absolute;
  right: 3px;
  bottom: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #3ecf8e;
  border: 2px solid var(--card-bg-solid);
  box-shadow: 0 0 0 0 rgba(62, 207, 142, .55);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(62, 207, 142, .5); }
  70% { box-shadow: 0 0 0 8px rgba(62, 207, 142, 0); }
  100% { box-shadow: 0 0 0 0 rgba(62, 207, 142, 0); }
}
.profile-name { font-size: 1.15rem; font-weight: 700; letter-spacing: .04em; }
.profile-bio { margin-top: .3rem; font-size: .8rem; color: var(--text-3); line-height: 1.6; }
.profile-socials {
  display: flex;
  justify-content: center;
  gap: .45rem;
  margin-top: 1rem;
}
.profile-socials a {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: var(--text-2);
  background: color-mix(in srgb, var(--text-1) 5%, transparent);
  transition: all .25s var(--ease);
}
.profile-socials a:hover {
  color: #fff;
  background: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px var(--primary-a20);
}
.profile-socials svg { width: 16px; height: 16px; }
.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 1.1rem;
  padding-top: .9rem;
  border-top: 1px dashed var(--line);
}
.profile-stats div { text-align: center; }
.profile-stats strong { display: block; font-size: 1rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.profile-stats span { font-size: .7rem; color: var(--text-3); letter-spacing: .06em; }

/* ---------- 8. 公告 / 音乐 ---------- */
.announce p {
  font-size: .84rem;
  color: var(--text-2);
  line-height: 1.7;
  padding-left: .1rem;
}
.announce .tag-line {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  margin-top: .7rem;
  padding: .18rem .55rem;
  font-size: .7rem;
  border-radius: 99px;
  color: var(--primary);
  background: var(--primary-a10);
}
.announce .tag-line svg { width: 13px; height: 13px; flex-shrink: 0; }

.music-card { display: flex; align-items: center; gap: .8rem; }
.music-cover {
  position: relative;
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
}
.music-cover img { width: 100%; height: 100%; object-fit: cover; }
.music-cover::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 10px;
  height: 10px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(255, 255, 255, .85);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, .12);
}
.music-info { flex: 1; min-width: 0; }
.music-title {
  font-size: .85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.music-artist { font-size: .72rem; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.music-progress {
  position: relative;
  height: 3px;
  margin-top: .5rem;
  border-radius: 99px;
  background: color-mix(in srgb, var(--text-1) 9%, transparent);
  overflow: hidden;
}
.music-progress i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--primary-light), var(--primary));
  transition: width .25s linear;
}
.music-actions { display: flex; align-items: center; gap: .3rem; flex-shrink: 0; }
.music-next {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--text-3);
  transition: color .2s, background .2s;
}
.music-next:hover { color: var(--primary); background: var(--primary-a10); }
.music-next:disabled { opacity: .4; cursor: not-allowed; }
.music-next:disabled:hover { color: var(--text-3); background: none; }
.music-next svg { width: 15px; height: 15px; }
.music-badge {
  margin-left: auto;
  padding: .08rem .42rem;
  font-size: .64rem;
  letter-spacing: .06em;
  border-radius: 99px;
  color: var(--primary);
  background: var(--primary-a10);
}
.music-more {
  display: inline-block;
  margin-top: .75rem;
  font-size: .7rem;
  color: var(--text-3);
  transition: color .2s;
}
.music-more:hover { color: var(--primary); }
.music-play {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--primary);
  box-shadow: 0 4px 12px var(--primary-a20);
  transition: transform .2s, box-shadow .2s;
}
.music-play:hover:not(:disabled) { transform: scale(1.06); box-shadow: 0 6px 18px var(--primary-a20); }
.music-play:disabled { opacity: .45; cursor: not-allowed; }
.music-play.is-loading svg { display: none; }
.music-play.is-loading::after {
  content: "";
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  animation: musicSpin .7s linear infinite;
}
@keyframes musicSpin { to { transform: rotate(360deg); } }
.music-play svg { width: 14px; height: 14px; margin-left: 1px; }

/* ---------- 9. 分类 / 标签 / 归档小部件 ---------- */
.cat-list { display: flex; flex-direction: column; gap: .1rem; }
.cat-item {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .42rem .5rem;
  border-radius: 8px;
  font-size: .84rem;
  color: var(--text-2);
  transition: background .2s, color .2s, padding .2s;
}
.cat-item:hover { background: var(--primary-a10); color: var(--primary); padding-left: .7rem; }
.cat-item .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--primary);
  opacity: .55;
  flex-shrink: 0;
}
.cat-item .count {
  margin-left: auto;
  font-size: .72rem;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

.tag-cloud { display: flex; flex-wrap: wrap; gap: .4rem; }
.tag-chip {
  display: inline-flex;
  align-items: center;
  padding: .2rem .55rem;
  font-size: .75rem;
  border-radius: 7px;
  color: var(--text-2);
  background: color-mix(in srgb, var(--text-1) 5%, transparent);
  transition: all .22s var(--ease);
  border: 1px solid transparent;
}
.tag-chip:hover {
  color: var(--primary);
  background: var(--primary-a10);
  border-color: var(--primary-a20);
  transform: translateY(-1px);
}
.tag-chip .n { margin-left: .25rem; opacity: .55; font-size: .68rem; }

.archive-mini { display: flex; flex-direction: column; gap: .1rem; }
.archive-mini a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .35rem .5rem;
  border-radius: 7px;
  font-size: .82rem;
  color: var(--text-2);
  transition: background .2s, color .2s;
}
.archive-mini a:hover { background: var(--primary-a10); color: var(--primary); }
.archive-mini .n { font-size: .72rem; color: var(--text-3); }

/* ---------- 10. 文章列表 ---------- */
.list-head {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: 0 .2rem;
}
.list-head h2 { font-size: 1.1rem; letter-spacing: .02em; }
.list-head .count-pill {
  font-size: .72rem;
  padding: .1rem .5rem;
  border-radius: 99px;
  color: var(--primary);
  background: var(--primary-a10);
  font-variant-numeric: tabular-nums;
}
.list-head .spacer { margin-left: auto; }
.view-switch { display: flex; gap: .25rem; }
.view-switch button {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 8px;
  color: var(--text-3);
  transition: all .2s;
}
.view-switch button:hover { color: var(--primary); background: var(--primary-a10); }
.view-switch button.on { color: var(--primary); background: var(--primary-a10); }
.view-switch svg { width: 15px; height: 15px; }

.posts { display: flex; flex-direction: column; gap: .9rem; }
.posts.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.post-card {
  display: flex;
  gap: 1rem;
  padding: .75rem;
  overflow: hidden;
  opacity: 0;
  transform: translateY(14px);
  animation: cardIn .6s var(--ease) forwards;
  animation-delay: calc(var(--i, 0) * 55ms);
}
@keyframes cardIn {
  to { opacity: 1; transform: translateY(0); }
}
.post-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--card-shadow-hover);
  border-color: var(--primary-a20);
}
.posts.grid .post-card { flex-direction: column; gap: .75rem; }

.post-cover {
  position: relative;
  flex-shrink: 0;
  width: 210px;
  aspect-ratio: 16 / 10;
  border-radius: 10px;
  overflow: hidden;
  background: var(--primary-soft);
}
.posts.grid .post-cover { width: 100%; aspect-ratio: 16 / 9; }
.post-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .7s var(--ease), filter .4s;
}
.post-card:hover .post-cover img { transform: scale(1.06); }
.post-cover .pin {
  position: absolute;
  top: 8px;
  left: 8px;
  display: inline-flex;
  align-items: center;
  gap: .2rem;
  padding: .15rem .45rem;
  font-size: .65rem;
  font-weight: 600;
  color: #fff;
  border-radius: 6px;
  background: rgba(0, 0, 0, .42);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  letter-spacing: .04em;
}
.post-cover .pin svg { width: 10px; height: 10px; }

.post-body { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: .15rem .35rem .2rem 0; }
.posts.grid .post-body { padding: 0 .35rem .35rem; }
.post-title {
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color .22s;
}
.post-card:hover .post-title { color: var(--primary); }
.post-excerpt {
  margin-top: .35rem;
  font-size: .82rem;
  line-height: 1.7;
  color: var(--text-3);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.posts.grid .post-excerpt { -webkit-line-clamp: 2; }
.post-foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: auto;
  padding-top: .6rem;
  font-size: .72rem;
  color: var(--text-3);
}
.post-foot .meta { display: inline-flex; align-items: center; gap: .3rem; }
.post-foot .meta svg { width: 12px; height: 12px; opacity: .75; }
.post-foot .sep { width: 1px; height: 10px; background: var(--line); }
.post-foot .cat {
  padding: .05rem .42rem;
  border-radius: 5px;
  color: var(--primary);
  background: var(--primary-a10);
  font-weight: 500;
}
.post-foot .tags { display: inline-flex; gap: .3rem; overflow: hidden; }
.post-foot .tags span { color: var(--text-3); }
.post-foot .tags span::before { content: "#"; opacity: .6; }

.post-card .arrow {
  position: absolute;
  right: .9rem;
  bottom: .9rem;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--primary);
  background: var(--primary-a10);
  opacity: 0;
  transform: translateX(-6px);
  transition: all .3s var(--ease);
}
.post-card:hover .arrow { opacity: 1; transform: translateX(0); }
.post-card .arrow svg { width: 13px; height: 13px; }

.empty {
  padding: 3rem 1rem;
  text-align: center;
  color: var(--text-3);
  font-size: .88rem;
}
.empty svg { width: 40px; height: 40px; margin: 0 auto .8rem; opacity: .4; }

/* 分页 / 加载更多 */
.load-more {
  display: flex;
  justify-content: center;
  padding: .3rem 0;
}
.load-more button {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .55rem 1.4rem;
  font-size: .84rem;
  color: var(--primary);
  border-radius: 99px;
  background: var(--card-bg);
  border: 1px solid var(--primary-a20);
  box-shadow: var(--card-shadow);
  transition: all .25s var(--ease);
}
.load-more button:hover { background: var(--primary); color: #fff; transform: translateY(-2px); box-shadow: 0 8px 20px var(--primary-a20); }
.load-more button svg { width: 14px; height: 14px; }

/* ---------- 11. 右侧：统计 / 日历 ---------- */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem; }
.stat-item {
  padding: .6rem .7rem;
  border-radius: 10px;
  background: color-mix(in srgb, var(--text-1) 4%, transparent);
  border: 1px solid transparent;
  transition: all .25s var(--ease);
}
.stat-item:hover { border-color: var(--primary-a20); background: var(--primary-a10); }
.stat-item strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
}
.stat-item span { font-size: .68rem; color: var(--text-3); letter-spacing: .06em; }

.calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .6rem;
  font-size: .82rem;
  font-weight: 600;
}
.calendar-head .nav { display: flex; gap: .15rem; }
.calendar-head .nav button {
  width: 22px; height: 22px;
  display: grid; place-items: center;
  border-radius: 6px;
  color: var(--text-3);
  transition: all .2s;
}
.calendar-head .nav button:hover { color: var(--primary); background: var(--primary-a10); }
.calendar-head svg { width: 13px; height: 13px; }
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  text-align: center;
  font-size: .72rem;
}
.calendar-grid .wd { color: var(--text-3); font-size: .66rem; padding: .15rem 0; }
.calendar-grid .day {
  position: relative;
  padding: .28rem 0;
  border-radius: 6px;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
  transition: background .2s, color .2s;
}
.calendar-grid .day.out { color: color-mix(in srgb, var(--text-3) 45%, transparent); }
.calendar-grid .day.has::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 1px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  transform: translateX(-50%);
  background: var(--primary);
}
.calendar-grid .day.today {
  color: #fff;
  background: var(--primary);
  font-weight: 600;
}
.calendar-grid .day.today::after { background: #fff; }

.info-list { display: flex; flex-direction: column; gap: .4rem; font-size: .78rem; margin: 0; }
.info-list dt { flex-shrink: 0; }
.info-list div { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.info-list dt { color: var(--text-3); }
.info-list dd { margin: 0; color: var(--text-2); font-weight: 500; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 12. 文章详情 ---------- */
.article-hero {
  position: relative;
  overflow: hidden;
  padding: 0;
  border-radius: var(--radius-lg);
}
.article-hero-media { position: relative; height: 240px; overflow: hidden; }
.article-hero-media img { width: 100%; height: 100%; object-fit: cover; }
.article-hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 12, 22, .05), rgba(8, 12, 22, .55));
}
.article-hero-inner {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 1.6rem 1.8rem 1.3rem;
  color: #fff;
  z-index: 1;
}
.article-cat {
  display: inline-flex;
  align-items: center;
  padding: .18rem .6rem;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .05em;
  border-radius: 99px;
  color: #fff;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .3);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.article-title {
  margin-top: .6rem;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  line-height: 1.4;
  letter-spacing: .01em;
  text-shadow: 0 2px 20px rgba(0, 0, 0, .3);
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .9rem;
  margin-top: .7rem;
  font-size: .76rem;
  color: rgba(255, 255, 255, .88);
}
.article-meta span { display: inline-flex; align-items: center; gap: .3rem; }
.article-meta svg { width: 13px; height: 13px; opacity: .8; }

.article-body { padding: 1.7rem 2.2rem 1.6rem; }
.article-meta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem .9rem;
  padding-bottom: 1.1rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px dashed var(--line);
  font-size: .76rem;
  color: var(--text-3);
}
.article-meta-bar span { display: inline-flex; align-items: center; gap: .3rem; }
.article-meta-bar svg { width: 13px; height: 13px; opacity: .8; }
.article-meta-bar .cat {
  padding: .16rem .58rem;
  border-radius: 99px;
  font-size: .72rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-a10);
  transition: all .2s;
}
.article-meta-bar .cat:hover { background: var(--primary); color: #fff; }

/* 正文排版 */
.prose { font-size: .95rem; line-height: 1.95; color: var(--text-1); }
.prose > * + * { margin-top: 1.05em; }
.prose h2 {
  position: relative;
  margin-top: 2.2em;
  padding-left: .85rem;
  font-size: 1.3rem;
  letter-spacing: .01em;
  scroll-margin-top: calc(var(--nav-h) + 1rem);
}
.prose h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: .28em;
  bottom: .28em;
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--primary-light), var(--primary));
}
.prose h3 {
  margin-top: 1.8em;
  font-size: 1.08rem;
  scroll-margin-top: calc(var(--nav-h) + 1rem);
}
.prose h4 { margin-top: 1.5em; font-size: .98rem; color: var(--text-2); }
.prose p { color: var(--text-1); }
.prose a {
  color: var(--primary);
  text-decoration: none;
  background-image: linear-gradient(var(--primary-a20), var(--primary-a20));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 2px;
  transition: background-size .25s, color .2s;
}
.prose a:hover { background-size: 100% 100%; }
.prose strong { font-weight: 700; }
.prose em { font-style: italic; }
.prose ul, .prose ol { padding-left: 1.35em; }
.prose ul { list-style: none; }
.prose ul li { position: relative; padding-left: .1em; }
.prose ul li::before {
  content: "";
  position: absolute;
  left: -1em;
  top: .78em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--primary);
  opacity: .55;
}
.prose ol { list-style: decimal; }
.prose ol li::marker { color: var(--primary); font-weight: 600; }
.prose li + li { margin-top: .35em; }
.prose blockquote {
  position: relative;
  margin: 1.6em 0;
  padding: .9rem 1.2rem .9rem 1.4rem;
  border-radius: 0 10px 10px 0;
  background: var(--primary-a10);
  color: var(--text-2);
  border-left: 3px solid var(--primary);
}
.prose blockquote p { margin: 0; font-size: .93rem; }
.prose blockquote p + p { margin-top: .6em; }
.prose code {
  font-family: var(--font-mono);
  font-size: .86em;
  padding: .12em .38em;
  border-radius: 5px;
  background: var(--code-bg);
  border: 1px solid var(--line);
  color: var(--primary-dark);
}
[data-theme="dark"] .prose code { color: var(--primary); }
.prose pre {
  position: relative;
  margin: 1.5em 0;
  padding: 1rem 1.15rem;
  border-radius: 12px;
  overflow-x: auto;
  background: #1b1f27;
  border: 1px solid rgba(255, 255, 255, .07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}
.prose pre code {
  padding: 0;
  background: none;
  border: 0;
  color: #d6deeb;
  font-size: .84rem;
  line-height: 1.75;
  display: block;
}
.prose pre .lang-tag {
  position: absolute;
  top: .5rem;
  right: .7rem;
  font-size: .62rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .32);
  font-family: var(--font-mono);
  pointer-events: none;
  transition: opacity .2s;
}
.prose pre .copy-btn {
  position: absolute;
  top: .35rem;
  right: .35rem;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: rgba(255, 255, 255, .55);
  background: rgba(255, 255, 255, .08);
  opacity: 0;
  transition: all .2s;
}
.prose pre:hover .copy-btn { opacity: 1; }
.prose pre .copy-btn:hover { color: #fff; background: rgba(255, 255, 255, .18); }
.prose pre .copy-btn svg { width: 14px; height: 14px; }
.prose pre:hover .lang-tag { opacity: 0; }
.prose hr { margin: 2.2em 0; border: 0; height: 1px; background: var(--line); }
.prose img { border-radius: 10px; margin: 1.2em auto; }
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: .85rem;
  margin: 1.4em 0;
  overflow: hidden;
  border-radius: 10px;
}
.prose th, .prose td { padding: .5rem .8rem; text-align: left; border-bottom: 1px solid var(--line); }
.prose th { background: var(--primary-a10); font-weight: 600; color: var(--text-2); font-size: .8rem; }
.prose tr:last-child td { border-bottom: 0; }
.prose tbody tr:hover { background: color-mix(in srgb, var(--text-1) 3%, transparent); }

.article-foot {
  margin-top: 2rem;
  padding-top: 1.3rem;
  border-top: 1px dashed var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .8rem;
}
.article-foot .tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.article-foot .license { margin-left: auto; font-size: .72rem; color: var(--text-3); }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.post-nav a {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  padding: .9rem 1.1rem;
  border-radius: var(--radius);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: var(--card-shadow);
  transition: all .3s var(--ease);
  min-width: 0;
}
.post-nav a:hover { border-color: var(--primary-a20); transform: translateY(-2px); box-shadow: var(--card-shadow-hover); }
.post-nav .label { font-size: .7rem; color: var(--text-3); letter-spacing: .08em; display: flex; align-items: center; gap: .3rem; }
.post-nav .title { font-size: .88rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.post-nav a.next { text-align: right; align-items: flex-end; }
.post-nav svg { width: 13px; height: 13px; }

/* 阅读进度 */
.read-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0;
  z-index: 200;
  background: linear-gradient(90deg, var(--primary-light), var(--primary));
  box-shadow: 0 0 10px var(--primary-a20);
  transition: width .1s linear;
}

/* 目录 */
.toc { position: relative; }
.toc-list { display: flex; flex-direction: column; gap: .1rem; font-size: .8rem; max-height: 46vh; overflow-y: auto; }
.toc-list a {
  display: block;
  padding: .32rem .6rem;
  border-radius: 6px;
  color: var(--text-3);
  border-left: 2px solid transparent;
  transition: all .22s;
  line-height: 1.55;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.toc-list a.lv3 { padding-left: 1.35rem; font-size: .76rem; }
.toc-list a:hover { color: var(--primary); background: var(--primary-a10); }
.toc-list a.active {
  color: var(--primary);
  font-weight: 600;
  background: var(--primary-a10);
  border-left-color: var(--primary);
}
.toc-empty { font-size: .78rem; color: var(--text-3); padding: .4rem .6rem; }

/* ---------- 13. 归档页 ---------- */
.archive-year { margin-bottom: 2rem; max-width: 780px; }
#archiveList { max-width: 800px; }
.archive-year-head {
  display: flex;
  align-items: baseline;
  gap: .7rem;
  margin-bottom: .9rem;
}
.archive-year-head h2 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: .02em;
  color: var(--primary);
}
.archive-year-head span { font-size: .74rem; color: var(--text-3); }

.timeline { position: relative; padding-left: 1.5rem; }
.timeline::before {
  content: "";
  position: absolute;
  left: 4px;
  top: .6rem;
  bottom: .4rem;
  width: 1px;
  background: linear-gradient(180deg, var(--primary-a20), var(--line) 60%, transparent);
}
.tl-item { position: relative; padding-bottom: 1rem; }
.tl-item::before {
  content: "";
  position: absolute;
  left: -1.5rem;
  top: .55rem;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--card-bg-solid);
  border: 2px solid var(--primary);
  box-shadow: 0 0 0 3px var(--page-bg);
  transition: transform .25s;
}
.tl-item:hover::before { transform: scale(1.25); background: var(--primary); }
.tl-link {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .55rem .85rem;
  border-radius: 10px;
  transition: background .22s, transform .22s;
}
.tl-link:hover { background: var(--primary-a10); transform: translateX(3px); }
.tl-date {
  flex-shrink: 0;
  font-size: .74rem;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
  font-family: var(--font-mono);
}
.tl-title { font-size: .9rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-link:hover .tl-title { color: var(--primary); }
.tl-cat { margin-left: auto; font-size: .68rem; color: var(--text-3); flex-shrink: 0; }

/* ---------- 14. 关于页 ---------- */
.about-hero {
  padding: 2.4rem 2rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  overflow: hidden;
}
.about-hero::after {
  content: "";
  position: absolute;
  right: -90px;
  top: -90px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--primary-a20), transparent 68%);
  opacity: .32;
  filter: blur(22px);
}
.about-avatar {
  flex-shrink: 0;
  width: 110px;
  height: 110px;
  border-radius: 28px;
  display: grid;
  place-items: center;
  font-size: 2.6rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(140deg, var(--primary-light), var(--primary-dark));
  box-shadow: 0 14px 34px var(--primary-a20);
  transform: rotate(-4deg);
  transition: transform .5s var(--ease);
}
.about-hero:hover .about-avatar { transform: rotate(0) scale(1.02); }
.about-hero h1, .about-name { font-size: 1.9rem; letter-spacing: .04em; margin: 0; font-weight: 700; }
.about-hero .role { margin-top: .3rem; font-size: .86rem; color: var(--primary); font-weight: 500; letter-spacing: .04em; }
.about-hero .desc { margin-top: .7rem; font-size: .86rem; color: var(--text-2); line-height: 1.8; max-width: 46ch; }

.about-block { padding: 1.6rem 2rem; }
.about-block h2 { font-size: 1.1rem; margin-bottom: .8rem; display: flex; align-items: center; gap: .5rem; }
.about-block h2 svg { width: 17px; height: 17px; color: var(--primary); }

.skill-tags { display: flex; flex-wrap: wrap; gap: .5rem; }
.skill-tags span {
  padding: .3rem .7rem;
  font-size: .78rem;
  border-radius: 8px;
  color: var(--text-2);
  background: color-mix(in srgb, var(--text-1) 5%, transparent);
  border: 1px solid transparent;
  transition: all .25s;
}
.skill-tags span:hover { color: var(--primary); border-color: var(--primary-a20); background: var(--primary-a10); }

/* 联系方式 */
.contact-row { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .9rem; }
.contact-chip { display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .8rem; font-size: .8rem; }
.contact-chip svg { width: 14px; height: 14px; }

/* 网站声明 */
.statement-list { margin: .2rem 0 0; padding: 0; list-style: none; }
.statement-list li {
  position: relative;
  padding-left: 1.1rem;
  margin-bottom: .55rem;
  font-size: .85rem;
  line-height: 1.85;
  color: var(--text-2);
}
.statement-list li::before {
  content: "";
  position: absolute;
  left: .15rem;
  top: .72em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--primary);
  opacity: .55;
}
.statement-list strong { color: var(--text-1); font-weight: 500; }
.statement-meta {
  margin-top: 1rem;
  padding-top: .8rem;
  border-top: 1px dashed var(--line);
  font-size: .76rem;
  color: var(--text-3);
  line-height: 1.9;
}

.timeline-about { position: relative; padding-left: 1.4rem; }
.timeline-about::before {
  content: "";
  position: absolute;
  left: 3px; top: .5rem; bottom: .3rem;
  width: 1px;
  background: var(--line);
}
.ta-item { position: relative; padding-bottom: 1.1rem; }
.ta-item::before {
  content: "";
  position: absolute;
  left: -1.4rem;
  top: .5rem;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 3px var(--page-bg);
}
.ta-item .year { font-size: .72rem; color: var(--primary); font-weight: 600; font-family: var(--font-mono); }
.ta-item .txt { font-size: .85rem; color: var(--text-2); }

/* ---------- 15. 页脚 ---------- */
.footer {
  position: relative;
  z-index: 1;
  margin-top: 1rem;
  padding: 2rem 1.5rem 2.4rem;
  text-align: center;
  font-size: .78rem;
  color: var(--text-3);
  border-top: 1px solid var(--line);
}
.footer-inner { max-width: var(--page-w); margin: 0 auto; }
.footer .row { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: .5rem 1rem; }
.footer a { transition: color .2s; }
.footer a:hover { color: var(--primary); }
.footer .sep { width: 1px; height: 11px; background: var(--line); }
.footer .heart { color: #ef5f7a; display: inline-block; animation: beat 1.8s ease-in-out infinite; }
@keyframes beat { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.18); } }
.footer .sub { margin-top: .5rem; font-size: .72rem; opacity: .75; }
.beian {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .35rem 1.1rem;
  margin-top: .7rem;
  font-size: .72rem;
}
.beian a {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  color: var(--text-3);
  transition: color .2s;
}
.beian a:hover { color: var(--primary); }
.beian svg { width: 13px; height: 13px; }
.beian-badge { width: 13px; height: 13px; object-fit: contain; }
.about-block[id] { scroll-margin-top: calc(var(--nav-h) + 16px); }

/* ---------- 16. 搜索 ---------- */
.search-mask {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 12vh 1rem 2rem;
  background: rgba(12, 18, 30, .42);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .28s var(--ease), visibility .28s;
}
.search-mask.open { opacity: 1; visibility: visible; }
.search-box {
  width: min(620px, 100%);
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  background: var(--card-bg-solid);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 80px rgba(8, 14, 26, .28);
  overflow: hidden;
  transform: translateY(-14px) scale(.98);
  transition: transform .3s var(--ease);
}
.search-mask.open .search-box { transform: translateY(0) scale(1); }
.search-input-wrap {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .95rem 1.1rem;
  border-bottom: 1px solid var(--line);
}
.search-input-wrap svg { width: 18px; height: 18px; color: var(--text-3); flex-shrink: 0; }
.search-input-wrap input {
  flex: 1;
  border: 0;
  outline: 0;
  background: none;
  font-size: .95rem;
}
.search-input-wrap input::placeholder { color: var(--text-3); }
.search-input-wrap kbd {
  font-family: var(--font-mono);
  font-size: .66rem;
  padding: .12rem .38rem;
  border-radius: 5px;
  color: var(--text-3);
  background: color-mix(in srgb, var(--text-1) 6%, transparent);
  border: 1px solid var(--line);
}
.search-results { overflow-y: auto; padding: .5rem; }
.search-item {
  display: block;
  padding: .6rem .7rem;
  border-radius: 10px;
  transition: background .18s;
}
.search-item:hover, .search-item.on { background: var(--primary-a10); }
.search-item .t { font-size: .88rem; font-weight: 600; display: flex; align-items: center; gap: .5rem; }
.search-item .t mark { background: none; color: var(--primary); font-weight: 700; }
.search-item .d { margin-top: .15rem; font-size: .74rem; color: var(--text-3); display: flex; gap: .6rem; }
.search-item .d .c { color: var(--primary); }
.search-empty { padding: 2.5rem 1rem; text-align: center; font-size: .85rem; color: var(--text-3); }
.search-foot {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .5rem 1.1rem;
  border-top: 1px solid var(--line);
  font-size: .68rem;
  color: var(--text-3);
  background: color-mix(in srgb, var(--text-1) 2%, transparent);
}
.search-foot kbd {
  font-family: var(--font-mono);
  padding: 0 .3rem;
  border-radius: 4px;
  border: 1px solid var(--line);
  margin-right: .2rem;
}

/* ---------- 17. 设置面板 ---------- */
.fab-group {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.fab {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--text-2);
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid var(--card-border);
  box-shadow: 0 8px 24px rgba(18, 30, 54, .12);
  transition: all .28s var(--ease);
}
.fab:hover { color: var(--primary); transform: translateY(-3px); box-shadow: 0 12px 28px rgba(18, 30, 54, .18); }
.fab svg { width: 19px; height: 19px; }
.fab.spin svg { animation: spin 14s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
#backTop { opacity: 0; visibility: hidden; transform: translateY(10px); }
#backTop.show { opacity: 1; visibility: visible; transform: none; }

.settings {
  position: fixed;
  right: 1.5rem;
  bottom: 5.2rem;
  z-index: 95;
  width: 288px;
  padding: 1rem;
  border-radius: var(--radius-lg);
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--card-border);
  box-shadow: 0 24px 60px rgba(10, 16, 30, .2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(.97);
  transform-origin: bottom right;
  transition: all .3s var(--ease);
}
.settings.open { opacity: 1; visibility: visible; transform: none; }
.settings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .9rem;
  font-size: .88rem;
  font-weight: 700;
}
.settings-head button { color: var(--text-3); width: 24px; height: 24px; display: grid; place-items: center; border-radius: 6px; }
.settings-head button:hover { background: var(--primary-a10); color: var(--primary); }
.settings-group { margin-bottom: .9rem; }
.settings-group:last-child { margin-bottom: 0; }
.settings-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .74rem;
  color: var(--text-3);
  margin-bottom: .4rem;
  letter-spacing: .04em;
}
.settings-label .val { font-family: var(--font-mono); color: var(--primary); }

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .2rem;
  padding: .2rem;
  border-radius: 10px;
  background: color-mix(in srgb, var(--text-1) 5%, transparent);
}
.segmented button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .3rem;
  padding: .38rem .2rem;
  font-size: .74rem;
  border-radius: 8px;
  color: var(--text-2);
  transition: all .22s;
}
.segmented button svg { width: 13px; height: 13px; }
.segmented.two { grid-template-columns: repeat(2, 1fr); }
.segmented button.on {
  color: var(--primary);
  background: var(--card-bg-solid);
  box-shadow: 0 2px 8px rgba(18, 30, 54, .08);
  font-weight: 600;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 99px;
  background: linear-gradient(90deg,
    hsl(0 80% 62%), hsl(45 85% 58%), hsl(90 65% 50%), hsl(150 65% 45%),
    hsl(200 75% 52%), hsl(250 75% 62%), hsl(300 70% 58%), hsl(350 80% 62%));
  outline: none;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
  transition: transform .15s;
}
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.15); }

.hue-presets { display: flex; gap: .35rem; margin-top: .5rem; }
.hue-presets button {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid transparent;
  transition: transform .2s, border-color .2s;
}
.hue-presets button:hover { transform: scale(1.15); }
.hue-presets button.on { border-color: var(--text-1); }

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .35rem 0;
  font-size: .78rem;
  color: var(--text-2);
}
.switch {
  position: relative;
  width: 38px;
  height: 22px;
  border-radius: 99px;
  background: color-mix(in srgb, var(--text-1) 15%, transparent);
  transition: background .25s;
  flex-shrink: 0;
}
.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
  transition: transform .25s var(--ease);
}
.switch.on { background: var(--primary); }
.switch.on::after { transform: translateX(16px); }

/* ---------- 18. Toast ---------- */
.toast-wrap {
  position: fixed;
  left: 50%;
  bottom: 2rem;
  z-index: 400;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: .5rem;
  align-items: center;
  pointer-events: none;
}
.toast {
  padding: .55rem 1.1rem;
  font-size: .8rem;
  border-radius: 99px;
  color: #fff;
  background: rgba(24, 30, 42, .92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .2);
  animation: toastIn .3s var(--ease) both;
}
.toast.out { animation: toastOut .3s var(--ease) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px); } }

/* ---------- 19. 移动端抽屉 ---------- */
.drawer-mask {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(10, 16, 26, .4);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: all .3s;
}
.drawer-mask.open { opacity: 1; visibility: visible; }
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 120;
  width: min(300px, 84vw);
  padding: 1.2rem 1rem;
  background: var(--card-bg-solid);
  box-shadow: -20px 0 60px rgba(0, 0, 0, .18);
  transform: translateX(100%);
  transition: transform .36s var(--ease);
  overflow-y: auto;
}
.drawer.open { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.drawer-head .t { font-weight: 700; letter-spacing: .04em; }
.drawer-links { display: flex; flex-direction: column; gap: .15rem; }
.drawer-links a {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .6rem .7rem;
  border-radius: 9px;
  font-size: .9rem;
  color: var(--text-2);
  transition: all .2s;
}
.drawer-links a svg { width: 16px; height: 16px; opacity: .7; }
.drawer-links a:hover, .drawer-links a.active { color: var(--primary); background: var(--primary-a10); }

/* ---------- 20. 响应式 ---------- */
@media (max-width: 1280px) {
  .layout { grid-template-columns: 250px minmax(0, 1fr); }
  .col-right { display: none; }
  .layout.no-right { grid-template-columns: 250px minmax(0, 1fr); }
}
@media (max-width: 1024px) {
  .nav-links { display: none; }
  .nav-toggle { display: grid; }
  .nav-actions { margin-left: auto; }
  .layout, .layout.no-right, .layout.no-left { grid-template-columns: minmax(0, 1fr); }
  .col-left {
    position: static;
    max-height: none;
    overflow: visible;
    order: 2;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .9rem;
  }
  .col-left .profile-card { grid-column: 1 / -1; }
  .col-main { order: 1; }
  .page-wrap { padding: 0 1rem 2rem; }
  .posts.grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  body { font-size: 14.5px; }
  :root { --banner-home: 56vh; }
  .navbar:not(.is-solid) {
  background-image: linear-gradient(180deg, rgba(8, 12, 22, .38) 0%, rgba(8, 12, 22, .10) 68%, transparent 100%);
}
.navbar:not(.is-solid) .icon-btn svg { filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .45)); }
.navbar-inner { padding: 0 1rem; }
  .banner-avatar { width: 68px; height: 68px; font-size: 1.6rem; }
  .banner-meta { gap: .8rem; font-size: .74rem; }
  .scroll-hint { display: none; }
  .post-card { flex-direction: column; gap: .7rem; }
  .post-cover { width: 100%; aspect-ratio: 16 / 9; }
  .post-body { padding: 0 .35rem .3rem; }
  .posts.grid { grid-template-columns: minmax(0, 1fr); }
  .col-left { grid-template-columns: minmax(0, 1fr); }
  .article-body { padding: 1.3rem 1.1rem 1.2rem; }
  .article-hero-media { height: 180px; }
  .article-hero-inner { padding: 1.1rem 1.1rem 1rem; }
  .article-meta { gap: .6rem; font-size: .7rem; }
  .about-hero { flex-direction: column; text-align: center; gap: 1.2rem; padding: 1.8rem 1.2rem; }
  .about-avatar { width: 84px; height: 84px; border-radius: 22px; font-size: 2rem; }
  .about-hero .desc { margin-left: auto; margin-right: auto; }
  .about-block { padding: 1.3rem 1.2rem; }
  .post-nav { grid-template-columns: minmax(0, 1fr); }
  .settings { right: 1rem; left: 1rem; width: auto; bottom: 4.6rem; }
  .fab-group { right: 1rem; bottom: 1rem; }
  .fab { width: 40px; height: 40px; border-radius: 12px; }
  .article-foot .license { margin-left: 0; }
  .tl-link { gap: .5rem; padding: .5rem .6rem; }
  .tl-cat { display: none; }
}

/* ---------- 20.5 Big Sur 窗口化（D 方案） ---------- */

/* 壁纸：窗口外露出的那一层，换成多色柔和渐变 */
.bg-layer {
  background:
    radial-gradient(58% 52% at 12% 8%,  hsl(var(--hue) 92% 82% / .80) 0%, transparent 62%),
    radial-gradient(52% 48% at 88% 10%, hsl(calc(var(--hue) + 48) 90% 86% / .68) 0%, transparent 60%),
    radial-gradient(62% 58% at 80% 92%, hsl(calc(var(--hue) - 42) 92% 88% / .58) 0%, transparent 62%),
    radial-gradient(56% 52% at 14% 94%, hsl(calc(var(--hue) + 92) 72% 84% / .55) 0%, transparent 60%),
    var(--page-bg);
}
[data-theme="dark"] .bg-layer {
  background:
    radial-gradient(58% 52% at 12% 8%,  hsl(var(--hue) 62% 26% / .62) 0%, transparent 62%),
    radial-gradient(52% 48% at 88% 10%, hsl(calc(var(--hue) + 48) 58% 24% / .52) 0%, transparent 60%),
    radial-gradient(62% 58% at 80% 92%, hsl(calc(var(--hue) - 42) 58% 22% / .46) 0%, transparent 62%),
    radial-gradient(56% 52% at 14% 94%, hsl(calc(var(--hue) + 92) 46% 20% / .40) 0%, transparent 60%),
    var(--page-bg);
}
/* 网格线在窗口外会显得杂乱，收起来 */
.bg-grid { display: none; }

/* 外壳：整页不再滚动，窗口自己滚 */
.shell { height: 100vh; height: 100dvh; }

/* 窗口本体。
   必须用 fixed + 内部滚动：若让 .win 留在正常文档流里，
   .col-left / .col-right 的 position:sticky 会以 .win 为滚动祖先，
   而 .win 不滚动 → 侧栏粘性失效；同时 navbar 也吸不住顶。 */
.win {
  position: fixed;
  top: 22px;
  right: 26px;
  bottom: 30px;
  left: 26px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  border-radius: 20px;
  background: rgba(255, 255, 255, .46);
  -webkit-backdrop-filter: blur(48px) saturate(200%);
  backdrop-filter: blur(48px) saturate(200%);
  border: .5px solid rgba(255, 255, 255, .7);
  box-shadow:
    0 0 0 .5px rgba(0, 0, 0, .05),
    0 2px 6px rgba(0, 0, 0, .05),
    0 8px 24px rgba(0, 0, 0, .06),
    0 28px 64px rgba(0, 0, 0, .09),
    inset 0 1px 0 rgba(255, 255, 255, .7);
}
[data-theme="dark"] .win {
  background: rgba(28, 30, 37, .66);
  border-color: rgba(255, 255, 255, .08);
  box-shadow:
    0 0 0 .5px rgba(0, 0, 0, .35),
    0 2px 6px rgba(0, 0, 0, .28),
    0 8px 24px rgba(0, 0, 0, .34),
    0 28px 64px rgba(0, 0, 0, .46),
    inset 0 1px 0 rgba(255, 255, 255, .09);
}

/* 导航：从 fixed 改成 sticky，吸在窗口顶部；
   负 margin-bottom 抵消它占掉的 60px，横幅仍从窗口顶端开始 */
.navbar {
  position: sticky;
  top: 0;
  left: auto;
  right: auto;
  margin-bottom: calc(-1 * var(--nav-h));
  border-radius: 20px 20px 0 0;
}
.navbar.is-solid { border-radius: 20px 20px 0 0; }

/* 横幅顶部跟着窗口圆角走 */
.banner { border-radius: 20px 20px 0 0; }
body:not([data-page="home"]) .banner { border-radius: 20px 20px 0 0; }

/* 页脚底部跟着窗口圆角走 */
.footer { border-radius: 0 0 20px 20px; }

/* 侧栏 sticky 的高度上限必须按「窗口」算，不能按视口算。
   原来写的是 100vh，窗口比视口矮 52px，侧栏高度会超过可视区，
   sticky 元素比滚动容器还高就粘不住了，滚动时侧栏会直接跑掉。 */
:root { --win-gap-y: 52px; }
.col-left, .col-right {
  max-height: calc(100dvh - var(--win-gap-y) - var(--nav-h) - 2rem);
}

/* 窗口比视口矮，横幅按视口高度取 62vh 会顶掉窗口三分之二，收一点 */
:root { --banner-home: 50vh; }
.banner { min-height: 340px; }

/* 个人卡顶部那条 78px 的渐变色块，在窗口化 + 白卡片下会变成一块生硬的矩形，
   换成从顶部中心散开的淡光晕，贴合 Big Sur 的克制感 */
.profile-card::before {
  height: 100%;
  background: radial-gradient(ellipse 120% 60% at 50% 0%, var(--primary-a10), transparent 62%);
  opacity: 1;
}
[data-theme="dark"] .profile-card::before {
  background: radial-gradient(ellipse 120% 60% at 50% 0%, var(--primary-a20), transparent 62%);
}

/* 窗口滚动条：macOS 那种细的悬浮条，不抢视线 */
.win { scrollbar-width: thin; scrollbar-color: rgba(0, 0, 0, .18) transparent; }
.win::-webkit-scrollbar { width: 10px; height: 10px; }
.win::-webkit-scrollbar-track { background: transparent; }
.win::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, .16);
  border: 3px solid transparent;
  border-radius: 99px;
  background-clip: content-box;
}
.win::-webkit-scrollbar-thumb:hover { background: rgba(0, 0, 0, .3); background-clip: content-box; }
[data-theme="dark"] .win { scrollbar-color: rgba(255, 255, 255, .22) transparent; }
[data-theme="dark"] .win::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .2); background-clip: content-box; }
[data-theme="dark"] .win::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, .34); background-clip: content-box; }

/* 窗口内的卡片不再叠一层玻璃，避免「玻璃套玻璃」发灰 */
.card {
  background: rgba(255, 255, 255, .72);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border: .5px solid rgba(16, 24, 40, .055);
  box-shadow:
    0 1px 2px rgba(18, 30, 54, .035),
    0 3px 10px rgba(18, 30, 54, .028);
}
.card:hover {
  box-shadow:
    0 2px 6px rgba(18, 30, 54, .05),
    0 10px 26px rgba(18, 30, 54, .06);
}
[data-theme="dark"] .card {
  background: rgba(38, 40, 48, .72);
  border-color: rgba(255, 255, 255, .07);
}

/* 导航变成分段控件（仅在滚动态 / 子页面，即导航已有实底时生效，
   否则在深色横幅上放一个灰底胶囊会很脏） */
.navbar.is-solid .nav-links {
  padding: 3px;
  border-radius: 9px;
  background: rgba(16, 24, 40, .055);
  gap: 0;
}
[data-theme="dark"] .navbar.is-solid .nav-links { background: rgba(255, 255, 255, .07); }
.navbar.is-solid .nav-links a {
  padding: 4px 12px;
  border-radius: 7px;
  font-size: .8rem;
}
.navbar.is-solid .nav-links a:hover { background: transparent; }
.navbar.is-solid .nav-links a.active {
  background: var(--card-bg-solid);
  color: var(--text-1);
  box-shadow: 0 1px 2px rgba(18, 30, 54, .07), 0 0 0 .5px rgba(18, 30, 54, .045);
}
[data-theme="dark"] .navbar.is-solid .nav-links a.active {
  background: rgba(255, 255, 255, .16);
  color: var(--text-1);
}
/* 分段控件不需要那条下划线 */
.navbar.is-solid .nav-links a.active::after { display: none; }

/* 文章列表在「列表」模式下合并成分组列表（iOS 设置页那种）；
   网格模式仍保留独立卡片 */
.posts:not(.grid) {
  gap: 0;
  background: rgba(255, 255, 255, .78);
  border: .5px solid rgba(16, 24, 40, .05);
  border-radius: 16px;
  box-shadow:
    0 1px 2px rgba(18, 30, 54, .035),
    0 3px 10px rgba(18, 30, 54, .026);
  overflow: hidden;
}
[data-theme="dark"] .posts:not(.grid) {
  background: rgba(38, 40, 48, .72);
  border-color: rgba(255, 255, 255, .07);
}
.posts:not(.grid) .post-card {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.posts:not(.grid) .post-card + .post-card { border-top: .5px solid var(--line); }
.posts:not(.grid) .post-card:hover {
  background: rgba(16, 24, 40, .028);
  box-shadow: none;
  transform: none;
}
[data-theme="dark"] .posts:not(.grid) .post-card:hover { background: rgba(255, 255, 255, .05); }

/* ---------- 必应壁纸背景层 ----------
   同一张壁纸的模糊版铺在最底下，窗口那层半透明毛玻璃会把它透出来，
   这就是 Big Sur 的 vibrancy 观感；横幅本身用的仍是清晰的大图。 */
.bg-layer::before {
  content: "";
  position: absolute;
  inset: -12%;
  background-image: var(--bg-photo, none);
  background-size: cover;
  background-position: center;
  filter: blur(64px) saturate(175%);
  opacity: 0;
  transition: opacity 1.1s var(--ease);
  pointer-events: none;
  will-change: opacity;
}
body.has-bg-photo .bg-layer::before { opacity: .88; }
[data-theme="dark"] body.has-bg-photo .bg-layer::before { opacity: .42; }
/* 关掉壁纸时背景层一起收起来，退回纯渐变 */
body[data-wallpaper="off"] .bg-layer::before { opacity: 0 !important; }

/* 移动端：屏幕本来就窄，边距收到 8px，仍保留窗口感 */
@media (max-width: 720px) {
  :root { --win-gap-y: 16px; }
  .win {
    top: 8px;
    right: 8px;
    bottom: 8px;
    left: 8px;
    border-radius: 16px;
  }
  .navbar, .navbar.is-solid { border-radius: 16px 16px 0 0; }
  .banner, body:not([data-page="home"]) .banner { border-radius: 16px 16px 0 0; }
  .footer { border-radius: 0 0 16px 16px; }
}

/* ---------- 20.9 头像图片 ----------
   图片和文字都塞进同一个 grid 单元格叠着放：图片正常时盖住文字，
   加载失败时 app.js 会把 img 摘掉，文字自然露出来当兜底。 */
.nav-brand .logo > *,
.banner-avatar > *,
.profile-avatar > *,
.about-avatar > * { grid-area: 1 / 1; }

.nav-brand .logo > img,
.banner-avatar > img,
.profile-avatar > img,
.about-avatar > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
  position: relative;
  z-index: 1;
}
.avatar-fallback { z-index: 0; }

/* ---------- 21. 动效偏好 & 打印 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .post-card { opacity: 1; transform: none; }
}
body[data-motion="off"] *,
body[data-motion="off"] *::before,
body[data-motion="off"] *::after {
  animation: none !important;
  transition: none !important;
}
body[data-motion="off"] .post-card { opacity: 1; transform: none; }

@media print {
  .navbar, .banner, .col-left, .col-right, .footer, .fab-group, .settings, .post-nav, .read-progress { display: none !important; }
  .page-wrap { margin: 0 !important; padding: 0 !important; }
  body { background: #fff; color: #000; }
  .article-body { padding: 0 !important; }
}
