/* ============================================================
   Messiahub design system
   学术极简主义 × 现代工程美学 × 克制的文学浪漫主义
   ============================================================ */

:root {
  /* 色彩：低饱和中性底；鸢尾光谱只做小面积强调，不铺满整页 */
  --bg: #f8f6f2;
  --bg-alt: #f2eee8;
  --surface: #f0ece6;
  --card: #fffdf9;
  --ink: #1d2430;
  --ink-2: #38414f;
  --muted: #5e5b57;
  --faint: #6b6560;
  --line: #ded8d0;
  --line-soft: #ece6de;

  /* Iris spectrum：冷紫 → 蓝紫 → 玫红 → 晚霞橙 → 珊瑚 → 浅金 */
  --iris-cold: #45317d;
  --iris-violet: #6f69b8;
  --iris-rose: #bb78ad;
  --iris-sunset: #e59b76;
  --iris-coral: #ed9c91;
  --iris-gold: #f0d09c;
  --iris-gradient: linear-gradient(
    105deg,
    var(--iris-cold) 0%,
    var(--iris-violet) 20%,
    var(--iris-rose) 40%,
    var(--iris-sunset) 60%,
    var(--iris-coral) 80%,
    var(--iris-gold) 100%
  );

  --brand: var(--iris-violet);
  --brand-ink: var(--iris-cold);
  --brand-soft: #f2eef6;
  --accent: var(--brand);
  --accent-ink: var(--brand-ink);
  --accent-soft: var(--brand-soft);
  --accent-line: #ddd1e4;
  --glow-a: rgba(69, 49, 125, 0.055);
  --glow-b: rgba(229, 155, 118, 0.065);
  --glow-c: rgba(187, 120, 173, 0.035);
  --shadow-color: 40, 35, 30;
  --shadow-sm: 0 1px 2px rgba(var(--shadow-color), 0.05);
  --shadow-md: 0 18px 42px -26px rgba(var(--shadow-color), 0.34);
  --header-bg: rgba(248, 246, 242, 0.82);

  /* 字体：只用系统字体，不引入外部字体资源 */
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia,
    "Songti SC", "Noto Serif CJK SC", "Noto Serif SC", "Source Han Serif SC",
    "STSong", "SimSun", serif;
  --font-sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC",
    "Noto Sans SC", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono",
    monospace;

  /* 尺度 */
  --max: 1160px;
  --measure: 700px;
  --pad: clamp(20px, 4vw, 32px);
  --header-h: 64px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --speed: 180ms;
  --speed-slow: 320ms;
}

/* 手动深色 */
html[data-theme="dark"] {
  --bg: #0e131b;
  --bg-alt: #121922;
  --surface: #18212c;
  --card: #19222e;
  --ink: #edf0f5;
  --ink-2: #cfd6e1;
  --muted: #a2adbe;
  --faint: #8491a4;
  --line: #2a3442;
  --line-soft: #212b38;
  --brand: #a89ede;
  --brand-ink: #c8bdea;
  --brand-soft: #221f33;
  --accent: var(--brand);
  --accent-ink: var(--brand-ink);
  --accent-soft: var(--brand-soft);
  --accent-line: #3a3358;
  --glow-a: rgba(168, 158, 222, 0.07);
  --glow-b: rgba(229, 155, 118, 0.05);
  --glow-c: rgba(187, 120, 173, 0.04);
  --shadow-color: 0, 0, 0;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.28);
  --shadow-md: 0 22px 48px -28px rgba(0, 0, 0, 0.8);
  --header-bg: rgba(14, 19, 27, 0.84);
  color-scheme: dark;
}

/* 系统深色；data-theme="light" 时显式回退到浅色 */
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    --bg: #0e131b;
    --bg-alt: #121922;
    --surface: #18212c;
    --card: #19222e;
    --ink: #edf0f5;
    --ink-2: #cfd6e1;
    --muted: #a2adbe;
    --faint: #8491a4;
    --line: #2a3442;
    --line-soft: #212b38;
    --brand: #a99bd6;
    --brand-ink: #b6a9e0;
    --brand-soft: #221f33;
    --accent: var(--brand);
    --accent-ink: var(--brand-ink);
    --accent-soft: var(--brand-soft);
    --accent-line: #3a3358;
    --glow-a: rgba(169, 155, 214, 0.07);
    --glow-b: rgba(143, 173, 208, 0.045);
    --shadow-color: 0, 0, 0;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.28);
    --shadow-md: 0 22px 48px -28px rgba(0, 0, 0, 0.8);
    --header-bg: rgba(14, 19, 27, 0.84);
    color-scheme: dark;
  }
}

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

