:root {
  color-scheme: dark;
  --bg: #121614;
  --text: #e7e2d6;
  --muted: #8f988f;
  --accent: #e0a45b;
  --line: #2a332d;
  --code: #0c0f0d;
  --max: 40rem;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.85;
}

a {
  color: var(--accent);
  text-underline-offset: 0.18em;
}

a:hover {
  color: #f2c48a;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 3rem;
}

.brand {
  color: var(--text);
  font-weight: 650;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.nav {
  display: flex;
  gap: 1rem;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
}

.nav a[aria-current="page"] {
  color: var(--text);
}

.hero h1,
.post h1 {
  font-size: 2.15rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  line-height: 1.35;
  margin: 0 0 0.75rem;
}

.post h1 {
  letter-spacing: 0.04em;
  font-size: 1.85rem;
}

.signature,
.empty {
  color: var(--muted);
  margin: 0 0 2.5rem;
}

.post-list {
  display: flex;
  flex-direction: column;
  gap: 1.85rem;
}

.post-list h2 {
  font-size: 1.25rem;
  font-weight: 650;
  line-height: 1.45;
  margin: 0.1rem 0 0.25rem;
}

.post-list h2 a {
  color: var(--text);
  text-decoration: none;
}

.post-list h2 a:hover {
  color: var(--accent);
}

.post-date,
.summary {
  margin: 0;
}

.post-date {
  color: var(--muted);
  font-size: 0.875rem;
  letter-spacing: 0.04em;
}

.summary {
  color: var(--muted);
}

.post-header {
  margin-bottom: 1.5rem;
}

.post-body h2,
.post-body h3 {
  font-size: 1.2rem;
  line-height: 1.45;
  margin: 2rem 0 0.4rem;
}

.post-body p,
.post-body ul,
.post-body ol,
.post-body blockquote,
.post-body pre {
  margin: 0.9rem 0;
}

.post-body ul,
.post-body ol {
  padding-left: 1.3rem;
}

.post-body li + li {
  margin-top: 0.25rem;
}

.post-body blockquote {
  padding-left: 1rem;
  border-left: 2px solid var(--line);
  color: var(--muted);
}

.post-body a {
  text-decoration-thickness: 1px;
}

.post-body code {
  font-family: "Cascadia Code", "Sarasa Mono SC", Consolas, monospace;
  font-size: 0.9em;
}

.post-body pre {
  overflow: auto;
  padding: 0.9rem 1rem;
  background: var(--code);
  border-radius: 8px;
  line-height: 1.6;
}

.post-body pre code {
  font-size: 0.875rem;
}

.post-body img {
  max-width: 100%;
  height: auto;
}

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

.site-footer a {
  color: var(--muted);
}

@media (max-width: 36rem) {
  .hero h1,
  .post h1 {
    font-size: 1.75rem;
  }

  .site-header {
    margin-bottom: 2.25rem;
  }
}
