/* ==========================================================================
   罗德华 · 个人博客
   设计语言：灰白底 / 墨色文字 / BMW 蓝点缀 / 细线网格 / 大字号中文标题
   ========================================================================== */

/* ---------------------------------------------------------------- tokens */
:root {
  --bg: #07080a;
  --bg-soft: #0b0d11;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.2);
  --text: #edeef1;
  --text-soft: #c9cdd4;
  --muted: #a6aeb9;
  --dim: #7b8492;
  --accent: #4f9cf0;
  --accent-soft: rgba(79, 156, 240, 0.14);
  --accent-line: rgba(79, 156, 240, 0.34);
  --cyan: #8fe7ff;
  --violet: #b8a6ff;
  --on-accent: #ffffff;
  --accent-ink: #7db8ff;
  --stroke: rgba(255, 255, 255, 0.26);
  --hover: rgba(255, 255, 255, 0.04);
  --shadow: 0 24px 70px -30px rgba(0, 0, 0, 0.9);

  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC",
    "HarmonyOS Sans SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Code", Menlo,
    Consolas, monospace;
  --serif: "Songti SC", "Noto Serif SC", Georgia, "Times New Roman", serif;

  --wrap: 1180px;
  --head-h: 76px;
  --ease: cubic-bezier(0.22, 0.68, 0.28, 1);
}

/* 灰白科技感：默认主题 */
html[data-theme="light"] {
  --bg: #eef1f4;
  --bg-soft: #e7eaee;
  --surface: #ffffff;
  --surface-2: #f5f6f8;
  --line: rgba(13, 18, 28, 0.11);
  --line-strong: rgba(13, 18, 28, 0.26);
  --text: #0a0d12;
  --text-soft: #1f252c;
  --muted: #4e5762;
  --dim: #646d78;
  --accent: #1c69d4;
  --accent-soft: rgba(28, 105, 212, 0.09);
  --accent-line: rgba(28, 105, 212, 0.3);
  --cyan: #0d7c94;
  --violet: #5b46b8;
  --on-accent: #ffffff;
  --accent-ink: #0f5aa8;
  --stroke: rgba(13, 18, 28, 0.2);
  --hover: rgba(13, 18, 28, 0.035);
  --shadow: 0 24px 60px -34px rgba(15, 23, 42, 0.22);
}

/* ---------------------------------------------------------------- reset */
*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color 0.5s var(--ease), color 0.5s var(--ease);
}

img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4, p, figure, blockquote, pre { margin: 0; }
ol, ul { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--accent); color: #ffffff; }

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

.skip-link {
  position: fixed; top: 8px; left: 8px; z-index: 200;
  padding: 0.6rem 1rem; background: var(--accent); color: var(--on-accent);
  border-radius: 6px; font-size: 13px; transform: translateY(-150%);
  transition: transform 0.25s var(--ease);
}
.skip-link:focus { transform: none; }

.wrap {
  width: min(var(--wrap), 100% - clamp(2.4rem, 8vw, 6rem));
  margin-inline: auto;
}
.accent { color: var(--accent); }
.mono { font-family: var(--mono); font-variant-ligatures: none; }

/* 内容始终在背景特效之上 */
main { position: relative; z-index: 2; }

/* ---------------------------------------------------------------- 背景层 */
.bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
}

.bg-grid {
  position: absolute; inset: -2px;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 96px 96px;
  opacity: 0.5;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 10%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 10%, transparent 78%);
}

.bg-glow {
  position: absolute; border-radius: 50%; filter: blur(90px);
  opacity: 0.5; will-change: transform;
}
.bg-glow--a {
  width: 46vw; height: 46vw; min-width: 320px; min-height: 320px;
  top: -18vw; right: -8vw;
  background: radial-gradient(circle, rgba(79, 156, 240, 0.16), transparent 62%);
  animation: drift-a 26s ease-in-out infinite alternate;
}
.bg-glow--b {
  width: 40vw; height: 40vw; min-width: 280px; min-height: 280px;
  top: 28vh; left: -14vw;
  background: radial-gradient(circle, rgba(143, 231, 255, 0.14), transparent 64%);
  animation: drift-b 32s ease-in-out infinite alternate;
}
html[data-theme="light"] .bg-noise { opacity: 0.018; }
html[data-theme="light"] .bg-glow { opacity: 0.5; }
html[data-theme="light"] .bg-glow--a {
  background: radial-gradient(circle, rgba(150, 180, 205, 0.28), transparent 62%);
}
html[data-theme="light"] .bg-glow--b {
  background: radial-gradient(circle, rgba(120, 190, 205, 0.16), transparent 64%);
}

@keyframes drift-a {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(-4vw, 6vh, 0) scale(1.12); }
}
@keyframes drift-b {
  from { transform: translate3d(0, 0, 0) scale(1.05); }
  to   { transform: translate3d(5vw, -5vh, 0) scale(0.95); }
}

.bg-dust { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.8; }