html {
  min-height: 100%;
  overflow-x: clip;
  background: var(--bg);
  color-scheme: light;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 18px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  background-image:
    radial-gradient(58rem 36rem at 8% -10%, var(--glow-a), transparent 62%),
    radial-gradient(48rem 30rem at 100% 0, var(--glow-b), transparent 60%),
    radial-gradient(36rem 24rem at 72% 6%, var(--glow-c), transparent 66%);
  background-repeat: no-repeat;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main {
  flex: 1 0 auto;
}

main:focus {
  outline: none;
}

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

img {
  height: auto;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

.wrap {
  width: min(calc(100% - var(--pad) * 2), var(--max));
  margin-inline: auto;
}

::selection {
  color: var(--ink);
  background: var(--accent-soft);
}

a {
  color: var(--accent-ink);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

a:hover {
  color: var(--accent);
}

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

h1,
h2,
h3 {
  text-wrap: balance;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -72px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
  font-size: 13px;
  transition: top var(--speed) var(--ease);
}

.skip-link:focus {
  top: 14px;
}

/* ---------- 通用文字 ---------- */
.eyebrow {
  margin: 0 0 10px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  line-height: 1.5;
  text-transform: uppercase;
}

.lead {
  margin: 0 0 22px;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 2.6vw, 1.9rem);
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: -0.02em;
}

.section-link {
  display: inline-block;
  margin-left: 8px;
  color: var(--accent-ink);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.03em;
  text-decoration: none;
  white-space: nowrap;
}

.section-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-ink);
  font-family: var(--font-mono);
  font-size: 11.5px;
  text-decoration: none;
  border-bottom: 1px solid var(--accent-line);
  padding-bottom: 2px;
}

.text-link:hover {
  border-color: var(--accent);
}

.empty {
  color: var(--faint);
  font-size: 13px;
  padding: 18px 0;
}

/* ---------- 头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background-color var(--speed-slow) ease, border-color var(--speed-slow) ease,
    box-shadow var(--speed-slow) ease;
}

.site-header::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 1px;
  background: var(--iris-gradient);
  opacity: 0.38;
  pointer-events: none;
}

.site-header.is-stuck {
  border-bottom-color: var(--line-soft);
  background: var(--header-bg);
  box-shadow: var(--shadow-sm);
  -webkit-backdrop-filter: blur(14px) saturate(1.5);
  backdrop-filter: blur(14px) saturate(1.5);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header.is-stuck {
    background: var(--bg);
  }
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: var(--header-h);
  padding-block: 9px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
}

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

.brand-mark {
  position: relative;
  flex: none;
  width: 13px;
  height: 13px;
  border: 1.5px solid var(--ink);
  border-radius: 3px;
  background: var(--accent);
  transform: rotate(-6deg);
  transition: transform var(--speed-slow) var(--ease);
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 1px;
  background: var(--card);
}

.brand:hover .brand-mark {
  transform: rotate(6deg);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 1px;
  font-size: 13px;
  white-space: nowrap;
}

.desktop-nav a {
  padding: 6px 9px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  transition: color var(--speed) ease, background-color var(--speed) ease;
}

.desktop-nav a:hover {
  color: var(--ink);
  background: var(--surface);
}

.desktop-nav a[aria-current="page"] {
  color: var(--ink);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line-soft);
}

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

.site-clock {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.lang-switch {
  display: inline-flex;
  flex: none;
  align-items: center;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--speed) ease, background-color var(--speed) ease,
    border-color var(--speed) ease;
}

.lang-switch:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.icon-button {
  display: grid;
  flex: none;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  color: var(--ink);
  transition: color var(--speed) ease, background-color var(--speed) ease,
    border-color var(--speed) ease, transform var(--speed) var(--ease);
}

.icon-button:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.icon-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.theme-toggle svg {
  grid-area: 1 / 1;
  transition: opacity var(--speed-slow) ease, transform var(--speed-slow) var(--ease);
}

.theme-toggle .icon-sun {
  opacity: 1;
  transform: none;
}

.theme-toggle .icon-moon {
  opacity: 0;
  transform: rotate(-40deg) scale(0.65);
}

html[data-theme="dark"] .theme-toggle .icon-sun {
  opacity: 0;
  transform: rotate(40deg) scale(0.65);
}

html[data-theme="dark"] .theme-toggle .icon-moon {
  opacity: 1;
  transform: none;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .theme-toggle .icon-sun {
    opacity: 0;
    transform: rotate(40deg) scale(0.65);
  }

  html:not([data-theme="light"]) .theme-toggle .icon-moon {
    opacity: 1;
    transform: none;
  }
}

.menu-button {
  display: none;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  color: var(--ink);
  place-items: center;
  align-content: center;
  gap: 4px;
}

.menu-button span {
  display: block;
  width: 15px;
  height: 1.5px;
  background: currentColor;
}

.no-js-fallback {
  display: none;
}

.fallback-nav {
  display: none;
}

/* ---------- 移动端抽屉 ---------- */
.nav-drawer {
  position: fixed;
  inset: 0 auto 0 0;
  display: none;
  flex-direction: column;
  width: min(380px, 100vw);
  height: 100vh;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-right: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow-md);
}

.nav-drawer[open] {
  display: flex;
  animation: drawer-in var(--speed-slow) var(--ease);
}

.nav-drawer::backdrop {
  background: rgba(10, 16, 24, 0.46);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.drawer-header {
  display: flex;
  flex: none;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 22px 18px;
  border-bottom: 1px solid var(--line-soft);
}

.drawer-header .eyebrow {
  margin-bottom: 5px;
}

.drawer-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 12px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.drawer-nav a {
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 21px;
  line-height: 1.35;
  letter-spacing: -0.02em;
  text-decoration: none;
  transition: color var(--speed) ease, background-color var(--speed) ease;
}

.drawer-nav a:hover {
  color: var(--accent-ink);
  background: var(--surface);
}

.drawer-nav a[aria-current="page"] {
  color: var(--accent-ink);
  background: var(--accent-soft);
}

.drawer-nav-footer {
  display: flex;
  flex: none;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
  padding: 18px 22px 24px;
  border-top: 1px solid var(--line-soft);
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.03em;
}

body.no-scroll {
  overflow: hidden;
}

@keyframes drawer-in {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  align-items: center;
  gap: clamp(34px, 6vw, 82px);
  padding-block: clamp(52px, 8vw, 94px) clamp(46px, 6vw, 76px);
}

.hero-copy {
  animation: rise 560ms var(--ease) both;
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 5.8vw, 4.55rem);
  font-weight: 500;
  line-height: 1.14;
  letter-spacing: -0.03em;
}

.hero h1 span {
  display: block;
  color: var(--accent-ink);
}

.hero-lede {
  max-width: 58ch;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.12rem);
  line-height: 1.9;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 16px;
  margin: 30px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.03em;
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hero-meta span::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
}

/* ---------- 按钮 ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color var(--speed) ease, border-color var(--speed) ease,
    color var(--speed) ease, transform var(--speed) var(--ease), box-shadow var(--speed) ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--ink);
  color: var(--bg);
}

.button-primary:hover {
  background: var(--ink-2);
  color: var(--bg);
  box-shadow: var(--shadow-sm);
}

.button-secondary {
  border-color: var(--line);
  background: var(--card);
  color: var(--ink);
}

.button-secondary:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-ink);
}

/* ---------- Now 卡片 ---------- */
.now-card {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow-md);
  animation: rise 560ms 70ms var(--ease) both;
}

.now-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--brand));
}

.now-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.label {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.status-pill,
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.02em;
  line-height: 1.4;
}

