:root {
  color-scheme: light;
  --bg: #faf9f6;
  --surface: #ffffff;
  --surface-soft: #f3f1eb;
  --text: #30342f;
  --muted: #73796f;
  --muted-soft: #9aa096;
  --line: #e2e0d9;
  --line-strong: #cbc9c0;
  --accent: #436b58;
  --accent-soft: #dfece1;
  --graph: #89a58d;
  --warning: #b36a4c;
  --shadow: rgba(37, 46, 38, 0.09);
  --serif: "Noto Serif SC", "Songti SC", STSong, serif;
  --sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "DM Mono", "SFMono-Regular", Consolas, monospace;
  --sidebar-width: 280px;
  --right-sidebar-width: clamp(288px, 22vw, 400px);
}

[data-sidebar="collapsed"] {
  --sidebar-width: 72px;
  --right-sidebar-width: clamp(400px, 30vw, 560px);
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #171a18;
  --surface: #202521;
  --surface-soft: #272d28;
  --text: #e9e9e2;
  --muted: #afb5ac;
  --muted-soft: #737d74;
  --line: #353c36;
  --line-strong: #515a51;
  --accent: #a8d0ad;
  --accent-soft: #263b2c;
  --graph: #9cc2a2;
  --warning: #d99675;
  --shadow: rgba(0, 0, 0, 0.28);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); scroll-behavior: smooth; scrollbar-gutter: stable; }
body { min-width: 320px; margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 15px; line-height: 1.65; text-rendering: optimizeLegibility; }
body::before { position: fixed; z-index: -1; inset: 0; background-image: radial-gradient(circle at 2px 2px, color-mix(in srgb, var(--line) 56%, transparent) 1px, transparent 0); background-size: 26px 26px; content: ""; opacity: 0.23; pointer-events: none; }
::selection { background: var(--accent-soft); color: var(--text); }
a { color: inherit; }
button, input { font: inherit; }
button { color: inherit; }

.mobile-header { display: none; }
.reader-exit { position: fixed; z-index: 19; top: 18px; left: 18px; display: none; align-items: center; gap: 5px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 6px; background: color-mix(in srgb, var(--surface) 92%, transparent); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08); color: var(--muted); cursor: pointer; font-size: 12px; backdrop-filter: blur(8px); }.reader-exit:hover { border-color: var(--accent); color: var(--accent); }.reader-exit span { font-family: var(--serif); font-size: 21px; line-height: 11px; }
.quartz-shell { display: grid; grid-template-columns: minmax(216px, 264px) minmax(0, 750px) minmax(204px, 250px); gap: clamp(28px, 4vw, 68px); width: min(1500px, calc(100% - 54px)); min-height: 100vh; margin: 0 auto; }
.content-column { min-width: 0; padding: 54px 0 36px; }
.sidebar { align-self: start; min-width: 0; }
.sidebar--left { position: sticky; top: 0; height: 100vh; padding: 50px 0 32px; overflow-y: auto; scrollbar-width: thin; }
.sidebar--right { position: sticky; top: 0; max-height: 100vh; padding: 58px 0 30px; overflow-y: auto; scrollbar-color: color-mix(in srgb, var(--muted-soft) 48%, transparent) transparent; scrollbar-gutter: stable; scrollbar-width: thin; }
.sidebar--right::-webkit-scrollbar { width: 8px; }
.sidebar--right::-webkit-scrollbar-track { background: transparent; }
.sidebar--right::-webkit-scrollbar-thumb { min-height: 44px; border: 2px solid transparent; border-radius: 999px; background: color-mix(in srgb, var(--muted-soft) 48%, transparent); background-clip: padding-box; }
.sidebar--right::-webkit-scrollbar-thumb:hover { background-color: color-mix(in srgb, var(--accent) 72%, transparent); }

.sidebar-brand { display: inline-flex; gap: 10px; align-items: center; margin-bottom: 28px; color: var(--text); font-family: var(--serif); font-size: 21px; font-weight: 700; letter-spacing: -0.03em; text-decoration: none; }
.sidebar-brand__mark { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 9px 9px 9px 2px; background: var(--accent); color: var(--surface); font-family: var(--serif); font-size: 19px; line-height: 1; transform: rotate(-7deg); }
.sidebar-actions { display: flex; gap: 8px; align-items: center; margin-bottom: 35px; }
.sidebar-search { display: flex; min-width: 0; flex: 1; gap: 7px; align-items: center; padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--muted); cursor: pointer; font-size: 12px; text-align: left; transition: border-color 150ms ease, color 150ms ease; }
.sidebar-search:hover, .icon-button:hover { border-color: var(--accent); color: var(--accent); }
.sidebar-search > span:first-child { font-family: var(--serif); font-size: 19px; line-height: 0.8; }.sidebar-search kbd { margin-left: auto; color: var(--muted-soft); font-family: var(--mono); font-size: 9px; }
.icon-button { display: grid; width: 31px; height: 31px; flex: 0 0 auto; place-items: center; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--muted); cursor: pointer; font-size: 15px; transition: border-color 150ms ease, color 150ms ease; }

.explorer { border-top: 1px solid var(--line); }
.explorer__title { display: flex; width: 100%; align-items: center; justify-content: space-between; padding: 13px 0; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--text); cursor: pointer; font-family: var(--serif); font-size: 18px; font-weight: 600; text-align: left; }.explorer__chevron { color: var(--muted); font-family: var(--sans); font-size: 17px; transition: transform 160ms ease; }.explorer.is-collapsed .explorer__chevron { transform: rotate(-90deg); }.explorer.is-collapsed .explorer__tree { display: none; }
.explorer__tree { padding: 10px 0; font-size: 13px; }.sidebar-loading { color: var(--muted); font-size: 12px; }.explorer__tree ul { margin: 0; padding-left: 14px; list-style: none; }.explorer__tree > ul { padding-left: 0; }.explorer__tree li { position: relative; min-width: 0; }.explorer-folder { display: flex; width: 100%; gap: 6px; align-items: center; padding: 4px 0; border: 0; background: transparent; color: var(--text); cursor: pointer; font: inherit; text-align: left; }.explorer-folder:hover { color: var(--accent); }.explorer-folder__arrow { width: 10px; color: var(--muted-soft); font-size: 11px; transition: transform 140ms ease; }.explorer-folder.is-collapsed + ul { display: none; }.explorer-folder.is-collapsed .explorer-folder__arrow { transform: rotate(-90deg); }.explorer-file { display: block; overflow: hidden; padding: 4px 8px 4px 16px; border-radius: 4px; color: var(--muted); text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }.explorer-file:hover, .explorer-file.is-current { color: var(--accent); }.explorer-file.is-current { background: var(--accent-soft); font-weight: 700; }

