/* ==========================================================================
   tsoKao 个人网站 - 全局样式
   纯 CSS，无外部依赖。三套主题通过 <html data-theme="..."> 切换：
     night 极夜（默认） | day 晴昼 | eye 护眼绿
   ========================================================================== */

/* ---------- 基础重置 ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --radius: 14px;
  --radius-sm: 10px;
  --max-width: 1100px;
  --nav-height: 64px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Helvetica Neue",
    Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "Cascadia Code", "JetBrains Mono",
    Consolas, "Courier New", monospace;
  --transition: 0.25s ease;

  /* 主题色点（主题切换菜单里的预览圆点，各主题下固定不变） */
  --dot-night: #2a3f66;
  --dot-day: #f2f5f9;
  --dot-eye: #8fbe8b;
}

/* ================= 主题一：极夜（默认） ================= */
:root,
:root[data-theme="night"] {
  --bg: #0b0f17;
  --bg-soft: #101726;
  --bg-card: #131c2c;
  --bg-hover: #1a2538;
  --text: #e8eef5;
  --text-secondary: #9aa8ba;
  --text-muted: #66748a;
  --accent: #5b9dff;
  --accent-strong: #7db4ff;
  --accent-soft: rgba(91, 157, 255, 0.14);
  --accent-contrast: #0b0f17;
  --border: rgba(148, 163, 184, 0.16);
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.25);
  --nav-bg: rgba(11, 15, 23, 0.82);
  --tag-bg: rgba(91, 157, 255, 0.13);
  --tag-text: #9cc3ff;
  --grad-1: #5b9dff;
  --grad-2: #8b5cf6;
  --tile-1: #16263f;
  --tile-2: #2c1f4d;
  --selection: rgba(91, 157, 255, 0.3);
  --code-bg: rgba(255, 255, 255, 0.05);
  color-scheme: dark;
}

/* ================= 主题二：晴昼 ================= */
:root[data-theme="day"] {
  --bg: #f5f7fa;
  --bg-soft: #eef1f6;
  --bg-card: #ffffff;
  --bg-hover: #eef3fb;
  --text: #1d2432;
  --text-secondary: #58636f;
  --text-muted: #8b96a5;
  --accent: #2f6fed;
  --accent-strong: #2059c9;
  --accent-soft: rgba(47, 111, 237, 0.1);
  --accent-contrast: #ffffff;
  --border: rgba(29, 36, 50, 0.12);
  --shadow: 0 12px 32px rgba(29, 36, 50, 0.08);
  --shadow-sm: 0 4px 14px rgba(29, 36, 50, 0.06);
  --nav-bg: rgba(255, 255, 255, 0.82);
  --tag-bg: rgba(47, 111, 237, 0.1);
  --tag-text: #2f6fed;
  --grad-1: #2f6fed;
  --grad-2: #7c5cff;
  --tile-1: #dbe7fb;
  --tile-2: #e6e0fb;
  --selection: rgba(47, 111, 237, 0.2);
  --code-bg: rgba(29, 36, 50, 0.04);
  color-scheme: light;
}

/* ============ 主题三：护眼绿（重点：低对比、暖绿色系、无纯白、降蓝光） ============ */
:root[data-theme="eye"] {
  --bg: #cfe8cf;          /* 柔和的低亮度绿色 */
  --bg-soft: #c3e0c3;
  --bg-card: #e7f1e2;     /* 卡片用暖白绿，避免纯白 */
  --bg-hover: #d9ebd4;
  --text: #33473a;        /* 柔和深灰绿文字，不用纯黑 */
  --text-secondary: #5b6f60;
  --text-muted: #7e9083;
  --accent: #5e8f68;      /* 平静的绿色点缀 */
  --accent-strong: #4a7a55;
  --accent-soft: rgba(94, 143, 104, 0.16);
  --accent-contrast: #ffffff;
  --border: rgba(51, 71, 58, 0.18);        /* 低对比边框 */
  --shadow: 0 12px 30px rgba(51, 71, 58, 0.1);
  --shadow-sm: 0 4px 12px rgba(51, 71, 58, 0.08);
  --nav-bg: rgba(207, 232, 207, 0.86);
  --tag-bg: rgba(94, 143, 104, 0.16);
  --tag-text: #4a7a55;
  --grad-1: #5e8f68;
  --grad-2: #8fb08f;
  --tile-1: #cfe4c9;
  --tile-2: #d8ead2;
  --selection: rgba(94, 143, 104, 0.25);
  --code-bg: rgba(51, 71, 58, 0.05);
  color-scheme: light;
}

