:root { color-scheme: light; --paper: #faf9f6; --ink: #292d2a; --muted: #70766e; --line: #e4e5dd; --accent: #496149; --soft: #edf0e7; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.85 -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif; }
a { color: inherit; text-decoration: none; text-underline-offset: 4px; }
a:hover { color: var(--accent); text-decoration: underline; }
button, input, select { font: inherit; }
button { cursor: pointer; color: var(--ink); background: transparent; border: 1px solid var(--line); border-radius: 6px; padding: 7px 14px; }
button:hover { background: var(--soft); }
input, select { border: 1px solid #bfc5b8; border-radius: 6px; padding: 9px 12px; background: #fff; color: var(--ink); min-width: 0; }
:focus-visible { outline: 3px solid #8b9b71; outline-offset: 4px; }
[hidden] { display: none !important; }
.shell { max-width: 1260px; margin: auto; display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 70px; padding: 64px 40px 72px; }
.sidebar { position: sticky; top: 48px; align-self: start; }
.brand { display: flex; gap: 14px; align-items: center; font-size: 20px; font-weight: 650; letter-spacing: 1px; }
.brand img { border-radius: 50%; object-fit: cover; }
.brand small { display: block; color: var(--muted); font-size: 11px; font-weight: 400; letter-spacing: 2px; }
.sidebar nav { margin-top: 40px; display: grid; gap: 2px; }
.sidebar nav a, .sidebar nav button { display: flex; justify-content: space-between; padding: 8px 14px; font-size: 14px; border: 0; border-radius: 5px; }
.sidebar nav a span { color: #a7afa0; }
.sidebar nav a[aria-current] { color: var(--accent); background: var(--soft); font-weight: 650; }
.sidebar nav button { margin-top: 15px; border-top: 1px solid var(--line); border-radius: 0; padding-top: 18px; text-align: left; }
kbd { color: var(--muted); background: #fff; border: 1px solid var(--line); padding: 0 8px; border-radius: 3px; }
.sidebar-note { font: italic 19px/1.6 Georgia, serif; color: #929889; margin: 46px 14px 20px; }
.sidebar-links { display: flex; gap: 14px; color: var(--muted); font-size: 12px; padding: 0 14px; }
.menu-toggle { display: none; }
main { min-width: 0; }
.eyebrow { color: var(--muted); letter-spacing: 2px; font-size: 11px; font-weight: 500; }
.hero { padding: 10px 0 54px; }
.hero h1 { font-size: clamp(32px, 3.7vw, 49px); font-weight: 650; letter-spacing: -1px; line-height: 1.45; margin: 17px 0; }
.hero > p:not(.eyebrow) { max-width: 600px; color: var(--muted); }
.inline-links { display: flex; flex-wrap: wrap; gap: 12px 24px; color: var(--accent); font-size: 14px; }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--line); padding-top: 20px; margin-bottom: 20px; }
.section-heading h2 { font-size: 18px; margin: 0; }
.section-heading > a { font-size: 12px; color: var(--muted); }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin: 25px 0 48px; }
.card { display: block; padding: 24px; border: 1px solid var(--line); border-radius: 8px; background: #fffefa; min-width: 0; }
a.card:hover { background: var(--soft); text-decoration: none; }
.card h2, .card h3 { font-size: 18px; line-height: 1.55; margin: 14px 0 10px; }
.card p { color: var(--muted); font-size: 13px; line-height: 1.85; }
.card > span:last-child { font-size: 13px; color: var(--accent); }
.post-list article { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 18px; padding: 25px 0; border-bottom: 1px solid var(--line); }
.post-list time, .archive-list time { color: var(--muted); font-size: 12px; padding-top: 6px; font-variant-numeric: tabular-nums; }
.post-list h3 { margin: 0 0 9px; font-size: 19px; font-weight: 600; line-height: 1.6; }
.post-list p { margin: 0 0 12px; font-size: 13px; color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags a, .tags span { background: var(--soft); color: var(--accent); padding: 2px 10px; border-radius: 4px; font-size: 11px; }
.pager { display: flex; justify-content: space-between; margin: 24px 0 48px; font-size: 14px; }
.book-banner { background: var(--soft); padding: 30px 35px; border-radius: 8px; }
.book-banner h2 { font-size: 28px; margin: 6px 0; }
.book-banner p:not(.eyebrow) { color: var(--muted); font-size: 14px; }
.book-banner a { font-size: 14px; color: var(--accent); }
.page-heading { padding: 6px 0 30px; border-bottom: 1px solid var(--line); margin-bottom: 30px; }
.page-heading h1 { font-size: clamp(28px, 3vw, 38px); line-height: 1.5; margin: 14px 0; overflow-wrap: anywhere; }
.page-heading > p:not(.eyebrow) { color: var(--muted); }
.page-heading .lead { font-size: 20px; color: var(--ink) !important; }
.prose { overflow-wrap: anywhere; line-height: 2; }
.prose h1 { font-size: 30px; }.prose h2 { font-size: 24px; }.prose h3 { font-size: 20px; }.prose h4, .prose h5 { font-size: 17px; }
.prose h1, .prose h2, .prose h3, .prose h4, .prose h5 { margin-top: 1.9em; line-height: 1.65; }
.prose a { color: var(--accent); text-decoration: underline; }
.prose img { max-width: 100%; height: auto; border-radius: 4px; }
.prose blockquote { margin: 24px 0; padding: 4px 22px; border-left: 3px solid #a6b192; background: var(--soft); color: #5e6759; }
.prose table { display: block; overflow-x: auto; border-collapse: collapse; max-width: 100%; }
.prose td, .prose th { border: 1px solid var(--line); padding: 8px 12px; }
.prose pre, .prose figure.highlight { overflow-x: auto; background: #eff0e9; padding: 16px; margin: 24px 0; border-radius: 6px; font: 13px/1.7 Consolas, monospace; }
.prose code { font-family: Consolas, monospace; font-size: .9em; background: #eff0e9; padding: 2px 5px; border-radius: 3px; }
.prose pre code { padding: 0; }.prose .highlight td { border: none; padding: 0 9px; }.prose .gutter { color: #929889; border-right: 1px solid #cfd3c7; }
.article-toc, .book-toc { background: var(--soft); border-radius: 6px; padding: 14px 20px; margin: 0 0 28px; font-size: 14px; }
summary { cursor: pointer; font-weight: 600; }.book-toc ol { list-style: none; padding-left: 0; }.book-toc .depth-1 { padding-left: 22px; }.book-toc a[aria-current] { color: var(--accent); font-weight: 650; text-decoration: underline; }
.chapter-nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding: 22px 0; margin-top: 32px; border-top: 1px solid var(--line); font-size: 14px; color: var(--accent); }
.reading-list { padding-left: 26px; }.reading-list li { padding: 18px 0 18px 12px; border-bottom: 1px solid var(--line); }.reading-list h2 { font-size: 20px; margin: 0; }.reading-list p { color: var(--muted); font-size: 14px; }
.related { margin-top: 40px; padding: 20px 25px; background: var(--soft); border-radius: 6px; }.related h2 { font-size: 18px; }.related .chapter-nav { margin-top: 15px; }
.comments { margin-top: 40px; }.comments p { font-size: 13px; color: var(--muted); }
.resource-controls { display: grid; grid-template-columns: auto minmax(0,1fr) auto minmax(100px,150px); gap: 12px; align-items: center; font-size: 14px; }
#resource-status { font-size: 12px; color: var(--muted); }.resource-card { padding: 22px 0; border-bottom: 1px solid var(--line); }.resource-card h2 { font-size: 18px; margin: 5px 0; line-height: 1.7; }.resource-card p { color: var(--muted); font-size: 14px; }.resource-card small { font-size: 11px; color: var(--muted); }.empty-state { padding: 25px 0; color: var(--muted); }
.archive-list article { display: grid; grid-template-columns: 105px minmax(0,1fr); padding: 15px 0; border-bottom: 1px solid var(--line); gap: 16px; }.tag-section { padding: 20px 0; }
.site-footer { max-width: 1180px; margin: 0 auto; padding: 24px 0 40px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); }.site-footer span { float: right; }
dialog { border: 1px solid var(--line); border-radius: 12px; padding: 28px; width: min(700px, calc(100% - 32px)); max-height: 80vh; background: var(--paper); color: var(--ink); box-shadow: 0 20px 80px #18261733; }
dialog::backdrop { background: #17201877; }.dialog-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }.dialog-heading h2 { font-size: 22px; margin: 0; }.dialog-heading button { font-size: 12px; }
#search-form { display: flex; gap: 10px; }#search-input { flex: 1; width: 100%; }#search-status { color: var(--muted); font-size: 13px; }.search-results { padding: 0; margin: 0; list-style: none; }.search-results li { border-top: 1px solid var(--line); padding: 16px 0; }.search-results small { display: block; font-size: 11px; color: var(--muted); }.search-results a { font-weight: 650; }.search-results p { font-size: 13px; margin: 6px 0 0; color: var(--muted); }mark { background: #e5e4a5; color: inherit; }
.sr-only, .skip-link { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }.skip-link:focus { position: fixed; top: 10px; left: 10px; width: auto; height: auto; clip-path: none; padding: 10px; background: white; z-index: 10; }
@media (max-width: 1000px) { .shell { gap: 40px; grid-template-columns: 180px minmax(0,1fr); padding: 40px 28px; }.brand { font-size: 16px; gap: 10px; }.brand img { width: 42px; height: 42px; }.card-grid { grid-template-columns: repeat(auto-fit,minmax(190px,1fr)); }.site-footer { margin: 0 28px; } }
@media (max-width: 700px) { .shell { display: block; padding: 24px 22px 40px; }.sidebar { position: static; margin-bottom: 35px; display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; }.brand { font-size: 18px; }.menu-toggle { display: block; font-size: 12px; padding: 7px 10px; }.sidebar nav { grid-column: 1 / -1; display: none; margin-top: 0; grid-template-columns: repeat(2,1fr); }.menu-toggle[aria-expanded="true"] + nav { display: grid; }.sidebar nav button { margin-top: 0; padding-top: 8px; border: none; }.sidebar-note, .sidebar-links { display: none; }.hero { padding-top: 0; }.hero h1 { font-size: 36px; }.card-grid { grid-template-columns: 1fr; }.card { padding: 22px; }.post-list article { grid-template-columns: 1fr; gap: 6px; }.post-list time { padding: 0; }.page-heading h1 { font-size: 29px; }.resource-controls { grid-template-columns: auto minmax(0,1fr); }.site-footer { margin: 0 22px; }.site-footer span { display: block; float: none; }.book-banner { padding: 24px; }.archive-list article { grid-template-columns: 80px minmax(0,1fr); gap: 12px; }dialog { padding: 20px; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print { body { background: white; color: black; font-size: 11pt; }.shell { display: block; max-width: none; padding: 0; }.sidebar, .site-footer, .comments, .skip-link, #print-resume, dialog, .related, .chapter-nav { display: none !important; }.page-heading { margin-bottom: 15px; padding-bottom: 12px; }.page-heading h1 { font-size: 26pt; }.prose h2 { font-size: 16pt; margin-top: 20px; }.prose h3 { font-size: 12pt; }.experience { break-inside: avoid; }.tags span { background: transparent; border: 1px solid #ddd; }.inline-links a { font-size: 10pt; } }
