:root {
  color-scheme: light;
  --paper: #f9f9f6;
  --ink: #17191d;
  --muted: #595c63;
  --blue: #2749cf;
  --line: #d2d3cd;
  --mono: "IBM Plex Mono", Consolas, "Liberation Mono", monospace;
  --sans: Inter, "Helvetica Neue", Arial, "Microsoft YaHei", sans-serif;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  scroll-padding-top: 24px;
}
*, *::before, *::after { box-sizing: border-box; }
body, figure, h1, h2, h3, p { margin: 0; }
body { -webkit-font-smoothing: antialiased; }
img, canvas { display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }
button:focus-visible, a:focus-visible, canvas:focus-visible { outline: 3px solid #f88737; outline-offset: 4px; }
::selection { background: #cbd4ff; color: #101733; }
.wrap { width: min(1320px, 90%); margin-inline: auto; }
.skip { position: absolute; z-index: 5; left: 10px; top: -5rem; padding: 12px; background: white; }
.skip:focus { top: 10px; }
.topbar { border-bottom: 1px solid var(--line); }
.bar-inner { min-height: 78px; display: flex; align-items: center; gap: 4%; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 750; letter-spacing: -.05em; font-size: 21px; }
.mark { display: inline-flex; justify-content: center; align-items: center; width: 35px; height: 35px; background: var(--blue); color: #fff; font: italic bold 34px/.8 var(--serif); padding: 0 4px 3px 0; }
nav { margin-left: auto; display: flex; gap: clamp(18px,3vw,42px); }
nav a, .github { font-weight: 600; font-size: 14px; }
.github { border-left: 1px solid var(--line); padding-left: clamp(15px,2.5vw,36px); }
nav a:hover, .github:hover, .secondary:hover, .text-link:hover, .entry:hover h3, figcaption a:hover { color: var(--blue); }
.hero { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 3.6%; padding-block: clamp(48px,5.5vw,88px) clamp(55px,6vw,92px); }
.intro { min-width: 0; }
.eyebrow, .mono, .work-meta, .entry time, .instrument-info { font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .12em; }
.eyebrow { display: flex; align-items: center; gap: 10px; color: var(--blue); }
.eyebrow span { color: #92958f; font-weight: 400; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); }
h1 { font-size: clamp(62px,7.5vw,119px); line-height: .9; letter-spacing: -.081em; padding-block: 26px 22px; font-weight: 650; }
h1 span, h1 em { display: block; }
h1 em { font: italic 1.08em/.84 var(--serif); color: var(--blue); letter-spacing: -.07em; }
.intro p { font-size: clamp(15px,1.14vw,18px); color: #474951; line-height: 1.85; }
.actions, .about-links { display: flex; align-items: center; gap: 28px; margin-top: 26px; }
.button { display: inline-flex; align-items: center; gap: 24px; background: var(--ink); color: white; padding: 13px 18px; font-size: 14px; font-weight: 650; }
.button:hover { background: var(--blue); }
.secondary, .text-link { font-size: 14px; font-weight: 600; }
.secondary { border-bottom: 1px solid currentColor; padding-block: 3px; }
.arrow { white-space: nowrap; font: 1.05em/1 Arial, sans-serif; }
.instrument { position: relative; padding: 0 20px; min-width: 0; background-color: #eceeea; border: 1px solid #d2d5cf; background-image: radial-gradient(#cdd1ca .7px, transparent .85px); background-size: 12px 12px; }
.instrument-info, .instrument figcaption { display: flex; align-items: center; justify-content: space-between; z-index: 1; position: relative; color: #4d5354; }
.instrument-info { margin: 15px 0 0; font-size: 10px; }
.instrument-info .mono { color: var(--blue); }
.stage { position: relative; width: 100%; aspect-ratio: 1.65; }
.stage canvas, .fallback { width: 100%; height: 100%; position: absolute; inset: 0; }
.fallback { object-fit: contain; }
#specimen { opacity: 0; cursor: grab; touch-action: pan-y; }
#specimen:active { cursor: grabbing; }
#specimen[data-ready=true] { opacity: 1; }
.stage:has(#specimen[data-ready=true]) .fallback { display: none; }
.instrument figcaption { padding: 12px 0; border-top: 1px solid #c2c7bf; font-size: 12px; min-height: 44px; }
.instrument figcaption strong { font-weight: 650; color: var(--ink); }
.instrument figcaption i { font-family: var(--serif); margin-left: 4px; font-size: 15px; }
.target { color: var(--blue); font-size: 17px; vertical-align: -.05em; margin-right: 4px; }
#motion-toggle { background: var(--paper); color: #383d42; font-size: 11px; border: 1px solid #bdc2bc; padding: 5px 9px; }
.chapter { border-top: 1px solid var(--line); padding-block: clamp(40px,4vw,64px) clamp(52px,6vw,92px); scroll-margin-top: 8px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 27px; }
h2 { font-weight: 680; font-size: clamp(32px,3.5vw,53px); line-height: 1.15; letter-spacing: -.055em; margin-top: 10px; }
.period { display: inline-block; color: var(--blue); margin-left: .06em; }
.filters { display: flex; align-items: center; padding-bottom: 2px; gap: 5px; }
.filters button { border: 1px solid transparent; border-radius: 50px; background: transparent; padding: 6px 15px; font-size: 13px; color: var(--muted); }
.filters button[aria-pressed=true] { background: var(--ink); color: white; }
.filters button:hover { border-color: #5c6065; }
.work-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 37px 26px; }
.cover { overflow: hidden; background: #e4e6e3; }
.cover img { width: 100%; height: auto; aspect-ratio: 2.1; object-fit: cover; }
.work-meta { display: flex; gap: 12px; align-items: center; margin: 15px 0 7px; color: var(--muted); letter-spacing: .055em; }
.work-meta span + span { padding-left: 12px; border-left: 1px solid var(--line); }
.work-card h3, .entry h3 { font-weight: 660; font-size: clamp(19px,1.65vw,25px); line-height: 1.45; letter-spacing: -.035em; }
.work-card h3 { display: flex; justify-content: space-between; gap: 10px; }
.work-card h3 .arrow { color: var(--blue); }
.work-card p { margin-top: 6px; color: var(--muted); font-size: 15px; line-height: 1.7; }
.work-card a:hover h3 { color: var(--blue); }
.text-link { display: inline-flex; align-items: center; gap: 9px; padding-block: 5px; flex-shrink: 0; }
.entry { padding: 23px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 110px 1fr auto 20px; align-items: center; gap: 24px; }
.entry:last-child { border-bottom: 1px solid var(--line); }
.entry time { color: var(--muted); letter-spacing: .02em; }
.entry-topic { color: var(--muted); font-size: 13px; }
.entry .arrow, figure a:hover figcaption { color: var(--blue); }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,240px),1fr)); gap: 22px; }
.photo { background: #eaebe7; }
.photo img { width: 100%; aspect-ratio: 1.55; object-fit: contain; }
.gallery-grid figcaption { display: flex; justify-content: space-between; gap: 8px; padding-top: 12px; font-size: 14px; font-weight: 600; }
.network { background: #efefeb; }
.directory { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,225px),1fr)); gap: 28px; }
.site-group h3 { padding-bottom: 14px; font-size: 18px; }
.site-group ul { list-style: none; padding: 0; margin: 0; }
.site-group li { border-top: 1px solid #cacbc4; }
.site-group li a { padding: 12px 0; display: grid; grid-template-columns: 1fr auto; gap: 3px 8px; }
.site-group li a:hover strong { color: var(--blue); }
.site-group .arrow { color: #737770; }
.site-group small { grid-column: 1/-1; color: var(--muted); font-size: 13px; line-height: 1.6; }
footer { background: #171a23; color: white; padding-top: clamp(45px,6vw,90px); }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6%; padding-bottom: 52px; }
footer .eyebrow { color: #afbfff; }
footer h2 { font-size: clamp(30px,4.5vw,72px); }
footer h2 em { font-family: var(--serif); font-weight: 400; }
.about-copy p { color: #d3d6dc; line-height: 1.85; }
.about-copy p + p { margin-top: 12px; }
footer .text-link:hover, footer a:hover { color: #b6c3ff; }
.footer-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid #454854; padding-block: 20px; font: 12px var(--mono); }
.footer-line .brand { font: 600 16px var(--sans); }
.footer-line .mark { width: 26px; height: 26px; font-size: 26px; }
@media (max-width: 740px) {
  .bar-inner { min-height: 64px; }
  .brand { font-size: 18px; gap: 8px; }
  nav { gap: 16px; }
  .github { display: none; }
  .hero { grid-template-columns: 1fr; padding-block: 40px; gap: 32px; }
  h1 { font-size: clamp(62px,12.4vw,86px); padding-block: 20px; }
  h1 span, h1 em { display: inline; }
  h1 em { margin-left: .1em; }
  .stage { aspect-ratio: 2.1; }
  .work-grid { gap: 26px 18px; }
  .about-grid { grid-template-columns: 1fr; gap: 24px; }
  .entry { grid-template-columns: 82px 1fr 16px; gap: 12px; }
  .entry-topic { display: none; }
}
@media (max-width: 500px) {
  .bar-inner { flex-wrap: wrap; gap: 0 14px; padding-block: 12px; }
  nav { gap: 12px; } nav a { font-size: 13px; }
  .mark { width: 27px; height: 28px; font-size: 28px; }
  .brand { font-size: 16px; }
  h1 { font-size: 11vw; } h1 em { font-size: 1.15em; }
  .hero { padding-top: 32px; gap: 24px; }
  .wide-only { display: none; }
  .stage { aspect-ratio: 1.58; }
  .instrument { padding-inline: 12px; }
  .work-grid, .gallery-grid { grid-template-columns: 1fr; }
  .section-head { gap: 8px; }
  .filters { gap: 1px; } .filters button { padding: 6px 10px; }
  .entry { grid-template-columns: 1fr auto; gap: 6px; padding-block: 16px; }
  .entry time { grid-column: 1/-1; }
  .footer-line { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .cover img { transition: transform .3s ease; }
  .work-card a:hover .cover img { transform: scale(1.025); }
}