.bg-noise {
  position: absolute; inset: 0; opacity: 0.038; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.cursor-glow {
  position: fixed; top: 0; left: 0; width: 460px; height: 460px;
  border-radius: 50%; pointer-events: none; z-index: 1;
  background: radial-gradient(circle, rgba(79, 156, 240, 0.07), transparent 62%);
  transform: translate3d(-50%, -50%, 0); opacity: 0;
  transition: opacity 0.4s ease; will-change: transform;
}
html[data-theme="light"] .cursor-glow {
  background: radial-gradient(circle, rgba(120, 145, 175, 0.12), transparent 62%);
}
@media (hover: hover) and (pointer: fine) {
  body.has-cursor .cursor-glow { opacity: 1; }
}

/* ---------------------------------------------------------------- header */
.site-head {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background-color 0.4s var(--ease), border-color 0.4s var(--ease),
    backdrop-filter 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-head.is-scrolled {
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom-color: var(--line);
  backdrop-filter: blur(7px) saturate(120%);
  -webkit-backdrop-filter: blur(7px) saturate(120%);
}
@supports not (background: color-mix(in srgb, red 50%, blue)) {
  .site-head.is-scrolled { background: rgba(7, 8, 10, 0.78); }
  html[data-theme="light"] .site-head.is-scrolled { background: rgba(238, 241, 244, 0.82); }
}

.head-inner {
  height: var(--head-h);
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
}

.brand { display: inline-flex; align-items: center; gap: 0.7rem; }
.brand-mark {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; flex: none;
  transition: transform 0.5s var(--ease);
}
html[data-theme="dark"] .brand-mark {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.34), 0 0 22px rgba(0, 0, 0, 0.55);
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.05); }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: 15px; font-weight: 600; letter-spacing: 0.04em; }
.brand-text em {
  font-style: normal; font-size: 9.5px; letter-spacing: 0.26em;
  color: var(--dim); text-transform: uppercase;
}

.nav { display: flex; align-items: center; gap: 1.7rem; }
.nav a {
  position: relative; font-size: 13.5px; color: var(--muted);
  padding: 0.3rem 0; transition: color 0.25s var(--ease);
}
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 1px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.nav a:hover, .nav a.is-active { color: var(--text); }
.nav a:hover::after, .nav a.is-active::after { transform: scaleX(1); }
.nav a.nav-icon::after { display: none; }
.nav a.nav-icon {
  display: grid; place-items: center; width: 32px; height: 32px;
  border: 1px solid var(--line); border-radius: 50%;
}
.nav a.nav-icon:hover { border-color: var(--accent-line); color: var(--accent-ink); }

.theme-btn {
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--line); background: transparent; cursor: pointer;
  display: grid; place-items: center; color: var(--muted);
  transition: color 0.25s, border-color 0.25s, transform 0.4s var(--ease);
}
.theme-btn:hover { color: var(--accent-ink); border-color: var(--accent-line); transform: rotate(18deg); }
.theme-btn--mobile { display: none; margin-left: auto; }
/* 图标表示「点击后切换到的模式」：浅色下显示月亮 */
.theme-btn .i-moon { display: none; }
html[data-theme="light"] .theme-btn .i-moon { display: block; }
html[data-theme="light"] .theme-btn .i-sun { display: none; }

.burger {
  display: none; width: 40px; height: 40px; border: 1px solid var(--line);
  border-radius: 50%; background: transparent; cursor: pointer;
  padding: 0; position: relative;
}
.burger span {
  position: absolute; left: 50%; top: 50%; width: 16px; height: 1.5px;
  background: var(--text); transform: translate(-50%, -50%);
  transition: transform 0.3s var(--ease), opacity 0.3s;
}
.burger span:nth-child(1) { transform: translate(-50%, calc(-50% - 3px)); }
.burger span:nth-child(2) { transform: translate(-50%, calc(-50% + 3px)); }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translate(-50%, -50%) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { transform: translate(-50%, -50%) rotate(-45deg); }

/* ---------------------------------------------------------------- 移动菜单 */
.mobile-menu {
  position: fixed; inset: 0; z-index: 45;
  background: color-mix(in srgb, var(--bg) 96%, transparent);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  padding: calc(var(--head-h) + 2rem) clamp(2.4rem, 8vw, 6rem) 2.5rem;
  display: flex; flex-direction: column; justify-content: space-between;
  animation: menu-in 0.35s var(--ease);
}
.mobile-menu[hidden] { display: none; }
.mobile-menu nav a {
  display: flex; align-items: baseline; justify-content: space-between;
  font-size: clamp(2rem, 9vw, 3rem); font-weight: 600; letter-spacing: -0.02em;
  padding: 1rem 0; border-bottom: 1px solid var(--line); color: var(--text);
}
.mobile-menu nav a .mono { font-size: 11px; color: var(--dim); letter-spacing: 0.1em; }
.mobile-menu nav a:active { color: var(--accent-ink); }
.mobile-contacts {
  display: flex; flex-direction: column; gap: 0.5rem;
  font-size: 11.5px; color: var(--dim); letter-spacing: 0.06em;
}
@keyframes menu-in {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: none; }
}

/* ---------------------------------------------------------------- buttons */
.btn-primary, .btn-ghost {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 1.5rem; border-radius: 999px; font-size: 13.5px;
  transition: transform 0.3s var(--ease), background-color 0.3s, border-color 0.3s;
}
.btn-primary { background: var(--text); color: var(--bg); font-weight: 600; }
.btn-primary:hover { transform: translateY(-2px); }
.btn-ghost { border: 1px solid var(--line); color: var(--muted); }
.btn-ghost:hover { border-color: var(--line-strong); color: var(--text); }

