:root {
  --bg: #fcfbf8;
  --text: #1f1d1a;
  --muted: #6f6a63;
  --line: #e7e2da;
  --accent: #a8401c;
  --quote-bg: #f5efe7;
  --ui: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", Arial, sans-serif;
  --serif: Charter, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161514;
    --text: #e9e6e1;
    --muted: #9d978f;
    --line: #2d2a27;
    --accent: #f0905f;
    --quote-bg: #211e1b;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.65;
}
html[lang="zh-CN"] body {
  font-family: var(--ui);
  font-size: 17.5px;
  line-height: 1.9;
}

.wrap {
  max-width: 40rem;
  margin: 0 auto;
  padding: 2.75rem 1.25rem 4rem;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
a:hover { text-decoration-thickness: 2px; }

/* 顶部 */
header.site {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  font-family: var(--ui);
}
.site-title {
  color: var(--text);
  font-weight: 650;
  font-size: 1.05rem;
  text-decoration: none;
}
.lang {
  font-size: 0.85rem;
  color: var(--muted);
  white-space: nowrap;
}
.lang a { color: var(--muted); text-decoration: none; }
.lang a:hover { color: var(--text); }
.lang strong { color: var(--text); font-weight: 600; }

.site-nav {
  font-family: var(--ui);
  font-size: 0.9rem;
  margin: 0.35rem 0 3.25rem;
}
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  margin-right: 1.1rem;
}
.site-nav a:hover { color: var(--text); }

/* 正文 */
h1 {
  font-size: 2.05rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0 0 0.4rem;
  text-wrap: balance;
}
h2 {
  font-family: var(--ui);
  font-size: 1.2rem;
  line-height: 1.4;
  margin: 2.6rem 0 0.8rem;
}
article h2 { font-family: inherit; font-size: 1.3rem; }
h3 { font-size: 1.05rem; margin: 2rem 0 0.6rem; }

.meta {
  font-family: var(--ui);
  font-size: 0.875rem;
  color: var(--muted);
  margin: 0 0 2.5rem;
}

p, ul, ol, blockquote { margin: 0 0 1.15em; }
ul, ol { padding-left: 1.4em; }
li { margin-bottom: 0.35em; }
strong { font-weight: 650; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
img { max-width: 100%; height: auto; border-radius: 6px; }
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88em;
  background: var(--quote-bg);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

blockquote {
  margin-left: 0;
  margin-right: 0;
  padding: 0.75em 1.1em;
  background: var(--quote-bg);
  border-left: 3px solid var(--accent);
  border-radius: 0 6px 6px 0;
}
blockquote p:last-child { margin-bottom: 0; }

/* 首页和列表 */
.intro {
  font-size: 1.12em;
  margin-bottom: 2.75rem;
}
ul.list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}
ul.list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.25rem;
  padding: 0.55rem 0;
  margin: 0;
  border-bottom: 1px solid var(--line);
}
ul.list a { text-decoration: none; }
ul.list a:hover { text-decoration: underline; }
.date {
  font-family: var(--ui);
  font-size: 0.85rem;
  color: var(--muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.more { font-family: var(--ui); font-size: 0.9rem; }

/* 日志的前一天 / 后一天 */
.pager {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-family: var(--ui);
  font-size: 0.9rem;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 4.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-family: var(--ui);
  font-size: 0.82rem;
  color: var(--muted);
}
footer a { color: var(--muted); }

.choose { padding-top: 30vh; font-family: var(--ui); }

@media (max-width: 560px) {
  body { font-size: 18px; }
  html[lang="zh-CN"] body { font-size: 17px; }
  .wrap { padding: 1.75rem 1rem 3rem; }
  .site-nav { margin-bottom: 2.5rem; }
  h1 { font-size: 1.65rem; }
  ul.list li { flex-direction: column; gap: 0.1rem; }
}
