@font-face {
  font-family: "Archive Sans";
  src: url("assets/sans.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("assets/display.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("assets/display-italic.woff2") format("woff2");
  font-style: italic;
  font-display: swap;
}
:root {
  color-scheme: light;
  --paper: #faf9f6;
  --ink: #171717;
  --blue: #193ddc;
  --muted: #5a5b55;
  --line: #d8d8d0;
  --sans: "Archive Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --gutter: clamp(1.3rem, 4vw, 5rem);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
button, a { color: inherit; font: inherit; }
button { cursor: pointer; border-radius: 0; }
a { text-decoration: none; }
:is(a, button, [tabindex="0"]):focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
[hidden] { display: none !important; }
p, h1, h2, h3, h4, figure { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
::selection { background: #dce2ff; color: #192977; }
.shell { width: min(calc(100% - 2 * var(--gutter)), 104rem); margin-inline: auto; }
.skip-link { position: fixed; top: .5rem; left: .5rem; transform: translateY(-155%); color: white; background: var(--blue); padding: .8rem; z-index: 3; }
.skip-link:focus { transform: none; }

.site-head,.site-actions,.language-picker,.signature { display: flex; align-items: center; }
.site-head { justify-content: space-between; gap: 1rem; padding-block: 1rem; }
.signature { gap: .48rem; font-size: .91rem; font-weight: 600; }
.signature [lang="en"] { font: italic 1.35rem/1 var(--serif); letter-spacing: -.025em; }
.slash { color: #999992; font-size: .8rem; font-weight: 400; }
.site-actions { gap: clamp(1.1rem, 3vw, 3rem); }
.language-picker { gap: .2rem; color: var(--muted); font-size: .78rem; }
.language-picker button { border: 0; background: transparent; min-height: 2.65rem; padding-inline: .2rem; }
.language-picker button[aria-pressed="true"] { color: var(--blue); text-decoration: underline; text-underline-offset: .35em; }
.language-picker button:hover,.signature:hover,.index-link:hover,.footer-nav a:hover { color: var(--blue); }
.index-link,.footer-nav a { font-size: .83rem; text-decoration: underline; text-decoration-color: #aeafa8; text-underline-offset: .35em; }

.intro { padding-top: clamp(2rem, 4.6vw, 5rem); display: grid; grid-template-columns: minmax(12rem, .75fr) minmax(0, 2.25fr); grid-template-areas: "kind kind" "title title" "brief photo"; column-gap: clamp(2.5rem, 6vw, 7.2rem); }
.intro-type { grid-area: kind; display: flex; align-items: center; gap: .7rem; color: var(--muted); }
.eyebrow,.intro-type { font-size: .79rem; line-height: 1.5; }
.intro-type .eyebrow { font: italic 1.1rem/1.3 var(--serif); color: var(--blue); }
#project-kind::before { content: "/"; padding-right: .65rem; color: #92928c; }
.intro-heading { grid-area: title; display: flex; flex-wrap: wrap; align-items: baseline; gap: .2em clamp(1.35rem, 3.65vw, 4.75rem); margin: .65rem 0 clamp(1.9rem, 3.3vw, 3.8rem); }
h1 { font-size: clamp(3.6rem, 6.65vw, 7.7rem); font-weight: 570; line-height: 1.16; letter-spacing: -.042em; }
h1:focus { outline: 0; }
.display-en { color: var(--blue); font: italic clamp(4rem, 8.75vw, 10rem)/1 var(--serif); letter-spacing: -.028em; word-spacing: .045em; }
html[lang="en"] #case-title { color: var(--blue); font: italic clamp(4rem, 8.75vw, 10rem)/1.04 var(--serif); letter-spacing: -.028em; word-spacing: .045em; }
html[lang="en"] #english-title { font: 510 clamp(1.65rem, 3.9vw, 4.7rem)/1.1 var(--sans); letter-spacing: -.055em; color: var(--ink); }

.intro-copy { grid-area: brief; align-self: end; padding-bottom: 2.2rem; max-width: 22rem; }
.status { color: var(--muted); font-size: .8rem; line-height: 1.5; }
#brief { margin-top: 1.1rem; font-size: clamp(1rem, 1.23vw, 1.33rem); line-height: 1.85; text-wrap: pretty; }
.lead-image { grid-area: photo; min-width: 0; }
.hero-frame { overflow: hidden; }
.hero-frame img { width: 100%; height: auto; }
figcaption { font-size: .83rem; line-height: 1.65; color: var(--muted); margin-top: .76rem; text-wrap: pretty; }

.reading { width: min(calc(100% - 2 * var(--gutter)), 82rem); display: grid; grid-template-columns: .85fr 1.5fr; gap: clamp(2.5rem, 8vw, 10rem); margin-top: clamp(4.5rem, 9vw, 10rem); }
.section-head { align-self: start; }
.section-head .eyebrow,.gallery-head .eyebrow { font: italic clamp(1.7rem, 2.9vw, 3.35rem)/1.12 var(--serif); letter-spacing: -.03em; color: var(--blue); }
.section-head h2,.gallery-head h2 { margin-top: .5rem; font-size: 1rem; font-weight: 550; }
html[lang="en"] :is(.section-head,.gallery-head) .eyebrow { display: none; }
html[lang="en"] :is(.section-head,.gallery-head) h2 { font: italic clamp(1.7rem, 2.9vw, 3.35rem)/1.12 var(--serif); letter-spacing: -.03em; color: var(--blue); margin: 0; }
.story { max-width: 44rem; }
.story h3 { text-wrap: balance; font-size: clamp(1.55rem, 2.9vw, 3.05rem); line-height: 1.42; letter-spacing: -.045em; font-weight: 540; margin-bottom: 1.35rem; }
.story h4 { font-size: .92rem; font-weight: 630; margin: 1.7rem 0 .4rem; }
.story p { line-height: 1.95; font-size: 1.04rem; text-wrap: pretty; }
html[lang="en"] .story p,html[lang="en"] #brief { line-height: 1.7; }
.visuals { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(0, .82fr); gap: clamp(2rem, 5vw, 6rem); align-items: start; margin-top: clamp(3.2rem, 6.8vw, 7rem); }
.visuals figure:nth-child(2) { margin-top: clamp(3.5rem, 9.5vw, 11rem); }
.visuals img { width: 100%; }

.gallery { margin-block: clamp(5rem, 10vw, 12rem); }
.gallery-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; padding-bottom: 1.3rem; border-bottom: 1px solid var(--line); }
.gallery-head p { font-size: .8rem; line-height: 1.6; color: var(--muted); }
.plates { margin-top: clamp(1.7rem, 3.9vw, 4rem); display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 6rem) clamp(1.3rem, 3vw, 3.3rem); }
.plates figure:first-child { grid-column: 1 / -1; width: 82%; justify-self: center; }
.plate-button { display: block; position: relative; width: 100%; padding: 0; border: none; background: transparent; cursor: zoom-in; }
.plate-button img { width: 100%; }
.magnify { position: absolute; right: .72rem; bottom: .72rem; width: 2.25rem; height: 2.25rem; display: grid; place-content: center; border-radius: 50%; box-shadow: 0 1px 8px #0002; color: var(--blue); background: var(--paper); font: 1.3rem var(--sans); }
.plate-button:is(:hover,:focus-visible) .magnify { color: white; background: var(--blue); }

.case-footer .shell { border-top: 1px solid var(--line); }
.next-project { display: block; padding: clamp(2.6rem, 6.8vw, 8.5rem) 0; }
#next-label { color: var(--muted); }
.next-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: .65rem clamp(1.1rem, 3vw, 4rem); margin-top: .55rem; }
.next-title strong { font-size: clamp(2.85rem, 5.8vw, 6.8rem); font-weight: 530; letter-spacing: -.04em; }
.next-title em { font: italic clamp(3.3rem, 7.5vw, 9rem)/1 var(--serif); letter-spacing: -.028em; word-spacing: .045em; color: var(--blue); }
html[lang="en"] .next-title strong { font: italic clamp(3.3rem, 7.5vw, 9rem)/1.08 var(--serif); color: var(--blue); letter-spacing: -.028em; word-spacing: .045em; }
html[lang="en"] .next-title em { font: 500 clamp(1.8rem, 4vw, 4.5rem)/1.2 var(--sans); color: var(--ink); }
.next-project:hover .next-title { text-decoration: underline; text-decoration-color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: .3em; }
.footer-nav { display: flex; justify-content: space-between; align-items: center; padding: .9rem 0 2rem; }

#viewer { margin: auto; width: min(96vw, 100rem); max-width: 100%; padding: 0; border: 0; color: var(--ink); background: var(--paper); }
#viewer::backdrop { background: rgba(18,18,21,.85); }
body.view-open { overflow: hidden; }
.viewer-inner { display: flex; flex-direction: column; height: min(94vh, 72rem); height: min(94dvh, 72rem); min-height: 0; }
.viewer-top,.viewer-controls { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .45rem 1.2rem; }
.viewer-top h2 { font-weight: 570; font-size: 1rem; line-height: 1.45; }
#viewer button { min-height: 2.65rem; padding: .35rem .7rem; border: 0; background: transparent; color: var(--blue); font-size: .9rem; }
#viewer button:is(:hover,:focus-visible) { text-decoration: underline; text-underline-offset: .28em; }
#viewer button:disabled { color: #76766e; opacity: .6; cursor: default; text-decoration: none; }
.stage { min-height: 0; flex: 1; overflow: auto; background: #202020; overscroll-behavior: contain; touch-action: pan-y pinch-zoom; }
#view-image { max-width: none; margin-inline: auto; object-fit: contain; cursor: zoom-in; user-select: none; }
.stage.is-zoomed { touch-action: pan-x pan-y pinch-zoom; }
.stage.is-zoomed, .stage.is-zoomed #view-image { cursor: grab; }
.stage.panning, .stage.panning #view-image { cursor: grabbing; }
.page-buttons,.zoom-buttons { display: flex; align-items: center; gap: .55rem; }
#page-count,#zoom-count { font: .86rem var(--sans); font-variant-numeric: tabular-nums; min-width: 3rem; text-align: center; }
#viewer-hint { color: var(--muted); font-size: .78rem; padding: .1rem 1.2rem .8rem; }

@media (prefers-reduced-motion: no-preference) {
  .intro-heading { animation: type-appear .75s ease-out both; }
  .hero-frame { animation: image-open .85s cubic-bezier(.2,.75,.15,1) both; }
  .hero-frame img { animation: image-settle 1.1s cubic-bezier(.16,.7,.16,1) both; }
  .on-stage { animation: text-enter .6s ease-out both; }
  .visuals .on-stage img,.plates .on-stage img { animation: image-open .72s cubic-bezier(.2,.75,.15,1) both; }
  #viewer[open] { animation: text-enter .18s ease-out; }
  @keyframes type-appear { from { transform: translateY(.2em); opacity: .15; } to { transform: none; opacity: 1; } }
  @keyframes text-enter { from { transform: translateY(.55rem); opacity: .35; } to { transform: none; opacity: 1; } }
  @keyframes image-open { from { clip-path: inset(0 6% 4% 6%); } to { clip-path: inset(0); } }
  @keyframes image-settle { from { transform: scale(1.045); } to { transform: none; } }
}
@media (max-width: 750px) {
  .site-head { padding-block: .45rem; gap: .45rem; }
  .site-actions { gap: .9rem; }
  .intro { padding-top: 2.6rem; grid-template-columns: 1fr; grid-template-areas: "kind" "title" "photo" "brief"; }
  .intro-heading { margin: .7rem 0 1.35rem; gap: .15rem .95rem; }
  h1 { font-size: clamp(2.65rem, 9vw, 4rem); }
  .display-en,html[lang="en"] #case-title { font-size: clamp(3.1rem, 11vw, 5.4rem); }
  html[lang="en"] #english-title { font-size: clamp(1.5rem, 5.7vw, 2.5rem); }
  .intro-copy { max-width: 35rem; padding: 0; margin-top: 1.7rem; }
  #brief { margin-top: .4rem; }
  .reading { margin-top: 4.6rem; grid-template-columns: 1fr; gap: 1.45rem; }
  .visuals,.plates { grid-template-columns: 1fr; gap: 1.85rem; }
  .visuals figure:nth-child(2) { margin-top: 0; }
  .plates figure:first-child { width: 100%; }
  .next-title { gap: .45rem .9rem; }
  .footer-nav { padding-bottom: 1.5rem; }
  #viewer { width: 100%; max-height: 100%; }
  .viewer-inner { height: 94vh; height: 94dvh; }
  .viewer-top,.viewer-controls { padding: .4rem .55rem; gap: .3rem; }
  #viewer button { padding-inline: .5rem; }
  .page-buttons,.zoom-buttons { gap: .2rem; }
  #page-count,#zoom-count { min-width: 2.4rem; font-size: .8rem; }
}
@media (max-width: 380px) {
  .site-actions { gap: .6rem; }
  .signature { font-size: .82rem; gap: .3rem; }
  .signature [lang="en"] { font-size: 1.1rem; }
  .index-link,.language-picker { font-size: .77rem; }
  .language-picker { gap: .05rem; }
  .gallery-head { align-items: start; flex-direction: column; gap: .4rem; }
}
