:root {
  --black: #000;
  --white: #fff;
  --red: #ff3300;
  --blue: #0066ff;
  --yellow: #ffcc00;
  --rule: 2px solid var(--black);
  --page: 1200px;
  --gutter: 24px;
  --section-gap: 96px;
  color: var(--black);
  background: var(--white);
  font: 500 100%/1.5 Inter, "Noto Sans CJK SC", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
h1, h2, h3, p, figure { margin: 0; }
a { color: inherit; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px dashed currentColor; outline-offset: 5px; }
[aria-current="location"] { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.shell { width: min(calc(100% - var(--gutter) * 2), var(--page)); margin-inline: auto; }
.grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
section[id] { scroll-margin-top: 24px; }

.masthead { border-bottom: var(--rule); }
.masthead-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 700; font-size: 1.375rem; white-space: nowrap; }
.brand b { margin-left: 4px; font-size: 1rem; letter-spacing: .1em; vertical-align: 2px; }
.brand-mark { width: 36px; height: 36px; border: var(--rule); background: repeating-radial-gradient(circle, #000 0 2px, #fff 2px 4px); }
nav { display: flex; align-items: center; gap: 32px; font-weight: 700; }
nav a:not([aria-current]) { text-decoration: none; }
nav a:hover, .footer a:hover { text-decoration: underline; text-underline-offset: 6px; }

.hero { margin-top: 40px; border: var(--rule); }
.intro {
  grid-column: span 3;
  padding: 40px clamp(24px, 5vw, 72px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}
.category { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 1rem; letter-spacing: .09em; }
.category span { width: 14px; height: 14px; flex: none; background: var(--yellow); border: var(--rule); }
h1 { font-size: clamp(3rem, 5.25vw, 4rem); line-height: 1.1; letter-spacing: -.02em; margin-top: 24px; }
.full-stop { display: inline-block; width: .65em; }
.hero-line { font-size: clamp(1.375rem, 2.5vw, 1.875rem); line-height: 1.25; margin-top: 16px; }
.lede { font-size: 1.125rem; line-height: 1.75; max-width: 24em; margin-top: 24px; text-wrap: pretty; }
.button {
  display: inline-flex;
  justify-content: center;
  padding: 12px 28px;
  border: var(--rule);
  border-radius: 0;
  background: var(--black);
  color: var(--white);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 120ms linear, color 120ms linear;
}
.intro .button { margin-top: 32px; }
.button:hover, .button:active { background: var(--white); color: var(--black); }
.button:active { box-shadow: inset 0 0 0 2px var(--black); }
.button:focus-visible { outline-color: var(--black); }

.portrait { grid-column: span 3; display: grid; grid-template-rows: 1fr auto; border-left: var(--rule); min-width: 0; }
.portrait-paper { display: grid; grid-template-columns: 1fr minmax(0, 384px) 1fr; place-items: end center; position: relative; overflow: hidden; }
.portrait img { width: 100%; height: auto; aspect-ratio: 4/5; object-fit: cover; object-position: center 44%; }
.print-edge { width: 100%; height: 100%; grid-column: 1/-1; grid-row: 1; position: absolute; pointer-events: none; }
.print-edge span { position: absolute; width: 16px; height: 16px; border: var(--rule); }
.print-edge span:nth-child(1) { top: 16px; left: 16px; border-right: 0; border-bottom: 0; }
.print-edge span:nth-child(2) { top: 16px; right: 16px; border-left: 0; border-bottom: 0; }
.print-edge span:nth-child(3) { bottom: 16px; left: 16px; border-right: 0; border-top: 0; }
.print-edge span:nth-child(4) { bottom: 16px; right: 16px; border-left: 0; border-top: 0; }
.portrait img { grid-column: 2; grid-row: 1; }
.ink-pair { display: grid; grid-template-rows: repeat(2, 1fr); width: 26px; height: 96px; border: var(--rule); position: absolute; right: 0; top: 40%; transform: translateY(-50%); }
.ink-pair span:first-child { background: var(--red); border-bottom: var(--rule); }
.ink-pair span:last-child { background: var(--blue); }
figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; border-top: var(--rule); padding: 10px 16px; font-size: 1rem; }
figcaption [lang] { font-size: .875rem; font-weight: 700; letter-spacing: .1em; align-self: center; }

.works, .notes { margin-top: var(--section-gap); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; padding-bottom: 24px; }
h2 { font-size: clamp(2.125rem, 4vw, 2.75rem); line-height: 1.15; letter-spacing: -.02em; }
.section-head h2, .notes h2 { margin-top: 8px; }
.section-head > p { font-size: 1.125rem; padding-bottom: 3px; }
.works-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: var(--rule); }
.works-grid article + article { border-left: var(--rule); }
.work-open { display: block; width: 100%; padding: 0; border: 0; background: var(--white); cursor: pointer; text-align: left; }
.work-open:focus-visible { outline-offset: -6px; }
.artwork { display: grid; place-items: center; height: clamp(190px, 22vw, 288px); padding: 16px; border-bottom: var(--rule); }
.artwork img { width: min(100%, 184px); height: auto; aspect-ratio: 1; object-fit: contain; }
.work-caption { display: flex; gap: 16px; justify-content: space-between; align-items: center; padding: 16px 24px 0; }
.work-name { font-size: 1.375rem; font-weight: 700; }
.open-mark { display: grid; place-items: center; width: 32px; height: 32px; border: var(--rule); font-size: 1.375rem; line-height: 1; }
.work-open:is(:hover, :focus-visible) .open-mark { color: var(--white); background: var(--black); }
.works-grid article p { font-size: 1rem; line-height: 1.65; padding: 8px 24px 24px; }
.notes { border: var(--rule); }
.notes-heading { grid-column: span 2; padding: 32px; display: grid; justify-items: start; align-content: center; border-right: var(--rule); }
.note-pattern { width: 96px; height: 16px; margin-top: 24px; border: var(--rule); background: repeating-linear-gradient(105deg, #000 0 8px, #fff 8px 16px); }
.note-copy { grid-column: span 4; padding: 40px clamp(24px, 5vw, 64px); background: var(--black); color: var(--white); }
h3 { font-size: 1.875rem; line-height: 1.25; }
.note-copy p { margin-top: 16px; font-size: 1.125rem; line-height: 1.75; text-wrap: pretty; }
.footer { border-top: var(--rule); margin-top: var(--section-gap); padding-block: 24px; display: flex; justify-content: space-between; gap: 16px; }
.footer a { font-weight: 700; text-underline-offset: 4px; }
.work-dialog { width: min(560px, calc(100% - 32px)); max-height: calc(100% - 32px); border: var(--rule); color: var(--black); padding: 24px; }
.work-dialog::backdrop { background: rgb(0 0 0 / .7); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 16px; border-bottom: var(--rule); }
.dialog-head h2 { font-size: 1.875rem; }
.work-dialog img { margin: 16px auto; width: min(100%, 352px, 45vh); height: auto; }
.work-dialog p { border-top: var(--rule); padding-top: 16px; font-size: 1.125rem; }

@media (max-width: 760px) {
  :root { --gutter: 16px; --section-gap: 64px; }
  .masthead-inner { min-height: 68px; }
  .brand { gap: 8px; }
  .brand b { display: none; }
  nav { gap: 16px; }
  .hero { margin-top: 24px; }
  .intro, .portrait, .notes-heading, .note-copy { grid-column: 1/-1; }
  .intro { padding: 32px 24px; }
  .portrait { border-left: 0; border-top: var(--rule); }
  .portrait-paper { grid-template-columns: 1fr min(74%, 336px) 1fr; }
  .section-head { align-items: start; flex-direction: column; }
  .work-caption { padding-inline: 16px; }
  .works-grid article p { padding-inline: 16px; }
  .notes-heading { border-right: 0; padding: 24px; }
  .note-copy { padding-block: 32px; }
}

@media (max-width: 575px) {
  .works-grid { grid-template-columns: 1fr; }
  .works-grid article + article { border-left: 0; border-top: var(--rule); }
  .artwork img { width: min(100%, 152px); }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

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