:root {
  --ink: #181512;
  --muted: #706b64;
  --paper: #f7f7f4;
  --line: #dedbd4;
  --accent: #a06642;
  --moss: #59624f;
  --title: "Cormorant Garamond", Georgia, serif;
  --body: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--body); line-height: 1.55; }
a { color: inherit; text-decoration: none; }
.skip-link { position: fixed; top: -4rem; left: 1rem; z-index: 10; padding: .65rem .85rem; background: var(--ink); color: #fff; }
.skip-link:focus { top: 1rem; }
.hub-shell { width: min(1360px, calc(100% - 56px)); margin: 0 auto; }
.hub-header { min-height: 92px; display: flex; align-items: center; justify-content: space-between; gap: 2rem; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: .75rem; min-width: max-content; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--ink); font-family: var(--title); font-size: 1.45rem; font-weight: 700; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: .92rem; letter-spacing: .01em; }
.brand small { color: var(--muted); font-family: var(--mono); font-size: .62rem; }
.hub-header nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 1.2rem; font-size: .84rem; }
.hub-header nav a { border-bottom: 1px solid transparent; }
.hub-header nav a:hover, .hub-header nav a:focus-visible, .hub-header nav a[aria-current="page"] { color: var(--accent); border-color: currentColor; }
.hub-hero, .project-hero { padding: clamp(2rem, 3.5vw, 3rem) 0 clamp(1.75rem, 3vw, 2.5rem); border-bottom: 1px solid var(--line); }
.eyebrow, .section-label, .project-overview span, .architecture-card > span, .timeline-item > span, .related-note span { margin: 0; color: var(--accent); font-family: var(--mono); font-size: .68rem; letter-spacing: .05em; text-transform: uppercase; }
.hub-hero h1, .project-hero h1 { max-width: none; margin: .55rem 0 1rem; font-family: var(--title); font-size: clamp(2rem, 3.2vw, 3.2rem); font-weight: 600; line-height: 1.04; letter-spacing: -.03em; }
.hub-hero h1 em { color: var(--moss); font-style: italic; }
.hub-hero-meta { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem; max-width: 780px; align-items: end; }
.hub-hero-meta p, .project-hero > p { max-width: 60ch; margin: 0; color: #45413c; font-size: 1rem; }
.hub-hero-meta span { color: var(--muted); font-family: var(--mono); font-size: .72rem; white-space: nowrap; }
.hub-hero-meta strong { color: var(--ink); font-size: 1.1rem; }
/* 笔记库：杂志目录式编辑列表 */
.section-heading h2 { margin: .4rem 0 1.75rem; font-family: var(--title); font-size: 2.2rem; line-height: .95; }
.series-section { padding: 0 0 3.25rem; border-bottom: 1px solid var(--line); }
.series-head { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin-bottom: 1.6rem; }
.series-head h2, .stream-head h2 { margin: .35rem 0 0; font-family: var(--title); font-size: 2.1rem; line-height: 1; }
.series-head p { max-width: 32ch; margin: 0; color: var(--muted); font-size: .85rem; }
.series-list { border-top: 1px solid var(--line); }
.series-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 1.5rem; align-items: baseline; padding: 1rem .25rem; border-bottom: 1px solid var(--line); transition: background .15s ease; }
.series-row:hover, .series-row:focus-visible { background: #fff; outline: none; }
.series-row:hover strong, .series-row:focus-visible strong { color: var(--accent); }
.series-num { color: var(--accent); font-family: var(--title); font-size: 1.75rem; line-height: 1; }
.series-main strong { font-family: var(--title); font-weight: 600; font-size: 1.5rem; line-height: 1.15; transition: color .15s ease; }
.series-tag { display: block; margin-top: .3rem; color: var(--muted); font-family: var(--mono); font-size: .68rem; }
.series-meta { color: var(--muted); font-family: var(--mono); font-size: .68rem; white-space: nowrap; }
.notes-stream { padding: 3rem 0 5rem; }
.stream-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1.5rem; margin-bottom: 1.3rem; }
.stream-head p { margin: 0; color: var(--muted); font-family: var(--mono); font-size: .7rem; }
.filter-bar { display: flex; flex-wrap: wrap; gap: .45rem .5rem; margin-bottom: 1.9rem; }
.filter-pill { padding: .38rem .8rem; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; font: inherit; font-size: .8rem; transition: color .15s ease, border-color .15s ease; }
.filter-pill span { margin-left: .3rem; font-family: var(--mono); font-size: .62rem; }
.filter-pill:hover, .filter-pill:focus-visible, .filter-pill.is-active { color: var(--accent); border-color: var(--accent); outline: none; }
.note-list { border-top: 1px solid var(--line); }
.note-row { display: grid; grid-template-columns: 104px minmax(0, 1fr) auto; gap: 1.75rem; align-items: start; padding: 1.35rem .25rem; border-bottom: 1px solid var(--line); transition: background .15s ease; }
.note-row:hover, .note-row:focus-visible { background: #fff; outline: none; }
.note-row:hover strong, .note-row:focus-visible strong { color: var(--accent); }
.note-row-date { padding-top: .5rem; color: var(--muted); font-family: var(--mono); font-size: .7rem; white-space: nowrap; }
.note-row-main strong { display: block; font-family: var(--title); font-weight: 600; font-size: 1.5rem; line-height: 1.2; transition: color .15s ease; }
.note-row-summary { display: -webkit-box; -webkit-line-clamp: 1; line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; margin-top: .4rem; color: #5b5650; font-size: .92rem; }
.note-row-meta { padding-top: .55rem; color: var(--muted); font-family: var(--mono); font-size: .66rem; text-align: right; white-space: pre-line; }
.note-row[hidden] { display: none; }
.project-hero { max-width: 980px; }
.project-heading { display: flex; align-items: end; justify-content: space-between; gap: 2rem; }
.project-heading h1 { margin-bottom: 1rem; }
.project-heading > span { align-self: center; padding: .55rem .75rem; border: 1px solid var(--line); color: var(--moss); font-family: var(--mono); font-size: .68rem; text-align: center; white-space: pre-line; }
.project-repo { display: inline-flex; gap: .45rem; margin-top: 2rem; padding-bottom: .15rem; border-bottom: 1px solid currentColor; color: var(--moss); font-family: var(--mono); font-size: .75rem; }
.project-overview { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-bottom: 1px solid var(--line); }
.project-overview article { padding: 2.1rem 1.5rem 2.1rem 0; border-right: 1px solid var(--line); }
.project-overview article + article { padding-left: 1.5rem; }
.project-overview article:last-child { border-right: 0; }
.project-overview p { max-width: 34ch; margin: 1.15rem 0 0; font-family: var(--title); font-size: 1.18rem; line-height: 1.5; }
.capability-list { display: flex; flex-wrap: wrap; align-content: flex-start; gap: .45rem; margin: 1.15rem 0 0; padding: 0; list-style: none; }
.capability-list li { padding: .32rem .6rem; border: 1px solid var(--line); background: #fff; color: #3f3a33; font-family: var(--mono); font-size: .68rem; line-height: 1.45; }
.project-section { padding: 5rem 0; border-bottom: 1px solid var(--line); }
.section-heading { display: grid; grid-template-columns: 48px minmax(160px, .7fr) minmax(0, 1.4fr); gap: 1.5rem; align-items: start; margin-bottom: 2rem; }
.section-heading > span { padding-top: .65rem; color: var(--accent); font-family: var(--mono); font-size: .7rem; }
.section-heading h2 { margin: 0; font-size: 2.65rem; }
.section-heading p { max-width: 48ch; margin: .55rem 0 0; color: var(--muted); font-size: .9rem; }
.architecture-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.architecture-card { min-height: 230px; padding: 1.5rem 1.5rem 1.5rem 0; border-right: 1px solid var(--line); }
.architecture-card + .architecture-card { padding-left: 1.5rem; }
.architecture-card:last-child { border-right: 0; }
.architecture-card h3 { margin: 2.6rem 0 .8rem; font-family: var(--title); font-size: 1.7rem; line-height: .95; }
.architecture-card p, .timeline-item p { margin: 0; color: #5b5650; font-size: .87rem; }
.project-two-column { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; }
.project-two-column .section-heading { grid-template-columns: 38px 1fr; margin-bottom: 1.25rem; }
.timeline { border-top: 1px solid var(--line); }
.timeline-item { display: grid; grid-template-columns: 105px 1fr; gap: 1rem; padding: 1.2rem 0; border-bottom: 1px solid var(--line); }
.related-section { border-bottom: 0; }
.related-notes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.related-note { display: grid; gap: .85rem; min-height: 178px; padding: 1.45rem 1.5rem 1.45rem 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.related-note:nth-child(even) { padding-left: 1.5rem; border-right: 0; }
.related-note strong { font-family: var(--title); font-size: 1.45rem; line-height: 1; }
.related-note em { color: var(--moss); font-family: var(--mono); font-size: .68rem; font-style: normal; }
.related-note:hover, .related-note:focus-visible { background: #fff; outline: none; }
.empty-state { min-height: 142px; display: grid; align-content: center; gap: .35rem; color: var(--muted); }
.empty-state strong { color: var(--ink); font-family: var(--title); font-size: 1.45rem; }
.empty-state p { margin: 0; font-size: .88rem; }
.hub-footer { display: flex; justify-content: space-between; gap: 1rem; padding: 1.8rem 0 2.4rem; border-top: 1px solid var(--line); color: var(--muted); font-family: var(--mono); font-size: .68rem; }
.hub-footer a { color: var(--moss); }

/* 项目门面页：媒体 hero、项目内子导航、子页面链接 */
.project-hero-media { margin: 2.75rem 0 0; }
.project-hero-media img { display: block; width: 100%; border: 1px solid var(--line); }
.project-hero-media figcaption { margin-top: .65rem; color: var(--muted); font-family: var(--mono); font-size: .68rem; }
.project-subnav { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem 1.5rem; padding: 1.15rem 0; border-bottom: 1px solid var(--line); font-size: .87rem; }
.project-subnav-label { margin-right: .75rem; color: var(--muted); font-family: var(--mono); font-size: .66rem; letter-spacing: .06em; text-transform: uppercase; }
.project-subnav a { padding-bottom: .12rem; border-bottom: 1px solid transparent; }
.project-subnav a:hover, .project-subnav a:focus-visible, .project-subnav a[aria-current="page"] { color: var(--accent); border-color: currentColor; outline: none; }
.project-subnav .is-pending { color: var(--muted); }
.project-subnav .is-pending em { margin-left: .35rem; font-family: var(--mono); font-size: .6rem; font-style: normal; opacity: .7; }
.project-more-link { color: var(--moss); font-family: var(--mono); font-size: .7rem; white-space: nowrap; border-bottom: 1px solid currentColor; padding-bottom: .1rem; }
.project-more-link:hover, .project-more-link:focus-visible { color: var(--accent); }
.architecture-grid.is-four { grid-template-columns: repeat(4, 1fr); }
.architecture-grid.is-four .architecture-card { min-height: 250px; }
.architecture-grid.is-four .architecture-card h3 { margin-top: 1.4rem; font-size: 1.5rem; }

@media (max-width: 900px) {
  .series-head { display: block; }
  .series-head p { margin-top: .6rem; }
  .series-row { grid-template-columns: 52px minmax(0, 1fr); }
  .series-meta { grid-column: 2; }
  .note-row { grid-template-columns: 96px minmax(0, 1fr); gap: .35rem 1.25rem; }
  .note-row-meta { grid-column: 2; padding-top: 0; text-align: left; white-space: normal; }
  .project-overview, .architecture-grid, .architecture-grid.is-four { grid-template-columns: 1fr; }
  .architecture-grid.is-four .architecture-card { min-height: auto; }
  .project-overview article, .architecture-card, .project-overview article + article, .architecture-card + .architecture-card { min-height: auto; padding: 1.6rem 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .project-overview p { max-width: none; }
  .project-overview article:last-child, .architecture-card:last-child { border-bottom: 0; }
  .architecture-card h3 { margin-top: 1.4rem; }
  .section-heading { grid-template-columns: 38px 1fr; }
  .section-heading p { grid-column: 2; }
  .project-two-column { grid-template-columns: 1fr; gap: 3.5rem; }
}

@media (max-width: 640px) {
  .hub-shell { width: min(100% - 32px, 1360px); }
  .hub-header { min-height: 0; padding: 1.1rem 0; align-items: flex-start; flex-direction: column; gap: .8rem; }
  .hub-header nav { justify-content: flex-start; gap: .65rem 1rem; }
  .hub-hero h1, .project-hero h1 { font-size: clamp(1.9rem, 8vw, 2.6rem); }
  .hub-hero-meta, .project-heading { display: block; }
  .hub-hero-meta span { display: block; margin-top: 1.25rem; }
  .project-heading > span { display: inline-block; margin: .25rem 0 1.25rem; }
  .project-section { padding: 2.4rem 0; }
  .series-section { padding-bottom: 2.5rem; }
  .notes-stream { padding: 2.5rem 0 3.5rem; }
  .related-notes { grid-template-columns: 1fr; }
  .note-row { grid-template-columns: 1fr; gap: .2rem; padding: 1.15rem 0; }
  .note-row-date, .note-row-meta { padding-top: 0; }
  .note-row-meta { grid-column: auto; }
  .note-row-main strong { font-size: 1.35rem; }
  .section-heading { gap: .8rem; }
  .section-heading h2 { font-size: 2.2rem; }
  .related-note, .related-note:nth-child(even) { padding: 1.35rem 0; border-right: 0; }
  .timeline-item { grid-template-columns: 88px 1fr; }
  .hub-footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