.status-dot {
  flex: none;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.now-card h2 {
  margin: 18px 0 14px;
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.now-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.now-list li {
  display: flex;
  gap: 9px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.now-list li::before {
  content: "";
  flex: none;
  width: 5px;
  height: 5px;
  margin-top: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.now-updated {
  margin: 18px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.02em;
  line-height: 1.6;
}

/* ---------- 区块 ---------- */
.section {
  padding-block: clamp(46px, 6.5vw, 72px);
  border-top: 1px solid var(--line-soft);
}

.section--flush {
  border-top: 1px solid var(--line-soft);
}

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

.section-head .eyebrow {
  margin-bottom: 7px;
  color: var(--accent-ink);
}

.section-head h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3.2vw, 2.45rem);
  font-weight: 500;
  line-height: 1.16;
  letter-spacing: -0.025em;
}

.section-desc {
  max-width: 46ch;
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.75;
  text-align: right;
}

/* ---------- 板块卡 ---------- */
.domain-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.domain-card {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--card);
  transition: transform var(--speed-slow) var(--ease), border-color var(--speed) ease,
    box-shadow var(--speed-slow) var(--ease);
}

.domain-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.domain-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.domain-card-name {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.domain-card-name::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.domain-card-name a {
  color: inherit;
  text-decoration: none;
}

.domain-card-name a:hover {
  color: var(--accent-ink);
}

.domain-card-count {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.domain-card-tagline {
  margin: 0;
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.6;
}

.domain-card-keywords {
  margin: 0;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.02em;
  line-height: 1.6;
}

.domain-card-list {
  display: grid;
  gap: 7px;
  min-width: 0;
  margin: 7px 0 0;
  padding: 10px 0 0;
  border-top: 1px solid var(--line-soft);
  list-style: none;
}

.domain-card-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  font-size: 12.5px;
}

.domain-card-list a {
  min-width: 0;
  overflow: hidden;
  color: var(--ink-2);
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.domain-card-list a:hover {
  color: var(--accent-ink);
}

.domain-card-list li.empty {
  padding: 0;
  color: var(--faint);
  font-style: italic;
}

.domain-card-type {
  flex: none;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 9.5px;
  white-space: nowrap;
}

.domain-card-more {
  margin-top: auto;
  padding-top: 8px;
  color: var(--accent-ink);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.03em;
  text-decoration: none;
}

.domain-card-more:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- 文章列表 ---------- */
.post-list {
  border-top: 1px solid var(--line);
}

.post-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  align-items: start;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line-soft);
  transition: background-color var(--speed) ease;
}

.post-row:hover {
  background: var(--surface);
}

.post-row-date {
  padding-top: 4px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.post-row-body {
  min-width: 0;
}

.post-row-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.post-row-title a {
  color: var(--ink);
  text-decoration: none;
  transition: color var(--speed) ease;
}

.post-row:hover .post-row-title a {
  color: var(--accent-ink);
}

.post-row-summary {
  max-width: 64ch;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.75;
}

.post-row-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  padding-top: 3px;
}

.post-row-section {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.post-row-section::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
}

.post-row-time {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 10px;
  white-space: nowrap;
}

/* ---------- 项目卡 ---------- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.project-grid--related {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-grid--related > :only-child {
  grid-column: 1 / -1;
  max-width: 560px;
}

.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 210px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--card);
  color: var(--ink);
  transition: transform var(--speed-slow) var(--ease), border-color var(--speed) ease,
    box-shadow var(--speed-slow) var(--ease);
}

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

.project-card:focus-within {
  outline: 2px solid var(--accent-ink);
  outline-offset: 3px;
}

.project-card-link {
  color: inherit;
  text-decoration: none;
}

.project-card-link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}

.project-card-link:focus-visible {
  outline: none;
}

.project-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 18px;
}

.project-domain {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.project-status {
  flex: none;
  padding: 2px 7px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.project-title {
  display: block;
  margin: 0;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 23px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.025em;
  overflow-wrap: anywhere;
  transition: color var(--speed) ease;
}

.project-card:hover .project-title {
  color: var(--accent-ink);
}

.project-desc {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.project-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 20px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.02em;
}

.tech-inline {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-arrow {
  flex: none;
  color: var(--accent-ink);
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1;
  transition: transform var(--speed) var(--ease);
}

.project-card:hover .project-arrow {
  transform: translateX(3px);
}

/* ---------- 空状态 ---------- */
.empty-state {
  margin-top: 20px;
  padding: 26px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  background: var(--card);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.empty-state-title {
  margin: 0 0 6px;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.empty-state p {
  margin: 0 0 12px;
}

.empty-state p:last-of-type {
  margin-bottom: 0;
}

.empty-state .text-link {
  margin-top: 14px;
}

/* ---------- 面包屑与页面头 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-top: 22px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.02em;
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

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

.breadcrumb [aria-current="page"] {
  color: var(--ink-2);
}

/* 文章详情的面包屑与正文列对齐 */
.breadcrumb--article {
  max-width: var(--measure);
  margin-inline: auto;
}

.page-head {
  padding-block: clamp(26px, 4.5vw, 48px) clamp(24px, 4vw, 38px);
}

.page-head h1 {
  max-width: 22ch;
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}

.page-lede {
  margin: 14px 0 0;
  color: var(--ink-2);
  font-family: var(--font-serif);
  font-size: clamp(1.1rem, 1.8vw, 1.35rem);
  line-height: 1.6;
  letter-spacing: -0.015em;
}

.page-intro {
  max-width: 66ch;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.85;
}

.page-head code {
  padding: 0.1em 0.35em;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 0.88em;
}

.page-head--section::before {
  content: "";
  display: block;
  width: 40px;
  height: 2px;
  margin-bottom: 18px;
  border-radius: 2px;
  background: var(--iris-gradient);
}

.page-head--section .eyebrow {
  color: var(--accent-ink);
}

.section-notice {
  margin: 18px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 12.5px;
  line-height: 1.7;
}

/* ---------- 文章页 ---------- */
.post {
  max-width: var(--measure);
  margin-inline: auto;
  padding-block: clamp(22px, 3.5vw, 36px) clamp(48px, 6vw, 72px);
}

.post-head {
  padding-bottom: clamp(20px, 3vw, 30px);
  border-bottom: 1px solid var(--line-soft);
}

.post-head::before {
  content: "";
  display: block;
  width: 40px;
  height: 2px;
  margin-bottom: 16px;
  border-radius: 2px;
  background: var(--iris-gradient);
}

.post-head .eyebrow {
  color: var(--accent-ink);
}

.post-head h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4.2vw, 3rem);
  font-weight: 500;
  line-height: 1.16;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}

.post-summary {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
}

.post-summary:empty {
  display: none;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.02em;
}

.meta-sep {
  opacity: 0.5;
}

.post-tags {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: auto;
}

.tag {
  padding: 2px 8px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.01em;
}

.post-notice {
  margin: 16px 0 0;
  padding: 10px 12px;
  border-left: 2px solid var(--accent);
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 12px;
  line-height: 1.7;
}

/* ---------- 正文排版 ---------- */
.prose {
  padding-top: clamp(24px, 3.5vw, 36px);
  color: var(--ink-2);
  font-size: 16.5px;
  line-height: 1.9;
  overflow-wrap: break-word;
}

.prose > * + * {
  margin-top: 1.1em;
}

.prose p {
  margin: 0;
  text-wrap: pretty;
}

.prose h2 {
  margin: 2.2em 0 0.55em;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 1.55rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.025em;
  overflow-wrap: anywhere;
}

.prose h3 {
  margin: 1.7em 0 0.5em;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

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

.prose li + li {
  margin-top: 0.4em;
}

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

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

.prose a {
  color: var(--accent-ink);
  text-decoration: underline;
  text-decoration-color: var(--accent-line);
  text-underline-offset: 0.18em;
  overflow-wrap: anywhere;
  transition: color var(--speed) ease, text-decoration-color var(--speed) ease;
}

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

.prose blockquote {
  margin: 1.5em 0;
  padding: 4px 0 4px 18px;
  border-left: 2px solid var(--accent);
  color: var(--muted);
}

.prose blockquote p {
  margin: 0;
}

.prose hr {
  margin: 2.2em 0;
  border: 0;
  border-top: 1px solid var(--line-soft);
}

.prose code {
  padding: 0.1em 0.35em;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.87em;
}

.prose pre {
  max-width: 100%;
  margin: 1.5em 0;
  padding: 15px 17px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  line-height: 1.7;
  tab-size: 2;
}

.prose pre code {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-2);
  font-size: 13px;
}

.prose img {
  max-width: 100%;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: var(--card);
}

.prose figure {
  margin: 2em 0 0;
}

.prose figure img {
  display: block;
  width: 100%;
}

.prose figcaption {
  margin-top: 9px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.65;
  letter-spacing: 0.01em;
}

.prose figcaption strong {
  color: var(--ink-2);
  font-weight: 600;
}

.figure-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 2em 0 0;
}

