:root {
  --bg: #111216;
  --text: #eeeef2;
  --secondary: #bfc0cc;
  --muted: #999ba9;
  --line: #2c2d36;
  --accent: #b5afff;
  --blue: #8cb7ff;
  --tag-bg: #292a35;
  --tag-text: #c7c2f6;
  --mono: ui-monospace, SFMono-Regular, Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; scrollbar-width: thin; scrollbar-color: #41424c var(--bg); }
html { background: var(--bg); scroll-behavior: smooth; }
body {
  position: relative;
  margin: 0;
  overflow-x: hidden;
  background: radial-gradient(circle at 76% 8%, rgba(181, 175, 255, .12), transparent 22rem), radial-gradient(circle at 22% 55%, rgba(140, 183, 255, .06), transparent 28rem), var(--bg);
  color: var(--text);
  font: 14px/1.8 "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
body::before { position: fixed; inset: 0; pointer-events: none; opacity: .65; background-image: radial-gradient(circle at 11% 16%, #b5afff 0 1px, transparent 2px), radial-gradient(circle at 92% 19%, #8cb7ff 0 1px, transparent 2px), radial-gradient(circle at 71% 42%, #b5afff 0 1px, transparent 2px), radial-gradient(circle at 8% 79%, #b5afff 0 1px, transparent 2px), radial-gradient(circle at 87% 88%, #8cb7ff 0 1px, transparent 2px); content: ""; }
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
::selection { color: #fff; background: #514d7a; }
.page { position: relative; width: min(1160px, 100%); margin-inline: auto; padding: 0 clamp(16px, 3.5vw, 64px) 70px; }

/* ---------- 星图档案导航 ---------- */
.site-header { display: flex; align-items: center; min-height: 90px; border-bottom: 1px solid var(--line); }
.blog-identity { display: inline-flex; align-items: center; gap: 12px; color: var(--text); }
.blog-avatar { width: 42px; height: 42px; flex: 0 0 auto; object-fit: cover; border: 2px solid #383440; border-radius: 50%; background: #23232b; }
.wordmark { color: var(--text); font: 800 27px/1 var(--mono); letter-spacing: -2px; }
.wordmark span { color: var(--accent); }
.header-note { margin-left: 19px; color: var(--muted); font-size: 12px; }
.site-nav { display: flex; gap: 26px; margin-left: auto; color: var(--secondary); font-size: 12px; }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--accent); }

/* ---------- 主视觉与信号 ---------- */
.site-intro { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 72px; padding: 78px 0 65px; }
.intro-copy { min-width: 0; }
.kicker, .detail-kicker { color: var(--accent); font: 10px/1.6 var(--mono); letter-spacing: 1.4px; }
.intro-copy .kicker { margin: 0; }
.site-intro h1 { margin: 21px 0 16px; font-size: clamp(42px, 6vw, 72px); font-weight: 500; letter-spacing: -.08em; line-height: 1.05; }
.site-intro h1 span { color: var(--accent); }
.site-description { max-width: 560px; margin: 0; color: var(--muted); font-size: 15px; }
.intro-aside { align-self: end; display: flex; flex-direction: column; gap: 2px; padding: 17px 0 0 22px; border-left: 1px solid var(--accent); color: var(--muted); font: 11px/2 var(--mono); }
.intro-aside strong { display: block; margin-bottom: 7px; color: var(--text); font-weight: 400; }
.intro-aside em { color: var(--blue); font-style: normal; }

/* ---------- 文章星图 ---------- */
.archive { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 35px; padding-top: 40px; border-top: 1px solid var(--line); }
.archive-aside { color: var(--muted); font: 10px/2 var(--mono); }
.archive-aside strong { display: block; color: var(--accent); font-weight: 400; letter-spacing: 1px; }
.archive-legend { margin-top: 28px; padding-top: 14px; border-top: 1px solid var(--line); }
.archive-legend em { display: block; color: var(--blue); font-style: normal; }
.archive-legend span { display: block; }
.stream { position: relative; padding-left: 28px; }
.stream::before { position: absolute; top: 12px; bottom: 12px; left: 5px; width: 1px; background: linear-gradient(var(--accent), rgba(181, 175, 255, .08)); content: ""; }
.post-list { display: flex; flex-direction: column; }
.post-card { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 100px 20px; gap: 24px; align-items: start; padding: 0 0 38px; margin: 0 0 38px; border-bottom: 1px solid var(--line); transition: background .2s; }
.post-card::before { position: absolute; top: 10px; left: -28px; width: 11px; height: 11px; border: 2px solid var(--accent); border-radius: 50%; background: var(--bg); box-shadow: 0 0 0 5px rgba(181, 175, 255, .06); content: ""; }
.post-card:hover { background: rgba(181, 175, 255, .025); }
.post-index { display: none; }
.post-copy { min-width: 0; }
.post-heading { display: block; }
.post-title { margin: 0; font-size: 22px; font-weight: 500; line-height: 1.5; overflow-wrap: anywhere; transition: color .2s; }
.post-date { display: block; padding-top: 2px; color: var(--muted); font: 10px/2 var(--mono); text-align: right; white-space: nowrap; }
.post-summary { max-width: 650px; margin: 10px 0 15px; color: var(--muted); font-size: 13px; line-height: 1.9; overflow-wrap: anywhere; }
.post-tags { display: flex; flex-wrap: wrap; gap: 15px; margin-top: 12px; }
.tag { display: inline-flex; padding: 0; color: var(--tag-text); background: transparent; border-radius: 0; font: 10px var(--mono); }
.tag::before { content: "/"; margin-right: 5px; color: #625f7e; }
.post-trailing { display: contents; }
.post-views { position: absolute; right: 20px; bottom: 42px; color: var(--muted); font: 10px var(--mono); white-space: nowrap; }
.post-arrow { display: block; padding-top: 4px; color: var(--muted); transition: color .2s; }
.post-card:hover .post-arrow, .post-card:hover .post-title { color: var(--accent); }

/* ---------- 文章详情 ---------- */
.back-link { display: inline-block; margin: 16px 0 32px; color: var(--muted); font-size: 13px; }
.back-link:hover { color: var(--accent); }
.detail-layout { display: grid; grid-template-columns: minmax(0, 760px) 220px; gap: 64px; align-items: start; justify-content: space-between; }
.post-detail { min-width: 0; }
.detail-header, .markdown-body { max-width: 760px; margin-inline: auto; }
.detail-header { margin-bottom: 34px; }
.detail-kicker { margin: 0; }
.detail-title { margin: 20px 0 18px; font-size: clamp(26px, 3vw, 38px); font-weight: 600; line-height: 1.5; letter-spacing: -.6px; overflow-wrap: anywhere; }
.detail-summary { margin: 0 0 24px; color: var(--muted); font-size: 14px; line-height: 1.9; overflow-wrap: anywhere; }
.detail-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding-top: 20px; border-top: 1px solid var(--line); }
.detail-meta time, .detail-views { color: var(--muted); font: 10px var(--mono); margin-right: 6px; }
.detail-aside { position: sticky; top: 24px; min-width: 0; padding: 0 0 0 24px; border-left: 1px solid var(--line); }
.toc-title { margin: 0 0 18px; color: var(--accent); font: 10px var(--mono); letter-spacing: 1.4px; }
.toc-list { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.toc-list li { position: relative; padding-left: 14px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.toc-list li::before { position: absolute; top: .7em; left: 0; width: 4px; height: 4px; border: 1px solid var(--accent); border-radius: 50%; content: ""; transform: translateY(-50%); }
.toc-list .toc-level-3, .toc-list .toc-level-4 { padding-left: 26px; color: #7f8190; font-size: 11px; }
.toc-list .toc-level-3::before, .toc-list .toc-level-4::before { left: 12px; width: 3px; height: 3px; border-color: #66627f; }
.toc-list a { display: block; overflow-wrap: anywhere; transition: color .2s; }
.toc-list a:hover { color: var(--accent); }
.toc-empty { margin: 0; color: var(--muted); font-size: 12px; }

/* ---------- Markdown ---------- */
.markdown-body { color: #d3d1dc; font-size: 15px; line-height: 1.95; overflow-wrap: anywhere; }
.markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4 { margin: 2em 0 .8em; color: var(--text); font-weight: 600; line-height: 1.5; }
.markdown-body h1 { font-size: 28px; }.markdown-body h2 { padding-bottom: 10px; border-bottom: 1px solid var(--line); font-size: 23px; }.markdown-body h3 { font-size: 19px; }.markdown-body h4 { font-size: 16px; }
.markdown-body p { margin: 0 0 1.25em; }.markdown-body a { color: var(--accent); text-decoration: underline; text-decoration-color: #77718f; text-underline-offset: 3px; }.markdown-body a:hover { color: #dedaff; }
.markdown-body code { padding: 3px 6px; color: var(--tag-text); background: var(--tag-bg); border-radius: 5px; font-family: var(--mono); font-size: .86em; }.markdown-body pre { margin: 1.5em 0; padding: 20px; overflow-x: auto; background: #0d1117; border: 1px solid var(--line); border-radius: 12px; }.markdown-body pre code { padding: 0; color: #c9d1d9; background: transparent; font-size: 13px; line-height: 1.7; }
.markdown-body blockquote { margin: 1.5em 0; padding: 12px 18px; border-left: 3px solid var(--accent); border-radius: 0 8px 8px 0; background: #23232d; color: var(--secondary); }.markdown-body blockquote p { margin: 0; }
.markdown-body ul, .markdown-body ol { margin: 0 0 1.25em; padding-left: 1.6em; }.markdown-body li::marker { color: var(--accent); }.markdown-body img { display: block; max-width: 100%; height: auto; margin: 1.75em auto; border-radius: 10px; }.markdown-body table { display: block; max-width: 100%; overflow-x: auto; margin: 0 0 1.25em; border-collapse: collapse; font-size: 13px; }.markdown-body th, .markdown-body td { padding: 9px 12px; border: 1px solid var(--line); text-align: left; }.markdown-body th { color: var(--text); background: var(--tag-bg); }.markdown-body hr { margin: 2.5em 0; border: 0; border-top: 1px solid var(--line); }
.site-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 28px 0; margin-top: 40px; border-top: 1px solid var(--line); color: var(--muted); font: 11px var(--mono); }.site-footer a { color: var(--accent); }.site-footer .footer-brand { color: #d1ccdf; font-weight: 600; }

@media (max-width: 1000px) { .detail-layout { grid-template-columns: minmax(0, 760px); justify-content: center; gap: 40px; }.detail-aside { position: static; padding: 24px 0 0; border-top: 1px solid var(--line); border-left: 0; }.toc-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; } }
@media (max-width: 760px) { .page { width: min(100% - 30px, 600px); }.site-header { min-height: 76px; }.header-note { display: none; }.blog-avatar { width: 36px; height: 36px; }.site-nav { gap: 15px; }.blog-identity { gap: 10px; }.site-intro { grid-template-columns: 1fr; gap: 30px; padding: 58px 0 42px; }.intro-aside { align-self: start; }.archive { grid-template-columns: 1fr; gap: 20px; padding-top: 30px; }.archive-legend { display: inline-block; margin: 12px 0 0 18px; padding: 0 0 0 14px; border: 0; border-left: 1px solid var(--line); }.stream { padding-left: 25px; }.post-card { grid-template-columns: minmax(0, 1fr) 20px; gap: 8px; padding-bottom: 28px; margin-bottom: 28px; }.post-date { grid-column: 1; text-align: left; }.post-trailing { display: contents; }.post-views { right: 34px; bottom: 32px; }.post-title { font-size: 20px; }.site-footer > span { display: none; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }
