:root {
  --paper: #f7f5ef;
  --ink: #202020;
  --muted: #626b78;
  --blue: #1555ef;
  --blue-hover: #0742c8;
  --line: #ccc9c1;
  --body: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  --mono: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  --page: min(1248px, calc(100% - 96px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 104px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.8; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
p, h1, h2, h3, figure { margin: 0; }
a, summary { -webkit-tap-highlight-color: transparent; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--blue); outline-offset: 6px; }
::selection { color: #fff; background: var(--blue); }
.page, .header-inner { width: var(--page); margin-inline: auto; }
.skip-link { position: fixed; top: 12px; left: 16px; z-index: 100; padding: 8px 16px; color: #fff; background: var(--blue); transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }

.site-header { position: sticky; top: 0; z-index: 10; background: var(--paper); }
.header-inner { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 28px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 14px; flex-shrink: 0; font-size: 24px; font-weight: 700; letter-spacing: 0.04em; }
.brand img { width: 46px; height: 46px; object-fit: contain; }
.site-nav { display: flex; align-self: stretch; gap: 40px; }
.site-nav a { position: relative; display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.nav-number { font: 13px var(--mono); font-weight: 400; }
.site-nav a[aria-current], .site-nav a:hover { color: var(--blue); }
.site-nav a[aria-current] { border-bottom: 3px solid var(--blue); }

.hero { position: relative; display: grid; grid-template-columns: 1.16fr 1fr; align-items: center; gap: 42px; min-height: 626px; padding: 60px 0 80px; }
.eyebrow { margin-bottom: 18px; color: var(--muted); font-size: 19px; letter-spacing: 0.025em; }
h1 { font-size: clamp(48px, 5.2vw, 76px); line-height: 1.2; font-weight: 800; letter-spacing: -0.055em; }
h1 span { display: block; }
.hero-lead { margin-top: 30px; font-size: 20px; line-height: 1.8; letter-spacing: -0.035em; }
.hero-intro { margin-top: 8px; color: var(--muted); font-size: 19px; line-height: 1.8; letter-spacing: -0.035em; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 36px; margin-top: 36px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 54px; padding: 12px 27px; background: var(--blue); border: 1px solid var(--blue); border-radius: 2px; color: #fff; font-size: 16px; font-weight: 600; transition: background 150ms ease; }
.button:hover { background: var(--blue-hover); }
.text-link { font-size: 15px; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }
.text-link:hover { color: var(--blue); }
.hero-art { width: min(100%, 500px); margin-top: -20px; justify-self: start; }
.hero-art img { width: 100%; height: auto; }
.hero-art figcaption { margin: -14px 0 0 34px; color: var(--muted); font: 12px/1.7 var(--mono); }
.hero-folio { position: absolute; right: 0; bottom: 57px; color: var(--muted); font: 12px/1.5 var(--mono); }

.chapter { padding-bottom: 76px; scroll-margin-top: 14px; }
.chapter-heading { display: flex; align-items: baseline; gap: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.chapter-number { color: var(--blue); font: 30px/1.2 var(--mono); }
h2 { font-size: 36px; line-height: 1.4; letter-spacing: -0.04em; font-weight: 700; }
.chapter-subtitle { margin-left: auto; color: var(--muted); font-size: 14px; }
.project-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 64px; }
.project { min-width: 0; padding: 34px 0 0; }
.project--featured { grid-column: 1 / -1; display: grid; grid-template-columns: 1.16fr 1fr; align-items: center; gap: 80px; padding: 38px 0; border-bottom: 1px solid var(--line); }
.project-kind { color: var(--muted); font-size: 13px; }
h3 { margin-top: 7px; font-size: 25px; line-height: 1.5; letter-spacing: -0.03em; }
.project--featured h3 { font-size: 32px; }
.project-summary { margin-top: 12px; color: var(--muted); font-size: 16px; line-height: 1.9; }
.project-status { margin-top: 18px; font-size: 13px; }
.project-links { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 14px; }
.project-links:empty { display: none; }
.project-details { margin-top: 21px; border-top: 1px solid var(--line); }
.project-details summary { padding: 12px 0; color: var(--muted); cursor: pointer; font-size: 13px; }
.project-details summary:hover { color: var(--blue); }
.details-body { padding: 3px 0 8px; font-size: 14px; line-height: 1.9; }
.details-body p + p { margin-top: 14px; }
.details-body strong { display: block; margin-bottom: 4px; font-size: 13px; }
.project-preview { padding: 8px 25px; }
.screenshot-pair { display: flex; align-items: center; justify-content: center; gap: 22px; }
.screenshot-pair img { width: min(41%, 140px); height: auto; border: 1px solid var(--line); border-radius: 12px; }
.project-preview figcaption { margin-top: 12px; text-align: center; color: var(--muted); font-size: 11px; }

.records-empty { padding: 36px 0 10px 74px; color: var(--muted); }
.empty-title { margin-bottom: 8px; color: var(--ink); font-size: 19px; }
.record { display: grid; grid-template-columns: 180px 1fr; gap: 30px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.record-meta { display: flex; flex-direction: column; gap: 9px; padding-top: 5px; color: var(--muted); font: 13px/1.5 var(--mono); }
.record-meta span { color: var(--blue); }
.record h3 { margin: 0; font-size: 21px; }
.record h3 .text-link { font-size: inherit; text-decoration: none; }
.record p { margin-top: 9px; color: var(--muted); }
.about-body { display: grid; grid-template-columns: 1.65fr 1fr; gap: 100px; padding-top: 34px; }
.about-copy { max-width: 740px; }
.about-copy p { line-height: 2; }
.about-copy p + p { margin-top: 17px; }
.about-links { display: flex; gap: 30px; margin-top: 27px; }
.about-aside { padding-left: 32px; border-left: 1px solid var(--line); }
.aside-label { color: var(--muted); font-size: 13px; }
.about-aside ul { list-style: none; margin: 16px 0; padding: 0; }
.about-aside li { padding: 3px 0; font-size: 15px; }
.aside-note { margin-top: 22px; color: var(--muted); font-size: 12px; }
.site-footer { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 25px 0 30px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.site-footer div { display: flex; gap: 28px; }
.site-footer .text-link { font-size: 12px; }

@media (max-width: 1100px) {
  .site-nav { gap: 24px; }
  .hero { gap: 25px; min-height: 550px; }
  .eyebrow { font-size: 16px; }
  .hero-lead, .hero-intro { font-size: 16px; }
  .hero-actions { gap: 23px; }
  .project--featured { gap: 35px; }
  .about-body { gap: 50px; }
}

@media (max-width: 760px) {
  :root { --page: calc(100% - 40px); }
  html { scroll-padding-top: 124px; }
  .header-inner { min-height: 105px; flex-direction: column; align-items: flex-start; gap: 0; }
  .brand { padding: 9px 0 3px; font-size: 20px; gap: 9px; }
  .brand img { width: 34px; height: 34px; }
  .site-nav { width: 100%; justify-content: space-between; gap: 5px; min-height: 46px; }
  .site-nav a { gap: 5px; font-size: 12px; }
  .nav-number { font-size: 10px; }
  .hero { display: flex; flex-direction: column; align-items: stretch; gap: 24px; min-height: auto; padding: 48px 0 53px; }
  .eyebrow { font-size: 13px; margin-bottom: 18px; }
  h1 { font-size: clamp(36px, 9.3vw, 64px); letter-spacing: -0.07em; }
  .hero-lead { margin-top: 24px; font-size: 15px; letter-spacing: 0; }
  .hero-intro { font-size: 14px; letter-spacing: 0; }
  .hero-actions { margin-top: 26px; gap: 23px; }
  .button { min-height: 48px; padding: 10px 20px; font-size: 14px; }
  .hero-actions .text-link { font-size: 14px; }
  .hero-art { width: min(85%, 360px); margin: 5px auto 0; }
  .hero-art figcaption { margin-top: -8px; margin-left: 24px; font-size: 10px; }
  .hero-folio { bottom: 12px; font-size: 10px; }
  .chapter { padding-bottom: 52px; }
  .chapter-heading { gap: 15px; padding-bottom: 13px; flex-wrap: wrap; }
  .chapter-number { font-size: 22px; }
  h2 { font-size: 27px; }
  .chapter-subtitle { flex-basis: 100%; margin-left: 47px; margin-top: -4px; font-size: 12px; }
  .project-list { display: block; }
  .project--featured { display: flex; flex-direction: column; gap: 20px; align-items: stretch; padding: 25px 0 30px; }
  .project:not(.project--featured) + .project { margin-top: 28px; border-top: 1px solid var(--line); }
  .project--featured h3 { font-size: 26px; }
  h3 { font-size: 23px; }
  .project-summary { font-size: 14px; }
  .project-preview { padding: 0; }
  .screenshot-pair { gap: 15px; }
  .screenshot-pair img { width: min(42%, 150px); }
  .records-empty { padding: 26px 0 0; font-size: 14px; }
  .empty-title { font-size: 17px; }
  .record { display: block; padding: 23px 0; }
  .record-meta { flex-direction: row; justify-content: space-between; margin-bottom: 12px; font-size: 11px; }
  .record h3 { font-size: 19px; }
  .record p { font-size: 14px; }
  .about-body { display: block; padding-top: 26px; }
  .about-copy { font-size: 14px; }
  .about-aside { margin-top: 30px; border-left: 0; border-top: 1px solid var(--line); padding: 24px 0 0; }
  .about-aside ul { display: flex; flex-wrap: wrap; gap: 4px 24px; margin: 10px 0; }
  .about-aside li { font-size: 14px; }
  .aside-note { margin-top: 12px; }
  .site-footer { align-items: flex-start; flex-direction: column; gap: 14px; font-size: 11px; }
  .site-footer .text-link { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button { transition: none; }
}