.side-panel { margin-bottom: 25px; padding-bottom: 21px; border-bottom: 1px solid var(--line); }.side-panel__header { display: flex; min-height: 24px; align-items: center; justify-content: space-between; gap: 10px; }.side-panel__header h2 { margin: 0; font-family: var(--serif); font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }.side-panel__header h2 span { margin-left: 6px; color: var(--muted); font-family: var(--mono); font-size: 10px; font-weight: 400; }.graph-open { display: grid; width: 22px; height: 22px; place-items: center; border: 0; border-radius: 4px; background: transparent; color: var(--muted); cursor: pointer; font-family: var(--mono); font-size: 15px; }.graph-open:hover { background: var(--surface-soft); color: var(--accent); }
.knowledge-graph, .global-graph { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 5px; background: color-mix(in srgb, var(--surface-soft) 54%, transparent); }.knowledge-graph { height: 245px; margin-top: 8px; }.global-graph { height: min(67vh, 620px); }.graph-pixi-canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; }.graph-pixi-canvas.is-panning { cursor: grabbing; }.graph-empty { display: grid; height: 100%; place-items: center; padding: 12px; color: var(--muted); font-size: 11px; text-align: center; }.graph-data-status { margin: 7px 0 0; color: var(--muted); font-family: var(--mono); font-size: 9px; line-height: 1.45; }.graph-summary { display: grid; align-content: center; height: 100%; padding: 14px; color: var(--muted); font-size: 11px; }.graph-summary strong { color: var(--text); font-family: var(--serif); font-size: 14px; }.graph-summary p { margin: 2px 0 8px; font-family: var(--mono); font-size: 9px; }.graph-summary__list { display: grid; gap: 3px; margin: 0; padding: 0; list-style: none; }.graph-summary__list a { color: var(--accent); text-decoration: none; }.graph-summary__list a:hover { text-decoration: underline; text-underline-offset: 0.18em; }.graph-tooltip { position: absolute; z-index: 2; max-width: 168px; overflow: hidden; padding: 4px 6px; border: 1px solid var(--line-strong); border-radius: 3px; background: var(--surface); box-shadow: 0 4px 12px var(--shadow); color: var(--text); font-size: 10px; line-height: 1.3; pointer-events: none; text-overflow: ellipsis; white-space: nowrap; }
.toc-links { display: grid; gap: 5px; margin-top: 10px; }.toc-links a { position: relative; display: block; overflow: hidden; padding-left: 14px; color: var(--muted-soft); font-size: 12px; line-height: 1.45; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; transition: color 150ms ease; }.toc-links a::before { position: absolute; top: 0.45em; left: 0; width: 6px; height: 6px; border: 1px solid var(--line-strong); border-radius: 50%; background: transparent; content: ""; transition: background 150ms ease, border-color 150ms ease, box-shadow 150ms ease; }.toc-links a[data-read="read"] { color: var(--muted); }.toc-links a[data-read="read"]::before { border-color: var(--graph); background: var(--graph); }.toc-links a.is-current { color: var(--accent); font-weight: 700; }.toc-links a.is-current::before { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }.toc-links a:hover { color: var(--accent); }.toc-links a[data-level="3"] { padding-left: 25px; font-size: 11px; }
.backlink-list { display: grid; gap: 6px; margin: 11px 0 0; padding: 0; list-style: none; }.backlink-list a { display: grid; gap: 1px; color: var(--muted); font-size: 12px; line-height: 1.45; text-decoration: none; }.backlink-list a:hover { color: var(--accent); }.backlink-list small { color: var(--muted-soft); font-family: var(--mono); font-size: 9px; }.panel-empty { margin: 10px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }

.page { min-width: 0; }.page--home { max-width: 730px; }.page--list { max-width: 720px; }.page--article { max-width: 750px; }
.article-header { margin-bottom: 30px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }.article-header--home { margin-bottom: 35px; }.article-header h1 { max-width: 100%; margin: 8px 0 10px; color: var(--text); font-family: var(--serif); font-size: clamp(34px, 4.1vw, 48px); font-weight: 700; letter-spacing: -0.045em; line-height: 1.22; }.article-header--home h1 { font-size: clamp(38px, 4.7vw, 55px); }.breadcrumbs { display: flex; gap: 7px; flex-wrap: wrap; margin: 0; color: var(--muted); font-size: 12px; }.breadcrumbs a { color: var(--muted); text-decoration: none; }.breadcrumbs a:hover { color: var(--accent); }.content-meta { display: flex; gap: 11px; align-items: center; margin: 0; color: var(--muted); font-family: var(--mono); font-size: 10px; }.content-meta span + span::before { margin-right: 11px; color: var(--line-strong); content: "·"; }
.tag-list { display: flex; gap: 7px; flex-wrap: wrap; margin: 20px 0 0; padding: 0; list-style: none; }.tag-list a { display: block; padding: 2px 8px; border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line)); border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-family: var(--mono); font-size: 10px; text-decoration: none; }.tag-list a:hover { border-color: var(--accent); }

