:root {
  color-scheme: light;
  --paper: #fff;
  --ink: #1f2933;
  --muted: #646e79;
  --line: #e5e7eb;
  --link: #2a7ae2;
  --surface: #f3f4f6;
  --serif: Georgia, "Noto Serif CJK SC", "Source Han Serif SC", "Songti SC", "SimSun", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 32px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.85 var(--serif); -webkit-font-smoothing: antialiased; }
a { color: var(--link); text-decoration: none; text-underline-offset: 4px; transition: color 150ms ease, background-color 150ms ease; }
a:hover { color: #175db7; text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--link); outline-offset: 5px; border-radius: 2px; }
::selection { background: #deebfc; }
p { margin: 0 0 1.1em; }
h1, h2, h3 { color: var(--ink); font-family: var(--serif); }
img { display: block; max-width: 100%; }
.skip-link { position: absolute; top: -70px; left: 16px; z-index: 2; padding: 8px 14px; background: var(--ink); color: white; font-family: var(--sans); }
.skip-link:focus { top: 12px; }

.site-header { border-bottom: 1px solid var(--line); }
.header-inner { max-width: 1080px; min-height: 83px; margin: auto; padding: 0 32px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.wordmark { color: var(--ink); font-size: 27px; font-weight: 600; letter-spacing: -1px; line-height: 1; }
.wordmark:hover { color: var(--ink); text-decoration: none; }
.wordmark-dot { color: var(--muted); }
nav { display: flex; gap: 28px; font: 13px/1.4 var(--sans); }
nav a { color: #56616d; padding: 13px 0; }

.reading-column { width: min(672px, calc(100% - 48px)); margin-inline: auto; }
.intro { padding-top: 78px; }
.intro-label { margin-bottom: 23px; color: var(--muted); font: 12px/1.5 var(--sans); letter-spacing: .03em; }
.intro-label > span { padding: 0 9px; color: #b3b9c0; }
.identity { display: flex; justify-content: space-between; align-items: center; gap: 25px; }
h1 { margin: 0; font-size: clamp(40px, 6vw, 64px); font-weight: 500; letter-spacing: -2.3px; line-height: 1.1; }
.intro-subtitle { margin: 20px 0 0; color: #58626b; font-size: 24px; letter-spacing: .025em; }
.portrait { width: 104px; height: 104px; flex-shrink: 0; object-fit: cover; border: 1px solid var(--line); border-radius: 2px; }
.byline { margin-top: 37px; padding: 21px 0 22px; border-block: 1px solid var(--line); display: grid; grid-template-columns: 1.35fr 1.25fr .55fr; gap: 20px; font: 12px/1.7 var(--sans); }
.byline > div { display: grid; align-content: start; gap: 6px; }
.meta-label { color: var(--muted); font-size: 10px; letter-spacing: .12em; }

.article-body { padding-top: 43px; padding-bottom: 20px; }
.article-section { position: relative; padding: 0 0 49px; margin: 0 0 45px; border-bottom: 1px solid var(--line); scroll-margin-top: 30px; }
.section-heading { position: relative; display: flex; align-items: baseline; gap: 14px; margin-bottom: 23px; }
.section-number { position: absolute; right: calc(100% + 25px); color: #9aA1a9; font: 12px/1.5 var(--sans); font-variant-numeric: tabular-nums; }
h2 { margin: 0; font-size: 27px; line-height: 1.45; font-weight: 600; letter-spacing: .02em; }
.article-section > p:last-of-type { margin-bottom: 0; }
.section-intro { color: #58626b; font-size: 16px; }
.sidenote { position: absolute; top: 5px; left: calc(100% + 46px); width: 154px; color: var(--muted); font: 12px/1.75 var(--sans); }
.note-label { display: block; margin-bottom: 9px; padding-top: 9px; border-top: 1px solid var(--line); color: #59636d; font-size: 11px; }
.sidenote p { margin: 0 0 8px; }
.sidenote a { font-size: 11px; }

.project { margin-top: 29px; padding-top: 24px; border-top: 1px solid var(--line); }
.project-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
h3 { margin: 0; font-size: 23px; font-weight: 600; line-height: 1.5; }
h3 a { color: var(--ink); }
h3 a:hover { color: var(--link); }
.external-arrow { margin-left: 4px; color: var(--link); font: 16px var(--sans); }
.project-type { flex-shrink: 0; color: var(--muted); font: 11px/1.5 var(--sans); }
.project-stack { margin: 9px 0 15px; color: var(--muted); font: 11px/1.6 var(--sans); letter-spacing: .02em; }
.project-stack span { padding: 0 6px; color: #a1a7af; }
.project > p:not(.project-stack) { margin-bottom: 11px; font-size: 16px; }
.source-link { display: inline-block; padding: 4px 0; font: 12px/1.8 var(--sans); }
.project-note { top: 106px; }

.resource-list { margin: 28px 0 35px; }
.resource-list > div { display: grid; grid-template-columns: 160px 1fr; align-items: baseline; gap: 24px; padding: 15px 0; border-top: 1px solid var(--line); }
.resource-list > div:last-child { border-bottom: 1px solid var(--line); }
.resource-list dt { font-size: 16px; }
.resource-list dt span { padding-left: 3px; font: 12px var(--sans); }
.resource-list dd { margin: 0; color: #58626b; font-size: 15px; }
.table-wrap { margin-top: 39px; }
table { width: 100%; border-collapse: collapse; border-block: 1px solid #707983; font-size: 14px; text-align: left; }
caption { padding-bottom: 13px; color: var(--muted); text-align: left; font: 12px/1.6 var(--sans); }
th, td { padding: 11px 12px 11px 0; vertical-align: top; }
thead { border-bottom: 1px solid var(--line); color: #58626b; font: 11px/1.6 var(--sans); }
th { font-weight: 400; }
tbody th { width: 27%; }
tbody td { color: #58626b; }
.contact-section { padding-bottom: 6px; border-bottom: 0; margin-bottom: 40px; }
.contact-links { display: flex; flex-wrap: wrap; gap: 10px 29px; margin-top: 20px; font: 13px/1.8 var(--sans); }
.contact-links a { overflow-wrap: anywhere; padding: 6px 0; }
.contact-links span { margin-left: 4px; }

.site-footer { border-top: 1px solid var(--line); }
.footer-inner { max-width: 1080px; margin: auto; padding: 27px 32px 30px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.footer-inner > div { display: flex; align-items: baseline; flex-wrap: wrap; gap: 16px; }
.footer-name { color: var(--ink); font-size: 17px; }
.footer-description, .icp-link { color: var(--muted); font: 11px/1.8 var(--sans); }

@media (max-width: 1150px) {
  .sidenote { position: static; width: auto; margin-top: 25px; padding: 13px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 2px; }
  .note-label { padding-top: 0; border: 0; margin-bottom: 5px; }
  .sidenote p { display: inline; margin-right: 9px; }
  .section-number { position: static; font-size: 11px; }
}

@media (max-width: 600px) {
  body { font-size: 16px; line-height: 1.9; }
  .header-inner { min-height: 72px; padding-inline: 24px; gap: 16px; }
  .wordmark { font-size: 24px; }
  nav { gap: 18px; font-size: 12px; }
  .intro { padding-top: 49px; }
  .intro-label { margin-bottom: 24px; font-size: 10px; }
  h1 { font-size: clamp(34px, 9vw, 46px); letter-spacing: -1.6px; }
  .identity { gap: 14px; align-items: start; }
  .portrait { width: 66px; height: 66px; margin-top: 2px; }
  .intro-subtitle { margin-top: 17px; font-size: 19px; white-space: nowrap; }
  .byline { margin-top: 29px; grid-template-columns: 1.4fr 1.25fr; gap: 17px 14px; font-size: 10px; padding-block: 18px; }
  .byline > div:last-child { grid-column: 1 / -1; display: flex; gap: 16px; align-items: baseline; }
  .meta-label { font-size: 9px; }
  .article-body { padding-top: 34px; }
  .article-section { margin-bottom: 33px; padding-bottom: 33px; }
  .section-heading { gap: 10px; margin-bottom: 19px; }
  h2 { font-size: 24px; }
  h3 { font-size: 21px; }
  .project { margin-top: 24px; padding-top: 21px; }
  .resource-list > div { grid-template-columns: 1fr; gap: 3px; padding-block: 12px; }
  .resource-list dd { font-size: 14px; }
  table { font-size: 12px; }
  tbody th { width: 29%; white-space: nowrap; }
  .contact-section { padding-bottom: 0; }
  .contact-links { gap: 4px 24px; font-size: 12px; }
  .footer-inner { padding: 24px; align-items: start; flex-direction: column; gap: 13px; }
}

@media (max-width: 360px) {
  .header-inner { padding-inline: 18px; }
  nav { gap: 13px; }
  .reading-column { width: calc(100% - 36px); }
  .portrait { width: 54px; height: 54px; }
  .intro-subtitle { font-size: 17px; }
}

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