/* ---------------------------------------------------------------- hero */
.hero {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(360px, 0.98fr);
  gap: clamp(2rem, 5vw, 5rem); align-items: end;
  padding-top: clamp(6.5rem, 14vh, 9.5rem);
  padding-bottom: clamp(3rem, 6vw, 4.5rem);
}
.hero-copy { min-width: 0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--dim); margin-bottom: 1.6rem;
}
.pulse {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 0 rgba(79, 156, 240, 0.5);
  animation: pulse 2.6s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(79, 156, 240, 0.45); }
  70%  { box-shadow: 0 0 0 10px rgba(79, 156, 240, 0); }
  100% { box-shadow: 0 0 0 0 rgba(79, 156, 240, 0); }
}

.hero-title {
  font-size: clamp(3.6rem, 12.5vw, 9rem);
  line-height: 0.92; font-weight: 700; letter-spacing: -0.055em;
  margin-left: -0.05em;
  text-shadow: 0 0 100px rgba(79, 156, 240, 0.1);
}
html[data-theme="light"] .hero-title { text-shadow: none; }
.hero-title .accent { font-weight: 700; }

.hero-sub {
  display: flex; align-items: center; gap: 0.7rem;
  margin-top: 1.1rem; font-size: clamp(1.15rem, 2.6vw, 1.65rem);
  font-weight: 500; letter-spacing: 0.08em; color: var(--text-soft);
}
.hero-slash { color: var(--accent-ink); font-weight: 400; font-size: 0.9em; }

.caret {
  display: inline-block; width: 2px; height: 1.05em; margin-left: 0.15em;
  background: var(--accent-ink); vertical-align: -0.12em;
  animation: blink 1.15s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.hero-quote {
  border-left: 2px solid var(--accent-line);
  padding: 0.3rem 0 0.4rem 1.8rem;
  margin-bottom: 0.3rem;
}
.hero-quote::before {
  content: "“";
  display: block;
  font-family: var(--serif);
  font-size: 2.9rem; line-height: 0.8;
  color: var(--accent);
  margin-bottom: 0.35rem;
}
.hero-desc {
  color: var(--text); font-size: clamp(1.05rem, 1.4vw, 1.32rem); line-height: 1.95;
  letter-spacing: 0.005em;
}
.quote-break { display: block; }
.hero-credit {
  margin-top: 1.2rem;
  font-size: 11px; letter-spacing: 0.08em; color: var(--dim);
}



/* ---------------------------------------------------------------- ticker */
.ticker {
  position: relative; z-index: 2;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  overflow: hidden; padding: 0.85rem 0; margin-bottom: clamp(3rem, 6vw, 5rem);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.ticker-track {
  display: flex; align-items: center; gap: 2.2rem; width: max-content;
  animation: marquee 42s linear infinite;
}
.ticker-track span {
  font-size: 10px; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--dim); white-space: nowrap;
}
.ticker-track i { width: 4px; height: 4px; border-radius: 50%; background: var(--dim); opacity: 0.5; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------------------------------------------------------------- section */
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1rem; padding-bottom: 1.1rem; border-bottom: 1px solid var(--line);
  margin-bottom: 0.5rem;
}
.section-head h2 {
  display: flex; align-items: center; gap: 0.8rem;
  font-size: clamp(1.25rem, 2.3vw, 1.6rem); font-weight: 600; letter-spacing: -0.01em;
}
.sec-index {
  font-size: 10px; color: var(--accent-ink); letter-spacing: 0.08em;
  border: 1px solid var(--accent-line); padding: 0.15rem 0.4rem; border-radius: 4px;
}
.sec-more { font-size: 11px; color: var(--dim); letter-spacing: 0.06em; }
.sec-more span { display: inline-block; transition: transform 0.3s var(--ease); }
.sec-more:hover { color: var(--accent-ink); }
.sec-more:hover span { transform: translateX(4px); }
.sec-note { font-size: 10px; color: var(--dim); letter-spacing: 0.12em; }

/* ---------------------------------------------------------------- post list */
/* 首页与搜索页统一到同一条内容轴 */
.page-home .hero,
.page-home .stream,
.page-search .page-head,
.page-search .stream { max-width: 980px; margin-inline: auto; }
.stream { max-width: 980px; margin-inline: auto; }

.post-list { position: relative; }
.post-card { border-bottom: 1px solid var(--line); }

.pc-link {
  position: relative;
  display: grid; grid-template-columns: 92px minmax(0, 1fr) 34px;
  gap: clamp(1rem, 3vw, 2.2rem); align-items: start;
  /* 左侧固定留出 0.9rem 槽位给蓝色竖线，hover 不再改变 padding */
  padding: clamp(1.5rem, 3vw, 2.1rem) 0.5rem clamp(1.5rem, 3vw, 2.1rem) 0.9rem;
  transition: background-color 0.45s var(--ease);
}
.pc-link::before {
  content: ""; position: absolute; left: 0.1rem; top: 22%; bottom: 22%;
  width: 2px; background: var(--accent); transform: scaleY(0); transform-origin: top;
  transition: transform 0.45s var(--ease);
}
.pc-link:hover {
  background: linear-gradient(90deg, var(--accent-soft), transparent 55%);
}
.pc-link:hover::before { transform: scaleY(1); }
.pc-link:focus-visible { outline: 1px solid var(--accent-line); outline-offset: 4px; }

.pc-date { display: flex; flex-direction: column; gap: 0.15rem; padding-top: 0.35rem; }
.pc-y { font-size: 9.5px; letter-spacing: 0.18em; color: var(--dim); }
.pc-md { font-size: 14px; letter-spacing: 0.02em; color: var(--muted); }

.pc-title {
  font-size: clamp(1.1rem, 2vw, 1.32rem); font-weight: 600; letter-spacing: -0.01em;
  line-height: 1.5; margin-bottom: 0.55rem; transition: color 0.3s;
}
.pc-link:hover .pc-title { color: var(--accent-ink); }

.pc-text {
  font-size: clamp(0.98rem, 1.6vw, 1.06rem); line-height: 1.95; color: var(--text-soft);
  max-width: 64ch;
}
.pc-ex { font-size: 0.94rem; line-height: 1.9; color: var(--muted); max-width: 64ch; }

.pc-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.9rem;
  margin-top: 0.9rem; font-size: 10px; letter-spacing: 0.1em;
  color: var(--dim); text-transform: uppercase;
}
.pc-tag {
  border: 1px solid var(--line); border-radius: 3px; padding: 0.05rem 0.35rem;
  letter-spacing: 0.1em; font-size: 9px;
}
.pc-tag--pin { border-color: var(--accent-line); color: var(--accent-ink); }

