:root {
  --paper: #f3f0e9;
  --ink: #1c1b19;
  --mute: #8b867c;
  --line: #dcd7cc;
  --gutter: clamp(16px, 3.2vw, 44px);
  --bar: clamp(56px, 8vh, 84px);
  --sans: "Inter Tight", ui-sans-serif, system-ui, sans-serif;
  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font: 400 11px/1.4 var(--sans);
  letter-spacing: .08em;
  -webkit-font-smoothing: antialiased;
}
body.locked { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { all: unset; }
::selection { background: var(--ink); color: var(--paper); }

/* bars */
.bar {
  height: var(--bar);
  padding: 0 var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
  text-transform: uppercase;
}
.top {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.name { font-weight: 500; letter-spacing: .22em; }
nav { display: flex; gap: clamp(18px, 2.4vw, 34px); }
nav a { color: var(--mute); transition: color .3s; }
nav a:hover, nav a[aria-current] { color: var(--ink); }

/* home mosaic */
.home { padding: 2vh var(--gutter) 14vh; }
.home-title {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px 32px;
  margin: 4vh 0 5vh;
  font: 300 clamp(40px, 6vw, 88px)/1 var(--serif);
  letter-spacing: -.01em;
}
.home-title[hidden] { display: none; }
.home-title small { font: 400 11px var(--sans); letter-spacing: .14em; color: var(--mute); text-transform: uppercase; }
.mosaic { display: flex; flex-direction: column; gap: var(--gap, 12px); }
.row { display: flex; gap: var(--gap, 12px); }
.tile {
  position: relative; display: block; overflow: hidden;
  background: var(--line);
}
.tile img {
  display: block; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity .9s var(--ease), transform 1.2s var(--ease);
}
.tile img.on { opacity: 1; }
.row.solo { width: 100%; margin: 0 auto; }
.block { display: flex; gap: var(--gap, 12px); align-items: flex-start; }
.block.flip { flex-direction: row-reverse; }
.block .side { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: var(--gap, 12px); }
.tile .num {
  position: absolute; top: 10px; left: 10px; z-index: 1;
  min-width: 30px; padding: 6px 8px;
  background: var(--paper); color: var(--ink);
  font: 500 13px/1 var(--sans); letter-spacing: .04em; text-align: center;
  font-variant-numeric: tabular-nums;
}
.tile .cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 40px 16px 14px;
  color: #fff; text-transform: uppercase; font-size: 10px; letter-spacing: .14em; line-height: 1.7;
  background: linear-gradient(transparent, rgba(0, 0, 0, .42));
  opacity: 0; transform: translateY(4px);
  transition: opacity .45s var(--ease), transform .45s var(--ease);
  pointer-events: none;
}
.tile .cap b { display: block; font: 400 22px/1.1 var(--serif); letter-spacing: 0; text-transform: none; margin-bottom: 4px; }
@media (hover: hover) {
  .tile:hover img { transform: scale(1.015); }
  .tile:hover .cap { opacity: 1; transform: none; }
  .mosaic.hovering .tile:not(:hover) img.on { opacity: .55; }
}

/* single photo */
.photo {
  position: fixed; inset: 0; z-index: 30;
  background: var(--paper);
  animation: rise .5s var(--ease);
}
.photo[hidden] { display: none; }
.back {
  position: absolute; z-index: 2; top: 0; left: 0;
  height: var(--bar); padding: 0 var(--gutter);
  display: flex; align-items: center;
  font-size: 22px; line-height: 1; letter-spacing: 0;
}
.back span { display: inline-block; transition: transform .4s var(--ease); }
.back:hover span { transform: translateX(-6px); }
.stage {
  position: absolute;
  inset: calc(var(--bar) + 1vh) calc(var(--gutter) + 4vw);
}
.stage img {
  position: absolute; inset: 0; margin: auto;
  max-width: 100%; max-height: 100%;
  width: auto; height: auto;
  opacity: 0; transition: opacity .7s var(--ease);
  user-select: none; -webkit-user-select: none;
}
.stage img.on { opacity: 1; }
.zone { position: absolute; top: 0; bottom: 0; }
.zone.prev { left: 0; width: 38%; }
.zone.next { right: 0; width: 62%; }
@media (pointer: fine) { .zone { cursor: none; } }
.bottom {
  position: absolute; left: 0; right: 0; bottom: 0;
  color: var(--mute); font-variant-numeric: tabular-nums;
}
.where em { font-style: normal; color: var(--ink); }

.cursor {
  position: fixed; z-index: 40; pointer-events: none;
  top: 0; left: 0;
  text-transform: uppercase; font-size: 10px; letter-spacing: .2em;
  opacity: 0; transition: opacity .25s;
  transform: translate(-50%, -50%);
}
.cursor.on { opacity: 1; }

/* sheets (rolls / about) */
.sheet {
  position: fixed; inset: var(--bar) 0 0; z-index: 10;
  background: var(--paper);
  overflow-y: auto;
  padding: 6vh var(--gutter) calc(var(--bar) + 4vh);
  animation: rise .6s var(--ease);
}
.sheet[hidden] { display: none; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

.roll-list { list-style: none; max-width: 980px; }
.roll-list a {
  display: grid; grid-template-columns: clamp(48px, 9vw, 120px) auto 1fr; align-items: baseline; column-gap: 28px;
  padding: .18em 0;
  font: 300 clamp(40px, 7.4vw, 104px)/1.05 var(--serif);
  letter-spacing: -.01em; text-transform: none;
  transition: color .4s, padding .5s var(--ease);
}
.roll-list .n, .roll-list .meta { font: 400 11px/1 var(--sans); letter-spacing: .14em; color: var(--mute); text-transform: uppercase; }
.roll-list .n { align-self: center; }
.roll-list:hover a { color: var(--line); }
.roll-list a:hover { color: var(--ink); padding-left: .25em; }
.roll-peek {
  position: fixed; right: var(--gutter); bottom: 6vh;
  width: min(30vw, 420px); pointer-events: none;
  opacity: 0; transition: opacity .4s;
}
.roll-peek.on { opacity: 1; }

.about-body {
  max-width: 34em;
  font: 300 clamp(22px, 2.4vw, 30px)/1.45 var(--serif);
  letter-spacing: 0; text-transform: none;
}
.about-body p + p { margin-top: 1em; }
.about-body .mail {
  display: inline-block; margin-top: 2.2em;
  font: 400 11px var(--sans); letter-spacing: .14em; color: var(--mute);
  border-bottom: 1px solid var(--line); padding-bottom: 3px;
  transition: color .3s, border-color .3s;
}
.about-body .mail:hover { color: var(--ink); border-color: var(--ink); }
.about-body small { display: block; margin-top: 3em; font: 400 11px var(--sans); letter-spacing: .14em; color: var(--mute); text-transform: uppercase; }

/* phones */
@media (max-width: 640px) {
  :root { --bar: 60px; }
  .stage { inset: var(--bar) 0; }
  .bottom { font-size: 10px; }
  .where .opt { display: none; }
  .roll-list a { grid-template-columns: 36px 1fr; column-gap: 0; }
  .roll-list .meta { grid-column: 2; padding: 8px 0 18px; }
  .roll-peek { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
