/* ===== 全局样式 · v0.2 视觉升级 ===== */
:root {
  --bg: #f7f6f2;
  --surface: #ffffff;
  --fg: #1c2026;
  --muted: #6f7680;
  --border: #e8e6df;
  --accent: #3b6ef5;
  --radius: 16px;
  --shadow: 0 1px 3px rgba(28,32,38,.05), 0 8px 24px rgba(28,32,38,.06);

  /* 分区主题色 */
  --c-work: #3b6ef5;  --c-work-soft: #e8eefd;
  --c-life: #f59e0b;  --c-life-soft: #fdf1dc;
  --c-study: #8b5cf6; --c-study-soft: #f1eafd;
  --c-sport: #10b981; --c-sport-soft: #e0f7ef;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161a; --surface: #1d2026; --fg: #eceef1; --muted: #9aa2ad;
    --border: #2b2f36; --shadow: 0 1px 3px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
    --c-work-soft: #1b2740; --c-life-soft: #3a2c12; --c-study-soft: #2a1f42; --c-sport-soft: #10312a;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--fg);
  line-height: 1.75; -webkit-font-smoothing: antialiased;
}

/* ===== 头部导航：毛玻璃吸顶 ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem;
  padding: .9rem clamp(1rem, 4vw, 2.5rem);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .logo {
  font-weight: 800; font-size: 1.05rem; text-decoration: none; color: var(--fg);
  background: linear-gradient(120deg, var(--c-work), var(--c-study));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.site-header nav a {
  margin-left: clamp(.6rem, 2vw, 1.2rem); text-decoration: none; color: var(--muted);
  font-size: .95rem; padding: .25rem .1rem; border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.site-header nav a:hover { color: var(--fg); border-color: var(--accent); }

.container { max-width: 880px; margin: 0 auto; padding: clamp(1.5rem, 5vw, 3rem) 1.25rem 3rem; }

/* ===== 首页 Hero ===== */
.hero { padding: clamp(2.5rem, 8vw, 5rem) 0 2rem; text-align: center; }
.hero h1 {
  font-size: clamp(2rem, 6vw, 3.4rem); line-height: 1.25; margin: 0 0 1rem; font-weight: 800;
  letter-spacing: -.02em;
}
.hero h1 .grad {
  background: linear-gradient(120deg, var(--c-work) 10%, var(--c-study) 50%, var(--c-sport) 90%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero p { color: var(--muted); font-size: clamp(1rem, 2.5vw, 1.2rem); margin: 0 auto; max-width: 34em; }
.hero .divider { width: 56px; height: 4px; border-radius: 2px; margin: 1.75rem auto 0;
  background: linear-gradient(90deg, var(--c-work), var(--c-study)); }

/* ===== 分区卡片 ===== */
.sections-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.1rem; margin-top: 2.25rem;
}
.card {
  --card-accent: var(--c-work); --card-soft: var(--c-work-soft);
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.4rem 1.3rem 1.2rem; text-decoration: none; color: var(--fg);
  transition: transform .18s ease, box-shadow .18s ease;
  box-shadow: var(--shadow);
}
.card:hover { transform: translateY(-4px); box-shadow: 0 4px 8px rgba(28,32,38,.06), 0 16px 32px rgba(28,32,38,.1); }
.card::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--card-accent);
}
.card .icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.6rem; height: 2.6rem; border-radius: 12px; font-size: 1.3rem;
  background: var(--card-soft); margin-bottom: .7rem;
}
.card h2 { margin: 0 0 .3rem; font-size: 1.15rem; color: var(--card-accent); }
.card p { margin: 0; color: var(--muted); font-size: .9rem; }
.card .arrow { position: absolute; right: 1.1rem; bottom: 1rem; color: var(--card-accent); opacity: 0; transition: opacity .18s, transform .18s; transform: translateX(-4px); }
.card:hover .arrow { opacity: 1; transform: none; }

/* ===== 首页最新动态 ===== */
.recent { margin-top: 3.25rem; }
.recent h2 { font-size: 1.3rem; margin: 0 0 1rem; display: flex; align-items: center; gap: .5rem; }
.recent h2::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.feed li {
  display: flex; align-items: baseline; gap: .8rem; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: .8rem 1.1rem; transition: border-color .15s, transform .15s;
}
.feed li:hover { border-color: var(--accent); transform: translateX(3px); }
.feed a { color: var(--fg); text-decoration: none; font-weight: 600; }
.feed a:hover { color: var(--accent); }
.feed .tag {
  font-size: .72rem; font-weight: 700; padding: .1rem .55rem; border-radius: 99px; white-space: nowrap;
}
.feed time { margin-left: auto; color: var(--muted); font-size: .82rem; white-space: nowrap; }

/* ===== 列表页 / 文章页 ===== */
.page-title { font-size: clamp(1.6rem, 4vw, 2.2rem); margin: 0 0 .4rem; font-weight: 800; letter-spacing: -.01em; }
.page-sub { color: var(--muted); margin: 0 0 2rem; }
.post-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; }
.post-list li {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 1rem 1.25rem; transition: border-color .15s, transform .15s;
}
.post-list li:hover { border-color: var(--accent); transform: translateY(-2px); }
.post-list a { text-decoration: none; color: var(--fg); font-weight: 600; font-size: 1.05rem; }
.post-list a:hover { color: var(--accent); }
.post-list .meta { color: var(--muted); font-size: .85rem; margin-top: .2rem; }
.post-list time { float: right; color: var(--muted); font-size: .85rem; }
.empty { color: var(--muted); background: var(--surface); border: 1px dashed var(--border); border-radius: 12px; padding: 2.5rem 1rem; text-align: center; }

article { max-width: 46em; }
article h1 { font-size: clamp(1.7rem, 4.5vw, 2.4rem); font-weight: 800; letter-spacing: -.01em; margin: 0 0 .5rem; line-height: 1.3; }
article .meta { color: var(--muted); font-size: .9rem; margin-bottom: 2rem; display: flex; gap: 1rem; flex-wrap: wrap; }
article h2 { border-left: 4px solid var(--accent); padding-left: .6rem; }
article img { max-width: 100%; border-radius: 12px; }
article blockquote {
  margin: 1.2rem 0; padding: .6rem 1.1rem; border-left: 4px solid var(--c-life);
  background: var(--c-life-soft); border-radius: 0 10px 10px 0;
}
article code { background: var(--c-work-soft); padding: .1rem .4rem; border-radius: 6px; font-size: .9em; }
article pre { background: #1c2026; color: #eceef1; padding: 1rem 1.2rem; border-radius: 12px; overflow-x: auto; }
article pre code { background: none; color: inherit; padding: 0; }

.site-footer {
  text-align: center; color: var(--muted); font-size: .875rem;
  padding: 2.25rem 1rem 2.5rem; border-top: 1px solid var(--border); margin-top: 3rem;
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }
