:root {
  color-scheme: light;
  --paper: #fbf8f0;
  --ink: #24211d;
  --muted: #716b62;
  --line: #ded7ca;
  --accent: #1f5d68;
  --accent-soft: #dcebed;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  background: var(--paper);
  color: var(--ink);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 10% 0%, rgb(220 235 237 / 45%), transparent 26rem),
    var(--paper);
}

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

a:hover {
  text-decoration-thickness: 0.14em;
}

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

.skip-link {
  position: fixed;
  z-index: 10;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.6rem 0.8rem;
  border-radius: 0.35rem;
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header,
.site-footer,
.page-shell {
  width: min(100% - 2rem, 760px);
  margin-inline: auto;
}

.site-header {
  padding-block: 1.25rem;
  border-bottom: 1px solid var(--line);
}

.brand {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-decoration: none;
}

.page-shell {
  padding-block: clamp(2rem, 7vw, 4.5rem);
}

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

.article-header h1,
.index-header h1 {
  margin: 0;
  font-family: Georgia, "Songti SC", "STSong", serif;
  font-size: clamp(2rem, 7vw, 3.35rem);
  line-height: 1.16;
  letter-spacing: -0.025em;
}

.article-meta,
.index-header p,
.card-meta {
  color: var(--muted);
}

.article-meta {
  margin-top: 1rem;
  font-size: 0.92rem;
}

.article-cover {
  display: block;
  width: 100%;
  margin-top: 1.75rem;
  border-radius: 0.8rem;
  box-shadow: 0 1rem 3rem rgb(44 38 30 / 12%);
}

.article-body {
  font-size: 1.05rem;
  line-height: 1.9;
  overflow-wrap: anywhere;
}

.article-body h2,
.article-body h3 {
  scroll-margin-top: 1rem;
  font-family: Georgia, "Songti SC", "STSong", serif;
  line-height: 1.35;
}

.article-body h2 {
  margin: 3.5rem 0 1.1rem;
  font-size: 1.65rem;
}

.article-body h3 {
  margin: 2.5rem 0 1rem;
  font-size: 1.3rem;
}

.article-body p,
.article-body ul,
.article-body ol,
.article-body blockquote {
  margin-block: 1.1rem;
}

.article-body li + li {
  margin-top: 0.55rem;
}

.article-body img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.8rem auto 0.75rem;
  border-radius: 0.6rem;
}

.article-body blockquote {
  margin-inline: 0;
  padding: 0.4rem 1.2rem;
  border-left: 0.25rem solid var(--accent);
  background: rgb(220 235 237 / 42%);
  color: #39494b;
}

.article-body code {
  padding: 0.12em 0.35em;
  border-radius: 0.3rem;
  background: #eee9df;
  font-size: 0.9em;
}

.article-body pre {
  padding: 1rem;
  overflow-x: auto;
  border-radius: 0.6rem;
  background: #292722;
  color: #f7f3e9;
}

.article-body pre code {
  padding: 0;
  background: transparent;
}

.article-body hr {
  margin-block: 3rem;
  border: 0;
  border-top: 1px solid var(--line);
}

.article-body table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
}

.article-body th,
.article-body td {
  padding: 0.65rem;
  border: 1px solid var(--line);
  text-align: left;
}

.index-header {
  margin-bottom: 2.75rem;
}

.index-header p {
  max-width: 38rem;
  font-size: 1.05rem;
  line-height: 1.75;
}

.article-list {
  display: grid;
  gap: 1.25rem;
}

.article-card {
  display: grid;
  gap: 0.75rem;
  padding: 1.35rem;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: rgb(255 255 255 / 52%);
}

.article-card h2 {
  margin: 0;
  font-family: Georgia, "Songti SC", "STSong", serif;
  font-size: 1.35rem;
  line-height: 1.4;
}

.article-card p {
  margin: 0;
  line-height: 1.7;
}

.card-link {
  color: inherit;
  text-decoration: none;
}

.card-link:hover {
  color: var(--accent);
}

.site-footer {
  padding-block: 1.5rem 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
}

@media (max-width: 520px) {
  .site-header,
  .site-footer,
  .page-shell {
    width: min(100% - 1.35rem, 760px);
  }

  .article-body {
    font-size: 1rem;
  }
}