/* ---------- 基础元素 ---------- */
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  transition: background 0.35s ease, color 0.35s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

::selection { background: var(--selection); }

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

img { max-width: 100%; display: block; }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

ul, ol { list-style: none; }

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

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

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

/* ---------- 顶部导航 ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  background: var(--nav-bg);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: background 0.35s ease, border-color 0.35s ease;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
  gap: 16px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.3px;
  color: var(--text);
}
.logo:hover { color: var(--text); }

.logo-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--grad-1), var(--grad-2));
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 0.82rem;
  box-shadow: 0 4px 12px var(--accent-soft);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  display: block;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
}
.nav-links a:hover { color: var(--text); background: var(--bg-hover); }
.nav-links a.active { color: var(--accent); background: var(--accent-soft); }

.nav-actions { display: flex; align-items: center; gap: 10px; }

/* ---------- 主题切换 ---------- */
.theme-switch { position: relative; }

.theme-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--bg-hover);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  transition: color 0.2s ease, border-color 0.2s ease, background 0.35s ease;
}
.theme-btn:hover,
.theme-btn.active { color: var(--accent); border-color: var(--accent); }

.theme-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 172px;
  padding: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.35s ease;
  z-index: 120;
}
.theme-menu.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.theme-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 9px;
  font-size: 0.92rem;
  color: var(--text-secondary);
  transition: background 0.2s ease, color 0.2s ease;
}
.theme-option:hover { background: var(--bg-hover); color: var(--text); }
.theme-option.active { color: var(--accent); background: var(--accent-soft); }

.dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.dot-night { background: var(--dot-night); }
.dot-day { background: var(--dot-day); }
.dot-eye { background: var(--dot-eye); }

/* ---------- 移动端汉堡菜单 ---------- */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-hover);
}
.hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 76px 0 64px;
}

.hero-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.32;
}
.blob-1 {
  width: 460px; height: 460px;
  background: var(--grad-1);
  top: -140px; left: -80px;
  animation: float1 13s ease-in-out infinite;
}
.blob-2 {
  width: 420px; height: 420px;
  background: var(--grad-2);
  bottom: -170px; right: -70px;
  opacity: 0.26;
  animation: float2 16s ease-in-out infinite;
}
@keyframes float1 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(34px, 22px); }
}
@keyframes float2 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-26px, -18px); }
}

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

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--tag-bg);
  color: var(--tag-text);
  font-size: 0.88rem;
  font-weight: 500;
  margin-bottom: 22px;
}

