:root {
  --page: #f3eee8;
  --paper: #ffffff;
  --ink: #202020;
  --muted: #747474;
  --line: #dddddd;
  --soft: #f7f3ed;
  --accent: #8c6f3f;
  --accent-2: #496457;
  --code: #f1f3f1;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(126,96,64,.04) 1px, transparent 1px) 0 0 / 38px 38px,
    var(--page);
  font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "Microsoft YaHei", serif;
  font-size: 16px;
  line-height: 1.9;
}
.headband { position: fixed; inset: 0 0 auto 0; height: 4px; background: #202020; z-index: 20; }
.shell { width: min(1540px, calc(100vw - 48px)); margin: 0 auto 80px; display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 14px; }
.sidebar { position: sticky; top: 0; align-self: start; min-height: 100vh; padding-bottom: 36px; }
.brand-panel { background: #202020; color: #fff; padding: 28px 24px 24px; text-align: center; }
.brand { color: #fff; text-decoration: none; display: flex; align-items: center; justify-content: center; gap: 13px; font-size: 24px; line-height: 1.2; }
.brand i { display: block; width: 26px; height: 2px; background: rgba(255,255,255,.62); }
.brand-panel p { margin: 18px 0 0; color: #c8c8c8; font-size: 13px; }
.nav, .profile, .toc-panel { background: var(--paper); border-bottom: 1px solid rgba(0,0,0,.04); }
.nav { padding: 18px 0; }
.nav a { display: flex; align-items: center; min-height: 38px; padding: 0 28px; color: #4f4f4f; text-decoration: none; border: 0; font-size: 14px; }
.nav a:hover, .nav a.active { background: #f4f4f1; color: var(--ink); }
.profile { margin-top: 12px; padding: 28px 22px; text-align: center; }
.profile img { width: 96px; height: 96px; object-fit: cover; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line), 0 12px 32px rgba(0,0,0,.12); }
.profile strong { display: block; margin-top: 13px; font-size: 17px; }
.profile p { margin: 8px 0 14px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; border-top: 1px solid var(--line); padding-top: 14px; }
.stats span { color: var(--muted); font-size: 11px; line-height: 1.3; }
.stats b { display: block; color: var(--ink); font-size: 17px; }
.profile-links { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; margin-top: 16px; font-size: 12px; }
.profile-links a { color: #555; text-decoration: none; border-bottom: 1px solid transparent; }
.profile-links a:hover { color: var(--ink); border-color: var(--ink); }
.toc-panel { margin-top: 12px; padding: 20px 22px; }
.toc-panel h2 { margin: 0 0 10px; font-size: 14px; }
.toc { display: grid; gap: 8px; font-size: 13px; line-height: 1.5; }
.toc a { color: var(--muted); text-decoration: none; border: 0; }
.toc a:hover { color: var(--ink); }
.muted { color: var(--muted); }
.content-frame { background: var(--paper); min-height: 100vh; padding: 70px min(4vw, 72px); box-shadow: 0 1px 0 rgba(0,0,0,.03); }
.eyebrow { margin: 0 0 8px; color: var(--accent); font-size: 12px; letter-spacing: 0; text-transform: uppercase; font-family: "Source Code Pro", monospace; }
.update-notice { max-width: 1040px; margin: 0 auto 42px; padding-bottom: 18px; border-bottom: 1px solid var(--line); color: #9a7b5e; font-family: "Source Code Pro", monospace; font-size: 12px; text-align: center; text-transform: uppercase; }
.post-list { display: grid; gap: 54px; }
.post-card { max-width: 1040px; margin: 0 auto; padding-bottom: 44px; border-bottom: 1px solid var(--line); }
.post-card h2 { margin: 0 0 12px; text-align: center; font-size: 28px; }
.post-card h2 a { color: var(--ink); text-decoration: none; border-bottom: 1px solid transparent; }
.post-card h2 a:hover { border-color: var(--ink); }
.post-card > p:not(.eyebrow) { color: #555; }
.meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; color: #888; font-size: 12px; }
.meta span::before { content: "|"; color: #bbb; }
.meta a, .meta em { color: #666; font-style: normal; text-decoration: none; border-bottom: 1px solid #bbb; }
.post-hero { text-align: center; margin: 0 auto 58px; max-width: 1100px; }
.post-hero h1 { margin: 0 0 12px; font-size: 34px; line-height: 1.35; }
.summary { color: var(--muted); max-width: 840px; margin: 20px auto 0; }
.post-body { max-width: 1280px; margin: 0 auto; color: #4c4c4c; }
.post-body h2 { margin: 46px 0 16px; color: #383838; font-size: 22px; }
.post-body h3 { margin: 34px 0 12px; color: #404040; font-size: 18px; }
.post-body p { margin: 0 0 18px; }
.post-body a { color: #454545; border-bottom: 1px solid #999; text-decoration: none; }
.post-body a:hover { color: var(--accent); border-color: var(--accent); }
.post-body ul, .post-body ol { padding-left: 1.35rem; }
pre { overflow: auto; background: #f7f6f2; color: #30332f; padding: 18px 20px; border: 1px solid #ded9ce; border-left: 4px solid var(--accent); line-height: 1.7; font-size: 13px; box-shadow: inset 0 1px 0 rgba(255,255,255,.8); }
code { font-family: "Source Code Pro", "SFMono-Regular", Consolas, monospace; background: var(--code); color: #30332f; padding: 2px 5px; border-radius: 3px; font-size: .9em; }
pre code { background: transparent; padding: 0; border-radius: 0; }
.table-scroll { overflow-x: auto; margin: 22px 0; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; min-width: 680px; font-size: 14px; }
th, td { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding: 10px 12px; vertical-align: top; }
th { background: #f4f4f2; color: #343434; text-align: left; }
tr:nth-child(even) td { background: #fafafa; }
blockquote { margin: 24px 0; padding: 12px 18px; border-left: 4px solid var(--accent-2); background: #f7f8f6; color: #555; }
.media-figure { margin: 26px auto 30px; }
.media-figure img, .media-figure video { width: min(100%, 980px); display: block; margin: 0 auto; background: #111; box-shadow: 0 12px 34px rgba(0,0,0,.08); }
.media-video video { width: min(100%, 1080px); }
.media-figure figcaption { margin-top: 10px; color: var(--muted); font-size: 13px; text-align: center; }
.tags-page, .archives-page { max-width: 1180px; margin: 0 auto; text-align: center; }
.tags-page h1, .archives-page h1 { margin: 0 0 56px; color: #5a4638; font-size: 28px; font-weight: 400; text-transform: lowercase; }
.tag-count { margin: 0 0 28px; color: #7f6b5d; font-size: 16px; }
.tag-cloud { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 24px 28px; line-height: 2.1; }
.tag-cloud a { color: #9a9188; text-decoration: none; border-bottom: 1px solid #b9aea2; transition: color .16s ease, border-color .16s ease; }
.tag-cloud a:hover { color: #3d332c; border-color: #3d332c; }
.tag-size-1 { font-size: 14px; }
.tag-size-2 { font-size: 19px; }
.tag-size-3 { font-size: 24px; }
.tag-size-4 { font-size: 30px; }
.tag-size-5 { font-size: 36px; }
.archives-page ul { display: inline-grid; gap: 14px; margin: 0; padding: 0; list-style: none; text-align: left; }
.archives-page li { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 18px; align-items: baseline; }
.archives-page time { color: var(--muted); font-size: 13px; }
.archives-page a { color: var(--ink); text-decoration: none; border-bottom: 1px solid #bbb; }
@media (max-width: 900px) {
  .shell { width: 100%; display: block; margin-bottom: 0; }
  .sidebar { position: static; min-height: 0; }
  .nav { display: grid; grid-template-columns: repeat(3, 1fr); }
  .nav a { justify-content: center; padding: 0 8px; }
  .profile, .toc-panel { margin-top: 0; }
  .content-frame { padding: 42px 22px; }
  .post-hero h1 { font-size: 28px; }
}