:root {
  color-scheme: light;
  --paper: #eff6fb; --ink: #293f4d; --body: #506572; --muted: #586f80;
  --line: #bccedb; --accent: #486f89; --bar: #eff6fbef;
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}
:root[data-palette="warm"] { --paper: #fbf3df; --ink: #494438; --body: #6c6251; --muted: #776b54; --line: #d3c5a7; --accent: #82693f; --bar: #fbf3dfef; }
:root[data-theme="dark"] { color-scheme: dark; --paper: #152737; --ink: #e1ebf2; --body: #b4c5d1; --muted: #93acbf; --line: #3e586b; --accent: #96bdd8; --bar: #152737ef; }
:root[data-theme="dark"][data-palette="warm"] { --paper: #2b2823; --ink: #e9e0d2; --body: #c6bba7; --muted: #b2a58c; --line: #5a5141; --accent: #ccb17e; --bar: #2b2823ef; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 122px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; border-radius: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.skip-link { position: fixed; top: 12px; left: 24px; padding: 12px; z-index: 30; background: var(--paper); transform: translateY(-200%); }
.skip-link:focus { transform: translateY(0); }
.page-bar { position: sticky; top: 0; z-index: 10; height: 76px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; padding: 0 4%; background: var(--bar); backdrop-filter: blur(18px); border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.return-link { justify-self: start; font-size: 12px; color: var(--body); }
.return-link span { margin-right: 10px; }
.return-link:hover { color: var(--ink); }
h1 { font: 600 21px/1.4 var(--serif); letter-spacing: .13em; margin: 0; }
.page-controls { justify-self: end; display: flex; align-items: center; gap: 18px; }
.preview-label { color: var(--muted); font-size: 10px; letter-spacing: .12em; margin-right: 4px; }
.reading-palettes { display: flex; align-items: center; gap: 3px; }
.reading-palettes button { display: grid; place-items: center; padding: 7px; width: 32px; height: 36px; }
.reading-palettes span { width: 16px; height: 16px; border: 1px solid #93a7b6; border-radius: 50%; background: #eff6fb; }
.reading-palettes [data-reading-theme="warm"] span { background: #fbf3df; }
.reading-palettes [aria-pressed="true"] span { outline: 1px solid var(--accent); outline-offset: 3px; }
:root[data-theme="dark"] .reading-palettes span { background: #182a3b; }
:root[data-theme="dark"] .reading-palettes [data-reading-theme="warm"] span { background: #2b2823; }
.theme-toggle { width: 34px; height: 34px; display: grid; place-items: center; padding: 7px; border-radius: 50%; }
.theme-toggle:hover { background: color-mix(in srgb, var(--line) 30%, transparent); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-sun { display: none; }
:root[data-theme="dark"] .theme-sun { display: block; }
:root[data-theme="dark"] .theme-moon { display: none; }
.life-page { max-width: 1256px; margin: 0 auto; padding: 82px 92px 0 30px; }
.life-timeline { --year-width: 190px; --year-gap: 66px; --axis-gap: 94px; --axis-x: calc((100% + var(--year-width) + var(--year-gap)) / 2); position: relative; outline: none; }
.timeline-spine { position: absolute; left: var(--axis-x); top: 7px; bottom: 26px; width: 1px; background: var(--line); }
.timeline-spine > span { display: block; width: 1px; height: 0; max-height: 100%; background: var(--accent); }
.timeline-spine::before { content: ""; position: absolute; left: -3px; top: -4px; width: 7px; height: 7px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 0 7px var(--paper); }
.timeline-year { position: relative; display: grid; grid-template-columns: var(--year-width) minmax(0, 1fr); gap: var(--year-gap); align-items: start; padding-bottom: 104px; }
.year-summary { position: sticky; top: 124px; padding: 0 0 24px; }
.year-summary h2 { margin: 0; font-weight: 400; }
.year-number { display: block; font: 400 70px/.95 Georgia, "Times New Roman", serif; letter-spacing: -.055em; }
.year-rule { display: block; width: 25px; height: 1px; background: var(--accent); margin: 25px 0 23px; }
.year-caption { display: block; font: 500 23px/1.7 var(--serif); letter-spacing: .02em; text-wrap: pretty; }
.year-count { margin: 22px 0 0; font: 10px/1.8 var(--sans); letter-spacing: .14em; color: var(--muted); }
.year-events { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--axis-gap); row-gap: 38px; margin: 0; padding: 0; list-style: none; }
.life-event { position: relative; grid-row: var(--event-row); min-width: 0; padding: 0 0 10px; }
.life-event[data-side="left"] { grid-column: 1; }
.life-event[data-side="right"] { grid-column: 2; }
.event-date { margin: 0 0 17px; color: var(--accent); font-size: 13px; font-weight: 500; letter-spacing: .045em; line-height: 20px; font-variant-numeric: tabular-nums; }
.event-date::before { content: ""; position: absolute; top: 9px; width: calc(var(--axis-gap) / 2 - 12px); height: 1px; background: var(--line); }
.life-event[data-side="left"] .event-date::before { left: calc(100% + 12px); }
.life-event[data-side="right"] .event-date::before { right: calc(100% + 12px); }
.event-dot { position: absolute; top: 5px; width: 9px; height: 9px; border: 1px solid var(--accent); border-radius: 50%; background: var(--paper); box-shadow: 0 0 0 5px var(--paper); }
.life-event[data-side="left"] .event-dot { left: calc(100% + var(--axis-gap) / 2 - 4px); }
.life-event[data-side="right"] .event-dot { right: calc(100% + var(--axis-gap) / 2 - 5px); }
.life-event.is-read .event-dot { background: var(--accent); }
.life-event h3 { margin: 0 0 15px; font: 600 23px/1.6 var(--serif); letter-spacing: .015em; text-wrap: pretty; }
.event-story { color: var(--body); font-size: 14px; line-height: 1.95; overflow-wrap: anywhere; }
.event-story p { margin: 0; }
.event-story p + p { margin-top: 12px; }
.timeline-year:last-child { padding-bottom: 0; min-height: 205px; }
.timeline-year:last-child .year-summary { position: static; }
.timeline-year:last-child .year-rule { margin-block: 24px 19px; }
.open-end { position: relative; grid-column: 2; height: 180px; }
.open-end::before { content: ""; position: absolute; bottom: 0; left: calc(50% - 6px); width: 13px; height: 13px; border: 1px solid var(--accent); border-radius: 50%; background: var(--paper); box-shadow: 0 0 0 6px var(--paper); }
.year-index { position: fixed; right: 23px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 7px; z-index: 5; }
.year-index a { position: relative; display: flex; align-items: center; justify-content: flex-end; gap: 9px; min-height: 32px; font: 11px Georgia, serif; font-variant-numeric: tabular-nums; color: var(--muted); padding: 3px 0 3px 8px; }
.year-index a::after { content: ""; display: block; width: 10px; height: 1px; background: var(--line); transition: width .2s; }
.year-index a:hover, .year-index a[aria-current="location"] { color: var(--ink); }
.year-index a[aria-current="location"]::after { width: 19px; background: var(--accent); }
.page-end { display: flex; align-items: center; justify-content: space-between; gap: 30px; border-top: 1px solid var(--line); margin-top: 70px; padding: 25px 0 38px; font-size: 11px; color: var(--muted); }
.page-end a:hover { color: var(--ink); }
.page-end a:first-child { font: 14px var(--serif); letter-spacing: .05em; }
.page-end span { margin-left: 8px; }
@media (min-width: 1600px) { .life-page { max-width: 1370px; padding-top: 96px; } .life-timeline { --year-width: 210px; --year-gap: 82px; --axis-gap: 112px; } .life-event h3 { font-size: 25px; } .event-story { font-size: 15px; } .year-events { row-gap: 44px; } .year-index { right: 3%; } }
@media (max-width: 1170px) { .life-page { padding: 70px 110px 0 34px; } .life-timeline { --year-width: 150px; --year-gap: 40px; --axis-gap: 66px; } .year-number { font-size: 59px; } .year-caption { font-size: 21px; } .life-event h3 { font-size: 21px; } .year-index { right: 19px; } .event-story { font-size: 13px; } }
@media (max-width: 800px) { .preview-label { display: none; } .page-bar { height: 68px; padding-inline: 20px; gap: 12px; } h1 { font-size: 18px; letter-spacing: .06em; } .page-controls { gap: 6px; } .return-link { font-size: 11px; } .return-link span { margin-right: 5px; } .reading-palettes { gap: 0; } .reading-palettes button { width: 26px; } .life-page { padding: 90px 26px 0; } .life-timeline { --year-width: 0px; --year-gap: 0px; --axis-x: 8px; } .timeline-year { display: block; padding-bottom: 60px; } .year-summary { position: static; padding: 0 0 35px 38px; } .year-number { font-size: 50px; } .year-rule { margin: 20px 0 14px; } .year-caption { max-width: 270px; font-size: 22px; } .year-count { display: none; } .year-events { display: block; padding-left: 38px; } .life-event { margin-bottom: 36px; padding: 0; } .life-event h3 { font-size: 23px; } .event-story { font-size: 14px; } .life-event .event-dot { left: -34px !important; right: auto !important; } .life-event .event-date::before { left: -26px !important; right: auto !important; width: 16px; } .timeline-year:last-child { min-height: 190px; } .open-end { height: 20px; } .open-end::before { left: 2px; } .timeline-spine { bottom: 36px; } .year-index { flex-direction: row; justify-content: space-between; top: 68px; left: 0; right: 0; transform: none; gap: 8px; padding: 10px 22px; background: var(--bar); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); } .year-index a { padding: 5px 0; font-size: 12px; min-height: 28px; gap: 4px; } .year-index a::after { display: none; } .year-index a[aria-current="location"] { border-bottom: 1px solid var(--accent); } .page-end { margin-top: 28px; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }
