:root {
  --bg: #efeeec;
  --ink: #181715;
  --gutter: 16px;
  --nav-size: clamp(16px, 1.15vw, 22px);
  --nav-unit: clamp(1.3px, 0.095vw, 2.4px); /* header lettering: px per grid unit */
  --ease: cubic-bezier(.24, 1, .29, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }
@media (hover: none) {
  body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
  img, svg { -webkit-user-drag: none; -webkit-touch-callout: none; }
  input, textarea, [contenteditable] { -webkit-user-select: text; user-select: text; }
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

/* Header */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 17px 17px;
  font-size: var(--nav-size);
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 1;
}
.nav .center { justify-self: center; }
.nav .left { justify-self: start; }   /* only as wide as the logo, so a tap doesn't light up the whole row */
.nav a, .nav button, .hero-word { -webkit-tap-highlight-color: transparent; }
.nav .right { justify-self: end; display: flex; gap: calc(var(--nav-unit) * 11); }
.nav a { display: block; line-height: 0; }
.nav .blobword { height: calc(var(--vbh) * var(--nav-unit)); width: auto; aspect-ratio: var(--ratio); overflow: visible; }
.nav a { transition: opacity 0.2s; }
.nav a:hover, .nav a[aria-current="page"] { opacity: 0.45; }
.nav .links { display: contents; }
/* RE logo, top left */
.nav .logo { display: block; height: calc(var(--nav-unit) * 19); width: auto; aspect-ratio: 753 / 510; margin: -4px 0; fill: var(--ink); }

/* Phone menu button: three lines that turn into a cross */
.menu-btn {
  display: none;
  width: 40px; height: 40px;
  margin: -10px -8px -10px 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.menu-btn .bars { position: relative; display: block; width: 22px; height: 14px; margin: auto; }
.menu-btn .bars i {
  position: absolute; left: 0; right: 0;
  height: 2.5px; border-radius: 2px;
  background: var(--ink);
  transition: transform 0.35s var(--ease), opacity 0.2s, top 0.35s var(--ease);
}
.menu-btn .bars i:nth-child(1) { top: 0; }
.menu-btn .bars i:nth-child(2) { top: calc(50% - 1.25px); }
.menu-btn .bars i:nth-child(3) { top: calc(100% - 2.5px); }
.nav.menu-open .menu-btn .bars i:nth-child(1) { top: calc(50% - 1.25px); transform: rotate(45deg); }
.nav.menu-open .menu-btn .bars i:nth-child(2) { opacity: 0; transform: scaleX(0.2); }
.nav.menu-open .menu-btn .bars i:nth-child(3) { top: calc(50% - 1.25px); transform: rotate(-45deg); }


.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.blobword {
  fill: var(--ink);
  stroke: var(--ink);
  stroke-width: 2;
  stroke-linecap: round;
  overflow: visible;
  display: block;
}
.blobword circle { stroke: none; }
.blobword text { stroke: none; }

/* Hero: three words spread over the page, switched on/off like lights. */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}
.hero-word { position: absolute; }
/* each letter fades on and off quickly */
.hero-word .ch { fill-opacity: 0; stroke-opacity: 0; }   /* fade speed and curve: set from content.json (assets/hero-anim.js) */
.hero-word .ch.on { fill-opacity: 1; stroke-opacity: 1; }
.hero { transition: opacity 0.35s; }
body.folder-open .hero { opacity: 0; }
.hero-word .blobword {
  height: min(27vh, calc(var(--maxw) / var(--ratio)));
  width: auto;
  aspect-ratio: var(--ratio);
}
.hero-word.w1 { --maxw: 60vw; left: 4vw;  top: 20vh; }
.hero-word.w2 { --maxw: 60vw; right: 4vw; top: 50vh; }

/* Folder overlay (work + about) */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  visibility: hidden;
}
.overlay.open, .overlay.closing { visibility: visible; }

.folder {
  position: absolute;
  left: 50%;
  bottom: -14px;
  --u: 2px;   /* one reference-photo pixel, set by the script */
  width: 100vw;   /* edge to edge: no strip of page showing at the sides */
  /* sits a little lower than the full screen, like a folder lying open on the desk */
  height: calc(100vh - 100px);
  height: calc(100svh - 100px);
  display: flex;
  flex-direction: column;
  pointer-events: auto;
  translate: -50% 0;
  opacity: 0;
  transform: translateY(60px) scale(0.96);
}
.overlay.open .folder { animation: folder-in 0.55s var(--ease) forwards; }
.overlay.closing .folder { animation: folder-out 0.45s var(--ease) forwards; pointer-events: none; }
@keyframes folder-in { from { opacity: 0; transform: translateY(60px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes folder-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(80px) scale(0.98); } }

/* Folder: tab outlines traced from the reference photo, filled with the photo's
   own paper (assets/folder/paper.jpg), no strokes. Sizes in photo pixels (--u).
   Back tabs sit under the sheet (left ones over right ones); the active tab is
   the front sheet's own tab and runs into it. */
.tabs {
  position: relative;
  display: flex;
  align-items: flex-start;
  height: calc(var(--u) * 51);
}
.tab {
  position: relative;
  flex: none;
  height: calc(var(--u) * 51);
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
  color: var(--ink);
}
.tab > .shape-group, .shape { position: absolute; left: 0; top: 0; }
.shape-ext { position: absolute; left: 0; }
.shape-paper { display: block; background-color: #b3b9b7; background-repeat: repeat; }
/* a soft hint of depth between overlapping tabs (no outlines) */
.tab:not(.active) .shape { filter: drop-shadow(1.5px 0 1.5px rgba(30, 38, 36, 0.14)); }
.tab .blobword {
  position: absolute;
  left: 50%;
  top: calc(var(--u) * 17.5);
  translate: -50% 0;
  height: calc(var(--u) * 20);
  width: auto;
  aspect-ratio: var(--ratio);
  fill: #3b3f3e; stroke: #3b3f3e;
}
/* the open tab stands out: it casts a shadow on the tabs around it (nothing below, so it still
   runs into the sheet), while the tabs behind it sit a little darker */
.tab.active .shape {
  filter: drop-shadow(0 -1px 2px rgba(30, 38, 36, 0.22)) drop-shadow(0 -3px 9px rgba(30, 38, 36, 0.3));
  clip-path: inset(-40px -40px 0 -40px);
}
.tab:not(.active) .shape { filter: drop-shadow(1.5px 0 1.5px rgba(30, 38, 36, 0.14)) brightness(0.9); }
.tab:not(.active) .blobword { opacity: 0.6; }
.tab:not(.active):hover .shape { filter: drop-shadow(1.5px 0 1.5px rgba(30, 38, 36, 0.14)) brightness(0.96); }
.tab:not(.active):hover .blobword { opacity: 0.85; }
.stack, .to-stack { display: none; }
/* paper clips on the phone folders: over the top edge of the folder */
.clip {
  position: absolute;
  top: calc(var(--u) * 51 - 20px);
  z-index: 45;
  width: 13px; height: 38px;
  fill: none;
  stroke-linecap: round;
  overflow: visible;
  transform-origin: 50% 60%;
  filter: drop-shadow(0.5px 1.5px 1px rgba(20, 24, 22, 0.35));
  pointer-events: none;
}
.back-tabs { position: absolute; left: 0; right: 0; top: 0; z-index: 0; pointer-events: none; }
.back-tabs svg { position: absolute; top: calc(var(--u) * -18); overflow: visible; }

.sheet {
  position: relative;
  z-index: 20;
  flex: 1;
  /* tile size: keep in sync with TILE in index.html */
  background: #b3b9b7 url("folder/paper.jpg") 0 0 / 742px 297px repeat;
  /* soft paper side edges only: nothing along the top, so the tabs run into the body */
  box-shadow: -0.5px 0 1px rgba(30, 38, 36, 0.22), 0.5px 0 1px rgba(30, 38, 36, 0.22);
  overflow: hidden;
}

/* Cards: freeform, draggable */
.board { position: absolute; inset: 0; transition: opacity 0.3s, filter 0.3s; }
.board.dimmed { opacity: 0.25; filter: blur(2px); pointer-events: none; }
/* closing a folder: the cards (and notes, posters) slip down into it and fade, one after another, instead of vanishing */
.board.tucking .card, .board.tucking .note, .board.tucking .poster, .board.tucking .wall-bar {
  animation: none;
  pointer-events: none;
  opacity: 0;
  transform: translateY(46px) scale(0.94);
  transition: opacity 0.2s ease-in, transform 0.28s var(--ease);
  transition-delay: calc(var(--z) * 10ms);
}
/* a folder of newspapers scrolls as a whole (tabs included); a little room above for the tab's shadow,
   and the top fades out instead of a hard cut */
.folder.scrolly {
  overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  height: calc(100svh - var(--nav-h, 62px) + 14px); padding-top: 24px;
}
.folder-fade { display: none; }
.overlay:has(.folder.scrolly) .folder-fade {
  display: block; position: absolute; left: 0; right: 0; top: 0; height: calc(var(--nav-h, 62px) + 34px); z-index: 1;
  background: linear-gradient(var(--bg) var(--nav-h, 62px), transparent); pointer-events: none;
}
.overlay:has(.folder.scrolly) .folder { z-index: 0; }
.folder.scrolly::-webkit-scrollbar { display: none; }
.folder.scrolly .tabs, .folder.scrolly .sheet { flex: none; }
.folder.scrolly .board { overflow: visible; }
.board.papers .card { touch-action: pan-y; }
.card {
  -webkit-touch-callout: none;
  position: absolute;
  left: calc(var(--x) * 1%);
  top: calc(var(--y) * 1%);
  width: calc(var(--w) * 1%);
  rotate: calc(var(--r) * 1deg);
  z-index: var(--z);
  border: 0;
  padding: 0;
  background: none;
  text-align: left;
  color: var(--ink);
  cursor: grab;
  touch-action: none;
  user-select: none;
  animation: card-in 0.5s var(--ease) backwards;
  animation-delay: calc(var(--z) * 60ms);
  transition: scale 0.25s var(--ease);
}
.card:hover { scale: 1.02; }
.card.dragging { cursor: grabbing; scale: 1.04; }
.card img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  box-shadow: 0 10px 30px rgba(0,0,0,0.18);
}
.card .caption {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.03em;
  text-transform: lowercase;
}
@keyframes card-in { from { opacity: 0; translate: 0 24px; } }

/* Press pieces: a folded broadsheet front page (white paper, colour print). Everything is sized in
   cqw of .news, so the page scales with the card; on the board the small print is texture, in the
   detail view it reads. */
.news {
  position: relative;
  display: block;
  container-type: inline-size;
  aspect-ratio: 1.32;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 45%, transparent 55%, rgba(80, 72, 60, 0.1) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .32 0 0 0 0 .3 0 0 0 0 .27 0 0 0 .42 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    #f4f2ec;
  color: #23221f;
  font-family: "Libre Baskerville", Georgia, "Times New Roman", serif;
  text-transform: none;
  letter-spacing: 0;
  text-align: left;
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.1), 0 6px 20px rgba(0, 0, 0, 0.14);
}
.news span { display: block; }
.news .news-in { height: 100%; display: flex; flex-direction: column; padding: 2.4cqw 3cqw 0; }
.news .news-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 2cqw; padding-bottom: 0.9cqw; border-bottom: 0.32cqw solid #23221f; }
.news-ear { justify-self: start; padding: 0.5cqw 0.8cqw; border: 0.1cqw solid #555; font-size: 0.85cqw; line-height: 1.3; letter-spacing: 0.1em; text-transform: uppercase; text-align: center; }
.news-ear.right { justify-self: end; border: 0; font-size: 1cqw; }
.news-mast { font-family: "Playfair Display", Georgia, serif; font-weight: 900; font-size: 5.2cqw; line-height: 1; text-align: center; }
.news .news-mast.logo { display: flex; align-items: center; justify-content: center; height: 6.6cqw; overflow: hidden; }
.news .news-mast.logo img { display: block; flex: none; width: auto; height: 6.6cqw; max-width: 34cqw; max-height: none; object-fit: contain; box-shadow: none; }
/* a round badge (HOT 97) needs more height than a wordmark to read at the same size */
.news .news-mast.logo:has(img[src*="hot97"]) { overflow: visible; }
.news .news-mast.logo img[src*="hot97"] { height: 10.5cqw; margin: -1.9cqw 0; }
.news .news-main { display: grid; grid-template-columns: auto 1fr; gap: 2.2cqw; margin-top: 0.45cqw; padding-top: 1.2cqw; border-top: 0.1cqw solid #23221f; }
.news .news-photo { position: relative; align-self: start; max-width: 54cqw; overflow: hidden; }
.news .news-photo img { display: block; width: auto; height: auto; max-height: 30cqw; max-width: 54cqw; min-height: 14cqw; box-shadow: none; }
/* old print: photos a little faded and warm */
.news .news-photo::after, .news .news-thumb::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse, transparent 50%, rgba(30, 28, 25, 0.3)), rgba(236, 233, 226, 0.1); mix-blend-mode: normal; pointer-events: none; }
/* old print: the photos come out in a halftone screen, ink a little washed out */
.news .news-photo::before, .news .news-thumb::before { content: ""; position: absolute; inset: 0; z-index: 1; background: radial-gradient(circle, rgba(20, 18, 15, 0.32) 32%, transparent 38%) 0 0 / 0.42cqw 0.42cqw; mix-blend-mode: multiply; pointer-events: none; }
.news .news-photo img, .news .news-thumb img { opacity: 0.95; }
.news .news-lead { display: flex; flex-direction: column; height: 30cqw; overflow: hidden; padding-left: 2.2cqw; border-left: 0.1cqw solid #8a8884; }
.news-kicker { color: #a8302a; font-size: 0.9cqw; letter-spacing: 0.2em; text-transform: uppercase; text-align: center; }
.news-head { margin: 0.6cqw 0 0.8cqw; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-weight: 700; font-style: normal; font-size: 3.3cqw; line-height: 1.04; letter-spacing: -0.02em; text-align: center; text-wrap: balance; }
.news-head.long { font-size: 2.6cqw; }
.news-by { margin-bottom: 0.9cqw; font-size: 0.8cqw; letter-spacing: 0.14em; text-transform: uppercase; text-align: center; }
.news-body { flex: 0 1 auto; min-height: 0; overflow: hidden; font-size: 1.12cqw; line-height: 1.45; text-align: justify; hyphens: auto; }
.news-p { margin-bottom: 0.7cqw; }
.news-p:first-child::first-letter { float: left; padding: 0.3cqw 0.6cqw 0 0; font-family: "Playfair Display", Georgia, serif; font-weight: 900; font-size: 3.6cqw; line-height: 0.8; }
.news-cap { margin-top: 0.5cqw; padding-bottom: 0.8cqw; border-bottom: 0.1cqw solid #23221f; font-size: 0.8cqw; font-style: italic; }
.news .news-more { flex: 1; min-height: 0; display: grid; grid-template-columns: 1.3fr 1fr 1fr 0.8fr; padding-top: 1cqw; overflow: hidden; }
.news .news-story { display: flex; flex-direction: column; padding: 0 1.4cqw; border-left: 0.1cqw solid #8a8884; overflow: hidden; }
/* a small photo at the foot of one story: colour that peeks out of the pile */
.news .news-thumb { position: relative; flex: none; align-self: center; margin-top: 0.8cqw; overflow: hidden; }
.news .news-thumb img { display: block; width: auto; height: auto; max-height: 11cqw; max-width: 100%; box-shadow: none; }
.news .news-lead .news-lines { margin-top: 0.8cqw; }
.news-story:first-child { padding-left: 0; border-left: 0; }
.news-story-h { margin-bottom: 0.7cqw; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-weight: 700; font-size: 1.4cqw; letter-spacing: -0.01em; line-height: 1.1; text-align: center; }
/* the story text, drawn as lines of small print */
.news .news-lines { flex: 1; min-height: 0; height: auto; background: repeating-linear-gradient(#a5a39d 0 0.3cqw, transparent 0.3cqw 1.05cqw); opacity: 0.8; }
.card.news-card .caption { display: none; }
/* folded newspaper: real folds only, with light and shade */
.news::before {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background:
    /* folded the way papers are: in half across (above / below the fold), then in half down the middle.
       Each fold is a crisp line with a shaded valley on one side and a lit ridge on the other */
    linear-gradient(90deg, transparent 47%, rgba(40, 34, 26, 0.05) 49%, rgba(40, 34, 26, 0.16) 49.85%, rgba(255, 255, 255, 0.75) 50.15%, rgba(255, 255, 255, 0.18) 51.2%, transparent 53.5%),
    linear-gradient(180deg, transparent 46.5%, rgba(255, 255, 255, 0.16) 48.8%, rgba(255, 255, 255, 0.6) 49.85%, rgba(40, 34, 26, 0.13) 50.15%, rgba(40, 34, 26, 0.04) 51.5%, transparent 54%),
    /* the four panels sit at slightly different angles to the light */
    linear-gradient(90deg, rgba(40, 34, 26, 0.05), transparent 30% 70%, rgba(255, 255, 255, 0.12)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent 25% 75%, rgba(40, 34, 26, 0.05)),
    /* paper worn thin where the folds cross */
    radial-gradient(circle at 50% 50%, rgba(40, 34, 26, 0.09), transparent 6%),
    /* worn, handled edges */
    radial-gradient(ellipse at 50% 50%, transparent 58%, rgba(70, 60, 48, 0.16) 100%);
  box-shadow: inset 0 0 0 0.5px rgba(70, 60, 48, 0.25), inset 0 0 2.5cqw rgba(70, 60, 48, 0.1);
}

/* in the pile: folded papers, a few sheets thick at their edges; the ones further down a touch darker */
.card.news-card .news {
  box-shadow:
    0.5px 1px 0 #e3e1da, 1px 2px 0 #f5f4ef, 1.5px 3px 0 #dad8d0, 2px 4px 0 #eeede7, 2.5px 5px 0 #d1cfc7,
    3px 6px 0 rgba(0, 0, 0, 0.06), 0 4px 8px rgba(0, 0, 0, 0.12), 0 22px 40px -8px rgba(0, 0, 0, 0.32);
}
/* ---- content seeding: torn sheets from a lined notepad, taped down, each with a post on it ---- */
.board.styled { overflow: visible; }
.notes { display: flex; align-items: flex-start; gap: 34px; width: min(1400px, calc(100% - 64px)); margin: 36px auto 0; padding-bottom: 20px; }
.notes > div { flex: 1; min-width: 0; }
.note {
  position: relative; display: block; width: 100%; margin: 0 0 40px; padding: 0; border: 0; background: none;
  rotate: var(--r); cursor: zoom-in; text-align: left; font: inherit; color: #3a372f;
  filter: drop-shadow(0 1px 1px rgba(40, 34, 20, 0.22)) drop-shadow(0 10px 14px rgba(40, 34, 20, 0.16));
  animation: card-in 0.5s var(--ease) backwards; animation-delay: calc(var(--z) * 40ms);
  transition: rotate 0.3s var(--ease), translate 0.3s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.note:hover { rotate: 0deg; translate: 0 -3px; }
.note-paper {
  position: relative; display: flex; flex-direction: column; aspect-ratio: 1; padding: 34px 16px 14px 16px;
  clip-path: var(--edge);
  background:
    radial-gradient(ellipse at 50% 40%, transparent 55%, rgba(150, 125, 70, 0.14)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .32 0 0 0 0 .3 0 0 0 0 .27 0 0 0 .42 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    #ece3c6;
}
.note-head { position: absolute; top: 14px; left: 16px; right: 16px; display: flex; justify-content: space-between; font-family: "Inter Tight", Arial, sans-serif; font-size: 7px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(110, 100, 80, 0.75); }
.note-hole { position: absolute; top: 46px; right: 22px; width: 7px; height: 7px; border-radius: 50%; background: #2b2a26; box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.6); }
.note-pic { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; margin: 4px 0 8px; rotate: calc(var(--r) * -0.6); }
.note-pic img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; padding: 4px; background: #fbfaf6; box-shadow: 0 1px 2px rgba(40, 34, 20, 0.25); }
.note-hand { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.note-hand { display: block; font-family: Thermochrome, "Inter Tight", "Helvetica Neue", Arial, sans-serif; font-weight: 400; font-synthesis: none; font-size: 19px; line-height: 1.2; letter-spacing: 0.045em; word-spacing: 0.1em; color: #2a2823; text-transform: lowercase; }
.note-hand.small { font-size: 14px; color: #6b665a; }
/* a strip of pale paper tape over the top edge */
.note-tape { position: absolute; top: -12px; left: 50%; width: 38%; height: 30px; translate: -50% 0; rotate: var(--tape);
  background: linear-gradient(rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0) 50%), rgba(246, 244, 236, 0.72);
  box-shadow: 0 1px 1.5px rgba(60, 55, 40, 0.18);
  backdrop-filter: blur(0.6px); -webkit-backdrop-filter: blur(0.6px);
  clip-path: polygon(0 4%, 6% 0, 13% 6%, 20% 1%, 28% 5%, 36% 0, 45% 4%, 55% 0, 63% 5%, 72% 1%, 80% 6%, 88% 0, 95% 5%, 100% 1%, 100% 96%, 94% 100%, 86% 95%, 78% 100%, 69% 96%, 60% 100%, 50% 95%, 41% 100%, 32% 96%, 23% 100%, 14% 95%, 6% 100%, 0 96%); }

/* ---- art: big posters pasted up side by side down the folder -------------------------------- */
.wall { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 100%;
  animation: card-in 0.5s var(--ease) backwards; }
.wall-in { position: absolute; inset: 0; }
.wall-shade { display: none; }
.poster {
  position: absolute; display: block; padding: 0; border: 0; background: none; cursor: grab;
  rotate: var(--r); filter: brightness(var(--shade));
  animation: card-in 0.6s var(--ease) backwards; animation-delay: calc(var(--z) * 12ms);
  -webkit-tap-highlight-color: transparent; touch-action: pan-y;
}
.poster:active { cursor: grabbing; }
.poster-paper { position: absolute; inset: 0; display: block; overflow: hidden; background: #f1efe9; box-shadow: 0 1px 2px rgba(30, 38, 36, 0.35), 0 6px 14px rgba(30, 38, 36, 0.18); }
.poster-paper img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* wheat-paste: the paper went on wet, so it wrinkles and catches the light along the creases */
.poster-paper::after { content: ""; position: absolute; inset: 0; pointer-events: none; mix-blend-mode: multiply;
  background:
    linear-gradient(97deg, transparent 18%, rgba(0, 0, 0, 0.14) 19%, transparent 21%, transparent 62%, rgba(0, 0, 0, 0.1) 63.5%, transparent 65%),
    linear-gradient(176deg, transparent 30%, rgba(0, 0, 0, 0.12) 31%, transparent 33.5%, transparent 71%, rgba(0, 0, 0, 0.12) 72.5%, transparent 75%),
    linear-gradient(80deg, transparent 40%, rgba(0, 0, 0, 0.08) 42%, transparent 45%),
    radial-gradient(ellipse at 30% 20%, transparent 45%, rgba(0, 0, 0, 0.18)); }
.poster-paper::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(97deg, transparent 20.5%, rgba(255, 255, 255, 0.16) 21.5%, transparent 23%, transparent 64.5%, rgba(255, 255, 255, 0.12) 65.5%, transparent 67%),
    linear-gradient(176deg, transparent 33%, rgba(255, 255, 255, 0.12) 34%, transparent 35.5%),
    linear-gradient(125deg, rgba(255, 255, 255, 0.12), transparent 35%); }
/* thin prints: some posters went up on see-through paper and look washed out */
.poster.tissue .poster-paper img { opacity: 0.42; filter: grayscale(0.4); }
.poster.tissue .poster-paper { background: rgba(240, 238, 232, 0.7); }
.poster.ripped { cursor: default; }
.rip-piece { pointer-events: none; animation: none; filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.5)); }
.wall-bar { position: sticky; bottom: 18px; z-index: 450; display: flex; justify-content: center; align-items: center; gap: 8px; pointer-events: none; }
.wall-hint { margin: 0; text-align: center; pointer-events: none;
  font: 600 13px/1 "Inter Tight", Arial, sans-serif; letter-spacing: -0.01em; color: var(--ink); }
.wall-hint span { padding: 7px 14px; border-radius: 999px; background: rgba(179, 185, 183, 0.92); }
.wall-reset { pointer-events: auto; padding: 7px 14px; border: 0; border-radius: 999px;
  font: 600 13px/1 "Inter Tight", Arial, sans-serif; color: #111; background: rgba(255, 255, 255, 0.88); cursor: pointer; }

/* ---- detail: a little gallery when there are more pictures ------------------------------- */
.detail-media { min-width: 0; }
.stage { position: relative; }
.stage > img, .stage > video { display: block; width: auto; max-width: 100%; height: auto; max-height: calc(100svh - 330px); margin: 0 auto; box-shadow: 0 14px 40px rgba(0, 0, 0, 0.2); background: #111; }
.stage > img { background: none; }
.stage .nav-prev, .stage .nav-next { position: absolute; top: 50%; z-index: 3; width: 40px; height: 40px; margin-top: -20px; border: 0; border-radius: 50%;
  background: rgba(24, 23, 21, 0.7); color: #fff; font: 400 26px/38px Georgia, serif; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.stage .nav-prev { left: 8px; }
.stage .nav-next { right: 8px; }
.detail-media:has(.thumbs) .stage > img, .detail-media:has(.thumbs) .stage > video { max-height: calc(100svh - 410px); }
.thumbs { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 14px; }
.thumb { width: 58px; height: 58px; padding: 0; border: 2px solid transparent; border-radius: 6px; overflow: hidden; background: rgba(0, 0, 0, 0.08); cursor: pointer; opacity: 0.6; transition: opacity 0.2s; }
.thumb.on { border-color: var(--ink); opacity: 1; }
.thumb:hover { opacity: 1; }
.thumb img, .thumb video { display: block; width: 100%; height: 100%; object-fit: cover; box-shadow: none; pointer-events: none; }
/* a video's thumb carries a little play mark */
.thumb.vid { position: relative; }
.thumb.vid::after { content: ""; position: absolute; left: 50%; top: 50%; width: 0; height: 0; margin: -8px 0 0 -5px;
  border-style: solid; border-width: 8px 0 8px 13px; border-color: transparent transparent transparent #fff; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6)); }
.board-end { position: absolute; left: 0; width: 1px; height: 1px; }
/* in the detail view the page is shown as large as the screen allows */
.detail-media .news { width: min(100%, calc((100svh - 300px) * 1.32)); margin: 0 auto; }

/* Project detail page (inside the folder) */
.detail {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 40px;
  padding: 64px 48px 48px;
  overflow: auto;
  opacity: 0;
  translate: 0 20px;
  transition: opacity 0.4s var(--ease), translate 0.4s var(--ease);
}
.detail.in { opacity: 1; translate: 0 0; }
.detail-media .stage > img { object-fit: contain; }
.detail-info { align-self: end; text-transform: lowercase; }
.detail-info .meta { font-size: 13px; font-weight: 600; opacity: 0.6; margin-bottom: 10px; }
.detail-info h2 { font-size: clamp(28px, 3.4vw, 54px); font-weight: 700; letter-spacing: -0.06em; line-height: 0.95; margin-bottom: 18px; }
/* the title in the Rocket Effect typeface: it is a heavy face, so its letters and words get room to breathe */
.detail-info h2 { font-family: Thermochrome, "Inter Tight", "Helvetica Neue", Arial, sans-serif; font-weight: 400; font-synthesis: none; letter-spacing: 0.045em; word-spacing: 0.1em; line-height: 1.12; }
.detail-info p { font-size: 17px; line-height: 1.4; letter-spacing: -0.02em; max-width: 42ch; }
.detail-link { display: inline-block; margin-top: 22px; font-weight: 700; border-bottom: 2px solid currentColor; }
.back {
  position: absolute;
  top: 20px; left: 24px;
  border: 0; background: none; cursor: pointer; padding: 4px;
}
.back .blobword { height: calc(var(--vbh) * var(--nav-unit)); width: auto; aspect-ratio: var(--ratio); }
.back:hover { opacity: 0.5; }

/* About */
.about-copy {
  position: absolute;
  inset: 0;
  padding: 40px 48px 40px;   /* the folder's foot runs 14px past the screen: keep the credit above it */
  overflow: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.about-copy .about-ig { display: block; margin-top: 0.4em; line-height: 0; transition: opacity 0.2s; }
.about-copy .about-ig:hover { opacity: 0.5; }
.about-copy .about-ig .blobword { height: calc(var(--vbh) * 2.6px); width: auto; aspect-ratio: var(--ratio); }
/* credit at the foot of the about folder */
.about-copy .about-credit { display: flex; align-items: flex-start; margin: auto 0 0; padding-top: 24px; max-width: none; line-height: 0; }
.about-copy .about-credit > .blobword { opacity: 0.55; }
.about-copy .about-credit a { line-height: 0; border-bottom: 1px solid currentColor; padding-bottom: 2px; transition: opacity 0.2s; }
.about-copy .about-credit a:hover { opacity: 0.5; }
.about-copy .about-credit .blobword { height: calc(var(--vbh) * 1.3px); width: auto; aspect-ratio: var(--ratio); }
.about-copy p {
  font-size: clamp(22px, min(3.2vw, 5.4vh), 52px);   /* also by height, so about fits without scrolling */
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 1;
  max-width: 22ch;
  margin-bottom: 0.6em;
}

@media (max-width: 640px) {
  :root { --nav-size: 16px; }
  .nav { padding: 14px 12px; grid-template-columns: 1fr auto; }
  .menu-btn { display: block; }
  /* the links become a drop-down under the rocket */
  .nav .links {
    position: absolute;
    top: 100%; right: 8px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 14px;
    padding: 16px 18px;
    min-width: 120px;
    --nav-unit: 1.9px;
    background: var(--bg);
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(24, 23, 21, 0.14);
    transform-origin: 100% 0;
    transform: translateY(-10px) scale(0.92);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.35s var(--ease), opacity 0.2s, visibility 0s 0.35s;
  }
  .nav .right { display: contents; }
  .nav .links a { opacity: 0; transform: translateY(-14px); transition: opacity 0.2s, transform 0.4s var(--ease); }
  .nav.menu-open .links { opacity: 1; visibility: visible; transform: none; transition: transform 0.45s var(--ease) 0.15s, opacity 0.2s 0.15s, visibility 0s; }
  .nav.menu-open .links a { opacity: 1; transform: none; transition-delay: calc(0.22s + var(--i) * 0.06s); }
  .nav.menu-open .links a:active { opacity: 0.45; }
  .hero-word.w1 { top: 30vh; left: 5vw; }
  .hero-word.w2 { top: 50vh; right: 5vw; }
  /* edge to edge, and on past the bottom of the screen (Safari's toolbar floats over it) */
  .folder { width: 100vw; top: 64px; bottom: auto; height: calc(100vh - 30px); height: calc(100lvh - 30px); }
  .folder.scrolly { top: var(--nav-h, 40px); height: calc(100svh - var(--nav-h, 40px)); }
  .folder .tab .blobword { height: calc(var(--u) * 27); top: calc(var(--u) * 13); }
  .folder { transform-origin: 50% 0; }
  .overlay.open .folder.flip { animation: none; opacity: 1; transform: none; }
  .folder.flip .card { animation-delay: calc(0.25s + var(--z) * 60ms); }

  /* Stack of folders (one per tab), lying on top of each other like the photo */
  .stack {
    position: absolute;
    left: 0; top: 64px;
    width: 100vw;
    height: calc(100vh - 64px);
    height: calc(100svh - 64px);
    pointer-events: auto;
  }
  .overlay.stacked .stack, .overlay.stack-anim .stack { display: block; }
  .overlay.stacked .folder { visibility: hidden; }
  .overlay.closing .stack { animation: folder-out 0.45s var(--ease) forwards; pointer-events: none; }
  .sfolder {
    position: absolute;
    left: 0;
    width: 100%; height: 100%;
    border: 0; padding: 0;
    background: none;
    cursor: pointer;
    text-align: left;
    -webkit-tap-highlight-color: transparent;
    transform-origin: 50% 0;
    rotate: calc(var(--rot) * 1deg);
    animation: sf-in 0.75s var(--ease) backwards;
    animation-delay: calc(0.08s + var(--i) * 0.07s);
    transition: translate 0.6s var(--ease), opacity 0.45s;
    transition-delay: calc(var(--d, 0) * 0.05s);
  }
  .sfolder:active { translate: 0 -5px; }
  /* when one is opened: the ones in front fall off the bottom (speeding up, so you see them go),
     the ones behind drift up and fade under it */
  .sfolder.away.down {
    translate: 0 105vh;
    transition: translate 0.6s cubic-bezier(.5, 0, .75, .15) calc(var(--d) * 0.06s);
  }
  .sfolder.away.up {
    translate: 0 -40px;
    opacity: 0;
    transition: translate 0.5s var(--ease) calc(var(--d) * 0.05s), opacity 0.4s calc(var(--d) * 0.05s);
  }
  /* going back to the stack: the folders in front wait until the open one's cards are tucked in,
     so nothing seems to slide behind them */
  .overlay.stack-anim .sfolder { transition-delay: calc(0.2s + var(--d, 0) * 0.05s); }
  .overlay.stack-anim .to-stack { opacity: 0; transition: opacity 0.2s; }
  @keyframes sf-in { from { translate: 0 100vh; } }
  .stab { position: absolute; top: 0; height: calc(var(--u) * 51); }
  .stab .blobword {
    position: absolute;
    left: 50%; translate: -50% 0;
    top: calc(var(--u) * 13);
    height: calc(var(--u) * 27);
    width: auto;
    aspect-ratio: var(--ratio);
    fill: #3b3f3e; stroke: #3b3f3e;
  }
  .spaper { position: absolute; left: 0; top: 0; background: #b3b9b7 url("folder/paper.jpg") 0 0 / 742px 297px repeat; }
  /* soft shadow along the folder's top edge and tab, cast up onto the folder behind */
  .sshadow { position: absolute; left: 0; top: -3px; filter: blur(5px); opacity: 0.32; }
  .sshadow > span { display: block; background: #1e2624; }
  /* blank sheets inside the folder, their tops peeking over its edge */
  .sheet-peek {
    position: absolute;
    height: 120px;
    border-radius: 1px;
    box-shadow: 0 -1px 2px rgba(30, 38, 36, 0.14), 0 0 0 0.5px rgba(30, 38, 36, 0.08);
    transform-origin: 50% 100%;
  }
  /* inside an opened folder: "back" puts it back on the pile */
  .to-stack {
    position: absolute;
    top: 0; right: 14px;
    z-index: 40;
    display: block;
    height: calc(var(--u) * 51);
    border: 0; padding: 0 4px;
    background: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .to-stack.left { right: auto; left: 14px; }
  .to-stack .blobword { height: calc(var(--u) * 22); width: auto; aspect-ratio: var(--ratio); }
  .to-stack:active { opacity: 0.45; }
  .folder:has(.detail:not([hidden])) .to-stack { display: none; }
  /* Side tabs: the tab strip is rotated to run down the left edge, bumps pointing left. */
  .folder.side-tabs { flex-direction: row; }
  .folder.side-tabs .tabs {
    position: absolute;
    left: 0; top: 0;
    width: var(--len);
    margin: 0;
    z-index: 30;
    transform-origin: 0 0;
    transform: translateY(var(--len)) rotate(-90deg);
    justify-content: flex-end;   /* a short strip (about) starts at the top */
  }
  .folder.side-tabs .tab .blobword { height: calc(var(--u) * 27); top: calc(var(--u) * 13); }
  .folder.side-tabs .tab:not(.active) .blobword { opacity: 0.8; }
  .folder.side-tabs .sheet { margin-left: calc(var(--u) * 51); box-shadow: 0.5px 0 1px rgba(30, 38, 36, 0.22); }
  .board.dimmed { display: none; }
  /* a folder with many cards scrolls; cards can still be dragged sideways */
  .board { overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; }
  .card { touch-action: pan-y; }
  .detail-media .news { width: 100%; }
  /* one column of notes, each about as wide as the screen */
  .notes { width: calc(100% - 52px); margin-top: 26px; }
  .note { margin-bottom: 38px; }
  .note-paper { padding: 32px 14px 12px; }
  .wall-bar { bottom: 28px; }
  .stage > img, .stage > video, .detail-media:has(.thumbs) .stage > img, .detail-media:has(.thumbs) .stage > video { max-height: 70svh; width: auto; max-width: 100%; }
  .detail { position: relative; grid-template-columns: 1fr; padding: 56px 18px 40px; gap: 22px; }
  /* the folder runs on past the bottom of the screen (and under Safari's toolbar): keep the credit in view */
  .about-copy { padding: 32px 20px 60px; padding-bottom: calc(100lvh - 100svh + 44px); }
  .about-copy .about-ig .blobword { height: calc(var(--vbh) * 2.1px); }
}