.pc-arrow {
  font-size: 1.05rem; color: var(--dim); justify-self: end; padding-top: 0.2rem;
  opacity: 0; transform: translate(-6px, 6px);
  transition: opacity 0.35s, transform 0.35s var(--ease), color 0.35s;
}
.pc-link:hover .pc-arrow { opacity: 1; transform: none; color: var(--accent-ink); }

/* ---------------------------------------------------------------- pager */
.pager {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: clamp(2rem, 4vw, 3rem); font-size: 11px; letter-spacing: 0.06em;
}
.pager-btn {
  padding: 0.7rem 1.15rem; border: 1px solid var(--line); border-radius: 999px;
  color: var(--muted); transition: border-color 0.3s, color 0.3s, background-color 0.3s;
}
.pager-btn:hover { border-color: var(--accent-line); color: var(--accent-ink); background: var(--accent-soft); }
.pager-btn.is-off { opacity: 0.28; }
.pager-now { color: var(--text-soft); }
.pager-now i { color: var(--dim); font-style: normal; margin: 0 0.2rem; }

/* ---------------------------------------------------------------- colophon */
.colophon {
  max-width: 660px;
  margin: clamp(4rem, 8vw, 7rem) auto 0;
  padding-top: clamp(2.4rem, 5vw, 3.6rem);
  border-top: 1px solid var(--line);
  text-align: center;
}
.colophon-k { font-size: 9.5px; letter-spacing: 0.24em; color: var(--dim); }
.colophon-text {
  margin-top: 1.3rem; font-size: 1.05rem; line-height: 2.1; color: var(--text-soft);
}
.colophon-meta {
  margin-top: 1.4rem; font-size: 9.5px; letter-spacing: 0.16em; color: var(--dim);
}

/* ---------------------------------------------------------------- page head */
.page-head { padding-top: clamp(6rem, 12vh, 8.5rem); padding-bottom: clamp(2rem, 4vw, 3rem); }
.page-title {
  font-size: clamp(2.8rem, 8vw, 5.5rem); line-height: 0.95;
  font-weight: 700; letter-spacing: -0.05em;
}
.page-sub { margin-top: 1.2rem; color: var(--muted); max-width: 40em; font-size: 1rem; }
.year-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.8rem; }
.year-chip {
  display: inline-flex; align-items: baseline; gap: 0.4rem;
  padding: 0.35rem 0.75rem; border: 1px solid var(--line); border-radius: 999px;
  font-size: 11px; color: var(--muted); transition: all 0.3s;
}
.year-chip i { font-style: normal; font-size: 9px; color: var(--dim); }
.year-chip:hover { border-color: var(--accent-line); color: var(--accent-ink); }

/* ---------------------------------------------------------------- article */
.read-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60;
  background: transparent; pointer-events: none;
}
.read-progress span {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--accent), var(--cyan));
  box-shadow: 0 0 12px rgba(79, 156, 240, 0.35);
  transition: width 0.1s linear;
}

.article-head { padding-top: clamp(5.5rem, 11vh, 7.5rem); }
.back { font-size: 11px; color: var(--dim); letter-spacing: 0.08em; display: inline-block; }
.back:hover { color: var(--accent-ink); }

.article-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem;
  margin-top: 2rem; font-size: 10.5px; letter-spacing: 0.08em; color: var(--dim);
}
.article-meta .sep { opacity: 0.35; }
.draft-flag {
  color: var(--bg); background: var(--text); padding: 0.1rem 0.45rem;
  border-radius: 3px; font-size: 9px; letter-spacing: 0.12em; margin-left: 0.4rem;
}

