/* ===== minus1 · 个人博客 ===== */
:root {
  --bg: #fbfaf8;
  --bg-soft: #f4f2ee;
  --card: #ffffff;
  --text: #1c1b1a;
  --text-soft: #6b6660;
  --text-faint: #9b958d;
  --accent: #4f6ef7;
  --accent-soft: #eef1fe;
  --border: #e8e4dd;
  --shadow: 0 1px 2px rgba(28, 27, 26, .04), 0 8px 24px rgba(28, 27, 26, .06);
  --shadow-hover: 0 2px 4px rgba(28, 27, 26, .05), 0 16px 40px rgba(28, 27, 26, .10);
  --radius: 14px;
  --mono: "SF Mono", "JetBrains Mono", "Fira Code", "Cascadia Code", Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

[data-theme="dark"] {
  --bg: #141417;
  --bg-soft: #1d1d22;
  --card: #1e1e24;
  --text: #ececee;
  --text-soft: #a8a6ad;
  --text-faint: #6f6d76;
  --accent: #7d95ff;
  --accent-soft: #262b3d;
  --border: #2b2b32;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
  --shadow-hover: 0 2px 4px rgba(0, 0, 0, .3), 0 16px 40px rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background .3s ease, color .3s ease;
}

a { color: inherit; text-decoration: none; }

.container { max-width: 760px; margin: 0 auto; padding: 0 24px; }
.container-wide { max-width: 1000px; margin: 0 auto; padding: 0 24px; }

/* ===== 导航 ===== */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1000px; margin: 0 auto; padding: 0 24px;
  height: 60px; display: flex; align-items: center; justify-content: space-between;
}
.logo { font-family: var(--mono); font-weight: 700; font-size: 19px; letter-spacing: -.5px; }
.logo .mark { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a { font-size: 14.5px; color: var(--text-soft); transition: color .2s; }
.nav-links a:hover { color: var(--text); }
#theme-toggle {
  border: 1px solid var(--border); background: var(--card); color: var(--text);
  width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-size: 15px;
  display: grid; place-items: center; transition: transform .2s, border-color .2s;
}
#theme-toggle:hover { transform: rotate(20deg); border-color: var(--accent); }

/* ===== 首页 Hero ===== */
.hero { padding: 96px 0 56px; }
.hero .eyebrow {
  font-family: var(--mono); font-size: 13px; color: var(--accent);
  letter-spacing: 1px; text-transform: uppercase; margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(38px, 7vw, 60px); line-height: 1.1; font-weight: 800;
  letter-spacing: -1.5px; margin-bottom: 20px;
}
.hero h1 .dot { color: var(--accent); }
.hero .tagline { font-size: 19px; color: var(--text-soft); max-width: 520px; }
.hero .socials { margin-top: 28px; display: flex; gap: 14px; }
.hero .socials a {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 14px; color: var(--text-soft); padding: 8px 15px;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--card); transition: all .2s;
}
.hero .socials a:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-2px); }

/* ===== 文章列表 ===== */
.section { padding: 40px 0; }
.section-title {
  font-family: var(--mono); font-size: 13px; color: var(--text-faint);
  text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 26px;
}
.post-card {
  display: block; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px 28px; margin-bottom: 16px;
  box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s, border-color .2s;
}
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: var(--accent); }
.post-card .meta { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.post-card .date { font-family: var(--mono); font-size: 13px; color: var(--text-faint); }
.post-card .tag {
  font-size: 12px; color: var(--accent); background: var(--accent-soft);
  padding: 2px 10px; border-radius: 999px;
}
.post-card h3 { font-size: 20px; font-weight: 700; letter-spacing: -.3px; margin-bottom: 8px; }
.post-card p { font-size: 15px; color: var(--text-soft); }
.post-card .more { font-size: 14px; color: var(--accent); font-weight: 500; margin-top: 12px; display: inline-block; }

/* ===== 关于 ===== */
.about { background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.about-inner { padding: 64px 0; }
.about p { font-size: 16px; color: var(--text-soft); max-width: 620px; }
.about p + p { margin-top: 14px; }

/* ===== 页脚 ===== */
.footer { padding: 40px 0 56px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer .copy { font-size: 13.5px; color: var(--text-faint); }
.footer .mono { font-family: var(--mono); font-size: 13px; color: var(--text-faint); }

/* ===== 文章详情页 ===== */
.article { padding: 72px 0 24px; }
.article .back { font-size: 14px; color: var(--text-soft); margin-bottom: 32px; display: inline-block; }
.article .back:hover { color: var(--accent); }
.article h1 { font-size: clamp(30px, 5.5vw, 44px); font-weight: 800; letter-spacing: -1px; line-height: 1.2; margin-bottom: 16px; }
.article .meta { display: flex; align-items: center; gap: 12px; margin-bottom: 40px; }
.article .meta .date, .article .meta .read { font-family: var(--mono); font-size: 13px; color: var(--text-faint); }
.article .meta .tag { font-size: 12px; color: var(--accent); background: var(--accent-soft); padding: 2px 10px; border-radius: 999px; }
.article-body { max-width: 680px; margin: 0 auto; }
.article-body p { font-size: 17px; line-height: 1.9; color: var(--text); margin-bottom: 22px; }
.article-body h2 { font-size: 24px; font-weight: 700; letter-spacing: -.4px; margin: 40px 0 16px; }
.article-body ul, .article-body ol { margin: 0 0 22px 24px; font-size: 16.5px; line-height: 1.9; }
.article-body code {
  font-family: var(--mono); font-size: .88em; background: var(--accent-soft);
  color: var(--accent); padding: 2px 7px; border-radius: 6px;
}
.article-body pre {
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: 12px;
  padding: 18px 20px; overflow-x: auto; margin: 0 0 22px;
}
.article-body pre code { background: none; color: var(--text); padding: 0; font-size: 14px; line-height: 1.6; }
.article-body blockquote {
  border-left: 3px solid var(--accent); padding: 4px 0 4px 20px; margin: 0 0 22px;
  color: var(--text-soft); font-size: 16.5px;
}

/* ===== 响应式 ===== */
@media (max-width: 640px) {
  .nav-links a:not(#theme-toggle) { display: none; }
  .hero { padding: 64px 0 40px; }
  .post-card { padding: 20px 20px; }
}