.figure-pair figure {
  margin: 0;
}

.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.prose table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 13.5px;
}

.prose th,
.prose td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: top;
}

.prose tr:last-child td {
  border-bottom: 0;
}

.prose th {
  border-bottom-color: var(--line);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

/* 诗体与文学排版 */
.post--writing .prose {
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 17.5px;
  line-height: 2.05;
  letter-spacing: 0.01em;
}

.verse {
  max-width: 28em;
  margin: 2.4em auto;
  padding: 0;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 1.06rem;
  line-height: 2.2;
  letter-spacing: 0.06em;
}

.verse span {
  display: block;
}

.verse + .verse {
  margin-top: 2.8em;
}

/* 《琉璃花园行》局部：两张植物图谱左右并列，手机端上下排列 */
.post--writing .poem-plates {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: clamp(14px, 2.4vw, 22px);
  margin: 2.8em 0 0;
}

.post--writing .poem-plates figure {
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin: 0;
}

.post--writing .poem-plates img {
  display: block;
  width: 100%;
  height: auto;
}

.post--writing .poem-plates figcaption {
  margin-top: 10px;
}

@media (max-width: 640px) {
  .post--writing .poem-plates {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 2.2em;
  }
}

.plant-note {
  margin-top: 2.4em;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: var(--surface);
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 13.5px;
  line-height: 1.85;
}

.plant-note strong {
  color: var(--ink-2);
}

/* ---------- 上下篇 ---------- */
.post-foot {
  margin-top: clamp(36px, 5vw, 56px);
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.post-foot-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.back-link {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.back-link:hover {
  color: var(--accent-ink);
}

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.pager-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: border-color var(--speed) ease, background-color var(--speed) ease;
}

.pager-link:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.pager-link span {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.pager-link strong {
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
}

.pager-next {
  align-items: flex-end;
  text-align: right;
}

.pager-empty {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--faint);
  font-size: 12px;
}

/* ---------- 关于页 ---------- */
.article {
  max-width: var(--measure);
  margin-inline: auto;
  padding-bottom: clamp(48px, 6vw, 72px);
}

.article > p {
  margin: 0 0 16px;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.9;
}

.article > h2 {
  margin: 2.1em 0 0.55em;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.article > ul {
  margin: 0 0 18px;
  padding-left: 1.35em;
  color: var(--ink-2);
  font-size: 15.5px;
  line-height: 1.9;
}

.article > ul li + li {
  margin-top: 0.35em;
}

.article > ul li::marker {
  color: var(--accent);
}

.contact-inline {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
  padding: 14px 0 0;
  border-top: 1px solid var(--line-soft);
  list-style: none;
}

.contact-inline li {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  align-items: baseline;
  gap: 12px;
  font-size: 13.5px;
}

.contact-inline li > span {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact-inline em {
  color: var(--muted);
  font-size: 12.5px;
  font-style: normal;
}

/* ---------- 项目详情 ---------- */
.project-detail {
  padding-block: clamp(22px, 3.5vw, 36px) clamp(48px, 6vw, 80px);
}

.project-head {
  max-width: none;
  padding-bottom: clamp(24px, 4vw, 36px);
  border-bottom: 1px solid var(--line-soft);
}

.project-head h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(2.1rem, 4.5vw, 3.3rem);
  font-weight: 500;
  line-height: 1.14;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}

.project-tagline {
  margin: 14px 0 0;
  color: var(--ink-2);
  font-family: var(--font-serif);
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  line-height: 1.55;
  letter-spacing: -0.015em;
}

.project-summary {
  max-width: 70ch;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.85;
}

.project-head-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}

.project-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  grid-template-areas: "main aside";
  align-items: start;
  gap: clamp(30px, 5vw, 64px);
  padding-top: clamp(26px, 4vw, 40px);
}

.project-main {
  grid-area: main;
  min-width: 0;
}

.project-aside {
  grid-area: aside;
  position: sticky;
  top: calc(var(--header-h) + 18px);
}

.project-meta-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--card);
  box-shadow: var(--shadow-sm);
}

.project-meta-card h2 {
  margin: 0 0 12px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-meta {
  display: grid;
  gap: 0;
  margin: 0;
}

.project-meta-row {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--line-soft);
  font-size: 12px;
  line-height: 1.55;
}

.project-meta-row:first-child {
  border-top: 0;
}

.project-meta dt {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.02em;
}

.project-meta dd {
  margin: 0;
  color: var(--ink-2);
  overflow-wrap: anywhere;
}

.project-note {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
  color: var(--faint);
  font-size: 11px;
  line-height: 1.65;
}

.project-section {
  padding-top: 26px;
  margin-top: 26px;
  border-top: 1px solid var(--line-soft);
}

.project-section:first-child {
  padding-top: 0;
  margin-top: 0;
  border-top: 0;
}