.post-content { color: var(--text); font-family: var(--serif); font-size: 16.5px; line-height: 1.9; }.post-content > :first-child { margin-top: 0; }.post-content p, .post-content ul, .post-content ol, .post-content blockquote, .post-content pre, .post-content table, .post-content .obsidian-callout, .post-content .oj-card-wrap, .post-content figure { margin: 0 0 25px; }.post-content h2, .post-content h3, .post-content h4 { position: relative; margin: 54px 0 17px; color: var(--text); font-family: var(--serif); font-weight: 700; letter-spacing: -0.025em; line-height: 1.35; scroll-margin-top: 30px; }.post-content h2 { font-size: 26px; }.post-content h3 { font-size: 20px; }.post-content h4 { font-size: 17px; }.post-content h2::before { position: absolute; top: 0.43em; left: -15px; width: 4px; height: 0.95em; border-radius: 2px; background: var(--accent); content: ""; }.post-content a { color: var(--accent); text-decoration-color: color-mix(in srgb, var(--accent) 43%, transparent); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }.post-content a:hover { color: var(--warning); text-decoration-color: var(--warning); }.post-content strong { font-weight: 700; }.post-content ul, .post-content ol { padding-left: 1.45em; }.post-content li + li { margin-top: 5px; }.post-content li::marker { color: var(--accent); }.post-content hr { height: 1px; margin: 44px 0; border: 0; background: var(--line); }.post-content blockquote { padding: 3px 0 3px 19px; border-left: 3px solid var(--accent); color: var(--muted); }.post-content blockquote p:last-child { margin-bottom: 0; }.post-content img, .post-content .obsidian-embed { display: block; max-width: 100%; height: auto; margin: 28px auto; border: 1px solid var(--line); border-radius: 4px; box-shadow: 0 8px 22px var(--shadow); }.post-content code { padding: 0.12em 0.32em; border: 1px solid var(--line); border-radius: 4px; background: var(--surface-soft); font-family: var(--mono); font-size: 0.8em; }.post-content pre { padding: 16px 18px; overflow: auto; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); box-shadow: 0 4px 12px var(--shadow); font-family: var(--mono); font-size: 12px; line-height: 1.7; }.post-content pre code { padding: 0; border: 0; background: transparent; }.post-content table { display: block; width: 100%; overflow: auto; border-collapse: collapse; font-family: var(--sans); font-size: 13px; line-height: 1.55; }.post-content th, .post-content td { min-width: 85px; padding: 9px 11px; border: 1px solid var(--line); text-align: left; }.post-content th { background: var(--surface-soft); font-weight: 600; }
.obsidian-callout { padding: 14px 17px !important; border: 1px solid color-mix(in srgb, var(--accent) 33%, var(--line)); border-left: 4px solid var(--accent) !important; border-radius: 4px; background: var(--accent-soft); color: var(--text); }.obsidian-callout > p:first-child { color: var(--accent); font-family: var(--sans); }.obsidian-callout--warning, .obsidian-callout--caution { border-left-color: var(--warning) !important; background: color-mix(in srgb, var(--warning) 8%, var(--surface)); }.obsidian-callout--warning > p:first-child, .obsidian-callout--caution > p:first-child { color: var(--warning); }.oj-card-wrap { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; height: auto !important; }.oj-card { width: auto !important; padding: 0 !important; position: static !important; }.oj-card__body { height: 100%; padding: 14px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); }.oj-card__title { color: var(--accent); font-family: var(--sans); font-weight: 700; }.oj-card__desc { margin-top: 3px; color: var(--muted); font-size: 12px; }.oj-card pre { margin: 10px 0 0; white-space: pre-wrap; font-size: 11px; }
.reading-progress { position: sticky; z-index: 3; top: 0; height: 2px; margin-bottom: 24px; background: var(--line); }.reading-progress span { display: block; width: 0; height: 100%; background: var(--accent); transition: width 60ms linear; }.post-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 60px; }.post-nav a { display: grid; gap: 13px; min-height: 88px; padding: 14px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); color: var(--text); text-decoration: none; transition: border-color 150ms ease, transform 150ms ease; }.post-nav a:hover { border-color: var(--accent); transform: translateY(-2px); }.post-nav small { color: var(--muted); font-family: var(--mono); font-size: 10px; }.post-nav span { font-family: var(--serif); font-size: 15px; font-weight: 600; line-height: 1.5; }

.home-content { font-size: 17px; }.home-section { margin-top: 53px; }.home-section h2 { margin-top: 0; }.home-group { margin: 28px 0; }.home-group h3 { margin: 0; color: var(--accent); font-size: 19px; }.home-group p { margin: 5px 0 13px; color: var(--muted); font-family: var(--sans); font-size: 13px; }.home-category-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }.home-category-grid a { display: flex; gap: 10px; align-items: baseline; justify-content: space-between; padding: 9px 11px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--text); font-family: var(--sans); font-size: 13px; text-decoration: none; }.home-category-grid a:hover { border-color: var(--accent); color: var(--accent); }.home-category-grid small { color: var(--muted); font-family: var(--mono); font-size: 9px; }.section-title-row { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; }.section-title-row a { color: var(--muted); font-family: var(--sans); font-size: 12px; }
.compact-note-list { border-top: 1px solid var(--line); }.compact-note-list a { display: grid; grid-template-columns: 88px minmax(0, 1fr) 78px; gap: 12px; align-items: center; min-height: 45px; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; transition: padding 150ms ease, background 150ms ease; }.compact-note-list a:hover { padding: 0 7px; background: var(--surface-soft); }.compact-note-list time, .compact-note-list small { overflow: hidden; color: var(--muted); font-family: var(--mono); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }.compact-note-list > a > span { overflow: hidden; font-family: var(--serif); font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }.compact-note-list--full { margin-top: 0; }.archive-list { margin-top: 42px; }.year-group { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 22px; margin-bottom: 55px; }.year-group h2 { margin: -6px 0 0; color: var(--accent); font-family: var(--serif); font-size: 31px; letter-spacing: -0.04em; }

.site-footer { display: flex; gap: 11px 18px; flex-wrap: wrap; margin-top: 64px; padding: 19px 0 4px; border-top: 1px solid var(--line); color: var(--muted); font-family: var(--mono); font-size: 9px; }.site-footer a { color: var(--accent); text-decoration: none; }

.search-dialog, .graph-dialog { position: fixed; z-index: 20; inset: 0; display: grid; place-items: start center; padding: min(13vh, 110px) 24px 24px; opacity: 0; pointer-events: none; transition: opacity 150ms ease; }.search-dialog.is-open, .graph-dialog.is-open { opacity: 1; pointer-events: auto; }.search-dialog__backdrop, .graph-dialog__backdrop { position: absolute; inset: 0; border: 0; background: rgba(16, 20, 17, 0.56); backdrop-filter: blur(5px); }.search-dialog__panel, .graph-dialog__panel { position: relative; width: min(680px, 100%); overflow: hidden; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); box-shadow: 0 20px 55px rgba(0, 0, 0, 0.26); transform: translateY(-8px); transition: transform 150ms ease; }.search-dialog.is-open .search-dialog__panel, .graph-dialog.is-open .graph-dialog__panel { transform: translateY(0); }.search-dialog__input-row { display: flex; height: 62px; align-items: center; gap: 11px; padding: 0 16px; border-bottom: 1px solid var(--line); }.search-dialog__symbol { color: var(--accent); font-family: var(--serif); font-size: 29px; }.search-dialog__input-row input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font-family: var(--serif); font-size: 18px; }.search-dialog__close { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-family: var(--mono); font-size: 10px; }.search-dialog__hint { margin: 12px 16px; color: var(--muted); font-size: 12px; }.search-dialog__results { max-height: min(56vh, 480px); overflow: auto; }.search-result { display: grid; grid-template-columns: 1fr auto; gap: 5px 14px; padding: 12px 16px; border-top: 1px solid var(--line); color: var(--text); text-decoration: none; }.search-result:hover { background: var(--surface-soft); }.search-result strong { font-family: var(--serif); font-size: 15px; }.search-result > span { color: var(--accent); font-family: var(--mono); font-size: 9px; }.search-result p { grid-column: 1 / -1; margin: 0; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }.search-empty { margin: 0; padding: 24px 16px; color: var(--muted); font-size: 12px; }
.graph-dialog { padding-top: min(8vh, 75px); }.graph-dialog__panel { width: min(1050px, 100%); }.graph-dialog__header { display: flex; align-items: center; justify-content: space-between; padding: 17px 20px; border-bottom: 1px solid var(--line); }.graph-dialog__header span { color: var(--muted); font-family: var(--mono); font-size: 9px; letter-spacing: 0.08em; }.graph-dialog__header h2 { margin: 3px 0 0; font-family: var(--serif); font-size: 23px; }.graph-dialog__actions { display: flex; gap: 12px; align-items: center; }.graph-dialog__header button { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-family: var(--mono); font-size: 10px; }.graph-dialog__header button:hover { color: var(--accent); }.graph-dialog__hint { margin: 0; padding: 9px 20px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; }