.article-title {
  margin-top: 1rem; font-size: clamp(1.9rem, 5vw, 3.4rem);
  line-height: 1.28; font-weight: 650; letter-spacing: -0.025em; max-width: 22ch;
}
.article-title--quiet { font-weight: 500; color: var(--text-soft); }
.article-title-date { font-size: 0.5em; color: var(--dim); letter-spacing: 0.04em; }

.article-head, .article-body, .article-nav, .article-end {
  width: min(780px, 100% - clamp(2.4rem, 8vw, 6rem));
  margin-inline: auto;
}
.article-body { margin-top: clamp(2rem, 5vw, 3.5rem); }
.prose {
  max-width: none; font-size: 1.0625rem; line-height: 2.05; color: var(--text-soft);
  overflow-wrap: anywhere;
}
.prose > *:first-child { margin-top: 0; }
.prose p { margin: 0 0 1.55em; }
.prose strong, .prose b { color: var(--text); font-weight: 650; }
.prose a {
  color: var(--accent-ink); border-bottom: 1px solid var(--accent-line);
  transition: border-color 0.25s, background-color 0.25s;
  padding-bottom: 1px; word-break: break-word;
}
.prose a:hover { border-bottom-color: var(--accent); background: var(--accent-soft); }
.prose h2, .prose h3, .prose h4 {
  color: var(--text); font-weight: 650; line-height: 1.45;
  margin: 2.4em 0 0.8em; letter-spacing: -0.01em;
}
.prose h2 { font-size: 1.45rem; padding-left: 0.75rem; border-left: 3px solid var(--accent); }
.prose h3 { font-size: 1.2rem; }
.prose h4 { font-size: 1.05rem; color: var(--text-soft); }
.prose blockquote {
  margin: 2em 0; padding: 0.4em 0 0.4em 1.2em;
  border-left: 2px solid var(--accent-line); color: var(--muted);
  font-family: var(--serif); font-size: 1.05em; line-height: 1.95;
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose ul, .prose ol { margin: 1.3em 0; padding-left: 1.5em; }
.prose ul li { list-style: none; position: relative; margin: 0.5em 0; }
.prose ul li::before {
  content: ""; position: absolute; left: -1em; top: 0.85em;
  width: 4px; height: 4px; border-radius: 50%; background: var(--accent);
}
.prose ol { list-style: decimal; }
.prose ol li { margin: 0.5em 0; padding-left: 0.2em; }
.prose ol li::marker { color: var(--accent-ink); font-family: var(--mono); font-size: 0.85em; }
.prose img {
  border-radius: 14px; margin: 2em 0; border: 1px solid var(--line);
  box-shadow: var(--shadow); cursor: zoom-in; transition: transform 0.4s var(--ease);
}
.prose img:hover { transform: scale(1.005); }
.prose figure { margin: 2em 0; }
.prose figure img { margin: 0; }
.prose figcaption { margin-top: 0.7em; text-align: center; font-size: 11px; color: var(--dim); font-family: var(--mono); }
.prose hr { border: 0; height: 1px; background: var(--line); margin: 3em 0; }
.prose code {
  font-family: var(--mono); font-size: 0.86em; padding: 0.15em 0.42em;
  border-radius: 5px; background: var(--surface-2); border: 1px solid var(--line);
  color: var(--text); word-break: break-word;
}
.prose pre {
  margin: 2em 0; padding: 1.15rem 1.25rem; overflow-x: auto;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px;
  font-size: 0.84rem; line-height: 1.85;
}
.prose pre code { padding: 0; border: 0; background: none; font-size: inherit; }
.prose table { width: 100%; border-collapse: collapse; margin: 2em 0; font-size: 0.9rem; }
.prose th, .prose td { border: 1px solid var(--line); padding: 0.6rem 0.8rem; text-align: left; }
.prose th { background: var(--surface); font-weight: 600; }
.prose .img-fallback {
  display: grid; place-items: center; min-height: 120px; margin: 2em 0;
  border: 1px dashed var(--line-strong); border-radius: 14px;
  color: var(--dim); font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em;
}

.article-nav {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1rem, 3vw, 2rem);
  margin-top: clamp(3rem, 7vw, 5rem); border-top: 1px solid var(--line);
  padding-top: 1.6rem;
}
.an-item { display: flex; flex-direction: column; gap: 0.35rem; }
.an-prev { align-items: flex-start; }
.an-next { align-items: flex-end; text-align: right; }
.an-k { font-size: 9px; letter-spacing: 0.14em; color: var(--dim); }
.an-t { font-size: 0.95rem; color: var(--text-soft); transition: color 0.25s; }
.an-d { font-size: 9px; color: var(--dim); letter-spacing: 0.1em; }
.an-item:hover .an-t { color: var(--accent-ink); }

.article-end { margin-top: clamp(3rem, 6vw, 4.5rem); text-align: center; }
.end-btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.8rem 1.4rem; border: 1px solid var(--line); border-radius: 999px;
  font-size: 12.5px; color: var(--muted); transition: all 0.3s var(--ease);
}
.end-btn:hover { color: var(--accent-ink); border-color: var(--accent-line); background: var(--accent-soft); }
.end-btn .mono { font-size: 13px; }

/* ---------------------------------------------------------------- archive */
.archive { padding-bottom: 2rem; }
.page-archive .page-head,
.page-archive .archive { max-width: 980px; margin-inline: auto; }
.year-block {
  display: grid; grid-template-columns: 190px minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  border-top: 1px solid var(--line); padding: clamp(2rem, 4vw, 2.8rem) 0;
}
.year-label { position: sticky; top: calc(var(--head-h) + 2rem); align-self: start; }
.year-num {
  display: block; font-size: clamp(2.4rem, 4.6vw, 3.6rem); font-weight: 700;
  letter-spacing: -0.05em; line-height: 1;
  color: transparent; -webkit-text-stroke: 1px var(--stroke);
  transition: -webkit-text-stroke-color 0.4s, color 0.4s;
}
.year-block:hover .year-num { -webkit-text-stroke-color: var(--accent); }
.year-count { display: block; margin-top: 0.5rem; font-size: 9px; letter-spacing: 0.2em; color: var(--dim); }

.year-list { border-top: 1px solid transparent; }
.year-item { border-bottom: 1px solid var(--line); }
.year-item:last-child { border-bottom: 0; }
.year-item a {
  display: grid; grid-template-columns: 58px minmax(0, 1fr) 18px;
  gap: 1rem; padding: 1.05rem 0.2rem; align-items: baseline;
  transition: transform 0.35s var(--ease), background-color 0.35s;
}
.year-item a:hover { transform: translateX(5px); }
.yi-date { font-size: 10.5px; color: var(--dim); letter-spacing: 0.06em; }
.yi-title { display: block; font-size: 1rem; color: var(--text-soft); line-height: 1.65; }
.yi-ex { display: block; font-size: 0.85rem; color: var(--dim); margin-top: 0.25rem; line-height: 1.7; }
.yi-arrow {
  font-size: 0.9rem; color: var(--dim); opacity: 0;
  transition: opacity 0.3s, color 0.3s; justify-self: end;
}
.year-item a:hover .yi-title { color: var(--accent-ink); }
.year-item a:hover .yi-arrow { opacity: 1; color: var(--accent-ink); }

/* ---------------------------------------------------------------- about */
.about-grid {
  display: grid; grid-template-columns: 320px minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem); align-items: start;
  padding-top: clamp(1.5rem, 4vw, 3rem);
}
.about-card {
  border: 1px solid var(--line); border-radius: 20px; padding: 1.6rem;
  background: var(--surface); box-shadow: var(--shadow);
}
.avatar-tile {
  width: 100%; aspect-ratio: 1; border-radius: 16px; overflow: hidden;
  background: linear-gradient(160deg, #171c24, #0d1015);
  display: grid; place-items: center; position: relative;
}
html[data-theme="light"] .avatar-tile {
  background: linear-gradient(160deg, #ffffff, #e9edf1);
  border: 1px solid var(--line);
}
.avatar-tile::before {
  content: ""; position: absolute; right: 14px; bottom: 14px;
  width: 14px; height: 14px; border-radius: 4px;
  background: var(--accent); z-index: 2;
  box-shadow: 0 0 0 1px rgba(13, 18, 28, 0.12);
}
.avatar-tile::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(0, 0, 0, 0.14) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.14) 1px, transparent 1px);
  background-size: 28px 28px; opacity: 0.5;
}
html[data-theme="light"] .avatar-tile::after {
  background-image:
    linear-gradient(to right, rgba(13, 18, 28, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(13, 18, 28, 0.07) 1px, transparent 1px);
  opacity: 0.8;
}
html[data-theme="light"] .avatar-tile span { color: var(--text); }
.avatar-tile span {
  position: relative; z-index: 1; color: var(--text);
  font-size: clamp(3.4rem, 6vw, 4.8rem); font-weight: 800; letter-spacing: -0.04em;
}
.avatar-tile img {
  position: relative; z-index: 1;
  width: 100%; height: 100%; object-fit: cover;
}
.avatar-tile img.avatar-logo {
  object-fit: contain; padding: 17%;
}
.about-id h2 { font-size: 1.35rem; font-weight: 600; margin-top: 1.2rem; letter-spacing: 0.02em; }
.about-id p { margin-top: 0.3rem; font-size: 10px; letter-spacing: 0.14em; color: var(--dim); }

.about-bio { font-size: 1.05rem; line-height: 2.15; color: var(--muted); }
.about-bio p { margin: 0 0 1.2em; }
.about-bio p:last-child { margin-bottom: 0; }

.contact { margin-top: clamp(3.5rem, 7vw, 5.5rem); }
.contact-list { margin-top: 0.4rem; }
.contact-row {
  display: grid; grid-template-columns: 84px minmax(0, 1fr) 60px;
  align-items: center; gap: 1rem; width: 100%; text-align: left;
  padding: 1.15rem 0.3rem; border: 0; border-bottom: 1px solid var(--line);
  background: none; cursor: pointer; transition: padding-left 0.35s var(--ease);
}
.contact-row:hover { padding-left: 0.9rem; }
.cr-k { font-size: 9.5px; letter-spacing: 0.16em; color: var(--dim); }
.cr-v { font-family: var(--mono); font-size: 1rem; color: var(--text-soft); letter-spacing: 0.01em; }
.cr-act {
  font-size: 9.5px; letter-spacing: 0.1em; color: var(--accent-ink);
  opacity: 0; transition: opacity 0.3s; justify-self: end;
}
.contact-row:hover .cr-v { color: var(--accent-ink); }
.contact-row:hover .cr-act { opacity: 1; }

.facts {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0;
  margin-top: clamp(3.5rem, 7vw, 5.5rem);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.fact { padding: 1.35rem 0; }
.fact + .fact { border-left: 1px solid var(--line); padding-left: clamp(1rem, 3vw, 2rem); }
.fact-num {
  display: block; font-size: clamp(1.8rem, 3vw, 2.5rem); font-weight: 700;
  letter-spacing: -0.03em; line-height: 1.1;
}
.fact-k { display: block; margin-top: 0.35rem; font-size: 9px; letter-spacing: 0.16em; color: var(--dim); }

.about-site { margin-top: clamp(3.5rem, 7vw, 5.5rem); }
.about-note { padding-top: 1.4rem; color: var(--muted); font-size: 0.96rem; line-height: 2.05; }
.about-note p + p { margin-top: 0.8rem; }
.about-note .mono { font-size: 11px; color: var(--dim); letter-spacing: 0.04em; }

/* ---------------------------------------------------------------- search */
.search-form {
  display: flex; align-items: center; gap: 0; margin-top: 2rem;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  overflow: hidden; max-width: 640px; transition: border-color 0.3s;
}
.search-form:focus-within { border-color: var(--accent-line); }
.search-form input {
  flex: 1; min-width: 0; background: none; border: 0; outline: none;
  padding: 0.95rem 1.3rem; font-size: 1rem; color: var(--text);
}
.search-form input::placeholder { color: var(--dim); }
.search-form button {
  border: 0; background: var(--text); color: var(--bg); cursor: pointer;
  padding: 0.95rem 1.4rem; font-size: 10px; letter-spacing: 0.14em; font-weight: 600;
  transition: filter 0.3s;
}
.search-form button:hover { filter: brightness(1.1); }
.search-hint { margin-top: 1rem; font-size: 10.5px; letter-spacing: 0.08em; color: var(--dim); }

/* ---------------------------------------------------------------- error */
.error-wrap {
  padding-top: clamp(8rem, 20vh, 12rem); padding-bottom: 6rem; text-align: center;
}
.error-code {
  font-size: clamp(6rem, 22vw, 14rem); line-height: 0.8; font-weight: 800;
  letter-spacing: -0.06em; color: transparent;
  background: linear-gradient(180deg, var(--text), transparent 88%);
  -webkit-background-clip: text; background-clip: text;
}
.error-title { margin-top: 1.5rem; font-size: clamp(1.5rem, 4vw, 2.2rem); font-weight: 600; }
.error-msg { margin-top: 0.8rem; color: var(--muted); }
.error-actions { display: flex; gap: 0.8rem; justify-content: center; margin-top: 2rem; }

/* ---------------------------------------------------------------- footer */
.site-foot {
  position: relative; z-index: 2; margin-top: clamp(5rem, 10vw, 9rem);
  border-top: 1px solid var(--line); padding-top: clamp(2.5rem, 5vw, 4rem);
  padding-bottom: 2rem;
}
.foot-top {
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
  flex-wrap: wrap;
}
.foot-brand { font-size: 1.4rem; font-weight: 650; letter-spacing: -0.01em; }
.foot-nav { display: flex; gap: 1.4rem; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.foot-nav a:hover { color: var(--accent-ink); }
.foot-contact { font-size: 10.5px; color: var(--dim); letter-spacing: 0.04em; }
.foot-contact a:hover { color: var(--accent-ink); }

.foot-word {
  margin: clamp(2rem, 5vw, 3.5rem) 0 clamp(1.5rem, 4vw, 2.5rem);
  font-size: clamp(3.4rem, 15.5vw, 14rem); font-weight: 800; line-height: 0.82;
  letter-spacing: -0.02em; text-align: center; color: transparent;
  -webkit-text-stroke: 1px var(--line-strong); user-select: none;
  transition: -webkit-text-stroke-color 0.6s;
}
.site-foot:hover .foot-word { -webkit-text-stroke-color: var(--accent-line); }

.foot-bottom {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.8rem; flex-wrap: wrap; font-size: 9.5px; letter-spacing: 0.08em;
  color: var(--dim); border-top: 1px solid var(--line); padding-top: 1.2rem;
}
.foot-bottom a:hover { color: var(--accent-ink); }
.foot-stack { opacity: 0.8; }

/* ---------------------------------------------------------------- toast */
.toast {
  position: fixed; left: 50%; bottom: 2rem; z-index: 120;
  transform: translate(-50%, 10px); opacity: 0; pointer-events: none;
  padding: 0.7rem 1.1rem; border-radius: 999px;
  background: var(--bg-soft); border: 1px solid var(--line-strong);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em;
  color: var(--text); box-shadow: var(--shadow);
  transition: opacity 0.3s, transform 0.35s var(--ease);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------------------------------------------------------------- lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 130; background: rgba(4, 5, 7, 0.94);
  display: grid; place-items: center; padding: 4vw; opacity: 0;
  pointer-events: none; transition: opacity 0.3s; cursor: zoom-out;
  backdrop-filter: blur(8px);
}
.lightbox.is-on { opacity: 1; pointer-events: auto; }
.lightbox img { max-width: 100%; max-height: 90vh; border-radius: 8px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); }
.lightbox-x {
  position: absolute; top: 1.2rem; right: 1.2rem; width: 40px; height: 40px;
  border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06); color: #fff; cursor: pointer;
  font-size: 16px; display: grid; place-items: center;
}

/* ---------------------------------------------------------------- reveal */
.js .reveal {
  opacity: 0; transform: translateY(18px);
  transition: opacity 0.85s var(--ease), transform 0.85s var(--ease);
  transition-delay: calc(var(--i, 0) * 55ms);
}
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1040px) {
  .hero { grid-template-columns: 1fr; gap: 2.4rem; padding-bottom: 3rem; align-items: start; }
  .hero-quote { border-left: 0; padding-left: 0; margin-bottom: 0; }
  .hero-quote::before { display: none; }
  .hero-desc { font-size: 1.1rem; }
  .quote-break { display: none; }
  .about-grid { grid-template-columns: 1fr; }
  .about-card { max-width: 320px; }
  .year-block { grid-template-columns: 130px minmax(0, 1fr); gap: 1.5rem; }
}