.hero h1 {
  font-size: clamp(2.3rem, 6.5vw, 3.7rem);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.hero h1 .grad {
  background: linear-gradient(90deg, var(--grad-1), var(--grad-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  margin-top: 18px;
  color: var(--text-secondary);
  font-size: 1.12rem;
  max-width: 660px;
}

.hero-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }

.tag {
  padding: 6px 15px;
  border-radius: 999px;
  background: var(--tag-bg);
  color: var(--tag-text);
  font-size: 0.88rem;
  font-weight: 500;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.98rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease,
    background 0.2s ease, border-color 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: linear-gradient(135deg, var(--grad-1), var(--grad-2));
  color: #fff;
  box-shadow: 0 8px 20px var(--accent-soft);
}
.btn-primary:hover { color: #fff; box-shadow: 0 12px 26px var(--accent-soft); }

.btn-ghost {
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--bg-card);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- 通用区块 ---------- */
.section { padding: 56px 0; }
.section-soft {
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

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

.section-title { font-size: 1.55rem; font-weight: 700; line-height: 1.3; }
.section-title .en {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.section-link { font-size: 0.92rem; font-weight: 600; white-space: nowrap; }

/* ---------- 网格 ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }

/* ---------- 博客卡片（首页预览用） ---------- */
.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease,
    border-color 0.25s ease, background 0.35s ease;
}
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.category-tag {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--tag-bg);
  color: var(--tag-text);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.post-card h3, .post-row h3 { font-size: 1.16rem; line-height: 1.5; }
.post-card h3 a, .post-row h3 a { color: var(--text); }
.post-card h3 a:hover, .post-row h3 a:hover { color: var(--accent); }

.post-card p, .post-row p { color: var(--text-secondary); font-size: 0.94rem; }

.read-more {
  margin-top: auto;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.read-more .arrow { transition: transform 0.2s ease; }
.post-card:hover .read-more .arrow,
.post-row:hover .read-more .arrow { transform: translateX(4px); }

/* ---------- 作品卡片 ---------- */
.work-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease,
    border-color 0.25s ease, background 0.35s ease;
}
.work-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
}

.work-thumb {
  height: 150px;
  display: grid;
  place-items: center;
  font-size: 3rem;
  background: linear-gradient(135deg, var(--tile-1), var(--tile-2));
  border-bottom: 1px solid var(--border);
}

.work-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }

.work-type {
  align-self: flex-start;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--tag-bg);
  color: var(--tag-text);
  font-size: 0.78rem;
  font-weight: 600;
}

.work-card h3 { font-size: 1.15rem; }
.work-card p { color: var(--text-secondary); font-size: 0.93rem; }

.work-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 8px;
}
.mini-tag {
  font-size: 0.76rem;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--bg-hover);
  color: var(--text-muted);
}

/* ---------- 关于区块 ---------- */
.about-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 20px; }

.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: background 0.35s ease;
}
.about-card h3 { font-size: 1.12rem; margin-bottom: 12px; }
.about-card p { color: var(--text-secondary); font-size: 0.95rem; margin-bottom: 10px; }

.about-list { display: grid; gap: 12px; margin-top: 6px; }
.about-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--text-secondary);
  font-size: 0.95rem;
}
.about-list .li-icon { color: var(--accent); flex-shrink: 0; }

/* ---------- 内页页头 ---------- */
.page-hero { padding: 62px 0 16px; }
.page-hero h1 { font-size: clamp(1.9rem, 5vw, 2.7rem); font-weight: 800; letter-spacing: -0.3px; }
.page-hero p { color: var(--text-secondary); margin-top: 10px; max-width: 660px; }

/* ---------- 博客筛选 ---------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0 14px; }

.filter-btn {
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.2s ease, color 0.2s ease,
    border-color 0.2s ease, transform 0.2s ease;
}
.filter-btn:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.filter-btn.active {
  background: var(--accent);
  color: var(--accent-contrast);
  border-color: var(--accent);
}

.filter-count { color: var(--text-muted); font-size: 0.88rem; margin-bottom: 22px; }

.post-list { display: grid; gap: 18px; }

.post-row {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 26px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease,
    border-color 0.25s ease, background 0.35s ease;
}
.post-row:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
}
.post-row h3 { font-size: 1.24rem; }

.post-item.hidden { display: none; }

/* ---------- 故事家页 ---------- */
.story-hero {
  position: relative;
  overflow: hidden;
  min-height: 72vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 90px 24px 70px;
}

.story-hero::before,
.story-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  z-index: 0;
}
.story-hero::before {
  width: 420px; height: 420px;
  background: var(--grad-1);
  top: -140px; left: -70px;
  opacity: 0.28;
}
.story-hero::after {
  width: 400px; height: 400px;
  background: var(--grad-2);
  bottom: -160px; right: -70px;
  opacity: 0.24;
}

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

.badge-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--tag-bg);
  color: var(--tag-text);
  font-weight: 600;
  font-size: 0.85rem;
}
.badge-live .pulse {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.75); }
}