body.reading-mode .quartz-shell { display: block; width: min(800px, calc(100% - 40px)); }.reading-mode .sidebar { display: none; }.reading-mode .content-column { padding-top: 54px; }.reading-mode .page--article { max-width: 760px; margin: 0 auto; }.reading-mode .post-content { font-size: 18px; line-height: 2; }
body.reading-mode .reader-exit { display: inline-flex; }
.explorer-file { transition: background-color 120ms ease, color 120ms ease; }

@view-transition { navigation: auto; }
@keyframes page-reveal { from { opacity: 0.55; } }
::view-transition-old(root) { animation: none; }
::view-transition-new(root) { animation: 140ms ease-out both page-reveal; }

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

@media (max-width: 1120px) { .quartz-shell { grid-template-columns: minmax(205px, 245px) minmax(0, 1fr); gap: 34px; width: min(1040px, calc(100% - 48px)); }.sidebar--right { display: none; }.content-column { max-width: 760px; }.page--home, .page--list, .page--article { max-width: none; } }
@media (max-width: 760px) { body { font-size: 14px; }.mobile-header { position: sticky; z-index: 10; top: 0; display: flex; height: 52px; align-items: center; justify-content: space-between; padding: 0 17px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 91%, transparent); backdrop-filter: blur(12px); }.mobile-header a { color: var(--text); font-family: var(--serif); font-size: 17px; font-weight: 700; text-decoration: none; }.mobile-header div { display: flex; gap: 4px; }.mobile-header button { display: grid; width: 28px; height: 28px; place-items: center; border: 0; border-radius: 4px; background: transparent; color: var(--muted); cursor: pointer; font-size: 15px; }.mobile-header button:hover { background: var(--surface-soft); color: var(--accent); }.quartz-shell { display: block; width: min(100% - 32px, 760px); }.content-column { padding: 34px 0 26px; }.sidebar--left { position: fixed; z-index: 15; top: 0; bottom: 0; left: 0; width: min(310px, 84vw); height: auto; padding: 70px 20px 25px; border-right: 1px solid var(--line); background: var(--bg); box-shadow: 14px 0 35px rgba(0, 0, 0, 0.16); transform: translateX(-105%); transition: transform 190ms ease; }.sidebar--left.is-open { transform: translateX(0); }.sidebar--left::after { position: fixed; z-index: -1; inset: 0 auto 0 100%; width: 100vw; background: rgba(0, 0, 0, 0.3); content: ""; opacity: 0; pointer-events: none; }.sidebar--left.is-open::after { opacity: 1; pointer-events: auto; }.sidebar--right { display: none; }.article-header { margin-bottom: 25px; padding-bottom: 22px; }.article-header h1, .article-header--home h1 { font-size: clamp(31px, 9vw, 43px); }.post-content { font-size: 16px; line-height: 1.82; }.post-content h2 { font-size: 23px; }.post-content h2::before { left: -10px; width: 3px; }.post-content pre { margin-right: -2px; margin-left: -2px; padding: 13px; }.home-category-grid { grid-template-columns: 1fr; }.compact-note-list a { grid-template-columns: 73px minmax(0, 1fr); gap: 9px; }.compact-note-list small { display: none; }.year-group { display: block; margin-bottom: 42px; }.year-group h2 { margin: 0 0 14px; font-size: 28px; }.post-nav { grid-template-columns: 1fr; margin-top: 45px; }.site-footer { margin-top: 45px; }.search-dialog, .graph-dialog { padding: 55px 12px 12px; }.graph-dialog__header h2 { font-size: 20px; }.global-graph { height: 70vh; padding: 4px; }.reading-mode .quartz-shell { width: min(100% - 32px, 760px); }.reading-mode .mobile-header { display: flex; }.reading-mode .content-column { padding-top: 34px; } }

/*
 * Reading theme
 * A warm, bookish skin inspired by the NeoXMind reading prototype.
 * The first section above remains the component baseline; these rules define
 * the finished visual system and keep older generated markup compatible.
 */
:root {
  color-scheme: light;
  --bg: #f5efe2;
  --surface: #fbf7ec;
  --surface-soft: #f0e8d5;
  --text: #2e2419;
  --muted: #000;
  --muted-soft: #7d6d56;
  --line: #d8cbb5;
  --line-strong: #aa9678;
  --accent: #8c4b28;
  --accent-soft: color-mix(in srgb, var(--accent) 9%, transparent);
  --graph: #9c6948;
  --warning: #843d38;
  --shadow: rgba(76, 52, 29, 0.12);
  --serif: "Noto Serif SC", "Songti SC", STSong, serif;
  --sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "DM Mono", "SFMono-Regular", Consolas, monospace;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #211b12;
  --surface: #2a2318;
  --surface-soft: #2f271a;
  --text: #f1e7d4;
  --muted: #c4b28f;
  --muted-soft: #ad9b7e;
  --line: #4b402f;
  --line-strong: #796c55;
  --accent: #e0ad69;
  --accent-soft: color-mix(in srgb, var(--accent) 11%, transparent);
  --graph: #d5a06a;
  --warning: #e79b81;
  --shadow: rgba(0, 0, 0, 0.3);
}

html {
  background: var(--bg);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

body::before {
  display: none;
}

a,
button,
input {
  transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease, opacity 180ms ease, transform 180ms ease;
}

::selection {
  background: color-mix(in srgb, var(--accent) 26%, transparent);
  color: var(--text);
}

.quartz-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  gap: 0;
  width: 100%;
  min-height: 100vh;
  margin: 0;
  transition: grid-template-columns 220ms ease;
}

.content-column {
  grid-column: 2;
  min-width: 0;
  padding: 0 32px 32px;
}

.sidebar--left {
  position: sticky;
  z-index: 4;
  top: 0;
  display: flex;
  grid-column: 1;
  grid-row: 1;
  height: 100vh;
  flex-direction: column;
  align-self: start;
  padding: 28px 22px 24px;
  overflow-x: hidden;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 55%, var(--bg));
  scrollbar-color: color-mix(in srgb, var(--line-strong) 58%, transparent) transparent;
  scrollbar-width: thin;
  transition: padding 220ms ease;
}

