:root {
  color-scheme: light;
  --paper: #f7f8f4;
  --white: #fff;
  --ink: #1c2823;
  --muted: #526159;
  --accent: #285842;
  --soft: #e9f0e9;
  --line: #d8e1d7;
  font-family: system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; line-height: 1.65; }
a { color: inherit; text-underline-offset: .22em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
h1, h2, h3, p, figure { margin: 0; }
.frame { width: min(73rem, calc(100% - 5rem)); margin-inline: auto; }
.skip-link { position: fixed; z-index: 2; left: 1rem; top: -4rem; padding: .65rem 1rem; background: var(--white); }
.skip-link:focus { top: 1rem; }

.site-header { border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.6rem; }
.wordmark { display: inline-flex; align-items: center; gap: .7rem; font-weight: 700; text-decoration: none; }
.mark { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: .45rem; background: var(--accent); color: var(--white); font-family: Georgia, serif; }
nav { display: flex; align-items: center; gap: clamp(.75rem, 3vw, 2rem); }
nav a { padding-block: .5rem; text-decoration: none; color: var(--muted); font-size: .94rem; }
nav a:hover, .footer a:hover { color: var(--accent); text-decoration: underline; }

.hero { display: grid; grid-template-columns: 1fr 1.18fr; align-items: center; gap: clamp(2rem, 6vw, 6rem); padding-block: clamp(2.5rem, 5vw, 4.75rem); }
.eyebrow { color: var(--accent); font: 600 .88rem/1.5 ui-monospace, Consolas, monospace; letter-spacing: .12em; }
h1 { margin-top: 1rem; font: 700 clamp(3.1rem, 6.2vw, 5.5rem)/1.13 "Songti SC", "Noto Serif CJK SC", SimSun, serif; letter-spacing: -.06em; }
.intro { margin-top: 1.3rem; color: var(--muted); font-size: 1.05rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.7rem; }
.button { display: inline-flex; min-height: 2.8rem; align-items: center; justify-content: center; padding: .55rem 1.1rem; border: 1px solid transparent; border-radius: .45rem; font-weight: 650; font-size: .94rem; text-decoration: none; white-space: nowrap; }
.primary { color: var(--white); background: var(--accent); }
.primary:hover { background: #1c4734; }
.outline { border-color: #b7c8ba; color: var(--accent); }
.outline:hover { background: var(--soft); }
.hero-photo { position: relative; overflow: hidden; border-radius: .65rem; background: #d5dfd8; }
.hero-photo img { display: block; width: 100%; height: auto; aspect-ratio: 1.27; object-fit: cover; }
.hero-photo figcaption { position: absolute; right: .8rem; bottom: .8rem; padding: .27rem .55rem; border-radius: .25rem; background: #f7f8f4ee; color: #243a2e; font-size: .8rem; }
.hero-photo a { text-decoration: none; }
.hero-photo a:hover { text-decoration: underline; }

.section { padding-block: 2.4rem; border-top: 1px solid var(--line); scroll-margin-top: 1rem; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .55rem 1.5rem; margin-bottom: 1.3rem; }
h2 { font-size: clamp(1.55rem, 3vw, 2rem); letter-spacing: -.025em; line-height: 1.35; }
.section-heading p, .about p, .project-card p { color: var(--muted); }
.note-list { border: 1px solid var(--line); border-radius: .6rem; background: var(--white); overflow: hidden; }
.note + .note { border-top: 1px solid var(--line); }
.note summary { display: grid; grid-template-columns: 6rem 1fr 1.5rem; align-items: center; gap: 1rem; padding: 1.15rem 1.4rem; cursor: pointer; list-style: none; }
.note summary::-webkit-details-marker { display: none; }
.note summary:hover, .note[open] summary { background: var(--soft); }
.note summary:focus-visible { outline-offset: -4px; }
.note-tag { justify-self: start; color: var(--accent); font-size: .875rem; }
.note-heading { display: grid; gap: .15rem; }
.note-heading strong { font-size: 1.05rem; }
.note-heading > span { color: var(--muted); }
.disclosure { position: relative; width: 1.35rem; height: 1.35rem; border: 1px solid #aec2b3; border-radius: 50%; color: var(--accent); }
.disclosure::before, .disclosure::after { content: ""; position: absolute; top: 50%; left: 50%; width: .55rem; height: 1px; background: currentColor; transform: translate(-50%, -50%); }
.disclosure::after { transform: translate(-50%, -50%) rotate(90deg); }
.note[open] .disclosure::after { content: none; }
.note-body { max-width: 49rem; padding: 1.1rem 1.4rem 1.3rem; margin-left: 7rem; }
.note-body p + p, .note-body li + li { margin-top: .45rem; }
.note-body ol { margin: 0; padding-left: 1.5em; }

.project-card { display: grid; grid-template-columns: auto 1fr auto; gap: 1.15rem; align-items: center; padding: 1.35rem; background: var(--soft); border-radius: .6rem; }
.project-mark { display: grid; place-items: center; width: 3.25rem; height: 3.25rem; border-radius: .45rem; background: var(--accent); color: var(--white); font: 600 .9rem/1 ui-monospace, Consolas, monospace; }
.project-card h3 { margin-bottom: .15rem; font-size: 1.1rem; }
.about p { margin-top: .65rem; }
.footer { border-top: 1px solid var(--line); padding-block: 1.15rem 2rem; display: flex; justify-content: space-between; gap: 1rem; color: var(--muted); font-size: .875rem; }
.footer a { text-decoration: none; }

@media (max-width: 48rem) {
  .frame { width: calc(100% - 2.25rem); }
  .hero { grid-template-columns: 1fr; gap: 1.8rem; }
  .hero-photo img { aspect-ratio: 1.55; }
  .desktop-break { display: none; }
  .note summary { grid-template-columns: 1fr auto; padding: 1rem; gap: .2rem .6rem; }
  .note-tag { grid-column: 1; }
  .note-heading { grid-column: 1; }
  .disclosure { grid-column: 2; grid-row: 1 / span 2; }
  .note-body { margin: 0; padding: 1rem; }
}

@media (max-width: 30rem) {
  .wordmark { gap: .45rem; }
  .frame { width: calc(100% - 2rem); }
  .header-inner { min-height: 3.95rem; }
  .project-card { gap: .8rem; }
  .project-card > a { grid-column: 1 / -1; justify-self: start; }
}
