:root {
  --pad: 20px;
  --gap: 30px;
  --cols: 5;
  --display: "Playfair Display", "Bodoni MT", Didot, serif;
  --type: "Cutive Mono", "Courier New", monospace;
  --mark: "Archivo", "Arial Black", sans-serif;
  --line: 3.6vw;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { background: #fff; }
body {
  background: #fff;
  color: #000;
  font: 400 14.8px/1.2 var(--type);
  letter-spacing: -.05em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.locked { overflow: hidden; }

a, button { color: inherit; font: inherit; letter-spacing: inherit; background: none; border: 0; cursor: pointer; text-decoration: none; }
ul { list-style: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

/* ---------- fixed chrome ---------- */

.head {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  padding: 18px var(--pad) 0;
  display: flex; justify-content: space-between; align-items: flex-start;
  pointer-events: none;
}
.head > * { pointer-events: auto; }

.menu { flex: 1; position: relative; }
.menu__toggle, .menu__list button, .menu__list a, .sheet__close { text-decoration: none; }
.menu__toggle:hover, .menu__list button:hover, .menu__list a:hover, .sheet__close:hover,
.menu__list .on { text-decoration: underline; text-underline-offset: 3px; }
.menu__list {
  position: absolute; top: 0; left: 0; right: 0;
  display: grid; grid-template-columns: repeat(var(--cols), 1fr); column-gap: var(--gap);
  margin-right: 60px;
  visibility: hidden;
}
.menu__list li { opacity: 0; transform: translateY(-6px); transition: opacity .3s, transform .4s cubic-bezier(.2, .7, .2, 1); background: #fff; justify-self: start; }
.menu.open .menu__toggle { visibility: hidden; }
.menu.open .menu__list { visibility: visible; }
.menu.open .menu__list li { opacity: 1; transform: none; }
.menu.open .menu__list li:nth-child(2) { transition-delay: .04s; }
.menu.open .menu__list li:nth-child(3) { transition-delay: .08s; }
.menu.open .menu__list li:nth-child(4) { transition-delay: .12s; }
.menu.open .menu__list li:nth-child(5) { transition-delay: .16s; }

.clock { white-space: nowrap; background: #fff; }
.clock span:first-child { margin-right: .6em; }

.mark {
  position: fixed; top: 50%; left: var(--pad); right: var(--pad); z-index: 15;
  transform: translateY(-50%);
  display: flex; justify-content: space-between;
  font: 900 31.6px/1 var(--mark);
  font-stretch: 125%;
  letter-spacing: -.04em;
  text-transform: uppercase;
  color: #fff;
  mix-blend-mode: difference;
  pointer-events: none;
}

/* ---------- the drawer ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  gap: var(--gap);
  padding: var(--pad);
}
.grid--first { padding-top: calc(var(--pad) + 26vh); }

.cell { aspect-ratio: 253 / 282; }
.entry {
  display: grid;
  grid-template-rows: minmax(0, 1fr) 51px;
  row-gap: 15px;
  width: 100%; height: 100%;
  text-align: left;
  transition: opacity .5s;
}
.entry__media { display: flex; justify-content: center; align-items: flex-end; min-height: 0; }
.entry__media img {
  display: block;
  max-width: 85.4%; max-height: 100%;
  width: auto; height: auto;
  opacity: 0;
  transition: opacity .9s;
}
.entry__media img.in { opacity: 1; }
.entry__cap span { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .35s; padding-bottom: 1px; }
.entry:hover .entry__cap span { background-size: 100% 1px; }

.line {
  font: 800 var(--line)/.74 var(--display);
  letter-spacing: -.055em;
  text-align: center;
  white-space: nowrap;
  padding-bottom: .12em;
}

body[data-filter="img"] .entry[data-kind="word"],
body[data-filter="word"] .entry[data-kind="img"] { opacity: .07; pointer-events: none; }

/* opening: the first sentence fills the window, its picture sits on top */
.hero-line, .hero-img { position: relative; }
.hero-line { z-index: 5; }
.hero-img { z-index: 6; }
.intro .entry:not(.is-hero), .intro .is-hero .entry__cap { opacity: var(--rest, 0); transition: none; }
.intro .entry { pointer-events: none; }

/* ---------- sheets ---------- */

.sheet {
  position: fixed; inset: 0; z-index: 30;
  background: #fff;
  opacity: 0;
  transition: opacity .45s;
}
.sheet[hidden] { display: none; }
.sheet.on { opacity: 1; }
.sheet__close { position: absolute; top: 18px; left: var(--pad); z-index: 3; }

.bio { overflow-y: auto; padding: 22vh var(--pad) 60px; }
.bio__text { max-width: 19em; margin: 0 auto; font: 800 clamp(30px, 4.4vw, 68px)/.92 var(--display); letter-spacing: -.045em; text-align: center; }
.bio__text p + p { margin-top: .6em; }
.bio__meta { margin: 9vh auto 0; max-width: 620px; }
.bio__meta li { display: grid; grid-template-columns: 110px 1fr; padding: 9px 0; border-top: 1px solid #000; }
.bio__meta a { text-decoration: underline; text-underline-offset: 3px; }

.view__stage { position: absolute; inset: 70px var(--pad); display: grid; place-items: center; }
.view__stage img { max-width: 100%; max-height: 100%; width: auto; height: auto; display: block; }
.view__stage .line { font-size: min(13vw, 19vh); }
.view__cap, .view__count { position: absolute; bottom: 18px; }
.view__cap { left: var(--pad); }
.view__count { right: var(--pad); }
.view__nav { position: absolute; top: 60px; bottom: 60px; width: 50%; z-index: 2; }
.view__nav--prev { left: 0; cursor: w-resize; }
.view__nav--next { right: 0; cursor: e-resize; }

/* ---------- smaller windows ---------- */

@media (max-width: 1000px) {
  :root { --cols: 3; --line: 6vw; --gap: 24px; }
}
@media (max-width: 600px) {
  :root { --cols: 2; --line: 9vw; --gap: 18px; --pad: 14px; }
  .mark { font-size: 20px; }
  .menu__list { grid-template-columns: 1fr; row-gap: 6px; }
  .cell:empty { display: none; }
  .cell:has(.is-hero) { order: -1; }
  .grid--first { padding-top: calc(var(--pad) + 34vh); }
  .bio__meta li { grid-template-columns: 80px 1fr; }
}