.sidebar-heading {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.sidebar-brand {
  display: flex;
  min-width: 0;
  gap: 12px;
  align-items: center;
  margin: 0;
  color: var(--text);
  font-family: var(--serif);
  text-decoration: none;
}

.sidebar-brand:hover {
  color: var(--accent);
}

.sidebar-brand__mark {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border-radius: 9px;
  background: var(--accent);
  color: #fbf5e6;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
  transform: none;
}

.sidebar-brand__mark img {
  display: block;
  width: 100%;
  height: 100%;
}

.sidebar-brand__text {
  display: grid;
  max-width: 170px;
  overflow: hidden;
  color: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.55;
  opacity: 1;
  white-space: nowrap;
  transition: max-width 180ms ease, opacity 140ms ease;
}

.sidebar-brand__text strong {
  font-weight: 600;
}

.sidebar-brand__text small {
  color: inherit;
  font-size: inherit;
}

.sidebar-collapse-toggle {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  color: var(--muted-soft);
  cursor: pointer;
}

.sidebar-collapse-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.sidebar-collapse-toggle svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  transition: transform 220ms ease;
}

.sidebar-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin: 0 0 22px;
}

.sidebar-search {
  display: flex;
  width: 100%;
  height: 38px;
  gap: 8px;
  align-items: center;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  font-family: var(--serif);
  font-size: 13.5px;
  text-align: left;
}

.sidebar-search svg,
.utility-button svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.sidebar-search:hover,
.utility-button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.sidebar-search kbd {
  margin-left: auto;
  padding: 0 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted-soft);
  font-family: var(--serif);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.03em;
}

.utility-button {
  display: flex;
  height: 38px;
  gap: 8px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  font-family: var(--serif);
  font-size: 13px;
}

.utility-button--theme {
  min-width: 72px;
  flex: 0 0 auto;
  padding: 0 9px;
}

.utility-button__sun {
  display: none;
}

[data-theme="dark"] .utility-button__moon {
  display: none;
}

[data-theme="dark"] .utility-button__sun {
  display: block;
}

@media (min-width: 761px) {
  [data-sidebar="collapsed"] .sidebar--left {
    padding: 20px 16px 22px;
    overflow-y: hidden;
  }

  [data-sidebar="collapsed"] .sidebar-heading {
    flex-direction: column;
    gap: 12px;
    margin-bottom: 18px;
  }

  [data-sidebar="collapsed"] .sidebar-brand {
    gap: 0;
  }

  [data-sidebar="collapsed"] .sidebar-brand__text {
    max-width: 0;
    opacity: 0;
    visibility: hidden;
  }

  [data-sidebar="collapsed"] .sidebar-collapse-toggle svg {
    transform: rotate(180deg);
  }

  [data-sidebar="collapsed"] .sidebar-actions {
    grid-template-columns: 38px;
    justify-content: center;
    margin-bottom: 0;
  }

  [data-sidebar="collapsed"] .sidebar-search,
  [data-sidebar="collapsed"] .utility-button--theme {
    width: 38px;
    min-width: 38px;
    gap: 0;
    justify-content: center;
    padding: 0;
  }

  [data-sidebar="collapsed"] .sidebar-search > span,
  [data-sidebar="collapsed"] .sidebar-search kbd,
  [data-sidebar="collapsed"] .utility-button--theme > span,
  [data-sidebar="collapsed"] .sidebar-external-links,
  [data-sidebar="collapsed"] .explorer,
  [data-sidebar="collapsed"] .sidebar-signature {
    display: none;
  }
}

.sidebar-external-links {
  display: grid;
  gap: 2px;
  margin: 0 0 12px;
}

.sidebar-external-links a {
  display: flex;
  min-height: 32px;
  align-items: center;
  justify-content: space-between;
  padding: 4px 10px;
  border-radius: 7px;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 13px;
  text-decoration: none;
}

.sidebar-external-links a:hover,
.sidebar-external-links a:focus-visible {
  background: var(--accent-soft);
  color: var(--accent);
  outline: none;
}

.sidebar-external-links svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.garden-nav {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.garden-nav__home,
.garden-nav__link {
  display: flex;
  align-items: center;
  border-radius: 8px;
  color: var(--text);
  font-family: var(--serif);
  text-decoration: none;
}

.garden-nav__home {
  gap: 10px;
  padding: 7px 10px;
  font-size: 14.5px;
}

.garden-nav__home span {
  color: var(--accent);
  font-size: 11px;
}

.garden-nav__home:hover,
.garden-nav__home.is-current,
.garden-nav__link:hover,
.garden-nav__link.is-current {
  background: var(--accent-soft);
  color: var(--accent);
}

.garden-nav__eyebrow {
  margin: 18px 0 15px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.25em;
}

.garden-nav__group {
  margin: 0 0 13px;
}

.garden-nav__group h2 {
  margin: 0;
  padding: 0 10px 5px;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: 0.08em;
}

.garden-nav__link {
  min-height: 29px;
  padding: 4px 10px 4px 20px;
  font-size: 14px;
}

.explorer {
  margin-top: 5px;
  border-top: 1px solid var(--line);
}

.explorer__tree {
  padding: 10px 0 8px;
  font-family: var(--serif);
  font-size: 14.5px;
  line-height: 1.55;
}

.explorer__tree ul {
  padding-left: 4px;
}

.explorer__tree > ul {
  padding-left: 0;
}

.explorer__tree li {
  border-bottom: 1px solid color-mix(in srgb, var(--line) 42%, transparent);
}

.explorer-folder {
  padding: 5px 8px 5px 4px;
  border-radius: 6px;
  color: var(--text);
  font-family: var(--serif);
  font-size: inherit;
}

.explorer-folder:hover {
  background: var(--accent-soft);
}

.explorer-file {
  display: -webkit-box;
  overflow: hidden;
  padding: 5px 8px 5px 21px;
  border-radius: 6px;
  color: var(--muted);
  font-family: var(--serif);
  font-size: inherit;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.55;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
}

.explorer-file:hover,
.explorer-file.is-current {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.graph-view-controls {
  display: flex;
  gap: 1px;
  align-items: center;
}

.graph-view-button {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease;
}

.graph-view-button svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.45;
}

.graph-view-button:hover,
.graph-view-button:focus-visible,
.graph-view-button.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  outline: none;
}

.sidebar-signature {
  margin: auto 0 0;
  padding-top: 20px;
  color: var(--muted-soft);
  font-size: 11.5px;
  letter-spacing: 0.05em;
  line-height: 1.85;
}

.sidebar--right {
  display: none;
}

.page--home,
.page--list {
  width: min(720px, 100%);
  max-width: none;
  margin: 0 auto;
  padding: 56px 0 24px;
}

.page--home {
  padding-top: 60px;
}

.page--article {
  width: 100%;
  max-width: 680px;
}

