/* Layout: an exhibition catalogue. White pages, two big staggered columns, and a museum label under every work. */
:root {
  color-scheme: light;
  --paper: #fbfbfa;
  --ink: #17161c;
  --ink-2: #6b6873;
  --rule: #dddbd7;
  --serif: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
  --sans: 'Instrument Sans', system-ui, -apple-system, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  --margin: max(16px, 6vw);
}
* { box-sizing: border-box; }
html { background: var(--paper); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.5 var(--sans); overflow-x: clip;
  padding-left: max(var(--margin), env(safe-area-inset-left, 0px)); padding-right: max(var(--margin), env(safe-area-inset-right, 0px));
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.skip { position: absolute; left: var(--margin); top: -60px; padding: 8px 12px; background: var(--ink); color: var(--paper); z-index: 10; }
.skip:focus { top: 8px; }

/* The bar */
.bar { display: flex; justify-content: space-between; align-items: baseline; gap: 12px 24px; flex-wrap: wrap; padding-block: 28px; border-bottom: 1px solid var(--rule); font-size: 14px; }
.brand { margin: 0; font: inherit; }
.home { font-weight: 600; letter-spacing: .01em; text-decoration: none; }
.nav { display: flex; gap: 24px; }
.nav a, .home { text-underline-offset: 4px; }
.nav a { text-decoration: none; }
.nav a:hover, .home:hover { text-decoration: underline; }

/* The title page */
.intro { padding-block: clamp(56px, 9vw, 140px) clamp(56px, 8vw, 120px); display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
.intro h1 { margin: 0; font: 400 clamp(54px, 10vw, 172px)/.9 var(--serif); letter-spacing: -.025em; text-wrap: balance; }
.intro.is-section h1, .intro.is-missing h1 { font-size: clamp(48px, 7vw, 120px); }
.lede { margin: 0; max-width: 30ch; font: italic 400 clamp(22px, 2.3vw, 34px)/1.25 var(--serif); color: var(--ink-2); }
.lede a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 6px; }
.span, .no, .end-label, .turn span, .plate dt { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.span { margin: 0; }

/* The catalogue: a plain grid without the script, two balanced columns with it. */
.catalogue { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8vw 8.5vw; align-items: start; }
.catalogue.is-laid { display: flex; gap: var(--gap); }
.catalogue.is-front { margin-top: clamp(32px, 4.5vw, 72px); }
.col { display: flex; flex-direction: column; gap: var(--vgap); flex: 1 1 0; min-width: 0; }
.col-1 { padding-top: var(--stagger, 0); }
.tile { min-width: 0; }
.tile > a { display: block; text-decoration: none; }
.media { display: block; overflow: hidden; background: #111; max-width: 100%; }
.media video, .media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.nomedia { display: grid; place-items: center; aspect-ratio: 4 / 3; color: var(--ink-2); background: var(--rule); font-size: 14px; }
/* The museum label: catalogue number, title, year and place, then what it's made of. */
.label { display: grid; grid-template-columns: 3.2em minmax(0, 1fr); column-gap: 12px; padding-top: 18px; }
.label .no { grid-row: span 3; line-height: 2.3; }
.label .name { margin: 0; font: 400 clamp(26px, 2.4vw, 38px)/1.05 var(--serif); letter-spacing: -.01em; }
.label .where { font-size: 14.5px; padding-top: 6px; }
.label .tech { font-size: 13.5px; color: var(--ink-2); }
.tile a:hover .name { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }
.empty { margin: 0; font: italic 400 24px/1.3 var(--serif); color: var(--ink-2); }

/* One work */
.work { padding-top: clamp(32px, 5vw, 72px); }
.work-media { margin: 0; max-width: 1300px; }
/* At most about three quarters of the screen high, so the label shows on the first screen too. */
.work-media .media { width: min(100%, calc(74vh * var(--ar, 1.7778))); width: min(100%, calc(74svh * var(--ar, 1.7778))); }
.work-text { display: grid; grid-template-columns: minmax(0, 19rem) minmax(0, 40rem); gap: 32px clamp(32px, 6vw, 96px); padding-top: clamp(28px, 4vw, 56px); }
.plate .no { margin: 0 0 10px; }
.plate h1 { margin: 0; font: 400 clamp(40px, 4.6vw, 72px)/1 var(--serif); letter-spacing: -.02em; text-wrap: balance; }
.plate .full { margin: 10px 0 0; font: italic 400 20px/1.3 var(--serif); color: var(--ink-2); }
.plate dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 16px; margin: 24px 0 0; padding-top: 18px; border-top: 1px solid var(--rule); font-size: 15px; }
.plate dt { line-height: 1.9; }
.plate dd { margin: 0; }
.turn { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: clamp(72px, 9vw, 140px); padding-top: 28px; border-top: 1px solid var(--rule); }
.turn a { display: grid; gap: 6px; text-decoration: none; }
.turn .next { text-align: right; }
.turn b { font: 400 clamp(28px, 3vw, 46px)/1.05 var(--serif); }
.turn a:hover b { font-style: italic; }

/* Pages */
.page { padding-top: clamp(48px, 7vw, 112px); }
.page h1 { margin: 0 0 clamp(28px, 4vw, 56px); font: 400 clamp(54px, 9vw, 150px)/.9 var(--serif); letter-spacing: -.025em; }
.page-media { margin: 0 0 40px; max-width: 1300px; }
.page-media img { display: block; width: 100%; height: auto; }

/* A post's own text and media */
.entry-content { font-size: clamp(17px, 1.2vw, 19px); line-height: 1.6; overflow-wrap: break-word; }
.entry-content > * { max-width: 38em; margin-block: 0 1.2em; }
.entry-content > figure, .entry-content > .wp-block-image, .entry-content > .wp-block-video, .entry-content > .wp-block-gallery, .entry-content > .wp-block-embed { max-width: 100%; }
.entry-content h2, .entry-content h3 { margin-top: 1.6em; font-family: var(--serif); font-weight: 400; line-height: 1.1; }
.entry-content h2 { font-size: clamp(28px, 2.6vw, 40px); }
.entry-content h3 { font-size: clamp(22px, 2vw, 30px); }
.entry-content a { text-decoration-thickness: 1px; text-underline-offset: .18em; }
.entry-content figure { margin-inline: 0; }
.entry-content img, .entry-content video { display: block; max-width: 100%; height: auto; }
.entry-content .wp-block-image img, .entry-content .wp-block-video video { width: 100%; }
.entry-content figcaption { margin-top: .6em; font-family: var(--mono); font-size: 12px; letter-spacing: .04em; color: var(--ink-2); }
.entry-content .wp-block-gallery { display: flex; flex-wrap: wrap; gap: 12px; }
.entry-content .wp-block-gallery figure { flex: 1 1 calc(50% - 12px); margin: 0; }
.entry-content iframe { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; }
.entry-content blockquote { margin-inline: 0; font: italic 400 1.3em/1.3 var(--serif); }
.entry-content ul, .entry-content ol { padding-left: 1.2em; }
.entry-content .alignwide, .entry-content .alignfull { max-width: none; }

/* Contact */
.end { margin-top: clamp(96px, 12vw, 180px); padding-block: 40px 56px; border-top: 1px solid var(--rule); display: grid; gap: 8px; }
.end-label { margin: 0; }
.end-mail { font: 400 clamp(36px, 6.5vw, 104px)/1 var(--serif); text-decoration: none; overflow-wrap: anywhere; justify-self: start; }
.end-mail:hover { font-style: italic; }

/* A standing picture gets the label and text beside it instead of a wide empty space. */
@media (min-width: 901px) {
  .work.is-tall { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: clamp(32px, 6vw, 96px); align-items: start; }
  .work.is-tall .work-media { position: sticky; top: 24px; }
  .work.is-tall .work-media .media { width: calc(86vh * var(--ar)); width: calc(86svh * var(--ar)); max-width: 44vw; }
  .work.is-tall .work-text { grid-template-columns: minmax(0, 1fr); padding-top: 0; max-width: 40rem; }
  .work.is-tall .turn { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .work-text { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 620px) {
  .catalogue { grid-template-columns: minmax(0, 1fr); gap: 64px; }
  .turn { grid-template-columns: minmax(0, 1fr); }
  .turn .next { text-align: left; }
}
