@font-face { font-family: 'DM Sans'; font-weight: 300; font-display: swap; src: url(/fonts/font-0.ttf) format('truetype'); }
@font-face { font-family: 'DM Sans'; font-weight: 400; font-display: swap; src: url(/fonts/font-1.ttf) format('truetype'); }
@font-face { font-family: 'Instrument Serif'; font-style: italic; font-display: swap; src: url(/fonts/font-4.ttf) format('truetype'); }
@font-face { font-family: 'Instrument Serif'; font-style: normal; font-display: swap; src: url(/fonts/font-5.ttf) format('truetype'); }

:root {
  color-scheme: dark;
  --bg: #08090b; --text: #e6e4df; --muted: #a6a6ac; --soft: #d1d3d9; --line: #ffffff21; --silver: #c5c7ce;
  --serif: 'Instrument Serif', Georgia, serif; --mono: ui-monospace, 'SF Mono', Menlo, monospace;
  --tone: #c5c7ce; /* the day's single highlight, set from the stats */
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.7 'DM Sans', system-ui, sans-serif; }
p { color: var(--muted); margin: 0 0 1em; }
a { color: inherit; text-decoration: none; }
a:hover { color: #fff; }
button { font: inherit; cursor: pointer; color: inherit; background: none; border: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--silver); outline-offset: 6px; }
em { font-style: italic; color: var(--silver); }
.grain { position: fixed; inset: 0; z-index: 50; pointer-events: none; opacity: .04; background-size: 160px 160px;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.92' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' opacity='.55' filter='url(%23n)'/%3E%3C/svg%3E"); }

.bar { position: absolute; top: 0; left: 0; right: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; padding: 26px 48px; font-size: 12px; }
.identity { font-size: 17px; line-height: 1.3; }
.identity small { display: block; font-size: 10px; letter-spacing: .04em; color: var(--muted); margin-top: 5px; }
.bar a { color: var(--muted); border-bottom: 1px solid #ffffff33; padding-bottom: 3px; }

/* Opening: a calendar plate on the left, the work hung full height on the right. */
.hall { display: grid; grid-template-columns: minmax(340px, 31fr) 69fr; min-height: 100svh; }
.plate { padding: 112px 56px 36px 48px; display: flex; flex-direction: column; border-right: 1px solid var(--line); }
.kicker { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.numeral { font: 400 min(15vw, 21vh, 230px)/.82 var(--serif); letter-spacing: -.06em; color: var(--text); margin: 0 0 6px; }
.numeral em { display: block; font-size: 32px; letter-spacing: -.01em; line-height: 1.2; margin-top: 10px; }
h1 { font: italic 400 clamp(38px, 3.4vw, 52px)/1.05 var(--serif); letter-spacing: -.02em; color: var(--silver); margin: min(34px, 3vh) 0 12px; }
.medium { font-family: var(--serif); font-size: 19px; line-height: 1.45; color: var(--soft); max-width: 34ch; }
.note { font-size: 15px; max-width: 40ch; }
.ledger { margin: 10px 0 0; border-top: 1px solid var(--line); }
.ledger div { display: flex; justify-content: space-between; align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--line); }
.ledger dt { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.ledger dd { margin: 0; font: 15px var(--mono); font-variant-numeric: tabular-nums; }
.ledger .tone dd::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--tone); margin-right: 9px; vertical-align: 1px; }
.controls { display: flex; align-items: center; gap: 18px; margin-top: auto; padding-top: 24px; font-size: 13px; }
.controls button:not(.text-link) { width: 38px; height: 38px; border-radius: 50%; box-shadow: inset 0 0 0 1px #ffffff33; color: var(--soft); transition: box-shadow .25s, color .25s; }
.controls button:not(.text-link):hover:not(:disabled) { box-shadow: inset 0 0 0 1px var(--silver); color: #fff; }
.controls button:disabled { opacity: .3; cursor: default; }
#counter { font: 11px var(--mono); letter-spacing: .1em; color: var(--muted); }
.text-link { margin-left: auto; border-bottom: 1px solid var(--silver); padding: 6px 0; color: var(--silver); }
.text-link:hover { color: #fff; }

.matte { position: relative; background: #000; display: grid; place-items: center; padding: 110px clamp(28px, 5vw, 90px) 70px; overflow: hidden; }
.matte::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 46%, #ffffff0b, transparent 60%); pointer-events: none; }
.stage { position: relative; margin: 0; width: min(100%, calc(100svh - 190px)); aspect-ratio: 1; box-shadow: 0 0 0 1px #ffffff1c, 0 40px 90px -30px #000, 0 0 140px -50px #c5c7ce55; cursor: zoom-in; animation: develop 1.8s ease-out both; }
.stage > svg, .frame > svg { image-rendering: pixelated; display: block; width: 100%; height: 100%; }
@keyframes develop { from { opacity: 0; filter: brightness(.2) contrast(1.4) blur(2px); } to { opacity: 1; filter: none; } }
.matte-note { position: absolute; bottom: 26px; right: 32px; margin: 0; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: #77777f; }
.loupe { image-rendering: pixelated; position: absolute; width: 200px; height: 200px; border-radius: 50%; pointer-events: none; opacity: 0; transform: translate(-50%, -50%) scale(.8);
  box-shadow: 0 0 0 1px var(--silver), 0 0 0 7px #000a, 0 24px 60px #000; background-repeat: no-repeat; transition: opacity .2s, transform .25s; z-index: 2; }
.loupe.on { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* Contact sheet: frames with edge numbers and a grease-pencil circle on the pick. */
.sheet { padding: 110px 48px 90px; border-top: 1px solid var(--line); }
.sheet-head { display: grid; grid-template-columns: 31fr 69fr; align-items: end; margin-bottom: 44px; }
.sheet h2 { font: 400 clamp(44px, 5vw, 72px)/1 var(--serif); letter-spacing: -.03em; margin: 0; }
.sheet-head p { margin: 0; font-size: 15px; }
.frames { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 30px 8px; padding: 26px; background: #000; box-shadow: inset 0 0 0 1px #ffffff12; }
.thumb { position: relative; text-align: left; }
.frame { display: block; aspect-ratio: 1; filter: grayscale(1) brightness(.75); transition: filter .35s; outline: 1px solid #ffffff14; }
.thumb:hover .frame, .thumb.active .frame { filter: none; }
.thumb.active::after { content: ''; position: absolute; inset: -9px -8px 16px -9px; border: 2px solid var(--soft); border-radius: 46% 54% 50% 48% / 52% 46% 54% 48%; transform: rotate(-2deg); pointer-events: none; opacity: .85; }
.edge { display: flex; justify-content: space-between; margin-top: 8px; font: 10px var(--mono); letter-spacing: .08em; color: #77777f; }
.edge b { font-weight: 400; color: var(--muted); }
.thumb.active .edge b { color: var(--text); }

footer { padding: 90px 48px 60px; border-top: 1px solid var(--line); }
.farewell { font: 400 clamp(38px, 5.5vw, 75px)/1.1 var(--serif); letter-spacing: -.035em; color: var(--text); margin: 0; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; margin-top: 60px; font-size: 11px; color: #94949f; }

@media (max-width: 980px) {
  .hall { grid-template-columns: 1fr; min-height: 0; }
  .plate { order: 2; border-right: 0; padding: 40px 24px 60px; }
  .matte { order: 1; padding: 96px 16px 44px; }
  .stage { width: 100%; }
  .numeral { font-size: 150px; }
  .sheet-head { grid-template-columns: 1fr; gap: 12px; }
  .frames { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .bar { padding: 20px 20px; }
  .plate { padding: 32px 20px 56px; }
  .matte-note { display: none; }
  .numeral { font-size: 128px; }
  .sheet { padding: 72px 12px 64px; }
  .sheet-head { padding: 0 8px; }
  .frames { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 5px; padding: 12px; }
  footer { padding: 64px 20px 40px; }
  .footer-bottom { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }
