:root {
  --fg: #1a1a1a;
  --fg-muted: #6b6b6b;
  --bg: #ffffff;
  --rule: #e5e5e5;
  --link: #1a4fa0;
  --code-bg: #f5f5f5;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fg: #e8e8e8;
    --fg-muted: #9a9a9a;
    --bg: #16171a;
    --rule: #2c2e33;
    --link: #7aa7e8;
    --code-bg: #202227;
  }
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
  max-width: 42rem;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  font-size: 16px;
  line-height: 1.75;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--rule);
}

.brand {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--fg);
  letter-spacing: 0.01em;
}

.site-header nav {
  display: flex;
  gap: 1.25rem;
  font-size: 0.9rem;
}

.site-header nav a {
  color: var(--fg-muted);
}

h1 {
  font-size: 1.6rem;
  line-height: 1.35;
  margin: 0 0 0.5rem;
  font-weight: 600;
}

h2 {
  font-size: 1.2rem;
  margin: 2rem 0 0.75rem;
  font-weight: 600;
}

h3 {
  font-size: 1.02rem;
  margin: 1.5rem 0 0.5rem;
  font-weight: 600;
}

.lede {
  color: var(--fg-muted);
  margin: 0 0 2.5rem;
}

.post-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.post-list li {
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--rule);
}

.post-list li:first-child {
  border-top: 1px solid var(--rule);
}

.post-title {
  font-weight: 600;
  font-size: 1.05rem;
}

.post-list time {
  display: inline-block;
  margin-left: 0.6rem;
  font-size: 0.82rem;
  color: var(--fg-muted);
  font-variant-numeric: tabular-nums;
}

.post-summary {
  margin: 0.35rem 0 0;
  color: var(--fg-muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

article time {
  display: block;
  font-size: 0.85rem;
  color: var(--fg-muted);
  margin-bottom: 2rem;
  font-variant-numeric: tabular-nums;
}

article p {
  margin: 0 0 1.15rem;
}

article ul,
article ol {
  padding-left: 1.4rem;
  margin: 0 0 1.15rem;
}

article li {
  margin-bottom: 0.4rem;
}

code {
  background: var(--code-bg);
  padding: 0.12em 0.35em;
  border-radius: 3px;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;
  font-size: 0.9em;
}

pre {
  background: var(--code-bg);
  padding: 1rem 1.1rem;
  border-radius: 6px;
  overflow-x: auto;
  line-height: 1.55;
  margin: 0 0 1.3rem;
}

pre code {
  background: none;
  padding: 0;
  font-size: 0.87rem;
}

blockquote {
  margin: 0 0 1.15rem;
  padding-left: 1rem;
  border-left: 3px solid var(--rule);
  color: var(--fg-muted);
}

hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 2.5rem 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.3rem;
  font-size: 0.92rem;
}

th, td {
  text-align: left;
  padding: 0.5rem 0.7rem;
  border-bottom: 1px solid var(--rule);
}

th {
  font-weight: 600;
}

.site-footer {
  margin-top: 4rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  font-size: 0.85rem;
  color: var(--fg-muted);
}

.site-footer p {
  margin: 0;
}

.back-link {
  display: inline-block;
  margin-bottom: 2rem;
  font-size: 0.9rem;
}
