/* ===== 鹈鹕小站 · 样式 ===== */
:root {
  --bg: #fbfcfe;
  --bg-soft: #f2f6fa;
  --ink: #1d2a35;
  --ink-soft: #5a6b7a;
  --line: #e2eaf1;
  --accent: #e76f51;
  --accent-soft: #fdeee9;
  --teal: #2a9d8f;
  --card: #ffffff;
  --shadow: 0 1px 2px rgba(29, 42, 53, .04), 0 8px 24px rgba(29, 42, 53, .06);
  --radius: 16px;
  --wrap: 780px;
  --font: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB",
          -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", monospace;
}

html[data-theme="dark"] {
  --bg: #131a21;
  --bg-soft: #1a232c;
  --ink: #e8eef4;
  --ink-soft: #9aabb9;
  --line: #27333d;
  --accent: #f08a6d;
  --accent-soft: #2b211d;
  --teal: #4fc3b3;
  --card: #18212a;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  transition: background .25s ease, color .25s ease;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

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

/* ---- 顶栏 ---- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  max-width: 1080px;
  display: flex; align-items: center; gap: 18px;
  height: 62px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); font-size: 17px; }
.brand:hover { text-decoration: none; color: var(--accent); }
.brand .mark { width: 30px; height: 30px; flex: none; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.nav a {
  color: var(--ink-soft); padding: 6px 12px; border-radius: 999px;
  font-size: 15px; transition: background .15s ease, color .15s ease;
}
.nav a:hover { background: var(--bg-soft); color: var(--ink); text-decoration: none; }
.nav a.active { color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.theme-btn {
  border: 1px solid var(--line); background: var(--card); color: var(--ink-soft);
  width: 34px; height: 34px; border-radius: 999px; cursor: pointer;
  font-size: 15px; line-height: 1; display: grid; place-items: center;
}
.theme-btn:hover { color: var(--accent); border-color: var(--accent); }

/* ---- 主视觉 ---- */
.hero { padding: 42px 0 8px; text-align: center; }
.hero-art {
  width: 100%; max-width: 720px; height: auto; margin: 0 auto;
  display: block; border-radius: 22px;
}
.hero h1 {
  font-size: clamp(30px, 5vw, 44px); line-height: 1.25;
  margin: 26px 0 10px; letter-spacing: -.02em;
}
.hero p.lede { color: var(--ink-soft); font-size: 18px; margin: 0 auto; max-width: 30em; }
.hero-actions { margin: 26px 0 8px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 10px 20px; border-radius: 999px;
  font-size: 15px; font-weight: 600; border: 1px solid transparent;
  transition: transform .12s ease, box-shadow .18s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow); }
.btn-ghost { background: var(--card); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---- 区块 ---- */
section { padding: 42px 0; }
.section-head {
  display: flex; align-items: baseline; gap: 12px;
  margin-bottom: 20px; border-bottom: 1px solid var(--line); padding-bottom: 10px;
}
.section-head h2 { font-size: 20px; margin: 0; letter-spacing: -.01em; }
.section-head .more { margin-left: auto; font-size: 14px; color: var(--ink-soft); }

/* ---- 文章列表 ---- */
.post-list { list-style: none; margin: 0; padding: 0; }
.post-list li { border-bottom: 1px dashed var(--line); }
.post-list li:last-child { border-bottom: 0; }
.post-item { display: block; padding: 18px 4px; }
.post-item:hover { text-decoration: none; }
.post-item:hover .post-title { color: var(--accent); }
.post-title { font-size: 19px; font-weight: 600; color: var(--ink); transition: color .15s ease; }
.post-meta { font-size: 13.5px; color: var(--ink-soft); margin-top: 4px; display: flex; gap: 10px; flex-wrap: wrap; }
.post-excerpt { color: var(--ink-soft); font-size: 15.5px; margin-top: 6px; }

.tag {
  display: inline-block; font-size: 12px; padding: 1px 9px; border-radius: 999px;
  background: var(--bg-soft); color: var(--ink-soft); border: 1px solid var(--line);
}

/* ---- 卡片 ---- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px; box-shadow: var(--shadow);
}

/* ---- 正文 ---- */
.article { padding: 34px 0 10px; }
.article h1 { font-size: clamp(26px, 4vw, 34px); line-height: 1.3; margin: 6px 0 12px; letter-spacing: -.02em; }
.article h2 { font-size: 21px; margin: 36px 0 10px; padding-top: 6px; }
.article h3 { font-size: 18px; margin: 26px 0 8px; }
.article p, .article li { color: var(--ink); }
.article blockquote {
  margin: 20px 0; padding: 4px 18px; border-left: 3px solid var(--accent);
  background: var(--accent-soft); border-radius: 0 10px 10px 0; color: var(--ink-soft);
}
.article code {
  font-family: var(--mono); font-size: .88em; background: var(--bg-soft);
  padding: 2px 6px; border-radius: 6px; border: 1px solid var(--line);
}
.article pre {
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px 18px; overflow-x: auto; font-size: 14px; line-height: 1.6;
}
.article pre code { background: none; border: 0; padding: 0; font-size: 14px; }
.article img { max-width: 100%; height: auto; border-radius: 12px; }
.article hr { border: 0; border-top: 1px solid var(--line); margin: 34px 0; }
.article table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 18px 0; }
.article th, .article td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; }
.article th { background: var(--bg-soft); }

.back-link { font-size: 14px; color: var(--ink-soft); }

/* ---- 关于页 ---- */
.about-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
.kv { display: grid; grid-template-columns: 108px 1fr; gap: 6px 14px; font-size: 15.5px; }
.kv dt { color: var(--ink-soft); }
.kv dd { margin: 0; }

/* ---- 页脚 ---- */
.site-footer {
  border-top: 1px solid var(--line); margin-top: 30px; padding: 26px 0 40px;
  color: var(--ink-soft); font-size: 14px; text-align: center;
}
.site-footer .mini { width: 92px; height: auto; opacity: .9; margin-bottom: 8px; }

/* ---- 移动端 ---- */
@media (max-width: 640px) {
  body { font-size: 16px; }
  .site-header .wrap { height: 56px; gap: 10px; }
  .brand span.name { display: none; }
  .nav a { padding: 6px 9px; font-size: 14px; }
  .hero { padding: 22px 0 0; }
  section { padding: 32px 0; }
  .card { padding: 18px 16px; }
  .kv { grid-template-columns: 92px 1fr; }
}