.project-section h2 {
  margin: 0 0 10px;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.project-section h2 span {
  display: block;
  margin-top: 3px;
  color: var(--faint);
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.project-section p {
  margin: 0;
  color: var(--ink-2);
  font-size: 15.5px;
  line-height: 1.9;
}

.project-list {
  margin: 0;
  padding-left: 1.25em;
  color: var(--ink-2);
  font-size: 15.5px;
  line-height: 1.9;
}

.project-list li + li {
  margin-top: 0.5em;
}

.project-list li::marker {
  color: var(--accent);
}

.project-resources {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.project-resources a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--accent-line);
  color: var(--accent-ink);
  font-size: 14px;
  text-decoration: none;
}

.project-resources a:hover {
  border-color: var(--accent);
}

.project-back {
  margin-top: 30px;
}

.project-related {
  margin-top: clamp(40px, 6vw, 64px);
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.project-related h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.related-list {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.related-list li {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--line-soft);
  font-size: 13.5px;
}

.related-list a {
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 17px;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.related-list a:hover {
  color: var(--accent-ink);
}

.related-list span {
  color: var(--muted);
  line-height: 1.6;
}

/* ---------- 404 ---------- */
.not-found {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: 52vh;
  padding-block: clamp(70px, 14vw, 140px);
}

.not-found h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.not-found p {
  max-width: 54ch;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
}

.not-found-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

/* ---------- 页脚 ---------- */
.site-footer {
  margin-top: auto;
  border-top: 0;
  background: var(--iris-gradient) top left / 100% 1px no-repeat, var(--bg-alt);
}

.footer-inner {
  display: grid;
  gap: 26px;
  padding-block: 44px 26px;
}

.footer-main {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) repeat(3, minmax(0, 0.8fr));
  align-items: start;
  gap: clamp(24px, 4vw, 52px);
}

.footer-brand p {
  max-width: 44ch;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.75;
}

.footer-brand .footer-note {
  padding-left: 10px;
  border-left: 2px solid var(--accent-line);
  color: var(--faint);
  font-size: 11.5px;
}

.footer-col {
  display: grid;
  align-content: start;
  gap: 8px;
}

.footer-col h3 {
  margin: 0 0 3px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.footer-col a {
  justify-self: start;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
  text-decoration: none;
}

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

.tech-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 5px;
}

.tech-badge {
  padding: 2px 7px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: var(--card);
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.02em;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 12px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.02em;
}

.footer-sep {
  opacity: 0.5;
}

.lang-status {
  color: var(--faint);
}

.to-top {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  color: var(--muted);
  text-decoration: none;
  font-size: 10.5px;
}

.to-top span {
  transition: transform var(--speed) var(--ease);
}

.to-top:hover span {
  transform: translateY(-3px);
}

/* ---------- 动效 ---------- */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ============================================================
   Editorial refinement：更克制的版面、状态标记与阅读辅助
   ============================================================ */
:root {
  --state-stable: #3f7a63;
  --state-preview: #9a742f;
  --state-alpha: #9a5b6a;
  --state-maintained: #4f6d8f;
}

html[data-theme="dark"] {
  --state-stable: #8fd0b8;
  --state-preview: #d8b46f;
  --state-alpha: #d99aaa;
  --state-maintained: #9ab8da;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    --state-stable: #8fd0b8;
    --state-preview: #d8b46f;
    --state-alpha: #d99aaa;
    --state-maintained: #9ab8da;
  }
}

body {
  font-feature-settings: "kern" 1, "liga" 1;
}

h1,
h2,
h3,
h4 {
  font-optical-sizing: auto;
}

.hero-lede,
.page-lede,
.page-intro,
.post-summary,
.project-summary,
.project-tagline,
.project-section p,
.article > p {
  text-wrap: pretty;
}

.prose {
  line-break: strict;
}

.post-meta,
.hero-meta,
.project-foot,
.project-status,
.project-meta dd,
.filter-summary,
.project-card-index {
  font-variant-numeric: tabular-nums;
}

/* 只在 hero 区加极淡的纸面网格，不打扰正文 */
.hero {
  position: relative;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--line-soft) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line-soft) 1px, transparent 1px);
  background-size: 36px 36px;
  opacity: 0.34;
  -webkit-mask-image: radial-gradient(ellipse 78% 82% at 22% 40%, #000 0%, transparent 76%);
  mask-image: radial-gradient(ellipse 78% 82% at 22% 40%, #000 0%, transparent 76%);
}

.hero > * {
  position: relative;
  z-index: 1;
}

/* 卡片改为细线条目：保留结构，不再堆叠圆角盒子 */
.domain-grid {
  gap: 24px 28px;
}

.domain-card {
  padding: 18px 0 0;
  border: 0;
  border-top: 1px solid var(--accent-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.domain-card:hover {
  transform: none;
  border-color: var(--accent);
  background: transparent;
  box-shadow: none;
}

.project-grid {
  gap: 26px 28px;
}

.project-card {
  min-height: 0;
  align-self: start;
  padding: 18px 0;
  border: 0;
  border-top: 1px solid var(--accent-line);
  border-radius: 0;
  background: transparent;
}

.project-card:hover {
  transform: none;
  border-top-color: var(--accent);
  background: transparent;
  box-shadow: none;
}

.project-card--feature {
  grid-column: span 2;
  padding-top: 22px;
}

.project-card--feature-wide {
  grid-column: 1 / -1;
}

.project-card--feature .project-card-top {
  margin-bottom: 24px;
}

.project-feature-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
  color: var(--accent-ink);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-feature-label::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--iris-gradient);
}

.project-card--feature .project-title {
  max-width: 18ch;
  font-size: clamp(2rem, 3.4vw, 2.8rem);
  line-height: 1.12;
}

.project-card--feature .project-desc {
  max-width: 58ch;
  font-size: 14px;
}

.project-card--feature .project-foot {
  padding-top: 26px;
}

.project-grid.is-filtered .project-card--feature,
.project-grid.is-filtered .project-card--feature-wide {
  grid-column: auto;
}

.project-card-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.project-card-index {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
}

.project-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 7px;
  border-color: var(--line-soft);
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0;
}