.article-header {
  margin: 0 0 30px;
  padding: 0 0 27px;
  border-bottom: 1px solid var(--line);
}

.article-header--home {
  margin: 0;
  padding: 0;
  border: 0;
}

.article-header--home .breadcrumbs {
  display: none;
}

.article-header h1 {
  margin: 0 0 14px;
  color: var(--text);
  font-family: var(--serif);
  font-size: clamp(32px, 3.3vw, 36px);
  font-weight: 700;
  letter-spacing: 0.025em;
  line-height: 1.5;
}

.article-header--home h1 {
  margin-bottom: 0.88em;
  font-size: clamp(36px, 3.6vw, 39px);
  letter-spacing: 0.03em;
  line-height: 1.45;
}

.breadcrumbs {
  gap: 8px;
  margin: 0 0 20px;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 13.5px;
  letter-spacing: 0.05em;
}

.breadcrumbs a {
  color: var(--muted);
}

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

.content-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 0;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: 0.035em;
}

.content-meta > * + *::before {
  margin: 0 10px;
  color: var(--line-strong);
  content: "·";
}

.article-source {
  color: var(--muted);
  font-family: var(--serif);
  font-size: 13.5px;
}

.article-source span {
  font-family: var(--serif);
}

.tag-list {
  gap: 8px;
  margin-top: 16px;
}

.tag-list a {
  padding: 3px 9px;
  border: 0;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--serif);
  font-size: 12.5px;
  letter-spacing: 0.025em;
}

.post-content {
  color: var(--text);
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: 0.015em;
  line-height: 1.8;
}

.post-content p,
.post-content ul,
.post-content ol,
.post-content blockquote,
.post-content pre,
.post-content table,
.post-content .obsidian-callout,
.post-content .oj-card-wrap,
.post-content figure {
  margin: 0 0 1.3em;
}

.post-content h2,
.post-content h3,
.post-content h4 {
  margin: 2.35em 0 0.9em;
  color: var(--text);
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: 0.025em;
  line-height: 1.55;
}

.post-content h2 {
  font-size: 25px;
}

.post-content h3 {
  font-size: 20.5px;
}

.post-content h4 {
  font-size: 18px;
}

.post-content h2::before {
  top: 0.74em;
  left: -19px;
  width: auto;
  height: auto;
  background: none;
  color: var(--accent);
  content: "✦";
  font-size: 10px;
  line-height: 1;
}

.home-content h2::before,
.home-content h3::before {
  display: none;
}