@media (max-width: 820px) {
  :root { --head-h: 66px; }
  .nav { display: none; }
  .theme-btn--mobile { display: grid; }
  .burger { display: block; }
  .hero { padding-top: clamp(6rem, 14vh, 8rem); }
  .hero-title { font-size: clamp(3.2rem, 15vw, 5.5rem); }
  .facts { grid-template-columns: repeat(2, 1fr); }
  /* 触屏/窄屏：邮箱单独一行，复制按钮一直可见 */
  .contact-row {
    grid-template-columns: 1fr auto;
    grid-template-areas: "k act" "v v";
    gap: 0.45rem 0.8rem;
    padding: 1rem 0.15rem 1.1rem;
  }
  .contact-row:hover { padding-left: 0.15rem; }
  .cr-k { grid-area: k; }
  .cr-act {
    grid-area: act; justify-self: end; opacity: 1;
    padding: 0.22rem 0.6rem; border: 1px solid var(--line); border-radius: 999px;
    font-size: 9px;
  }
  .cr-v {
    grid-area: v; font-size: 0.92rem; min-width: 0;
    overflow-wrap: anywhere;
  }
  .article-title { max-width: none; }
  .article-nav { grid-template-columns: 1fr; gap: 1.4rem; }
  .an-next { align-items: flex-start; text-align: left; }
  .year-block { grid-template-columns: 1fr; gap: 1rem; }
  .year-label { position: static; display: flex; align-items: baseline; gap: 0.8rem; }
  .year-num { font-size: 2.6rem; }
  .year-count { margin-top: 0; }
  .pc-link { grid-template-columns: 1fr 24px; gap: 0.6rem; }
  .pc-date { flex-direction: row; align-items: baseline; gap: 0.5rem; grid-column: 1; }
  .pc-main { grid-column: 1 / -1; }
  .pc-arrow { display: none; }
  .search-form button { padding: 0.95rem 1rem; }
  .foot-bottom { justify-content: flex-start; gap: 0.5rem 1.2rem; }
  .foot-word { -webkit-text-stroke-width: 1px; }
}

@media (max-width: 560px) {
  .wrap { width: min(var(--wrap), 100% - 2.6rem); }
  .chip { font-size: 11.5px; padding: 0.45rem 0.7rem; }
  .chip-k { font-size: 8.5px; }
  .chip-v { font-size: 11px; }
  .article-meta { gap: 0.3rem; font-size: 9.5px; }
  .cr-v { font-size: 0.88rem; }
  .foot-top { flex-direction: column; align-items: flex-start; gap: 1.1rem; }
  .foot-contact { width: 100%; }
  .foot-contact a {
    display: inline-flex; max-width: 100%;
    padding: 0.45rem 0.7rem; border: 1px solid var(--line); border-radius: 999px;
    font-size: 10.5px; overflow-wrap: anywhere;
  }
  .mobile-contacts a { overflow-wrap: anywhere; }
  .error-actions { flex-direction: column; align-items: center; }
  .pager { font-size: 10px; }
  .pager-btn { padding: 0.6rem 0.9rem; }
}

/* 触屏设备不保留 hover 位移，避免点按后元素停在偏移状态 */
@media (hover: none) {
  .year-item a:hover { transform: none; }
  .contact-row:hover { padding-left: 0.3rem; }
}

/* ---------------------------------------------------------------- 动效偏好 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .bg-glow, .ticker-track { animation: none !important; }
  .cursor-glow { display: none; }
}

/* ---------------------------------------------------------------- 打印 */
@media print {
  .site-head, .site-foot, .read-progress, .bg, .cursor-glow,
  .article-nav, .article-end, .ticker { display: none !important; }
  body { background: #fff; color: #111; }
  .prose { color: #111; max-width: none; }
  .article-head { padding-top: 0; }
}