.project-status::before {
  content: "";
  flex: none;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--state-stable);
}

.project-status--stable::before,
.status-chip--stable .status-dot {
  background: var(--state-stable);
}

.project-status--preview::before,
.status-chip--preview .status-dot {
  background: var(--state-preview);
}

.project-status--alpha::before,
.status-chip--alpha .status-dot {
  background: var(--state-alpha);
}

.project-status--maintained::before,
.status-chip--maintained .status-dot {
  background: var(--state-maintained);
}

.now-card {
  padding: 22px 0 0;
  border: 0;
  border-radius: 0;
  background: var(--iris-gradient) top left / 100% 2px no-repeat;
  box-shadow: none;
}

.now-card::before {
  display: none;
}

/* 项目索引：编辑式筛选条，而不是一组按钮胶囊 */
.project-filters {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin: 0 0 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}

.filter-chip {
  padding: 6px 10px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.01em;
  line-height: 1.6;
}

.filter-chip:hover {
  color: var(--ink);
  background: transparent;
}

.filter-chip[aria-pressed="true"] {
  color: var(--ink);
  background: var(--accent-soft);
  border-bottom-color: var(--accent);
}

.filter-count {
  margin-left: 6px;
  color: var(--faint);
  font-size: 9px;
}

.filter-summary {
  margin: 0;
  padding-left: 14px;
  border-left: 1px solid var(--line-soft);
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.02em;
}

.filter-empty {
  margin: 24px 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
}

/* 项目详情的小型识别标记 */
.project-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.project-kicker .eyebrow {
  margin: 0;
}

.project-mark {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.04em;
  line-height: 1;
}

.project-mark--stable {
  border-color: var(--state-stable);
}

.project-mark--preview {
  border-color: var(--state-preview);
}

.project-mark--alpha {
  border-color: var(--state-alpha);
}

.project-mark--maintained {
  border-color: var(--state-maintained);
}

/* 文章阅读辅助 */
.reading-progress {
  position: fixed;
  top: var(--header-h);
  right: 0;
  left: 0;
  z-index: 70;
  height: 2px;
  pointer-events: none;
}

.reading-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--iris-gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 80ms linear;
}

.post-toc {
  margin: 22px 0 0;
  padding: 10px 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.post-toc summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}

.post-toc summary::-webkit-details-marker {
  display: none;
}

.post-toc summary .eyebrow {
  margin: 0;
}

.post-toc-count {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 10px;
}

.post-toc ol {
  margin: 12px 0 2px;
  padding: 0;
  columns: 2;
  column-gap: 28px;
  list-style: none;
}

.post-toc li {
  break-inside: avoid;
  padding: 4px 0;
  font-size: 13px;
  line-height: 1.5;
}

.post-toc li.toc-h3 {
  padding-left: 14px;
  color: var(--muted);
  font-size: 12px;
}

.post-toc a {
  color: var(--muted);
  text-decoration: none;
}

.post-toc a:hover {
  color: var(--accent-ink);
}

.pager-link {
  padding: 12px 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
}

.pager-link:hover {
  border-color: var(--accent);
  background: transparent;
}

/* 文字标与 M 字标 */
.brand-mark {
  display: block;
  width: 19px;
  height: 19px;
  flex: none;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--accent-ink);
  overflow: visible;
  transform: none;
}

.brand-mark path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-mark-base {
  opacity: 0.28;
}

.brand-mark::after {
  content: none;
}

.brand:hover .brand-mark {
  transform: translateY(-1px);
}

@media (max-width: 900px) {
  .project-card--feature .project-title {
    font-size: clamp(2rem, 6vw, 2.5rem);
  }
}

@media (max-width: 600px) {
  .post-toc ol {
    columns: 1;
  }

  .project-card--feature,
  .project-card--feature-wide {
    grid-column: auto;
  }

  .domain-grid,
  .project-grid {
    gap: 22px;
  }
}

/* ---------- 响应式 ---------- */
@media (max-width: 880px) {
  .desktop-nav {
    display: none;
  }

  .menu-button {
    display: grid;
  }

  .fallback-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
    padding-block: 10px;
    border-bottom: 1px solid var(--line-soft);
  }

  .fallback-nav a {
    padding: 4px 8px;
    border-radius: 999px;
    color: var(--muted);
    font-size: 12.5px;
    text-decoration: none;
  }

  .fallback-nav a[aria-current="page"] {
    background: var(--surface);
    color: var(--ink);
  }
}

