/*
Theme Name: Plain
Theme URI: https://027886.xyz/
Description: 简洁的单栏阅读主题，白底、清晰排版，适合技术笔记。
Author: 027886
Version: 1.0.0
Text Domain: plain
*/

:root {
  --bg: #f4f1ea;
  --paper: #fffcf7;
  --ink: #1f1a17;
  --muted: #7a716a;
  --line: #e6e0d6;
  --accent: #0f6e6b;
  --accent-soft: #e7f3f2;
  --code: #f3eee6;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(1200px 400px at 50% -80px, #fff, transparent 70%),
    var(--bg);
  color: var(--ink);
  font-family: "Avenir Next", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  line-height: 1.75;
}

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

.wrap {
  width: min(760px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 252, 247, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}

.brand {
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.03em;
  font-size: 22px;
  text-decoration: none;
}

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

.searchform {
  display: flex;
  align-items: center;
  gap: 8px;
}

.searchform input[type="search"] {
  width: 180px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit;
  color: inherit;
  outline: none;
}

.searchform input[type="search"]:focus { border-color: var(--accent); }

.searchform button {
  border: 0;
  background: var(--ink);
  color: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit;
  cursor: pointer;
}

.cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 0 14px;
}

.cats a,
.cats li { list-style: none; }

.cats ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }

.cats a {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 13px;
}

.site-main { padding: 28px 0 64px; }

article.post, article.page {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px 32px;
  margin: 0 0 18px;
  box-shadow: 0 1px 0 rgba(31, 26, 23, 0.03);
}

article.post h2, article.page h1, article.post h1 {
  font-size: 28px;
  line-height: 1.35;
  letter-spacing: -0.03em;
  margin: 0 0 8px;
}

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

.meta {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 14px;
}

.entry p, .entry ul, .entry ol, .entry blockquote, .entry pre, .entry table { margin: 0 0 1em; }
.entry ul, .entry ol { padding-left: 1.3em; }
.entry h2, .entry h3, .entry h4 { line-height: 1.4; margin: 1.4em 0 0.4em; letter-spacing: -0.02em; }
.entry img, .entry video, .entry iframe { max-width: 100%; height: auto; }
.entry blockquote {
  margin-left: 0;
  padding: 4px 0 4px 16px;
  border-left: 3px solid var(--accent);
  color: #444;
}
.entry pre, .entry code {
  font-family: "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.88em;
}
.entry code {
  background: var(--code);
  padding: 0.1em 0.35em;
  border-radius: 6px;
}
.entry pre {
  background: #231f1c;
  color: #f6f1e8;
  padding: 16px 18px;
  border-radius: 12px;
  overflow: auto;
}
.entry pre code { background: transparent; color: inherit; padding: 0; }
.entry table { width: 100%; border-collapse: collapse; font-size: 0.95em; }
.entry th, .entry td { border-bottom: 1px solid var(--line); padding: 8px 6px; text-align: left; }

.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; }
.pager a, .nav-links a, .nav-links span {
  display: inline-block;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  color: var(--ink);
}
.nav-links { display: flex; flex-wrap: wrap; gap: 8px; }

.comments { margin-top: 28px; }
.comment-list { list-style: none; padding: 0; }
.comment-list li { border-top: 1px solid var(--line); padding: 14px 0; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  background: #fff;
}
.comment-form textarea { min-height: 120px; }
.comment-form .submit, button, input[type="submit"] {
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 8px 16px;
  font: inherit;
  cursor: pointer;
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  padding: 22px 0 40px;
}

.empty { color: var(--muted); padding: 40px 0; }

@media (max-width: 640px) {
  article.post, article.page { padding: 22px 18px; border-radius: 14px; }
  article.post h2, article.page h1, article.post h1 { font-size: 24px; }
  .searchform input[type="search"] { width: 120px; }
  .site-header .wrap { min-height: 60px; }
}
