/*
Theme Name: 小沐札记
Theme URI: https://xy.wmxiaomu.cn
Author: 小沐
Description: 一个轻盈、适合长期写作的中文个人博客主题。
Version: 1.0.0
Text Domain: wmxiaomu-blog
*/

:root {
  --ink: #202124;
  --muted: #72757b;
  --line: #e9e8e4;
  --paper: #fffdf9;
  --soft: #f5f2ec;
  --accent: #bd5d43;
  --accent-dark: #914330;
  --max: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  line-height: 1.8;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.site-header { border-bottom: 1px solid var(--line); background: rgba(255,253,249,.95); }
.header-inner, .site-main, .site-footer-inner { width: min(calc(100% - 48px), var(--max)); margin: 0 auto; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; min-height: 78px; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: #fff; background: var(--accent); font-family: Georgia, serif; font-size: 20px; }
.brand-name { font-size: 20px; font-weight: 700; letter-spacing: .04em; }
.brand-description { display: block; color: var(--muted); font-size: 12px; line-height: 1.2; }
.primary-menu { display: flex; align-items: center; gap: 24px; padding: 0; margin: 0; list-style: none; font-size: 14px; }
.primary-menu a { color: var(--muted); }
.primary-menu a:hover, .primary-menu .current-menu-item a { color: var(--accent); }
.search-link { color: var(--muted); font-size: 14px; }

.hero { display: grid; grid-template-columns: 1.35fr .65fr; gap: 48px; align-items: end; padding: 72px 0 56px; border-bottom: 1px solid var(--line); }
.eyebrow { margin: 0 0 12px; color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.hero h1 { max-width: 760px; margin: 0; font-family: Georgia, "Songti SC", serif; font-size: clamp(38px, 5vw, 66px); font-weight: 500; line-height: 1.2; letter-spacing: -.03em; }
.hero p { margin: 20px 0 0; max-width: 650px; color: var(--muted); font-size: 17px; }
.hero-note { padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--soft); color: var(--muted); font-size: 14px; }
.hero-note strong { display: block; margin-bottom: 8px; color: var(--ink); font-size: 15px; }

.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 64px; padding: 54px 0 80px; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 0 0 20px; padding-bottom: 16px; border-bottom: 2px solid var(--ink); font-family: Georgia, "Songti SC", serif; font-size: 23px; font-weight: 500; }
.section-title small { color: var(--muted); font-family: inherit; font-size: 12px; }
.post-card { padding: 28px 0; border-bottom: 1px solid var(--line); }
.post-card:first-of-type { padding-top: 0; }
.post-meta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 10px; color: var(--muted); font-size: 12px; }
.post-category { color: var(--accent); }
.post-card h2 { margin: 0 0 10px; font-family: Georgia, "Songti SC", serif; font-size: clamp(23px, 3vw, 31px); font-weight: 500; line-height: 1.35; }
.post-excerpt { margin: 0; color: var(--muted); font-size: 15px; }
.read-more { display: inline-block; margin-top: 13px; color: var(--accent); font-size: 13px; }
.pagination { display: flex; gap: 8px; margin-top: 30px; }
.pagination a, .pagination span { padding: 6px 12px; border: 1px solid var(--line); border-radius: 5px; font-size: 13px; }
.pagination .current { border-color: var(--accent); color: #fff; background: var(--accent); }

.sidebar section { margin-bottom: 34px; }
.sidebar h2 { margin: 0 0 13px; padding-bottom: 10px; border-bottom: 1px solid var(--line); font-size: 14px; letter-spacing: .08em; }
.sidebar ul { padding: 0; margin: 0; list-style: none; }
.sidebar li { padding: 5px 0; color: var(--muted); font-size: 14px; }
.sidebar li a { display: flex; justify-content: space-between; gap: 12px; }
.sidebar .count { color: #aaa; }
.author-card { padding: 21px; border-radius: 12px; background: var(--soft); }
.author-card p { margin: 0; color: var(--muted); font-size: 14px; }

.single-header { max-width: 800px; padding: 72px 0 40px; }
.single-header h1 { margin: 0 0 18px; font-family: Georgia, "Songti SC", serif; font-size: clamp(36px, 5vw, 60px); font-weight: 500; line-height: 1.25; }
.single-content { max-width: 800px; padding-bottom: 80px; font-family: Georgia, "Songti SC", "Noto Serif CJK SC", serif; font-size: 17px; }
.single-content h2, .single-content h3 { margin-top: 2em; font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif; line-height: 1.4; }
.single-content p { margin: 1.25em 0; }
.single-content blockquote { padding: 2px 22px; margin: 1.5em 0; border-left: 3px solid var(--accent); color: var(--muted); }
.single-content code { padding: 2px 5px; border-radius: 4px; background: var(--soft); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88em; }
.single-content pre { overflow-x: auto; padding: 18px; border-radius: 8px; color: #f9f7f1; background: #282522; }
.single-content pre code { padding: 0; color: inherit; background: transparent; }
.post-tags { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 25px; border-top: 1px solid var(--line); }
.post-tags a { padding: 3px 9px; border: 1px solid var(--line); border-radius: 20px; color: var(--muted); font-size: 12px; }

.site-footer { padding: 30px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.site-footer-inner { display: flex; justify-content: space-between; gap: 20px; }
.search-form { display: flex; gap: 8px; }
.search-field { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 5px; background: #fff; font: inherit; }
.search-submit { padding: 10px 14px; border: 0; border-radius: 5px; color: #fff; background: var(--accent); cursor: pointer; }
.not-found { padding: 90px 0; text-align: center; }

@media (max-width: 800px) {
  .header-inner, .site-main, .site-footer-inner { width: min(calc(100% - 32px), var(--max)); }
  .header-inner { align-items: flex-start; flex-direction: column; gap: 12px; padding: 18px 0; }
  .primary-menu { flex-wrap: wrap; gap: 12px 18px; }
  .hero { grid-template-columns: 1fr; gap: 25px; padding: 48px 0 40px; }
  .content-grid { grid-template-columns: 1fr; gap: 50px; padding-top: 40px; }
  .single-header { padding-top: 48px; }
  .site-footer-inner { flex-direction: column; }
}
