:root {
  --bg: #f6f4ef;
  --bg-elev: #fffcf7;
  --bg-card: #ffffff;
  --border: #e6e0d4;
  --text: #1c1917;
  --text-muted: #6b6560;
  --accent: #c45c26;
  --accent-soft: rgba(196, 92, 38, 0.08);
  --warn-bg: rgba(196, 92, 38, 0.08);
  --warn-border: #d4a574;
  --link: #b45309;
  --code-bg: #f0ebe3;
  --shadow: 0 1px 2px rgba(28, 25, 23, 0.04), 0 4px 16px rgba(28, 25, 23, 0.05);
  --radius: 12px;
  --max: 700px;
  --font: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "Sarasa Mono SC", Consolas,
    monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121110;
    --bg-elev: #1a1816;
    --bg-card: #1e1c1a;
    --border: #2e2a26;
    --text: #f5f0e8;
    --text-muted: #a89f94;
    --accent: #e8956a;
    --accent-soft: rgba(232, 149, 106, 0.12);
    --warn-bg: rgba(232, 149, 106, 0.1);
    --warn-border: #8a5a3a;
    --link: #f0a878;
    --code-bg: #0e0d0c;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.25), 0 8px 24px rgba(0, 0, 0, 0.2);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--link);
  text-decoration: none;
  text-underline-offset: 0.15em;
}
a:hover {
  text-decoration: underline;
}

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

.site-header {
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-elev) 88%, transparent);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
}

.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.9rem 1.35rem;
}

.brand {
  font-weight: 700;
  font-size: 1.08rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.brand:hover {
  text-decoration: none;
  color: var(--accent);
}
.brand span {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 0.82rem;
  margin-left: 0.45rem;
}

.nav {
  display: flex;
  gap: 1.15rem;
  font-size: 0.92rem;
}
.nav a {
  color: var(--text-muted);
  padding: 0.2rem 0;
  border-bottom: 2px solid transparent;
}
.nav a:hover,
.nav a.active {
  color: var(--accent);
  text-decoration: none;
  border-bottom-color: var(--accent);
}

.hero {
  padding: 3rem 0 1.75rem;
}
.hero h1 {
  margin: 0 0 0.55rem;
  font-size: 2rem;
  letter-spacing: -0.03em;
  font-weight: 750;
  line-height: 1.25;
}
.hero .tagline {
  margin: 0;
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.section-title {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin: 1.75rem 0 0.9rem;
  font-weight: 600;
}

.post-list {
  list-style: none;
  padding: 0;
  margin: 0 0 3.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.post-list li {
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.post-list li:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(28, 25, 23, 0.08), 0 8px 24px rgba(28, 25, 23, 0.06);
}
.post-list a {
  display: block;
  padding: 1.15rem 1.25rem;
  color: var(--text);
  text-decoration: none;
}
.post-list a:hover {
  text-decoration: none;
}
.post-list .title {
  font-weight: 650;
  font-size: 1.08rem;
  margin-bottom: 0.35rem;
  letter-spacing: -0.01em;
  line-height: 1.4;
}
.post-list .meta {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.article {
  padding: 1.85rem 0 3.5rem;
}
.article-header {
  margin-bottom: 1.85rem;
  padding-bottom: 1.35rem;
  border-bottom: 1px solid var(--border);
}
.article-header h1 {
  margin: 0 0 0.65rem;
  font-size: 1.75rem;
  line-height: 1.3;
  letter-spacing: -0.025em;
  font-weight: 750;
}
.article-header .meta {
  color: var(--text-muted);
  font-size: 0.92rem;
}
.back {
  display: inline-block;
  margin-bottom: 1.1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.back:hover {
  color: var(--accent);
}

.disclaimer {
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  border-radius: var(--radius);
  padding: 0.85rem 1.1rem;
  margin: 0 0 1.6rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.content h1,
.content h2,
.content h3,
.content h4 {
  line-height: 1.35;
  margin: 2rem 0 0.8rem;
  scroll-margin-top: 4.5rem;
  letter-spacing: -0.015em;
  font-weight: 700;
}
.content h1 {
  font-size: 1.5rem;
}
.content h2 {
  font-size: 1.3rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.4rem;
}
.content h3 {
  font-size: 1.12rem;
  font-weight: 650;
}
.content h4 {
  font-size: 1.02rem;
  color: var(--text-muted);
}
.content p {
  margin: 0.9rem 0;
}
.content ul,
.content ol {
  padding-left: 1.45rem;
  margin: 0.85rem 0;
}
.content li {
  margin: 0.4rem 0;
}
.content li > ul,
.content li > ol {
  margin: 0.25rem 0;
}
.content blockquote {
  margin: 1.15rem 0;
  padding: 0.75rem 1.15rem;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  color: var(--text-muted);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.content blockquote p {
  margin: 0.4rem 0;
}
.content code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--code-bg);
  padding: 0.15em 0.4em;
  border-radius: 5px;
  border: 1px solid var(--border);
  word-break: break-word;
}
.content pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.05rem 1.15rem;
  overflow-x: auto;
  margin: 1.15rem 0;
  line-height: 1.55;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.content pre code {
  border: none;
  padding: 0;
  background: none;
  font-size: 0.84rem;
  word-break: normal;
}
.content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.15rem 0;
  font-size: 0.92rem;
  display: block;
  overflow-x: auto;
  border-radius: var(--radius);
}
.content th,
.content td {
  border: 1px solid var(--border);
  padding: 0.55rem 0.75rem;
  text-align: left;
  vertical-align: top;
}
.content th {
  background: var(--bg-elev);
  font-weight: 650;
}
.content tr:nth-child(even) td {
  background: color-mix(in srgb, var(--bg) 55%, var(--bg-card));
}
.content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin: 0.85rem 0;
  box-shadow: var(--shadow);
}
.content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.25rem 0;
}
.content a {
  word-break: break-word;
}
.content strong {
  font-weight: 650;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.75rem 0 2.25rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
}

.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  margin: 1.75rem 0 3.5rem;
  box-shadow: var(--shadow);
}
.about-card h1 {
  margin-top: 0;
  font-size: 1.55rem;
  letter-spacing: -0.02em;
}
.about-card p {
  color: var(--text-muted);
  line-height: 1.7;
}

@media (max-width: 560px) {
  body {
    font-size: 16px;
  }
  .hero {
    padding: 2.25rem 0 1.25rem;
  }
  .hero h1 {
    font-size: 1.6rem;
  }
  .article-header h1 {
    font-size: 1.4rem;
  }
  .site-header .inner {
    flex-wrap: wrap;
  }
  .post-list a {
    padding: 1rem 1.05rem;
  }
  .wrap,
  .site-header .inner {
    padding-left: 1.1rem;
    padding-right: 1.1rem;
  }
}