.story-title {
  font-size: clamp(2rem, 6vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-top: 20px;
}
.story-title .grad {
  background: linear-gradient(90deg, var(--grad-1), var(--grad-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.story-desc {
  color: var(--text-secondary);
  max-width: 560px;
  margin: 16px auto 0;
}

.story-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 44px auto 0;
  max-width: 780px;
  width: 100%;
}

.feature {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 18px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.35s ease;
}
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.feature .f-icon { font-size: 1.8rem; }
.feature h4 { margin-top: 10px; font-size: 1.02rem; }
.feature p { color: var(--text-muted); font-size: 0.88rem; margin-top: 6px; }

.subscribe-box {
  margin-top: 44px;
  max-width: 480px;
  width: 100%;
}
.subscribe-box .box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  transition: background 0.35s ease;
}
.subscribe-box h3 { font-size: 1.1rem; }
.subscribe-box .sub-tip { color: var(--text-muted); font-size: 0.88rem; margin-top: 6px; }

.subscribe-form { display: flex; gap: 10px; margin-top: 16px; }
.subscribe-form input[type="email"] {
  flex: 1;
  min-width: 0;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
}
.subscribe-form input[type="email"]::placeholder { color: var(--text-muted); }
.subscribe-form input[type="email"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-msg {
  margin-top: 12px;
  font-size: 0.9rem;
  color: var(--accent-strong);
  display: none;
}
.form-msg.show { display: block; animation: fadeIn 0.3s ease; }

.form-note { margin-top: 12px; color: var(--text-muted); font-size: 0.82rem; }

.story-note {
  margin-top: 56px;
  padding: 10px 18px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.85rem;
}
.story-note strong { color: var(--text-secondary); font-weight: 600; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

/* ---------- 页脚 ---------- */
.footer {
  border-top: 1px solid var(--border);
  margin-top: 48px;
  padding: 40px 0 30px;
  background: var(--bg-soft);
  transition: background 0.35s ease;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-brand { font-weight: 800; font-size: 1.05rem; }
.footer-brand .dot-accent { color: var(--accent); }

.footer-copy { color: var(--text-muted); font-size: 0.86rem; margin-top: 6px; }

.footer-links { display: flex; gap: 18px; }
.footer-links a { color: var(--text-secondary); font-size: 0.92rem; }
.footer-links a:hover { color: var(--accent); }

.footer-placeholder {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px dashed var(--border);
  color: var(--text-muted);
  font-size: 0.82rem;
}

/* ---------- 滚动显现动画 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .story-features { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .container { padding: 0 18px; }

  .hamburger { display: flex; }

  .nav-links {
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: var(--nav-bg);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    padding: 10px 18px 16px;
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
  }
  .nav-links.open { opacity: 1; transform: none; pointer-events: auto; }
  .nav-links a { padding: 12px 14px; border-radius: var(--radius-sm); }

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

  .hero { padding: 52px 0 48px; }
  .section { padding: 42px 0; }
  .subscribe-form { flex-direction: column; }
  .subscribe-form .btn { justify-content: center; }

  .section-head { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* ---------- 无障碍：减少动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  html { scroll-behavior: auto; }
}

/* ---------- 内容加载失败 / 空态提示条（content.js 动态插入） ---------- */
.load-error {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.6;
}
.grid-3 .load-error,
.post-list .load-error {
  grid-column: 1 / -1;
}

/* ---------- 文章详情页（post.html） ---------- */
.post-article {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 34px 38px;
  box-shadow: var(--shadow-sm);
  max-width: 820px;
  margin: 0 auto;
}
.post-article .post-meta { margin-bottom: 18px; }
.post-article h1 {
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.3px;
  margin-bottom: 16px;
}
.post-summary {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.8;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 22px;
}
.post-cover {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--border);
  margin: 0 0 24px;
}
.post-content {
  color: var(--text);
  font-size: 1.04rem;
  line-height: 1.9;
}
.post-content p { margin-bottom: 1.15em; }
.post-empty {
  max-width: 620px;
  margin: 0 auto;
  padding: 70px 24px;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.post-empty h2 { font-size: 1.5rem; font-weight: 700; margin-bottom: 12px; }
.post-empty p { color: var(--text-secondary); margin-bottom: 26px; }

@media (max-width: 640px) {
  .post-article { padding: 24px 20px; }
  .post-empty { padding: 50px 18px; }
}