/* 拾光志 — 共享样式。页面差异通过 body class 区分：
   home(首页) / post(文章) / archive(归档) / about(关于) / page404 */

:root{
  --bg:#fafafa; --card:#ffffff; --text:#2b2b2b; --muted:#8a8a8a;
  --brand:#3b6ea5; --line:#ececec; --hover:#f4f7fa;
  --code:#f5f5f5; --border:#e0e0e0;
}
*{box-sizing:border-box}
body{
  margin:0;background:var(--bg);color:var(--text);line-height:1.8;font-size:16px;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
  -webkit-font-smoothing:antialiased;
}
a{color:var(--brand);text-decoration:none}
a:hover{text-decoration:underline}

/* 首页行高更紧凑 */
.home body,.home{line-height:1.75}
.home .wrap,.archive .wrap{max-width:720px}

.wrap{max-width:680px;margin:0 auto;padding:0 20px}

/* 站点头部（默认=内页尺寸） */
header.site{padding:36px 0 24px;text-align:center;border-bottom:1px solid var(--line)}
header.site .avatar{
  width:48px;height:48px;border-radius:50%;margin:0 auto 10px;
  background:linear-gradient(135deg,#6a9fd3,#3b6ea5);
  display:flex;align-items:center;justify-content:center;color:#fff;
  font-size:20px;font-weight:600;
}
header.site a.title{font-size:18px;font-weight:600;color:var(--text)}
nav{margin-top:14px;display:flex;justify-content:center;gap:22px;font-size:14px}
nav a{color:var(--muted)}

/* 首页头部：更大留白与头像 */
.home header.site{padding:64px 0 36px}
.home header.site .avatar{
  width:64px;height:64px;margin:0 auto 16px;
  font-size:24px;letter-spacing:1px;
}
.home header.site h1{font-size:24px;margin:0 0 8px;font-weight:600}
.home header.site p.desc{margin:0;color:var(--muted);font-size:14px}
.home nav{margin-top:20px}

footer.site{
  text-align:center;padding:32px 0 48px;color:var(--muted);font-size:13px;
  border-top:1px solid var(--line);
}
footer.site a{color:var(--muted)}
.home footer.site{padding:40px 0 60px}

/* 文章列表卡片（首页独有） */
.home article.post{
  background:var(--card);border:1px solid var(--line);border-radius:10px;
  padding:26px 28px;margin-bottom:22px;transition:background .2s;
}
.home article.post:hover{background:var(--hover)}
.home article.post h2{font-size:19px;margin:0 0 8px;font-weight:600}
.home article.post h2 a{color:var(--text)}
.home article.post .meta{color:var(--muted);font-size:13px;margin-bottom:10px}
.home article.post p.excerpt{margin:0;color:#555;font-size:15px}
.home article.post .more{display:inline-block;margin-top:12px;font-size:14px}
.home .tag{
  display:inline-block;background:#eef3f8;color:#3b6ea5;font-size:12px;
  padding:2px 8px;border-radius:4px;margin-right:6px;
}

/* 文章正文容器（posts/*.html） */
article.post{padding:40px 0}
article.post h1{font-size:26px;line-height:1.4;margin:0 0 12px;font-weight:700}

/* 文章元信息（带分隔线，区别于首页卡片 meta） */
.meta{color:var(--muted);font-size:13px;margin-bottom:32px;padding-bottom:16px;border-bottom:1px solid var(--line)}
.meta .tag{display:inline-block;background:#eef3f8;color:#3b6ea5;font-size:12px;padding:2px 8px;border-radius:4px;margin-left:6px}

/* 正文内容 */
.content p{margin:0 0 18px}
.content h2{font-size:20px;margin:36px 0 14px;font-weight:600}
.content h3{font-size:17px;margin:28px 0 10px;font-weight:600}
.content ul,.content ol{margin:0 0 18px;padding-left:24px}
.content li{margin-bottom:6px}
.content blockquote{
  margin:0 0 18px;padding:10px 18px;border-left:3px solid var(--brand);
  background:#f4f7fa;color:#555;border-radius:0 4px 4px 0;
}
.content pre{
  background:var(--code);border:1px solid var(--border);border-radius:6px;
  padding:14px 16px;overflow-x:auto;margin:0 0 18px;font-size:14px;line-height:1.6;
}
.content code{font-family:"SFMono-Regular",Consolas,"Liberation Mono",Menlo,monospace}
.content :not(pre)>code{background:var(--code);padding:2px 5px;border-radius:3px;font-size:14px}
.about .content h2{font-size:18px;margin:32px 0 12px}

/* 上一篇/下一篇导航 */
.nav-links{
  display:flex;justify-content:space-between;margin:40px 0 0;padding-top:20px;
  border-top:1px solid var(--line);font-size:14px;
}
.nav-links .next{text-align:right}
.nav-links .label{display:block;color:var(--muted);font-size:12px;margin-bottom:2px}

/* 归档页 */
h1.page-title{font-size:22px;margin:0 0 24px;font-weight:600}
.year{font-size:18px;font-weight:600;margin:28px 0 12px;color:var(--brand)}
.year:first-of-type{margin-top:0}
ul.posts{list-style:none;margin:0 0 12px;padding:0}
ul.posts li{display:flex;align-items:baseline;padding:8px 0;border-bottom:1px solid var(--line)}
ul.posts li:hover{background:var(--hover)}
ul.posts .date{color:var(--muted);font-size:13px;width:90px;flex-shrink:0;font-variant-numeric:tabular-nums}
ul.posts .title{flex:1}
ul.posts .title a{color:var(--text)}

/* 关于页 */
.about-header{text-align:center;margin-bottom:32px}
.about-header .avatar-lg{
  width:80px;height:80px;border-radius:50%;margin:0 auto 16px;
  background:linear-gradient(135deg,#6a9fd3,#3b6ea5);
  display:flex;align-items:center;justify-content:center;color:#fff;
  font-size:32px;font-weight:600;
}
.about-header h1{font-size:24px;margin:0 0 6px;font-weight:600}
.about-header p{margin:0;color:var(--muted);font-size:14px}
.links{display:flex;flex-wrap:wrap;gap:16px;margin-top:24px;padding-top:20px;border-top:1px solid var(--line);font-size:14px}

/* 404 页 */
.page404{display:flex;min-height:100vh;align-items:center;justify-content:center}
.box{text-align:center;padding:40px 20px;max-width:480px}
.code{font-size:72px;font-weight:700;color:var(--brand);line-height:1;margin-bottom:16px;font-family:Georgia,serif}
.box h1{font-size:20px;margin:0 0 12px;font-weight:600}
.box p{color:var(--muted);margin:0 0 28px;font-size:15px}
.box .links{display:flex;justify-content:center;gap:20px;font-size:14px;margin:0;padding:0;border:none}
footer.mini{margin-top:40px;color:var(--muted);font-size:12px;text-align:center}

main{padding:40px 0 24px}

/* 响应式 */
@media(max-width:560px){
  .home header.site{padding:44px 0 28px}
  .home article.post{padding:20px}
  article.post{padding:28px 0}
  article.post h1{font-size:22px}
  ul.posts .date{width:70px;font-size:12px}
}
