/* 阿越的小站 · 样式表（纯本地字体，无外部 CDN 依赖） */

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

:root {
  --bg: #fdfaf7;
  --bg-soft: #f7f0ea;
  --card: #ffffff;
  --text: #2f2a28;
  --muted: #7f746e;
  --accent: #c2606a;
  --accent-soft: #f8e5e7;
  --line: #ece0d8;
  --radius: 16px;
  --shadow: 0 12px 32px rgba(122, 92, 82, .09);
  --maxw: 820px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC",
          -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-title: "Noto Serif SC", "Songti SC", "Source Han Serif SC", Georgia, "Times New Roman", serif;
}

html[data-theme="dark"] {
  --bg: #141118;
  --bg-soft: #1d1920;
  --card: #221d25;
  --text: #eae3e2;
  --muted: #a99fa4;
  --accent: #e9929c;
  --accent-soft: #38272e;
  --line: #312a32;
  --shadow: 0 12px 32px rgba(0, 0, 0, .4);
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
.skip { position: absolute; left: -9999px; }

/* ---------- 顶栏 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 9;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.header-inner { display: flex; align-items: center; gap: 12px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px; background: var(--accent);
  color: #fff; display: grid; place-items: center;
  font-family: var(--font-title); font-size: 17px; line-height: 1;
}
.brand-text { font-family: var(--font-title); font-weight: 700; font-size: 15px; letter-spacing: .5px; }
.nav { display: flex; gap: 20px; margin-left: auto; font-size: 15px; }
.nav a { color: var(--muted); }
.nav a:hover { color: var(--accent); text-decoration: none; }
.theme-toggle {
  width: 38px; height: 38px; margin-left: 6px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--card); color: var(--text);
  font-size: 15px; cursor: pointer;
}
.theme-toggle:hover { border-color: var(--accent); }

/* ---------- 首屏 ---------- */
.hero { padding: 64px 22px 44px; }
.hero-kicker { margin: 0 0 14px; color: var(--accent); font-size: 13px; letter-spacing: 2px; }
.hero-title {
  margin: 0 0 20px; font-family: var(--font-title);
  font-size: clamp(30px, 5.6vw, 46px); line-height: 1.35; font-weight: 700; letter-spacing: 1px;
}
.hero-sub { margin: 0; max-width: 46em; color: var(--muted); }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0 0; padding: 0; }
.tags li {
  padding: 4px 14px; border-radius: 999px; font-size: 13px;
  background: var(--accent-soft); color: var(--accent);
}

/* ---------- 区块 ---------- */
.section { padding: 20px 22px 56px; }
.section-title {
  margin: 0 0 24px; font-family: var(--font-title); font-size: 22px; letter-spacing: 1px;
  padding-left: 14px; border-left: 4px solid var(--accent); line-height: 1.4;
}

/* ---------- 文章卡片 ---------- */
.cards { display: grid; gap: 18px; }
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(122, 92, 82, .16); }
.card-link { display: block; padding: 24px 26px; color: inherit; }
.card-link:hover { text-decoration: none; }
.card-meta { margin: 0 0 8px; font-size: 13px; color: var(--muted); }
.card-title {
  margin: 0 0 10px; font-family: var(--font-title);
  font-size: 20px; line-height: 1.5; color: var(--text);
}
.card-link:hover .card-title { color: var(--accent); }
.card-excerpt { margin: 0 0 14px; color: var(--muted); font-size: 15px; }
.card-more { font-size: 14px; color: var(--accent); }

/* ---------- 关于 ---------- */
.about-box {
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px 28px;
}
.about-box p { margin: 0 0 16px; }
.facts { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 10px; font-size: 15px; }
.facts li { display: flex; gap: 14px; border-top: 1px dashed var(--line); padding-top: 10px; }
.facts span { flex: 0 0 84px; color: var(--muted); }

/* ---------- 页脚 ---------- */
.site-footer {
  border-top: 1px solid var(--line); background: var(--bg-soft);
  padding: 34px 0 40px; margin-top: 20px;
  font-size: 14px; color: var(--muted); text-align: center;
}
.footer-nav { margin: 0 0 10px; }
.footer-copy { margin: 0 0 6px; }
.footer-icp { margin: 0; font-size: 13px; color: var(--muted); }
.footer-icp a { color: var(--muted); }
.footer-icp a:hover { color: var(--accent); }
.footer-icp .dot { margin: 0 8px; opacity: .6; }

/* ---------- 文章页 ---------- */
.post { padding: 48px 22px 56px; }
.post-head { border-bottom: 1px solid var(--line); padding-bottom: 22px; margin-bottom: 30px; }
.post-title {
  margin: 0 0 12px; font-family: var(--font-title);
  font-size: clamp(26px, 4.6vw, 34px); line-height: 1.4; letter-spacing: .5px;
}
.post-meta { margin: 0; color: var(--muted); font-size: 14px; }
.post-body { font-size: 16.5px; }
.post-body p { margin: 0 0 20px; }
.post-body h2 {
  font-family: var(--font-title); font-size: 21px;
  margin: 38px 0 16px; padding-left: 12px; border-left: 4px solid var(--accent); line-height: 1.5;
}
.post-body blockquote {
  margin: 26px 0; padding: 14px 20px; border-left: 3px solid var(--accent);
  background: var(--accent-soft); border-radius: 0 12px 12px 0; color: var(--text);
}
.post-body ul, .post-body ol { padding-left: 22px; margin: 0 0 20px; }
.post-body li { margin-bottom: 8px; }
.post-foot { margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 15px; }
.back-link { display: inline-block; }

/* ---------- 响应式 ---------- */
@media (max-width: 620px) {
  .wrap { padding: 0 16px; }
  .header-inner { min-height: 58px; gap: 8px; }
  .brand { gap: 8px; }
  .brand-mark { width: 26px; height: 26px; border-radius: 8px; font-size: 15px; }
  .brand-text { font-size: 13px; letter-spacing: 0; }
  .nav { gap: 12px; font-size: 13px; }
  .theme-toggle { width: 34px; height: 34px; margin-left: 2px; }
  .hero { padding: 44px 16px 30px; }
  .section { padding: 20px 16px 46px; }
  .card-link { padding: 20px; }
  .about-box { padding: 20px; }
  .facts li { flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
  .facts span { flex: none; }
  .post { padding: 40px 16px 46px; }
}

@media print {
  .site-header, .site-footer, .theme-toggle { display: none; }
}
