:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --text: #1a1a2e;
  --text-muted: #64748b;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --border: #e2e8f0;
  --code-bg: #f1f5f9;
  --radius: 8px;
  --max-width: 760px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
}

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

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
}

.header-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.site-title:hover {
  color: var(--accent);
  text-decoration: none;
}

nav a {
  margin-left: 1.5rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

nav a:hover,
nav a.active {
  color: var(--accent);
  text-decoration: none;
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.hero {
  margin-bottom: 2.5rem;
}

.hero h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.hero p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

.article-list {
  list-style: none;
}

.article-list li {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}

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

.article-list a.title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  display: block;
  margin-bottom: 0.35rem;
}

.article-list a.title:hover {
  color: var(--accent);
  text-decoration: none;
}

.article-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.article-meta span + span::before {
  content: " · ";
}

.article h1 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.article .meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.article h2 {
  font-size: 1.25rem;
  margin: 2rem 0 0.75rem;
}

.article p {
  margin-bottom: 1rem;
}

.article ul,
.article ol {
  margin: 0 0 1rem 1.5rem;
}

.article li {
  margin-bottom: 0.4rem;
}

.article code {
  background: var(--code-bg);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.9em;
  font-family: "SF Mono", "Fira Code", Consolas, monospace;
}

.article pre {
  background: var(--code-bg);
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  overflow-x: auto;
  margin-bottom: 1rem;
  font-size: 0.88rem;
  line-height: 1.5;
}

.article pre code {
  background: none;
  padding: 0;
}

.about-section {
  margin-bottom: 2rem;
}

.about-section h2 {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
}

footer {
  text-align: center;
  padding: 2rem 1.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}

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

footer a:hover {
  color: var(--accent);
}

footer .beian {
  margin-top: 0.5rem;
}

.police-beian a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.police-beian img {
  width: 20px;
  height: 20px;
}

@media (max-width: 600px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  nav a {
    margin-left: 0;
    margin-right: 1.25rem;
  }

  main {
    padding-top: 1.5rem;
  }
}