@media (max-width: 1100px) {
  .domain-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 38px;
    padding-block: clamp(44px, 7vw, 66px) clamp(42px, 6vw, 60px);
  }

  .now-card {
    max-width: 560px;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 22px;
  }

  .section-desc {
    max-width: 100%;
    text-align: left;
  }

  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .project-body {
    grid-template-columns: 1fr;
    grid-template-areas:
      "aside"
      "main";
    gap: 28px;
  }

  .project-aside {
    position: static;
  }

  .project-actions {
    margin-left: 0;
  }

  .related-list li {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

@media (max-width: 720px) {
  :root {
    --pad: 18px;
    --header-h: 60px;
  }

  .header-inner {
    gap: 10px;
  }

  .site-clock {
    font-size: 10px;
  }

  .hero h1 {
    font-size: clamp(2.2rem, 9vw, 2.95rem);
    letter-spacing: -0.025em;
  }

  .hero-lede {
    margin-top: 18px;
    font-size: 15.5px;
    line-height: 1.85;
  }

  .hero-actions {
    margin-top: 24px;
  }

  .hero-meta {
    margin-top: 24px;
    padding-top: 14px;
    font-size: 10px;
  }

  .now-card {
    padding: 18px 0 0;
    border-radius: 0;
  }

  .section {
    padding-block: 44px;
  }

  .section-head h2 {
    font-size: 1.75rem;
  }

  .post-row {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 8px 12px;
    padding: 16px 0;
  }

  .post-row-date {
    padding-top: 3px;
  }

  .post-row-title {
    font-size: 18px;
  }

  .post-row-summary {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    font-size: 13px;
  }

  .post-row-meta {
    grid-column: 2;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding-top: 0;
  }

  .project-card {
    min-height: 0;
    padding: 18px 0;
  }

  .project-title {
    font-size: 21px;
  }

  .page-head {
    padding-block: 22px 30px;
  }

  .page-head h1 {
    font-size: clamp(1.9rem, 8vw, 2.45rem);
  }

  .post {
    padding-block: 18px 48px;
  }

  .post-head h1 {
    font-size: clamp(1.75rem, 7.4vw, 2.15rem);
  }

  .post-summary {
    font-size: 15px;
  }

  .post-meta {
    font-size: 10.5px;
  }

  .post-tags {
    width: 100%;
    margin-left: 0;
  }

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

  .post--writing .prose {
    font-size: 16.5px;
    line-height: 2.02;
  }

  .verse {
    max-width: 100%;
    margin-block: 2.1em;
    font-size: 16px;
    line-height: 2.08;
    letter-spacing: 0.03em;
  }

  .verse + .verse {
    margin-top: 2.3em;
  }

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

  .pager-next {
    align-items: flex-start;
    text-align: left;
  }

  .contact-inline li {
    grid-template-columns: 74px minmax(0, 1fr);
  }

  .project-meta-row {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .not-found {
    min-height: 48vh;
    padding-block: 64px;
  }

  .footer-main {
    gap: 24px;
  }

  .footer-bottom {
    font-size: 10px;
  }

  .to-top {
    margin-left: 0;
  }
}

@media (max-width: 600px) {
  .domain-grid,
  .project-grid {
    grid-template-columns: 1fr;
  }


  .figure-pair {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

@media (max-width: 520px) {
  :root {
    --pad: 16px;
  }

  .site-clock {
    display: none;
  }

  .brand {
    font-size: 17px;
  }

  .header-actions {
    gap: 6px;
  }

  .icon-button {
    width: 34px;
    height: 34px;
  }

  .lang-switch {
    height: 34px;
    padding: 0 9px;
    font-size: 0.76rem;
  }

  .menu-button {
    width: 38px;
    height: 38px;
  }

  .hero h1 {
    font-size: clamp(2.05rem, 9.4vw, 2.55rem);
  }

  .button {
    min-height: 42px;
    padding-inline: 14px;
    font-size: 13px;
  }

  .hero-actions .button {
    flex: 1 1 auto;
  }

  .footer-main {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .footer-brand {
    grid-column: auto;
  }

  .related-list li {
    padding: 10px 0;
  }
}

@media (max-width: 360px) {
  :root {
    --pad: 14px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .post-row {
    grid-template-columns: 56px minmax(0, 1fr);
  }
}

/* ---------- 减少动态效果 ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .hero-copy,
  .now-card {
    animation: none;
  }
}

/* ---------- 打印 ---------- */
@media print {
  .site-header,
  .site-footer,
  .skip-link,
  .breadcrumb,
  .hero-actions,
  .hero-meta,
  .now-card,
  .post-foot,
  .project-aside,
  .project-actions,
  .section-link {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }

  .wrap,
  .hero,
  .section,
  .post,
  .article,
  .project-detail {
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0;
  }

  .section {
    border-top: 1px solid #ccc;
    padding-block: 12pt;
  }

  a {
    color: #000;
    text-decoration: underline;
  }

  .prose {
    font-size: 11pt;
    line-height: 1.6;
  }

  .prose pre {
    white-space: pre-wrap;
    border-color: #999;
  }

  .verse {
    font-size: 11pt;
  }

  .project-body {
    display: block;
  }
}