.home-content h2 {
  margin: 0 0 1em;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.home-content h3 {
  margin: 1.8em 0 0.7em;
  font-size: 20.5px;
  font-weight: 600;
}

.post-content ul,
.post-content ol {
  padding-left: 1.35em;
}

.home-content ul {
  padding-left: 1em;
  list-style: none;
}

.home-content li {
  position: relative;
  padding-left: 0.15em;
}

.home-content li::before {
  position: absolute;
  left: -0.85em;
  color: var(--accent);
  content: "·";
}

.post-content li + li {
  margin-top: 0.25em;
}

.post-content li::marker {
  color: var(--accent);
}

.post-content a {
  color: var(--accent);
  text-decoration-color: color-mix(in srgb, var(--accent) 42%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.28em;
}

.post-content a:hover {
  color: var(--warning);
  text-decoration-color: currentColor;
}

.post-content hr {
  position: relative;
  height: 11px;
  margin: 3em 0;
  border: 0;
  background:
    linear-gradient(var(--line), var(--line)) left center / calc(50% - 18px) 1px no-repeat,
    linear-gradient(var(--line), var(--line)) right center / calc(50% - 18px) 1px no-repeat;
  overflow: visible;
}

.post-content hr::after {
  position: absolute;
  inset: 50% auto auto 50%;
  color: var(--line-strong);
  content: "✦";
  font-size: 10px;
  line-height: 1;
  transform: translate(-50%, -50%);
}

.post-content blockquote {
  padding: 4px 0 4px 20px;
  border: 0;
  border-left: 2px solid var(--line-strong);
  color: var(--muted);
}

.post-content blockquote p:last-child,
.obsidian-callout p:last-child {
  margin-bottom: 0;
}

.obsidian-callout {
  --callout-color: var(--accent);
  --callout-background: #f8eee6;
  --callout-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M12 11v5' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3Ccircle cx='12' cy='8' r='1.2' fill='black'/%3E%3C/svg%3E");
  padding: 17px 21px 18px !important;
  border-radius: 6px;
  background: var(--callout-background);
  box-shadow: none;
  color: var(--text);
}

.obsidian-callout > p:first-child {
  position: relative;
  min-height: 1.5em;
  margin-bottom: 7px;
  padding-left: 27px;
  color: var(--text);
  font-family: var(--serif);
  font-size: 15.5px;
}

.obsidian-callout > p:first-child::before {
  position: absolute;
  top: 0.28em;
  left: 0;
  width: 20px;
  height: 20px;
  background: var(--callout-color);
  content: "";
  -webkit-mask: var(--callout-icon-mask) center / contain no-repeat;
  mask: var(--callout-icon-mask) center / contain no-repeat;
}

.obsidian-callout > p:first-child > strong:first-child {
  display: block;
  margin-bottom: 3px;
  color: var(--callout-color);
  font-size: 16.5px;
}

.obsidian-callout > p:not(:first-child) {
  color: var(--text);
  font-size: 15.5px;
}

.obsidian-callout--abstract,
.obsidian-callout--info {
  --callout-color: #087ea4;
  --callout-background: #edf8fb;
}

.obsidian-callout--abstract {
  --callout-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 5H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-3' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Crect x='9' y='3' width='6' height='4' rx='1' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M8 12h8M8 16h6' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}

.obsidian-callout--note {
  --callout-color: #1d6ddd;
  --callout-background: #e9f2fb;
  --callout-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m14.7 4.3 5 5M3 21l4.2-1.1L19.7 7.4a3.5 3.5 0 0 0-5-5L2.2 14.9 1 19.1 3 21Z' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='m12.8 4.3 5 5' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  color: #1d6ddd;
}

.obsidian-callout--note > p:first-child,
.obsidian-callout--note > p:not(:first-child) {
  color: #1d6ddd;
}

.obsidian-callout--tip {
  --callout-color: #00aaa8;
  --callout-background: #eaf9f8;
  --callout-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 22c4.7 0 8-3.3 8-8 0-2.4-1.2-4.5-2.4-5.9-.8 2.3-2.5 3.5-4.5 2.9.7-3.9-1.5-7.5-3.1-9-1 3.3-6 6.7-6 12 0 4.7 3.3 8 8 8Z' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.obsidian-callout--success {
  --callout-color: #0874d1;
  --callout-background: #eaf3ff;
  --callout-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='m8 12 2.6 2.6L16.5 9' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.obsidian-callout--warning {
  --callout-color: #f07800;
  --callout-background: #fff2e8;
  --callout-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10.3 3.8 1.8 18.3a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.8a2 2 0 0 0-3.4 0Z' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M12 9v4' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3Ccircle cx='12' cy='17' r='1.1' fill='black'/%3E%3C/svg%3E");
}

.obsidian-callout--caution,
.obsidian-callout--danger,
.obsidian-callout--failure {
  --callout-color: #ef334f;
  --callout-background: #fff0f2;
  --callout-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 6l12 12M18 6 6 18' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}

.obsidian-callout--question {
  --callout-color: #745f9d;
  --callout-background: #f5f0ff;
  --callout-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M9.8 9a2.4 2.4 0 1 1 3.2 2.3c-.7.3-1 1-1 1.7' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3Ccircle cx='12' cy='17' r='1.1' fill='black'/%3E%3C/svg%3E");
}

.obsidian-callout--todo {
  --callout-color: #0874d1;
  --callout-background: #eaf3ff;
  --callout-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M12 7v5l3.5 2' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.obsidian-callout--example {
  --callout-color: #7a5aa6;
  --callout-background: #f4effb;
  --callout-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m12 3 9 9-9 9-9-9 9-9Z' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.obsidian-callout--quote {
  --callout-color: #766b5b;
  --callout-background: #f3f0ea;
  --callout-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 10H4a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h4v-8Zm14 0h-4a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h4v-8ZM6 10c0-3 1-5 3-6m11 6c0-3 1-5 3-6' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

[data-theme="dark"] .obsidian-callout--abstract,
[data-theme="dark"] .obsidian-callout--info {
  --callout-color: #70bad0;
}

[data-theme="dark"] .obsidian-callout--tip { --callout-color: #8fc69a; }
[data-theme="dark"] .obsidian-callout--success { --callout-color: #79c69b; }
[data-theme="dark"] .obsidian-callout--warning { --callout-color: #e0ae61; }
[data-theme="dark"] .obsidian-callout--caution,
[data-theme="dark"] .obsidian-callout--danger,
[data-theme="dark"] .obsidian-callout--failure { --callout-color: #e99389; }
[data-theme="dark"] .obsidian-callout--question { --callout-color: #bba6df; }
[data-theme="dark"] .obsidian-callout--todo { --callout-color: #a5b5c8; }
[data-theme="dark"] .obsidian-callout--note { --callout-color: #85b7ff; }
[data-theme="dark"] .obsidian-callout--note > p:first-child,
[data-theme="dark"] .obsidian-callout--note > p:not(:first-child) { color: #85b7ff; }
[data-theme="dark"] .obsidian-callout--example { --callout-color: #c5a8ee; }
[data-theme="dark"] .obsidian-callout--quote { --callout-color: #bdb19c; }

[data-theme="dark"] .obsidian-callout {
  --callout-background: color-mix(in srgb, var(--callout-color) 16%, var(--surface));
}

.post-content img,
.post-content .obsidian-embed {
  margin: 1.8em auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 12px 32px var(--shadow);
}

.post-content code {
  border-color: var(--line);
  border-radius: 5px;
  background: var(--surface-soft);
}

.post-content pre {
  padding: 17px 19px;
  border-color: var(--line);
  border-radius: 9px;
  background: var(--surface);
  box-shadow: none;
  font-size: 15.5px;
  line-height: 1.78;
}

.post-content pre code {
  font-size: inherit;
}

.post-content table {
  display: table;
  width: 100%;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  border-collapse: separate;
  border-spacing: 0;
  background: color-mix(in srgb, var(--surface) 45%, transparent);
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.8;
  table-layout: fixed;
}

.post-content th,
.post-content td {
  padding: 10px 15px;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
  vertical-align: top;
}

.post-content th:last-child,
.post-content td:last-child {
  border-right: 0;
}

.post-content tr:last-child td {
  border-bottom: 0;
}

.post-content th {
  background: var(--surface-soft);
}

.oj-card-wrap {
  gap: 14px;
}

.oj-card__body {
  border-color: var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.reading-progress {
  position: sticky;
  top: 0;
  height: 2px;
  margin: 0 0 27px;
  background: transparent;
}

.reading-progress span {
  border-radius: 0 2px 2px 0;
  background: var(--accent);
}

.post-nav {
  gap: 16px;
  margin-top: 62px;
}

.post-nav a {
  min-height: 96px;
  padding: 16px 20px;
  border-color: var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 65%, transparent);
}

.post-nav a:hover {
  border-color: var(--accent);
  background: var(--surface);
  transform: translateY(-2px);
}

.post-nav small {
  color: var(--muted);
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 0.12em;
}

.post-nav span {
  font-size: 15.5px;
  line-height: 1.75;
}

.compact-note-list {
  border-top-color: var(--line);
}

.compact-note-list a {
  border-bottom-color: var(--line);
}

.compact-note-list--full {
  border-top: 0;
}

.compact-note-list--full a {
  display: flex;
  min-height: 0;
  gap: 14px;
  align-items: baseline;
  margin: 0 -10px;
  padding: 11px 10px;
  border: 0;
  border-radius: 8px;
}

.compact-note-list--full a::before {
  order: 2;
  min-width: 18px;
  flex: 1;
  border-bottom: 1px dotted var(--line-strong);
  content: "";
  transform: translateY(-4px);
}

.compact-note-list--full a:hover {
  padding: 11px 10px;
  background: var(--accent-soft);
}

.compact-note-list--full > a > span {
  order: 1;
  max-width: 70%;
  flex: 0 1 auto;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.01em;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.compact-note-list--full small {
  order: 3;
  flex: none;
  color: var(--accent);
  font-family: var(--serif);
  font-size: 12px;
}

.compact-note-list--full time {
  order: 4;
  flex: none;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.archive-list {
  margin-top: 38px;
}

.year-group h2 {
  color: var(--accent);
  letter-spacing: 0.01em;
}

.side-panel {
  margin-bottom: 32px;
  padding: 0;
  border: 0;
}

.side-panel__header h2 {
  color: var(--muted);
  font-family: var(--serif);
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: 0.18em;
}

.side-panel__header h2 span {
  color: var(--muted-soft);
  font-family: var(--serif);
  font-size: 9px;
}

.toc-links {
  display: flex;
  gap: 0;
  flex-direction: column;
  margin-top: 13px;
  border-left: 1px solid var(--line);
}

.toc-links a {
  margin-left: -1px;
  padding: 5px 0 5px 15px;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 13px;
  line-height: 1.65;
  text-overflow: clip;
  white-space: normal;
}

.toc-links a::before {
  top: 0;
  left: 0;
  width: 2px;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.toc-links a[data-read="read"] {
  color: color-mix(in srgb, var(--accent) 72%, transparent);
}

.toc-links a[data-read="read"]::before {
  border: 0;
  background: color-mix(in srgb, var(--accent) 42%, transparent);
}

.toc-links a.is-current,
.toc-links a:hover {
  color: var(--accent);
  font-weight: 400;
}

.toc-links a.is-current::before {
  border: 0;
  background: var(--accent);
  box-shadow: none;
}

.toc-links a[data-level="3"] {
  padding-left: 27px;
  font-size: 12.5px;
}

.backlink-list {
  gap: 7px;
  margin-top: 12px;
}

.backlink-list a,
.panel-empty {
  color: var(--muted-soft);
  font-family: var(--serif);
  font-size: 13px;
  line-height: 1.8;
}

.backlink-list a:hover {
  color: var(--accent);
}

.site-footer {
  justify-content: center;
  width: min(720px, 100%);
  gap: 7px 14px;
  margin: 56px auto 0;
  padding: 30px 0 7px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 0.03em;
  text-align: center;
}

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

.search-dialog__backdrop,
.graph-dialog__backdrop {
  background: color-mix(in srgb, #211b12 60%, transparent);
  backdrop-filter: blur(7px);
}

.search-dialog__panel,
.graph-dialog__panel {
  border-color: var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 28px 70px rgba(35, 25, 15, 0.3);
}

.search-dialog__input-row {
  border-bottom-color: var(--line);
}

.search-dialog__input-row input,
.search-dialog__close,
.search-dialog__hint,
.search-result,
.search-empty {
  font-family: var(--serif);
}

.search-result {
  border-top-color: var(--line);
}

.search-result:hover {
  background: var(--accent-soft);
}

.graph-dialog__header,
.graph-dialog__hint {
  border-color: var(--line);
}

.knowledge-graph,
.global-graph {
  border-color: var(--line);
  border-radius: 9px;
  background: color-mix(in srgb, var(--surface-soft) 50%, transparent);
}

body.reading-mode .quartz-shell {
  display: block;
  width: min(800px, calc(100% - 40px));
  margin: 0 auto;
}

body.reading-mode .content-column {
  padding-top: 56px;
}

body.reading-mode .page--article {
  max-width: 700px;
}

body.reading-mode .post-content {
  font-size: 18px;
  line-height: 2.08;
}

@media (min-width: 1121px) {
  .quartz-shell,
  .layout-post .quartz-shell {
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr) var(--right-sidebar-width);
  }

  .content-column,
  .layout-post .content-column {
    grid-column: 2;
    width: min(720px, 100%);
    justify-self: center;
    padding: 56px 0 40px;
  }

  .sidebar--right,
  .layout-post .sidebar--right {
    position: sticky;
    top: 0;
    display: block;
    grid-column: 3;
    grid-row: 1;
    width: 100%;
    min-width: 0;
    max-height: 100vh;
    box-sizing: border-box;
    justify-self: end;
    padding: 30px 16px 35px clamp(16px, 2vw, 28px);
    overflow-y: auto;
    scrollbar-gutter: auto;
  }

  .sidebar--right .knowledge-graph {
    width: 100%;
  }
}

@media (max-width: 1120px) {
  .quartz-shell,
  .layout-post .quartz-shell {
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  }

  .content-column,
  .layout-post .content-column {
    grid-column: 2;
    width: 100%;
    max-width: 784px;
    margin: 0 auto;
    padding: 0 32px 32px;
  }

  .layout-post .content-column {
    padding-top: 56px;
  }

  .page--article {
    margin: 0 auto;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 15px;
  }

  .sidebar-collapse-toggle {
    display: none;
  }

  .mobile-header {
    position: sticky;
    z-index: 10;
    top: 0;
    display: flex;
    height: 54px;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg) 90%, transparent);
    backdrop-filter: blur(14px);
  }

  .mobile-header a {
    overflow: hidden;
    color: var(--text);
    font-family: var(--serif);
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-header div {
    display: flex;
    flex: none;
    gap: 1px;
  }

  .mobile-header button {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--muted);
  }

  .mobile-header button:hover {
    background: var(--accent-soft);
    color: var(--accent);
  }

  .quartz-shell,
  .layout-post .quartz-shell {
    display: block;
    width: 100%;
  }

  .content-column,
  .layout-post .content-column {
    width: 100%;
    max-width: none;
    padding: 0 20px 28px;
  }

  .layout-post .content-column {
    padding-top: 34px;
  }

  .sidebar--left {
    position: fixed;
    z-index: 15;
    inset: 0 auto 0 0;
    width: min(336px, 90vw);
    height: auto;
    padding: 24px 22px;
    border-right: 1px solid var(--line);
    background: var(--bg);
    box-shadow: 16px 0 45px rgba(34, 25, 16, 0.22);
    transform: translateX(-105%);
    transition: transform 220ms ease;
  }

  .sidebar--left.is-open {
    box-shadow: 16px 0 45px rgba(34, 25, 16, 0.22), 0 0 0 100vmax rgba(28, 21, 13, 0.35);
    transform: translateX(0);
  }

  .sidebar--left::after {
    display: none;
  }

  .sidebar--right {
    display: none;
  }

  .page--home,
  .page--list {
    width: 100%;
    padding: 34px 0 18px;
  }

  .page--article {
    max-width: none;
  }

  .article-header h1,
  .article-header--home h1 {
    font-size: clamp(31px, 9vw, 38px);
    line-height: 1.45;
  }

  .article-header--home h1 {
    margin-bottom: 0.9em;
  }

  .post-content {
    font-size: 17.5px;
    line-height: 1.92;
  }

  .post-content h2 {
    font-size: 23px;
  }

  .post-content h2::before {
    left: -12px;
  }

  .home-content h2 {
    font-size: 25px;
  }

  .compact-note-list--full a {
    flex-wrap: wrap;
    gap: 4px 10px;
    padding: 11px 8px;
  }

  .compact-note-list--full a::before {
    display: none;
  }

  .compact-note-list--full > a > span {
    width: 100%;
    max-width: none;
  }

  .compact-note-list--full small {
    display: block;
  }

  .compact-note-list--full time {
    margin-left: auto;
  }

  .post-nav {
    grid-template-columns: 1fr;
  }

  .site-footer {
    margin-top: 44px;
  }

  .search-dialog,
  .graph-dialog {
    padding: 64px 12px 12px;
  }

  body.reading-mode .quartz-shell {
    width: 100%;
  }

  body.reading-mode .content-column {
    padding: 34px 20px 28px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .page,
  .site-footer {
    animation: reading-theme-in 460ms ease both;
  }

  .site-footer {
    animation-delay: 80ms;
  }
}

@keyframes reading-theme-in {
  from {
    opacity: 0;
    transform: translateY(7px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}
