/* ==========================================================
   ARIN AYKUT — Score Composer
   Single-screen cinematic portfolio
   ========================================================== */

:root {
  --bg: #0b0907;
  --ink: #f3ede3;
  --ink-2: rgba(243, 237, 227, .72);
  --muted: rgba(243, 237, 227, .5);
  --line: rgba(243, 237, 227, .14);
  --accent: #e3b46f;          /* updated live from the current poster */
  --accent-deep: #3a2614;     /* updated live from the current poster */
  --paper: #f1ebe0;
  --paper-ink: #17130e;
  --serif: 'Jost', 'Futura', system-ui, sans-serif;
  --sans: 'Jost', 'Futura', system-ui, -apple-system, sans-serif;
  --pad: clamp(14px, 1.6vw, 26px);
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 14px; line-height: 1.55; font-weight: 300;
  -webkit-font-smoothing: antialiased; overflow: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
em { font-style: italic; }
::selection { background: var(--accent); color: #000; }
:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; }
.label { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; font-weight: 500; }

.grain {
  position: fixed; inset: -50%; z-index: 60; pointer-events: none; opacity: .045;
  background-image: 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='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1s steps(6) infinite;
}
@keyframes grain {
  0%,100% { transform: translate(0,0); } 20% { transform: translate(-5%,-8%); } 40% { transform: translate(-12%,4%); }
  60% { transform: translate(7%,-12%); } 80% { transform: translate(-3%,11%); }
}

.btn {
  padding: 14px 24px; border-radius: 100px; border: 1px solid var(--line);
  font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; font-weight: 500;
  transition: background .4s, color .4s, border-color .4s;
}
.btn:hover { border-color: var(--ink); }
.btn--accent { background: var(--accent); border-color: var(--accent); color: #140d06; }
.btn--accent:hover { background: var(--ink); border-color: var(--ink); }

/* ==========================================================
   STAGE — one screen
   ========================================================== */
.stage {
  position: fixed; inset: 0; overflow: hidden;
  display: grid;
  grid-template-columns: minmax(340px, 28vw) 1fr minmax(320px, 46vw);
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  grid-template-areas:
    "card top   top"
    "card .     ."
    "poster .   index"
    "bottom bottom bottom";
  gap: var(--pad);
  padding: var(--pad);
}

/* background — colour of the current film */
.bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; background: var(--accent-deep); transition: background 1.4s ease; }
.bg__img {
  position: absolute; inset: -8%; background-size: cover; background-position: center;
  filter: blur(22px) saturate(1.45) brightness(.6); opacity: 0; transform: scale(1.1);
  transition: opacity 1.4s ease;
}
.bg__img.is-on { opacity: 1; animation: drift 24s ease-in-out infinite alternate; }
@keyframes drift { from { transform: scale(1.1) translate(0,0); } to { transform: scale(1.22) translate(-2%, 1.5%); } }
.bg__wash {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 78% 50%, transparent 0%, rgba(8,6,4,.25) 55%, rgba(8,6,4,.7) 100%),
    linear-gradient(180deg, rgba(8,6,4,.35), transparent 30%, transparent 70%, rgba(8,6,4,.55));
}
/* home: portrait of Arın as the resting image */
.bg__home {
  position: absolute; inset: 0; opacity: 0; transition: opacity 1.6s ease;
}
.home-shot {
  position: absolute; inset: 0; top: var(--drop, 0); opacity: 0; transition: opacity 3s cubic-bezier(.45,0,.55,1);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 14%); mask-image: linear-gradient(180deg, transparent, #000 14%);
  background-position: var(--pos, 50% 40%); background-size: cover; background-repeat: no-repeat;
  filter: brightness(var(--light, .34)) sepia(.2) contrast(1.1);
  transform: scale(1.04);
}
/* desktop: the photo sits on the left and fades out before the works list */
@media (min-width: 1101px) {
  .home-shot {
    right: 30%;
    -webkit-mask-image: linear-gradient(90deg, #000 55%, transparent 100%), linear-gradient(180deg, transparent, #000 14%);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(90deg, #000 55%, transparent 100%), linear-gradient(180deg, transparent, #000 14%);
    mask-composite: intersect;
  }
}
/* dip to black: the old photo fades out, a short dark pause, then the next one fades in */
.home-shot.is-on { opacity: 1; transition: opacity 4s cubic-bezier(.45,0,.55,1) 2.2s; animation: homeDrift 40s ease-in-out infinite alternate; }
@keyframes homeDrift { from { transform: scale(1.04); } to { transform: scale(1.1) translateX(-1.5%); } }
.is-home .bg__home { opacity: 1; }
.is-home .bg__img.is-on { opacity: 0; }
.poster { transition: opacity .8s ease, transform .8s var(--ease); }
.is-home .poster { opacity: 0; transform: translateY(16px); pointer-events: none; }
.dust { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.stage > *:not(.bg):not(.dust):not(.panel):not(.brand) { position: relative; z-index: 2; }

/* identity card */
.card {
  grid-area: card; align-self: start; justify-self: start; width: max-content; max-width: 100%;
  background: linear-gradient(145deg, rgba(255,255,255,.10), rgba(255,255,255,.03) 60%), rgba(14,11,8,.38);
  backdrop-filter: blur(22px) saturate(1.4); -webkit-backdrop-filter: blur(22px) saturate(1.4);
  border: 1px solid rgba(255,255,255,.13); border-radius: 10px;
  color: var(--ink);
  padding: 14px 18px 13px; display: grid; gap: 12px;
  box-shadow: 0 24px 60px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.12);
}
.card__top { display: block; }
.card__menu, .scroll-hint { display: none; }
.card__role { margin: 10px 0 0; font-size: 13px; color: var(--ink-2); line-height: 1.35; max-width: 20ch; }
.card__nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.card__nav button, .card__nav a { font-size: 14px; font-weight: 400; padding: 1px 0; position: relative; color: var(--ink-2); transition: color .3s; }
.card__nav button:hover, .card__nav a:hover, .card__nav button.is-active { color: var(--ink); }
.card__nav button.is-active::before { color: var(--accent); }
.card__nav button::before, .card__nav a::before { content: ''; position: absolute; left: 0; right: 0; bottom: -3px; height: 1px; background: var(--accent); opacity: 0; transform: scaleX(.3); transition: all .35s var(--ease); }
.card__nav button:hover::before, .card__nav a:hover::before, .card__nav button.is-active::before { opacity: 1; transform: none; }
.card__bottom { display: grid; gap: 10px; border-top: 1px solid rgba(255,255,255,.12); padding-top: 11px; font-size: 14px; }
.card__now { display: flex; gap: 10px; align-items: flex-start; line-height: 1.35; }
.card__now .label { color: var(--muted); font-size: 11px; }
.card__now em { font-family: var(--serif); font-size: 17px; }
.card__nf { display: inline-block; height: 13px; width: auto; margin-left: 10px; vertical-align: -1px; filter: drop-shadow(0 0 10px rgba(229,9,20,.35)); }
.dot { flex: 0 0 auto; width: 8px; height: 8px; margin-top: 4px; border-radius: 50%; background: #c0392b; box-shadow: 0 0 0 0 rgba(192,57,43,.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(192,57,43,0); } 100% { box-shadow: 0 0 0 0 rgba(192,57,43,0); } }
.card__mail { font-weight: 500; border-bottom: 1px solid rgba(255,255,255,.25); justify-self: start; transition: border-color .3s; }
.card__mail:hover { border-color: var(--accent); color: var(--accent); }

/* signature: top centre of the screen */
.brand { position: absolute; z-index: 3; top: calc(var(--pad) - 4px); left: 0; right: 0; width: max-content; margin: 0 auto; line-height: 0; }  /* centred without transform, so entrance animations can't shift it */
.brand a { display: block; transition: opacity .3s; }
.brand a:hover { opacity: .8; }
.brand img { width: clamp(104px, 8.5vw, 140px); height: auto; filter: drop-shadow(0 2px 16px rgba(0,0,0,.45)); }
.panel .bio p { font-size: 15.5px; line-height: 1.75; text-align: justify; hyphens: auto; -webkit-hyphens: auto; margin-bottom: 1.1em; }
.panel .bio p:first-child { font-family: var(--serif); font-size: 21px; line-height: 1.45; color: var(--ink); text-align: justify; hyphens: auto; -webkit-hyphens: auto; }

/* top line */
.top { grid-area: top; display: flex; justify-content: flex-end; color: var(--ink-2); padding-top: 4px; }
.top__loc #clock { font-variant-numeric: tabular-nums; }

/* poster */
.poster { grid-area: poster; margin: 0; align-self: end; display: grid; gap: 12px; width: 100%; max-width: 330px; }
.poster__frame {
  position: relative; aspect-ratio: var(--ar, .75); width: min(100%, calc(52vh * var(--ar, .75))); border-radius: 4px; overflow: hidden;
  transition: width .6s var(--ease);
  background: #000; box-shadow: 0 30px 80px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.06);
}
.poster__img { position: absolute; inset: 0; background-size: 100% 100%; background-position: center; }
.poster__city { position: absolute; inset: 0; width: 100%; height: 100%; display: none; }
.poster__type { position: absolute; inset: 0; display: none; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 24px; background: radial-gradient(ellipse at 50% 25%, var(--accent-deep), #070504 75%); }
.poster__type b { font-family: var(--serif); font-weight: 400; font-size: 34px; line-height: 1.02; }
.poster__type small { margin-top: 18px; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.poster--city .poster__city { display: block; }
.poster--city .poster__img, .poster--type .poster__img { display: none; }
.poster--type .poster__type { display: flex; }
.poster--city .poster__type { display: flex; background: none; justify-content: flex-start; padding-top: 34px; }
.poster__cap { display: flex; justify-content: flex-start; align-items: center; gap: 10px; color: var(--ink-2); min-height: 28px; }
.poster__play { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); padding: 7px 12px 7px 9px; border-radius: 100px; background: rgba(0,0,0,.35); border: 1px solid var(--line); transition: background .3s, color .3s; white-space: nowrap; }
.poster__play svg { width: 11px; fill: currentColor; }
.poster__play:hover { background: var(--accent); color: #140d06; border-color: var(--accent); }
.poster__play[hidden] { display: none; }

/* works index */
.index { grid-area: index; align-self: stretch; display: flex; flex-direction: column; justify-content: center; gap: 14px; min-height: 0; }
.index__head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.chip { background: var(--ink); color: #120d08; padding: 4px 8px; border-radius: 3px; }
.filters { display: flex; gap: 14px; color: var(--muted); }
.filters button { transition: color .3s; }
.filters button:hover, .filters button.is-active { color: var(--ink); }
.works { list-style: none; margin: 0; padding: 0; overflow-y: auto; min-height: 0; flex: 0 1 auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(transparent, #000 14px, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(transparent, #000 14px, #000 calc(100% - 24px), transparent); padding: 8px 0 16px; }
.works::-webkit-scrollbar { display: none; }
.work {
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) 108px; gap: 16px; align-items: baseline;
  padding: 3px 8px; margin: 0 -8px; border-radius: 3px; cursor: pointer;
  color: var(--ink-2); transition: background .25s, color .25s;
}
.work__t { font-family: var(--serif); font-size: clamp(17px, 1.35vw, 22px); line-height: 1.2; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.work__r { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.work__rt { display: inline-block; }
.work__r.is-long { text-overflow: clip; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
.work:hover .work__r.is-long, .work.is-active .work__r.is-long { -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.work:hover .work__r.is-long .work__rt, .work.is-active .work__r.is-long .work__rt { animation: roleScroll var(--dur, 6s) ease-in-out infinite alternate; }
@keyframes roleScroll { 0%, 18% { transform: translateX(0); } 82%, 100% { transform: translateX(var(--shift, 0)); } }
@media (prefers-reduced-motion: reduce) { .work__rt { animation: none !important; } }
.work__c { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); text-align: right; white-space: nowrap; }
.work__t sup { font-family: var(--sans); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-left: 8px; vertical-align: 4px; }
.work:hover { background: rgba(243,237,227,.08); }
.work.is-active { background: var(--ink); color: #120d08; }
.work.is-active .work__t, .work.is-active .work__c { color: #120d08; }
.work.is-active .work__t sup { color: #8a5a1c; }
.work.is-hidden { display: none; }
/* spotlight tracks: a little more presence at the top of Selected */
.work--spot .work__t { font-size: clamp(20px, 1.6vw, 26px); }
.work--spot + .work:not(.work--spot) { margin-top: 10px; position: relative; }
.work--spot + .work:not(.work--spot)::before { content: ''; position: absolute; left: 8px; right: 8px; top: -6px; height: 1px; background: var(--line); }
.work__t sup.spot { color: var(--accent); }
/* playable vs. not: a play mark in a fixed slot, and only playable rows feel clickable */
.work__play { display: inline-grid; place-items: center; width: 20px; height: 20px; margin-right: 12px; vertical-align: 1px; border-radius: 50%; flex: 0 0 auto; }
.work.is-playable .work__play { border: 1px solid var(--accent); color: var(--accent); transition: background .25s, color .25s, transform .3s var(--ease); }
.work__play svg { width: 9px; height: 9px; fill: currentColor; margin-left: 1px; }
.work__play .i-eq { display: none; }
.work.is-playable { cursor: pointer; }
.work:not(.is-playable) { cursor: default; }
.work.is-playable:hover .work__play { background: var(--accent); color: #140d06; transform: scale(1.1); }
.work.is-active.is-playable .work__play { border-color: #8a5a1c; color: #8a5a1c; }
.work.is-active.is-playable:hover .work__play { background: #8a5a1c; color: var(--ink); }
.work.is-playing .work__play { background: var(--accent); color: #140d06; }
.work.is-playing .i-p { display: none; }
.work.is-playing .i-eq { display: inline; }
.work.is-playing .i-eq rect { transform-origin: 50% 100%; transform-box: fill-box; animation: eqb .9s ease-in-out infinite; }
.work.is-playing .i-eq rect:nth-child(2) { animation-delay: -.3s; } .work.is-playing .i-eq rect:nth-child(3) { animation-delay: -.6s; }
@keyframes eqb { 0%, 100% { transform: scaleY(.35); } 50% { transform: scaleY(1); } }
.filters__listen { display: inline-flex; align-items: center; gap: 6px; }
.filters__listen svg { width: 9px; height: 9px; fill: var(--accent); }
.work--track .work__c { font-variant-numeric: tabular-nums; letter-spacing: .06em; }
@keyframes blink { 50% { opacity: .3; } }
.index__auto { height: 1px; background: var(--line); overflow: hidden; }
.index__auto i { display: block; height: 100%; width: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); }

/* bottom line */
.bottom { grid-area: bottom; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; }
.mini {
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px;
  justify-self: start; width: min(340px, 100%);
  padding: 9px 14px 9px 9px; border-radius: 12px;
  background: linear-gradient(145deg, rgba(255,255,255,.09), rgba(255,255,255,.02) 60%), rgba(14,11,8,.42);
  backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 14px 40px rgba(0,0,0,.3);
}
.mini__art {
  position: relative; width: 40px; height: 40px; border-radius: 50%;
  background: var(--accent); color: #140d06; display: grid; place-items: center;
  transition: transform .3s var(--ease), background .6s;
}
.mini__art:hover { transform: scale(1.07); }
.mini__pp { display: grid; place-items: center; }
.mini__pp svg { width: 14px; height: 14px; fill: currentColor; }
.mini__pp .i-play { margin-left: 2px; }
.mini__pp .i-pause, .is-playing .mini__pp .i-play { display: none; }
.is-playing .mini__pp .i-pause { display: block; }
.mini__body { display: grid; gap: 4px; min-width: 0; }
.mini__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
.mini__title { font-size: 14px; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.mini__title small { color: var(--muted); font-weight: 400; }
.mini__scrub { width: 100%; }
.mini__times { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; line-height: 1; }
.mini__vol { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; color: var(--muted); }
.mini__vol:hover { color: var(--ink); }
.mini__vol button { display: grid; place-items: center; width: 18px; height: 18px; color: inherit; }
.mini__vol svg { width: 14px; height: 14px; fill: currentColor; }
.mini__vol .x { display: none; }
.mini.is-muted .mini__vol .x { display: inline; }
.mini.is-muted .mini__vol .w1, .mini.is-muted .mini__vol .w2 { display: none; }
.mini__vol .range { width: 54px; }
/* slim range inputs with an accent-coloured fill (--p) */
.range { -webkit-appearance: none; appearance: none; height: 12px; background: transparent; cursor: pointer; margin: 0; --p: 0%; }
.range::-webkit-slider-runnable-track { height: 3px; border-radius: 3px; background: linear-gradient(to right, var(--accent) var(--p), rgba(243,237,227,.18) var(--p)); }
.range::-moz-range-track { height: 3px; border-radius: 3px; background: rgba(243,237,227,.18); }
.range::-moz-range-progress { height: 3px; border-radius: 3px; background: var(--accent); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 10px; height: 10px; margin-top: -3.5px; border-radius: 50%; background: var(--ink); border: 0; opacity: 0; transition: opacity .2s, transform .2s; }
.range::-moz-range-thumb { width: 10px; height: 10px; border-radius: 50%; background: var(--ink); border: 0; }
.mini:hover .range::-webkit-slider-thumb, .range:focus-visible::-webkit-slider-thumb { opacity: 1; }
.range:hover::-webkit-slider-thumb { transform: scale(1.2); }
.range:focus-visible { outline: none; }
.range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px rgba(227,180,111,.5); }
.mini__note { font-size: 12.5px; color: var(--muted); }
.mini__note a { color: var(--accent); }
.social { list-style: none; margin: 0; padding: 0; display: flex; gap: 18px; color: var(--ink-2); }
.social a:hover { color: var(--ink); }
.bottom__right { justify-self: end; display: flex; gap: 22px; align-items: center; color: var(--ink-2); }
.bottom__right button:hover { color: var(--ink); }
.sound { display: flex; align-items: center; gap: 8px; }
.eq { display: flex; align-items: flex-end; gap: 2px; height: 11px; }
.eq i { width: 2px; height: 3px; background: currentColor; }
.sound.is-on { color: var(--accent); }
.sound.is-on .eq i { animation: eq 1s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -.3s !important; } .eq i:nth-child(3) { animation-delay: -.6s !important; } .eq i:nth-child(4) { animation-delay: -.15s !important; }
@keyframes eq { 0%,100% { height: 3px; } 50% { height: 11px; } }

/* ==========================================================
   PANEL
   ========================================================== */
.panel { position: fixed; inset: 0; z-index: 40; visibility: hidden; }
.panel__scrim { position: absolute; inset: 0; background: rgba(6,5,4,.45); opacity: 0; }
.panel__sheet {
  position: absolute; top: var(--pad); right: var(--pad); bottom: var(--pad);
  width: min(640px, calc(100% - 2 * var(--pad)));
  background: rgba(16,12,9,.82); backdrop-filter: blur(24px) saturate(1.2); -webkit-backdrop-filter: blur(24px) saturate(1.2);
  border: 1px solid var(--line); border-radius: 6px;
  transform: translateX(calc(100% + 40px)); display: flex; flex-direction: column;
}
.panel__close { position: absolute; top: 12px; right: 14px; color: var(--ink-2); z-index: 2; padding: 6px 12px; border-radius: 999px; background: rgba(20,16,12,.82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.panel__close:hover { color: var(--ink); }
.panel__body { overflow-y: auto; padding: 56px clamp(20px, 3vw, 40px) 40px; flex: 1; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.panel h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(36px, 3.4vw, 54px); line-height: 1; margin: 0 0 28px; }
.panel h3 { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; font-weight: 500; color: var(--accent); margin: 36px 0 10px; }
.panel p { color: var(--ink-2); margin: 0 0 1em; font-size: 15.5px; }
.panel .lead { font-family: var(--serif); font-size: 26px; line-height: 1.2; color: var(--ink); margin-bottom: 26px; }
.panel em { color: var(--ink); }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li, .rows a { display: grid; grid-template-columns: 52px 1fr auto; gap: 14px; align-items: baseline; padding: 11px 0; border-bottom: 1px solid var(--line); }
.rows a { transition: color .3s, padding .4s var(--ease); }
.rows a:hover { color: var(--accent); padding-left: 6px; }
.rows .y { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.rows .m { color: var(--ink); }
.rows .m small { display: block; color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.rows .r { font-family: var(--serif); font-style: italic; font-size: 16px; color: var(--ink-2); text-align: right; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 30px 0 0; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats b { display: block; font-family: var(--serif); font-weight: 400; font-size: 46px; line-height: 1; color: var(--accent); }
.stats span { font-size: 13.5px; color: var(--muted); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pills span { border: 1px solid var(--line); padding: 6px 12px; border-radius: 100px; font-size: 14px; color: var(--ink-2); }
/* listen */
.tracks { list-style: none; margin: 0; padding: 0; }
.track { display: grid; grid-template-columns: 26px 44px 1fr auto; gap: 14px; align-items: center; padding: 8px 6px; margin: 0 -6px; border-radius: 4px; cursor: pointer; transition: background .25s; }
.track:hover { background: rgba(243,237,227,.06); }
.track.is-active { background: rgba(243,237,227,.1); }
.track__n { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.track.is-active .track__n { color: var(--accent); }
.track img { width: 44px; height: auto; max-height: 62px; object-fit: contain; border-radius: 3px; justify-self: center; }
.track__t { font-family: var(--serif); font-size: 19px; line-height: 1.1; }
.track__t small { display: block; font-family: var(--sans); font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.track__d { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
/* contact */
.mail-big { display: inline-block; font-family: var(--sans); font-size: 16px; font-weight: 400; border-bottom: 1px solid var(--accent); margin: 4px 0 28px; transition: color .3s; word-break: break-all; }
.mail-big:hover { color: var(--accent); }
.mail-copied { margin-left: 12px; font-size: 12.5px; color: var(--accent); opacity: 0; transition: opacity .3s; }
.mail-copied.is-on { opacity: 1; }
.cform { display: grid; gap: 14px; margin: 0 0 8px; }
.cform__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cform label { display: grid; gap: 6px; }
.cform label span { font-size: 14px; color: var(--ink-2); font-weight: 400; }
.cform input, .cform textarea {
  width: 100%; font: inherit; font-size: 15px; color: var(--ink);
  background: rgba(243,237,227,.05); border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 12px; transition: border-color .3s, background .3s; resize: vertical;
}
.cform input:focus, .cform textarea:focus { outline: none; border-color: var(--accent); background: rgba(243,237,227,.08); }
.cform .is-bad { border-color: #c96a5a; }
.cform__hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.cform__foot { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.cform__send {
  font: inherit; font-size: 14px; font-weight: 500; color: #14100c; background: var(--accent);
  border-radius: 999px; padding: 9px 22px; cursor: pointer; transition: opacity .3s, transform .3s;
}
.cform__send:hover { transform: translateY(-1px); }
.cform__send:disabled { opacity: .5; cursor: default; transform: none; }
.cform__status { font-size: 13.5px; color: var(--muted); }
.cform__status.is-ok { color: var(--accent); }
.cform__status.is-err { color: #e09080; }
.links { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.links a { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); transition: color .3s; }
.links a:hover { color: var(--accent); }
.links__name { display: inline-flex; align-items: center; gap: 10px; }
.ico { width: 15px; height: 15px; flex: 0 0 auto; filter: invert(1); opacity: .7; transition: opacity .3s; }
.links a:hover .ico { opacity: 1; }

/* ==========================================================
   JOURNAL
   ========================================================== */
.is-reading .bg__home { opacity: 0; }
.is-reading .bg__img.is-on { opacity: 1; }
.jlist { list-style: none; margin: 10px 0 0; padding: 0; }
.jlist a { display: grid; grid-template-columns: 132px 1fr; gap: 20px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.jlist__img { display: grid; place-items: center; }
.jlist__img img { width: 100%; height: auto; max-height: 150px; object-fit: contain; border-radius: 4px; transition: transform 1s var(--ease), filter .6s; filter: saturate(.85); }
.jlist a:hover .jlist__img img { transform: scale(1.06); filter: none; }
.jlist__body { display: grid; gap: 6px; min-width: 0; }
.jlist__body .label { color: var(--muted); font-size: 11px; }
.jlist__t { font-family: var(--serif); font-size: 24px; line-height: 1.1; color: var(--ink); transition: color .3s; }
.jlist a:hover .jlist__t { color: var(--accent); }
.jlist__x { font-size: 14px; color: var(--ink-2); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.post__back { color: var(--ink-2); margin-bottom: 26px; display: inline-block; }
.post__back:hover { color: var(--accent); }
.post__meta { color: var(--accent); margin: 0 0 12px; }
.post .post__title { font-size: clamp(38px, 4vw, 60px); line-height: 1.02; margin: 0 0 26px; max-width: 18ch; }
.post__note { display: flex; gap: 10px; align-items: baseline; margin: -8px 0 30px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 6px; background: rgba(255,255,255,.04); font-size: 14px !important; line-height: 1.5; color: var(--ink-2) !important; }
.post__note span { color: var(--accent); }
.post__cover { margin: 0 0 34px; border-radius: 6px; overflow: hidden; }
.post__cover img { width: 100%; max-height: 420px; object-fit: cover; }
.post__body { max-width: none; }
.panel .post__body p { font-size: 16px; line-height: 1.78; color: rgba(243,237,227,.82); margin: 0 0 1.15em; text-align: justify; text-justify: inter-word; hyphens: auto; -webkit-hyphens: auto; }
.post__body li { text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
.panel .post__body p.post__next { text-align: left; margin-top: 2.4em; padding-top: 18px; border-top: 1px solid var(--line); font-family: var(--serif); font-size: 21px; color: var(--ink); }
.post__next .label { display: block; font-family: var(--sans); color: var(--accent); margin-bottom: 6px; }
.post__body a { color: var(--accent); border-bottom: 1px solid rgba(255,255,255,.2); transition: border-color .3s; }
.post__body a:hover { border-color: var(--accent); }
.post__body a em { color: inherit; }
.post__body strong { color: var(--ink); font-weight: 600; }
.post__body h4 { font-family: var(--serif); font-weight: 400; font-size: 28px; line-height: 1.15; margin: 1.6em 0 .55em; color: var(--ink); }
.post__body blockquote { margin: 1.6em 0; padding: 4px 0 4px 22px; border-left: 2px solid var(--accent); font-family: var(--serif); font-style: italic; font-size: 24px; line-height: 1.35; color: var(--ink); }
.post__body ul, .post__body ol { margin: 0 0 1.2em; padding-left: 1.2em; color: rgba(243,237,227,.82); font-size: 16px; line-height: 1.7; }
.post__body li { margin-bottom: .4em; }
.post__body li::marker { color: var(--accent); }
.post__body figure { margin: 2em 0; }
.post__body figure img { width: 100%; border-radius: 5px; }
.post__body figcaption { margin-top: 8px; font-size: 13px; color: var(--muted); }
.post__body figcaption a { color: var(--muted); border: 0; }
.post__table { overflow-x: auto; margin: 1.6em 0; border: 1px solid var(--line); border-radius: 6px; }
.post__table table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
.post__table th, .post__table td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.post__table th { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.post__table th strong { font-weight: 500; color: inherit; }
.post__table tr.is-flow td { color: var(--muted); font-style: italic; text-align: center; background: rgba(255,255,255,.03); }
.post__nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 50px; padding-top: 24px; border-top: 1px solid var(--line); }
.post__nav a { display: grid; gap: 6px; font-family: var(--serif); font-size: 20px; line-height: 1.15; padding: 14px; border-radius: 6px; background: rgba(255,255,255,.04); transition: background .3s; }
.post__nav a:hover { background: rgba(255,255,255,.09); }
.post__nav a .label { font-family: var(--sans); color: var(--muted); }
.post__nav a.is-next { text-align: right; }
@media (max-width: 720px) {
  .jlist a { grid-template-columns: 92px 1fr; gap: 14px; }
  .jlist__t { font-size: 20px; }
  .post__nav { grid-template-columns: 1fr; }
}

/* ==========================================================
   RESPONSIVE
   ========================================================== */
@media (max-width: 1100px) {
  .stage { grid-template-columns: minmax(280px, 34vw) 1fr; grid-template-areas: "card top" "card index" "poster index" "bottom bottom"; grid-template-rows: auto auto 1fr auto; }
  .poster { max-width: 260px; }
  .social { display: none; }
  .bottom { grid-template-columns: 1fr auto; }
}
@media (max-width: 720px), (max-height: 560px) and (max-width: 900px) {
  body { overflow: auto; }
  .stage { position: relative; min-height: 100svh; grid-template-columns: 1fr; grid-template-rows: auto auto auto auto auto auto; grid-template-areas: "brand" "top" "card" "poster" "index" "bottom"; }
  .poster { max-width: none; grid-template-columns: 120px 1fr; align-items: end; }
  .brand { position: relative; left: auto; right: auto; top: auto; margin: 0; grid-area: brand; justify-self: center; }
  .brand img { width: 112px; }
  .poster__cap { flex-direction: column; align-items: flex-start; }
  .works { max-height: none; overflow: visible; -webkit-mask-image: none; mask-image: none; }
  .work { grid-template-columns: 1fr auto; }
  .work__r { display: none; }
  .bg { position: fixed; }
  .dust { position: fixed; }
  /* player bar stays on screen while scrolling */
  .stage > .bottom { position: fixed !important; left: 0; right: 0; bottom: 0; z-index: 5; background: rgba(11,9,7,.78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); margin: 0; padding: 10px var(--pad) calc(10px + env(safe-area-inset-bottom)); }
  .stage { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  /* 16px stops iPhone from zooming into the form */
  .cform input, .cform textarea { font-size: 16px; }
  .mini { width: 100%; }
  .mini__vol .range { display: none; }
  .links { grid-template-columns: 1fr; }
  .cform__row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .001ms !important; }
}

/* Jost: titles and running text in the light weight; tiny labels stay at regular so they hold up on dark */
.work__t, .card__now em, .poster__type b, .panel h2, .panel .lead, .rows .r, .stats b, .track__t, .jlist__t,
.panel .post__body p.post__next, .post__body h4, .post__body blockquote, .post__nav a, .panel .bio p:first-child { font-weight: 300; font-style: normal; }
.work__t sup, .panel h3, .mini__times, .work__c, .filters button, .top, .bottom, .card__now small, .tag, .label { font-weight: 400; }

/* ==========================================================
   PHONE — even side margins, blocks stretched edge to edge
   inside them and centred, no empty bands
   ========================================================== */
@media (max-width: 720px), (max-height: 560px) and (max-width: 900px) {
  :root { --pad: 20px; }
  .stage { row-gap: 18px; }
  /* identity card: full width, menu spread across it, "now scoring" centred */
  /* no poster yet on the home screen: don't leave an empty band for it */
  .is-home .poster { display: none; }
  .card__now .dot { display: none; }
  .card__now .label::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #c0392b; margin-right: 8px; vertical-align: 1px; }
  .poster { grid-template-columns: 1fr; justify-items: center; }
  .poster__frame { width: min(46vw, calc(30svh * var(--ar, .75))); }
  /* works header: chip centred, filters spread across the full width */
  .index { gap: 12px; }
  .index__head { flex-direction: column; align-items: stretch; gap: 12px; }
  .index__head .chip { align-self: center; }
  .filters { justify-content: space-between; gap: 6px; flex-wrap: wrap; }
  .works { padding: 4px 0 8px; }
  .work { margin: 0 -10px; padding: 5px 10px; }
  /* player bar */
  .stage { padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
  .bottom { gap: 12px; }
  /* panels: a margin all round, comfortable inner padding, justified text */
  .panel__sheet { inset: 12px; width: auto; }
  .panel__body { padding: 58px 22px 32px; }
  .panel h2 { font-size: 38px; margin-bottom: 20px; }
  .panel .bio p, .panel .post__body p, .panel p { text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
  .panel .bio p:first-child { font-size: 18px; line-height: 1.5; }
  .panel .post__body p.post__next { text-align: left; }
}

/* ==========================================================
   PHONE — opening screen: logo on top, menu button on the right,
   full-screen photo, "now scoring" card at the bottom and a hint
   to scroll; the cover and the works list come below
   ========================================================== */
@media (max-width: 720px), (max-height: 560px) and (max-width: 900px) {
  .stage {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto calc(100svh - 73px - 3 * var(--pad) - 18px - 46px) auto auto auto auto;
    grid-template-areas: "brand" "card" "hint" "poster" "index" "bottom";
  }
  .top { display: none; }
  .brand { align-self: start; justify-self: center; }
  .brand img { width: 96px; }
  /* card sits at the bottom of the opening screen */
  .stage > .card { position: relative !important; z-index: 7 !important; align-self: end; justify-self: stretch; width: auto; max-width: none; padding: 12px 16px; gap: 0; }
  .card__bottom { border-top: 0; padding-top: 0; }
  .card__now .label { font-size: 11.5px; }
  .card__now em { font-size: 16px; }
  .card__nf { height: 12px; margin-left: 8px; }
  /* scroll hint under the card */
  .scroll-hint {
    display: flex; flex-direction: column; align-items: center; gap: 0; grid-area: hint; justify-self: center;
    color: var(--ink-2); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; font-weight: 400;
    position: relative; z-index: 2; height: 46px; justify-content: center;
  }
  .scroll-hint svg { width: 20px; height: 20px; animation: hintBob 1.8s ease-in-out infinite; }
  @keyframes hintBob { 0%, 100% { transform: translateY(-2px); opacity: .6; } 50% { transform: translateY(4px); opacity: 1; } }
  /* menu button: top right, level with the logo; two lines that turn into a cross */
  .card__menu {
    display: grid; place-content: center; gap: 5px; position: fixed !important; z-index: 8 !important;
    top: calc(var(--pad) + 14px); right: var(--pad); width: 44px; height: 44px; border-radius: 50%;
    background: rgba(18,14,10,.55); border: 1px solid rgba(255,255,255,.13);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  }
  .card__menu span { display: block; width: 18px; height: 1.5px; background: var(--ink); border-radius: 2px; transition: transform .3s var(--ease); }
  .card.is-open ~ .card__menu span:first-child { transform: translateY(3.25px) rotate(45deg); }
  .card.is-open ~ .card__menu span:last-child { transform: translateY(-3.25px) rotate(-45deg); }
  /* sections drop down under the button (the card has no blur on phones so this can be pinned to the screen) */
  .stage > .card { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(18,14,10,.62); transform: none !important; }
  .card__top {
    position: fixed; z-index: 9; top: calc(var(--pad) + 66px); right: var(--pad); width: 210px;
    padding: 8px; border-radius: 12px; border: 1px solid rgba(255,255,255,.13);
    background: rgba(18,14,10,.95);
    box-shadow: 0 24px 60px rgba(0,0,0,.5);
    opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .25s, transform .3s var(--ease), visibility 0s .3s;
  }
  .card.is-open .card__top { opacity: 1; visibility: visible; transform: none; transition: opacity .25s, transform .3s var(--ease); }
  .card__nav { flex-direction: column; flex-wrap: nowrap; gap: 0; }
  .card__nav button, .card__nav a { text-align: left; font-size: 16px; padding: 11px 12px; border-radius: 6px; color: var(--ink); }
  .card__nav button:active, .card__nav button.is-active { background: rgba(243,237,227,.07); }
  .card__nav button::before, .card__nav a::before { display: none; }
  /* below the opening screen: no "Works" label, cover then list */
  .index__head .chip { display: none; }
  .is-home .index { margin-top: -18px; } /* hidden poster row would leave a double gap */
  /* player bar slides in once you scroll (or a track is playing) */
  .stage > .bottom { transition: transform .45s var(--ease); }
  .at-top .stage > .bottom { transform: translateY(110%); }
  /* home photos: portrait crops made for phones (assets/photos/m), framed on the subject */
  .home-shot { background-position: 50% 30%; }
}

/* small caps labels inside panels keep their size (a <p class="label"> was picking up paragraph size) */
.panel p.label, .panel .post__meta { font-size: 12px; letter-spacing: .12em; line-height: 1.5; }

/* ==========================================================
   PHONE — Journal: calm reading sizes, nothing oversized
   ========================================================== */
@media (max-width: 720px), (max-height: 560px) and (max-width: 900px) {
  .panel__sheet { inset: 10px; }
  .panel__body { padding: 56px 20px 32px; }
  .panel h2 { font-size: 30px; line-height: 1.1; margin-bottom: 16px; }
  .panel .lead { font-size: 17px; line-height: 1.45; text-align: left; }
  /* list */
  .jlist a { grid-template-columns: 76px 1fr; gap: 14px; padding: 14px 0; }
  .jlist__body .label { font-size: 10px; letter-spacing: .06em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .jlist__t { font-size: 17px; line-height: 1.25; }
  .jlist__x { font-size: 13.5px; line-height: 1.5; }
  /* post */
  .post__back { font-size: 11px; }
  .panel .post__meta { font-size: 10.5px; letter-spacing: .1em; margin-bottom: 10px; }
  .post .post__title { font-size: 26px; line-height: 1.2; margin: 0 0 18px; max-width: none; }
  .post__note { font-size: 12px !important; margin: 0 0 22px; }
  .panel .post__body p { font-size: 15.5px; line-height: 1.7; font-weight: 400; color: rgba(243,237,227,.86); margin-bottom: 1em; word-spacing: -.02em; }
  .post__body h4 { font-size: 19px; line-height: 1.3; margin: 1.5em 0 .5em; font-weight: 400; }
  .post__body blockquote { font-size: 17px; line-height: 1.5; padding-left: 14px; }
  .post__body ul, .post__body ol { font-size: 15.5px; font-weight: 400; }
  .post__body figure { margin: 1.3em 0; }
  .post__table { overflow-x: auto; }
  .post__table table { font-size: 12.5px; }
  .panel .post__body p.post__next { font-size: 17px; }
  .post__nav a { font-size: 16px; padding: 12px; }
}

/* ==========================================================
   SHARE — top button opens the options; full row at the end of each post
   ========================================================== */
.post__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.post__top .post__back { margin: 0; }
.post__sharebtn { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-2); padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; transition: color .3s, border-color .3s; }
.post__sharebtn svg { width: 14px; height: 14px; }
.post__sharebtn:hover, .post__sharebtn[aria-expanded="true"] { color: var(--ink); border-color: var(--accent); }
.post__share { display: flex; flex-wrap: wrap; gap: 8px; }
.post__share--top { display: none; margin: -6px 0 22px; }
.post__share--top.is-open { display: flex; }
.share__btn {
  display: inline-flex; align-items: center; gap: 8px; font: inherit; font-size: 13px; font-weight: 400; color: var(--ink-2);
  padding: 8px 13px; border-radius: 999px; background: rgba(243,237,227,.05); border: 1px solid var(--line);
  cursor: pointer; transition: color .3s, border-color .3s, background .3s;
}
.share__btn svg { width: 15px; height: 15px; }
.share__btn .ico { width: 14px; height: 14px; }
.share__btn:hover { color: var(--ink); border-color: rgba(243,237,227,.3); background: rgba(243,237,227,.08); }
.share__btn.is-done { color: var(--accent); border-color: var(--accent); }
.post__end { margin: 2.4em 0 1.6em; padding-top: 18px; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.post__end .label { color: var(--accent); }
@media (max-width: 720px), (max-height: 560px) and (max-width: 900px) {
  .post__share { gap: 6px; }
  .share__btn { font-size: 12.5px; padding: 8px 10px; }
  .share__btn span { display: none; }            /* icons only on phones… */
  .share__btn.is-done span, .share__btn[data-share-native] span { display: inline; } /* "Link copied" still shows after a tap */
}

/* ==========================================================
   PANEL STANDARD — every tab shares one width, margin and header;
   each has a single small mark of its own
   ========================================================== */
.panel { --px: clamp(40px, 3.6vw, 60px); }
.phead { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 64px; margin-bottom: 22px; }
.panel .phead h2 { font-size: clamp(34px, 2.9vw, 44px); line-height: 1; margin: 0; }
.panel .jintro { margin: 0 0 4px; }
.pages { display: none; }
/* journal: the margin line and punched holes of a notebook page */
.panel[data-theme="journal"] .panel__sheet::after {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: calc((var(--px) - 14px) * var(--z, 1)); pointer-events: none;
  border-right: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  background: radial-gradient(circle, rgba(0,0,0,.75) 4px, rgba(243,237,227,.2) 4.5px, transparent 5px) 50% 0 / 100% 33.34% repeat-y;
}
/* honours: a small laurel */
.cert__laurel { width: 58px; flex: 0 0 auto; color: var(--accent); opacity: .75; overflow: visible; }
/* press: a newspaper's double rule */
.panel[data-theme="press"] .phead { border-bottom: 3px double rgba(243,237,227,.28); }
/* contact: a postage stamp */
.stamp { flex: 0 0 auto; width: 48px; height: 60px; padding: 5px; background: #d9cfbe; opacity: .85; rotate: 2deg;
  -webkit-mask: linear-gradient(#000 0 0) center / calc(100% - 6px) calc(100% - 6px) no-repeat, radial-gradient(circle at 3px 3px, transparent 1.7px, #000 2px) -3px -3px / 6px 6px;
  mask: linear-gradient(#000 0 0) center / calc(100% - 6px) calc(100% - 6px) no-repeat, radial-gradient(circle at 3px 3px, transparent 1.7px, #000 2px) -3px -3px / 6px 6px; }
.stamp img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; filter: sepia(.35) saturate(.8); }

@media (min-width: 721px) and (min-height: 561px), (min-width: 901px) {
  .panel__sheet { width: min(700px, calc(100% - 2 * var(--pad))); }
  /* --z grows with the sheet, so text, pictures and spacing fill it on any screen (set in main.js) */
  .panel__body, .panel__close { zoom: var(--z, 1); }
  .panel .panel__body { padding: 52px calc(var(--px) - var(--sb, 0px)) 44px var(--px); }
  .post .post__title { max-width: none; font-size: clamp(34px, 2.9vw, 44px); line-height: 1.1; }
}

/* phones: each tab is a plain full-screen page with one bar at the top */
@media (max-width: 720px), (max-height: 560px) and (max-width: 900px) {
  body.is-panel { overflow: hidden; }
  .panel__scrim { display: none; }
  .panel__sheet { inset: 0; width: auto; transform: none; border: 0; border-radius: 0; background: #0e0b08; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .panel__sheet::after { display: none; }
  .panel .panel__body { margin-top: calc(52px + env(safe-area-inset-top)); padding: 4px 24px calc(36px + env(safe-area-inset-bottom)); overscroll-behavior: contain; }
  .panel__close { top: calc(8px + env(safe-area-inset-top)); right: 12px; padding: 10px 12px; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .phead { height: 56px; margin-bottom: 18px; }
  .panel .phead h2 { font-size: 30px; }
  .cert__laurel { width: 46px; }
  .stamp { width: 42px; height: 53px; }
  .panel__body > p, .panel .jintro { font-size: 15.5px; line-height: 1.65; text-align: left; }
  .panel .bio p:first-child { font-size: 17px; line-height: 1.55; }
  /* journal list: date, title, small picture */
  .panel .panel__body > p { text-align: left; }
  .panel .jintro { margin-bottom: 6px; }
  .jlist a { grid-template-columns: 1fr 64px; gap: 18px; padding: 16px 0; }
  .jlist__img { order: 2; }
  .jlist__img img { width: 64px; height: 64px; object-fit: cover; }
  .jlist__x { display: none; }
  /* honours and press: title and source, year on the right */
  .rows li, .rows a { grid-template-columns: 1fr auto; gap: 4px 16px; padding: 14px 0; }
  .rows .y { order: 2; }
  .rows .m { order: 1; }
  .rows .r { order: 3; grid-column: 1 / -1; text-align: left; font-size: 14px; }
  .rows .r:empty, .rows a > span:last-child { display: none; }
  .rows li > span:empty { display: none; }
  /* contact */
  .mail-big { margin-bottom: 8px; }
  .links { display: flex; justify-content: space-between; gap: 0; max-width: 340px; }
  .links a { border: 0; padding: 12px; margin: 0 -12px; }
  .links .ico { width: 21px; height: 21px; }
  .links__t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .links__a { display: none; }
  .links li { padding: 0 0; }
  /* the other pages */
  .pages { display: flex; flex-wrap: wrap; gap: 4px 22px; margin-top: 44px; padding-top: 18px; border-top: 1px solid var(--line); }
  .pages button { padding: 8px 0; font-size: 15px; color: var(--ink-2); }
}

/* desktop: tabs open in the empty left side, under the menu; the works list stays in view.
   The player moves under the list so the tab can use the full height. */
@media (min-width: 1101px) {
  .panel__sheet { left: var(--pad); right: auto; top: var(--sheet-top, 164px); width: calc(100vw - max(320px, 46vw) - 2 * var(--pad) - 28px); transform: translateX(calc(-100% - 60px)); }
  .panel { pointer-events: none; }
  .panel__sheet { pointer-events: auto; }
  .panel__scrim { display: none; }
  .mini { transition: translate .9s var(--ease); }
  .is-panel .mini { translate: calc((100vw - max(320px, 46vw) - 2 * var(--pad)) / var(--ui, 1)) 0 !important; }
  .is-panel .social { visibility: hidden; pointer-events: none; }
  .is-panel .poster { opacity: 0 !important; pointer-events: none; }
}
@media (prefers-reduced-motion: reduce) { .mini { transition: none; } }

/* desktop: the whole interface grows with the screen (--ui is set in main.js; 1 = the 1440px design) */
@media (min-width: 1101px) {
  .card, .index, .bottom, .top { zoom: var(--ui, 1); }
  .brand img { width: calc(clamp(104px, 8.5vw, 122px) * var(--ui, 1)); }
  .poster { max-width: calc(330px * var(--ui, 1)); }
  .work__t { font-size: clamp(17px, 1.35vw, 19.5px); }
  .work--spot .work__t { font-size: clamp(20px, 1.6vw, 23px); }
}
/* tablets: the tab covers the whole screen, with no half-hidden site beside it */
@media (min-width: 721px) and (max-width: 1100px) and (min-height: 561px), (min-width: 901px) and (max-width: 1100px) {
  .panel__sheet { left: var(--pad); width: auto; background: rgba(14,11,8,.95); }
}

/* ==========================================================
   LIGHT — breathes with the music (opacity set in main.js).
   Colour-dodge lifts the lit wall behind him and leaves the silhouette dark.
   ========================================================== */
.bg__dim, .bg__light { position: absolute; inset: 0; opacity: 0; pointer-events: none; will-change: opacity; }
.bg__dim { background: #050403; }
.bg__light { mix-blend-mode: color-dodge; }
.bg__light i { position: absolute; inset: 0; opacity: .4; transition: opacity 1.2s ease;
  background: radial-gradient(ellipse 46% 78% at 27% 44%, rgb(170,146,112), rgb(96,80,60) 45%, transparent 100%); }
.is-home .bg__light i { opacity: 1; }
@media (max-width: 720px) { .bg__light i { background: radial-gradient(ellipse 110% 62% at 50% 40%, rgb(170,146,112), rgb(96,80,60) 45%, transparent 100%); } }

/* the dark moment between the photo and a cover (see cut() in main.js) */
.bg__cut { position: absolute; inset: 0; background: #040302; opacity: 0; pointer-events: none; }
.is-cut .bg__home, .is-cut .bg__img, .is-cut .poster, .is-cut .bg__light i { transition: none !important; }

/* ==========================================================
   PHONE — two full frames that settle into place: portrait, then works.
   Fades follow the finger: --p-bg / --p-in / --p-out are set in main.js
   ========================================================== */
@media (max-width: 720px), (max-height: 560px) and (max-width: 900px) {
  html { scroll-snap-type: y mandatory; }
  html:has(body.is-panel) { scroll-snap-type: none; }
  .brand { scroll-snap-align: start; scroll-snap-stop: always; scroll-margin-top: 60px; }
  .stage { overflow: clip; --cover: 25svh; --bar: calc(92px + env(safe-area-inset-bottom)); padding-bottom: var(--bar); }
  .poster, .is-home .poster { display: grid; transform: none; height: var(--cover); align-content: center; opacity: var(--p-in, 0) !important; transition: none; scroll-snap-align: start; scroll-snap-stop: always; scroll-margin-top: calc(18px + env(safe-area-inset-top)); }
  .poster__frame { width: min(62vw, calc(var(--cover) * var(--ar, .75))); }
  .is-home .index { margin-top: 0; }
  .index { height: calc(100dvh - 18px - env(safe-area-inset-top) - var(--cover) - 18px - var(--bar)); justify-content: flex-start; opacity: var(--p-in, 0); }   /* dvh: fills the screen whether Safari's bars show or not */
  .works { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-mask-image: linear-gradient(#000 calc(100% - 22px), transparent); mask-image: linear-gradient(#000 calc(100% - 22px), transparent); padding-bottom: 22px; }
  .index__auto { display: none; }
  /* photo and cover colours dissolve into each other */
  .bg__home { opacity: calc(1 - var(--p-bg, 0)) !important; transition: opacity .25s linear; }
  .bg__img.is-on, .is-home .bg__img.is-on { opacity: var(--p-bg, 0) !important; transition: opacity .25s linear; }
  .bg__img { transition: opacity 1.4s ease; }
  .is-reading .bg__home { opacity: 0 !important; } .is-reading .bg__img.is-on { opacity: 1 !important; }
  .brand { opacity: var(--p-out, 1) !important; }
  /* the hint: under the card at first; once the player is there, it moves above it */
  .scroll-hint { opacity: var(--p-out, 1) !important; transition: transform .45s var(--ease); }
  body:not(.at-top) .scroll-hint { transform: translateY(-76px) !important; }
  .card { transition: background-color .4s, border-color .4s, box-shadow .4s; }
  .card__bottom { transition: opacity .4s ease, visibility .4s; }
  body:not(.at-top) .card { background: none; border-color: transparent; box-shadow: none; pointer-events: none; }
  body:not(.at-top) .card__top { pointer-events: auto; }
  body:not(.at-top) .card__bottom { opacity: 0; visibility: hidden; }
}
/* phones held sideways: no room for the cover, the list takes the frame */
@media (max-height: 560px) and (max-width: 900px) and (orientation: landscape) {
  .poster, .is-home .poster { display: none; }
  .index { height: calc(100dvh - 18px - var(--bar)); padding-right: 64px; scroll-snap-align: start; scroll-snap-stop: always; scroll-margin-top: 18px; }
}

/* language button: small flag and code */
#langToggle { display: inline-flex; align-items: center; gap: 8px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); transition: border-color .3s, background .3s; }
#langToggle:hover { border-color: rgba(243,237,227,.4); background: rgba(243,237,227,.06); }
.flag { width: 18px; height: 12px; border-radius: 2px; flex: 0 0 auto; }
.card__lang { display: none; }
/* phones: the language sits in the menu, the player gets the full width */
@media (max-width: 720px), (max-height: 560px) and (max-width: 900px) {
  .bottom__right { display: none; }
  .stage > .bottom { grid-template-columns: 1fr; }
  .card__lang { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 6px; padding: 13px 12px 10px; border-top: 1px solid var(--line); font-size: 15px; color: var(--ink-2); text-align: left; }
}

/* ===================== SHELF: the works as DVD cases on a still shelf ===================== */
.index:not(.is-list) .works { display: none !important; }   /* Selected: the shelf; every other filter: the list */
.index.is-list .shelf { display: none; }
.shelf { position: relative; flex: 1 1 auto; min-height: 220px; perspective: 2400px; perspective-origin: 50% 40%; touch-action: pan-y; -webkit-user-select: none; user-select: none; }
.shelf__world { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform-style: preserve-3d; }
.case { position: absolute; left: 0; top: 0; width: 0; height: 0; padding: 0; border: 0; background: none; transform-style: preserve-3d; transition: transform .9s var(--ease); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.case:focus-visible { outline: none; }
.case .f { position: absolute; left: 0; top: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; }
.case .f::after { content: ''; position: absolute; inset: 0; background: #000; opacity: 0; transition: opacity .7s; pointer-events: none; }
.case .f { transition: opacity .5s ease; }
.case.is-on { pointer-events: none; }
.shelf .case.is-on .f { opacity: 0; }

/* six faces of a keepcase */
.f--front, .f--back { width: var(--w); height: var(--h); border-radius: 2px; }
.f--front { transform: translate(-50%, -50%) translateZ(calc(var(--d) / 2)); background: #060606; padding: 3.2% 3.2% 3.2% 4.2%; }
.f--back { transform: translate(-50%, -50%) rotateY(180deg) translateZ(calc(var(--d) / 2)); background: #0a0908; }
.f--spine, .f--edge { width: var(--d); height: var(--h); }
.f--spine { transform: translate(-50%, -50%) rotateY(-90deg) translateZ(calc(var(--w) / 2)); }
.f--edge { transform: translate(-50%, -50%) rotateY(90deg) translateZ(calc(var(--w) / 2)); background: linear-gradient(90deg, #040404, #121212 50%, #040404); }
.f--top, .f--bottom { width: var(--w); height: var(--d); background: linear-gradient(90deg, #161514, #0b0b0a); }
.f--top { transform: translate(-50%, -50%) rotateX(90deg) translateZ(calc(var(--h) / 2)); }
.f--bottom { transform: translate(-50%, -50%) rotateX(-90deg) translateZ(calc(var(--h) / 2)); }

/* front: the sleeve behind clear plastic */
.cs__cover { position: relative; width: 100%; height: 100%; overflow: hidden; background: #111; }
.cs__img { position: absolute; inset: 0; background-size: cover; background-position: center; }
.cs__type { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 12%; background: #0f0d0b; color: var(--ink); }
.cs__type b { font-weight: 300; font-size: 1.35em; line-height: 1.2; letter-spacing: .02em; }
.cs__type small { margin-top: 1.4em; font-size: .5em; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); }
.cs__sheen { position: absolute; inset: 0; border-radius: 2px; pointer-events: none;
  background: linear-gradient(100deg, rgba(255,255,255,.07), rgba(255,255,255,0) 26%), linear-gradient(90deg, rgba(255,255,255,.05) 0 1.2%, transparent 1.2%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }

/* the spine: one design for the whole collection, the film's colour as a thin band */
.f--spine { display: flex; flex-direction: column; align-items: center; padding: 0 0 .9em; border-radius: 1.5px; color: var(--ink);
  background:
    linear-gradient(90deg, rgba(0,0,0,.55), rgba(255,255,255,.05) 20%, rgba(255,255,255,.015) 45%, rgba(0,0,0,0) 70%, rgba(0,0,0,.6)),
    linear-gradient(color-mix(in srgb, var(--sp, #1a1612) 35%, #121110), #0c0b0a);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.035); }
.sp__band { flex: 0 0 auto; width: 100%; height: 1.1em; background: var(--sa, var(--accent)); opacity: .75; transition: opacity .6s; }
.sp__no { margin-top: .75em; font-size: .62em; letter-spacing: .06em; color: rgba(243,237,227,.42); font-variant-numeric: tabular-nums; }
.sp__t { writing-mode: vertical-rl; flex: 1 1 auto; min-height: 0; margin: .9em 0 .6em; font-size: .78em; font-weight: 400; letter-spacing: .2em; text-transform: uppercase; line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: rgba(243,237,227,.9); }
.sp__sub { writing-mode: vertical-rl; font-size: .56em; letter-spacing: .16em; text-transform: uppercase; color: rgba(243,237,227,.38); white-space: nowrap; }
.sp__end { display: grid; place-items: center; margin-top: .8em; height: 1em; }
.sp__mark { font-style: normal; font-size: .5em; letter-spacing: .08em; color: rgba(243,237,227,.36); }
.sp__eq { display: none; gap: .14em; align-items: flex-end; height: .9em; color: var(--sa, var(--accent)); }
.sp__eq b { width: .16em; height: 100%; background: currentColor; transform-origin: 50% 100%; animation: eqb .9s ease-in-out infinite; }
.sp__eq b:nth-child(2) { animation-delay: -.3s; } .sp__eq b:nth-child(3) { animation-delay: -.6s; }
.case.is-playing .sp__mark { display: none; }
.case.is-playing .sp__eq { display: flex; }
.case.is-on .sp__band { opacity: 1; }

/* the shelf: a thin dark glass ledge */
.plank { position: absolute; left: 0; top: 0; width: 0; height: 0; transform-style: preserve-3d; pointer-events: none; }
.plank__top { position: absolute; left: 0; top: 0; width: var(--w); height: var(--d); transform: translate(-50%, -50%) rotateX(90deg);
  background: radial-gradient(ellipse 50% 46% at 50% 50%, rgba(0,0,0,.6), transparent 80%), linear-gradient(rgba(255,255,255,.025), rgba(255,255,255,.06)); }
.plank__front { position: absolute; left: 0; top: 0; width: var(--w); height: var(--h); transform: translate(-50%, 0) translateZ(calc(var(--d) / 2));
  background: linear-gradient(rgba(243,237,227,.38), rgba(243,237,227,.08)); }
.plank__front span { position: absolute; top: max(1.5em, 9px); font-size: max(1em, 11px); font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: rgba(243,237,227,.82); white-space: nowrap; }

/* the chosen case in the poster spot */
.pcase { position: absolute; inset: 0; perspective: 1600px; display: none; pointer-events: none; touch-action: pan-y; -webkit-user-select: none; user-select: none; }
.pcase:active { cursor: grabbing; }
.pcase .case { left: 50%; top: 50%; transition: none; cursor: inherit; }
.poster--case .pcase { display: block; }
.poster--case .poster__frame { overflow: visible; background: transparent; box-shadow: none; border-radius: 0; }
.poster--case .poster__img, .poster--case .poster__type, .poster--case .poster__city { visibility: hidden; }
.case--big .f--front { box-shadow: 0 30px 70px rgba(0,0,0,.55); }
.case--big .f--front, .case--big .f--back { overflow: hidden; }
.poster { position: relative; }
.pcase__flip { position: absolute; top: 10px; right: 10px; z-index: 3; display: none; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: var(--ink); background: rgba(10,8,6,.55); border: 1px solid rgba(243,237,227,.18); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); opacity: 0; transition: opacity .35s, background .3s; }
.pcase__flip svg { width: 16px; height: 16px; }
.pcase__flip:hover { background: rgba(243,237,227,.9); color: #120d08; }
.poster--case .pcase__flip { display: grid; }
.poster--case:hover .pcase__flip, .pcase__flip:focus-visible { opacity: 1; }
@media (hover: none) { .poster--case .pcase__flip { opacity: .85; } }
.case.is-small .bk__meta, .case.is-small .bk__badge, .case.is-small .bk__code, .case.is-small .bk__alt { display: none; }
.case.is-small .bk__role { font-size: .7em; }
.case.is-small .bk__cat, .case.is-small .bk__foot { font-size: .55em; }
.case.is-small .bk__play { font-size: .62em; }

/* the back of the case: the credits */
.bk { position: absolute; inset: 0; }
.bk__bg { position: absolute; inset: -10%; background-size: cover; background-position: center; filter: blur(22px) brightness(.26) saturate(.9); }
.bk__in { position: relative; height: 100%; display: flex; flex-direction: column; padding: 10% 10% 8%; color: var(--ink); text-align: left; }
.bk__cat { font-size: .46em; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); }
.bk h3 { margin: .6em 0 0; font-weight: 300; font-size: 1.25em; line-height: 1.15; letter-spacing: .01em; }
.bk__alt { margin: .35em 0 0; font-size: .56em; color: var(--muted); }
.bk__role { margin: 1.3em 0 0; padding-top: 1em; border-top: 1px solid rgba(243,237,227,.12); font-size: .58em; line-height: 1.5; color: var(--ink-2); }
.bk__meta { margin: .3em 0 0; font-size: .54em; line-height: 1.5; color: var(--muted); }
.bk__badge { margin: 1em 0 0; font-size: .44em; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); }
.bk__play { align-self: flex-start; display: inline-flex; align-items: center; gap: .55em; margin-top: 1.4em; padding: .5em 1em .5em .8em; border-radius: 99px; border: 1px solid rgba(243,237,227,.35); color: var(--ink); font-size: .5em; letter-spacing: .16em; text-transform: uppercase; transition: background .3s, color .3s; }
.bk__play:hover { background: var(--ink); color: #120d08; }
.bk__play svg { width: 1em; height: 1em; fill: currentColor; }
.bk__foot { margin-top: auto; display: flex; justify-content: space-between; align-items: flex-end; gap: 1em; font-size: .4em; letter-spacing: .2em; text-transform: uppercase; color: rgba(243,237,227,.4); }
.bk__code { display: flex; gap: 2px; height: 2.4em; padding: .3em .4em; background: rgba(243,237,227,.8); }
.bk__code i { background: #111; }
@media (prefers-reduced-motion: reduce) { .case { transition: none; } }
@media (max-width: 720px), (max-height: 560px) and (max-width: 900px) {
  .shelf { min-height: 0; }
}
/* spines cut from the poster art: a strip of the poster runs down the spine, the type sits on top */
.f--spine.has-art { position: absolute; background: #0c0b0a; }
.sp__art { position: absolute; inset: 0; z-index: -2; background-size: auto 100%; background-repeat: no-repeat; opacity: .42; filter: saturate(.85); }
.f--spine.has-art { isolation: isolate; }
.f--spine.has-art::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(#000 0%, rgba(0,0,0,.92) 14%, rgba(0,0,0,0) 34%, rgba(0,0,0,0) 66%, rgba(0,0,0,.92) 86%, #000 100%),
    linear-gradient(90deg, rgba(0,0,0,.55), rgba(255,255,255,.14) 18%, rgba(255,255,255,0) 40%, rgba(0,0,0,0) 65%, rgba(0,0,0,.6)); }
.f--spine.has-art .sp__band { display: none; }
.f--spine.has-art .sp__no { margin-top: 1em; color: var(--sa); opacity: .95; text-shadow: 0 1px 3px rgba(0,0,0,.8); }
.f--spine.has-art .sp__t { color: #fff; font-weight: 500; text-shadow: 0 0 .5em rgba(0,0,0,.9), 0 0 .15em rgba(0,0,0,.9); }
.f--spine.has-art .sp__sub, .f--spine.has-art .sp__mark { color: rgba(255,255,255,.6); text-shadow: 0 0 .4em rgba(0,0,0,.9); }

/* the disc mark at the foot of the spine */
.sp__end { height: auto; margin-top: .7em; }
.sp__mark { display: block; width: calc(var(--d) * .5); line-height: 0; color: rgba(243,237,227,.34); }
.sp__mark svg { display: block; width: 100%; height: auto; }
.f--spine.has-art .sp__mark { color: rgba(255,255,255,.36); text-shadow: none; }
/* the filters sit at the right edge, above the shelf (desktop and tablet) */
@media (min-width: 721px) and (min-height: 561px), (min-width: 901px) {
  .index__head { justify-content: flex-end; }
  .index { justify-content: flex-start; }   /* the filters stay put whatever the tab holds */
}

/* ===== cover, then one card with the details and the player (desktop) ===== */
.info { display: none; }
@media (min-width: 1101px) {
  :root { --pw: min(calc(320px * var(--ui, 1)), 32vh); }
  .poster { gap: 12px; width: var(--pw); max-width: none; margin-bottom: calc(-1 * var(--pad)); }
  .poster__frame { width: var(--pw); }
  .info:not([hidden]) { display: grid; gap: 3px; zoom: var(--ui, 1); width: calc(var(--pw) / var(--ui, 1)); box-sizing: border-box; padding: 14px 16px 12px; color: var(--ink);
    border-radius: 12px 12px 0 0; border: 1px solid rgba(255,255,255,.12); border-bottom: 0;
    background: linear-gradient(160deg, rgba(255,255,255,.09), rgba(255,255,255,.02) 70%), rgba(14,11,8,.42);
    backdrop-filter: blur(22px) saturate(1.4); -webkit-backdrop-filter: blur(22px) saturate(1.4); }
  .info__k { font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
  .info__t { margin: 3px 0 0; font-family: var(--serif); font-weight: 400; font-size: 20px; line-height: 1.15; }
  .info__alt { margin: 0; font-size: 12.5px; color: var(--muted); }
  .info__r { margin: 6px 0 0; font-size: 13.5px; color: var(--ink-2); }
  .info__m { margin: 0; font-size: 12.5px; line-height: 1.4; color: var(--muted); }
  .info__b { margin: 5px 0 0; font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
  /* the player: hidden until something plays; under the details it becomes the lower half of the same card */
  .mini { width: calc(var(--pw) / var(--ui, 1)); transition: translate .9s var(--ease), opacity .5s, visibility .5s; }
  body:not(.has-played) .mini { opacity: 0; visibility: hidden; pointer-events: none; }
  body.has-info:not(.is-home):not(.is-panel) .mini { border-radius: 0 0 12px 12px; border-top: 1px solid rgba(255,255,255,.07); }
  .is-home .poster { margin-bottom: 0; }
}
/* covers facing out (every filter but Selected) are only to look at */
.shelf.is-front .case { cursor: default; }
.shelf.is-front .case .f--front { box-shadow: 0 8px 18px rgba(0,0,0,.45); }
.shelf.is-scroll { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; touch-action: pan-y; }
.shelf.is-scroll::-webkit-scrollbar { display: none; }
.shelf__space { width: 1px; pointer-events: none; }

/* ===== one window on the left: cover, details and player in a single card (desktop) ===== */
@media (min-width: 1101px) {
  body.has-info:not(.is-home) .poster {
    box-sizing: border-box; padding: 16px 16px 0; gap: 0;
    border: 1px solid rgba(255,255,255,.11); border-bottom: 0; border-radius: 14px 14px 0 0;
    background: rgba(16,12,9,.5); backdrop-filter: blur(22px) saturate(1.4); -webkit-backdrop-filter: blur(22px) saturate(1.4);
  }
  body.has-info:not(.is-home) .poster__frame { width: 100%; }
  body.has-info:not(.is-home) .info:not([hidden]) { width: auto; padding: 14px 2px 10px; border: 0; border-radius: 0; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
  body.has-info:not(.is-home) .pcase__flip { top: 26px; right: 26px; }
  body.has-info:not(.is-home):not(.is-panel) .mini {
    border-radius: 0 0 14px 14px; border: 1px solid rgba(255,255,255,.11); border-top: 1px solid rgba(255,255,255,.07);
    background: rgba(16,12,9,.5); box-shadow: 0 24px 60px rgba(0,0,0,.35);
  }
  /* the title is already in the card above */
  body.has-info:not(.is-home):not(.is-panel) .mini__title { visibility: hidden; }
}

/* ===== background: the photos stay; a chosen film only tints them in its colours (no poster behind) ===== */
.bg__tint { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .7s ease, background-color .7s ease;
  background: var(--accent); mix-blend-mode: color; }
body:not(.is-reading) .bg__img { visibility: hidden !important; }
body:not(.is-reading) .bg__home { opacity: 1 !important; }
body.has-cover:not(.is-home):not(.is-reading) .bg__tint { opacity: .34; }
@media (max-width: 720px), (max-height: 560px) and (max-width: 900px) {
  /* phones: the tint comes in as the page scrolls down to the works */
  body:not(.is-reading) .bg__tint { opacity: calc(var(--p-bg, 0) * .34) !important; transition: none; }
}
/* the two spotlight cases: still, then now and then a small shiver */
.case__in { position: absolute; left: 0; top: 0; width: 0; height: 0; transform-style: preserve-3d; }
.case.is-spot .case__in { animation: spotShiver 6s ease-in-out infinite; }
.case.is-spot ~ .case.is-spot .case__in { animation-delay: -3s; }
@keyframes spotShiver {
  0%, 86%, 100% { transform: none; }
  88% { transform: translateY(-2px) rotateZ(-1.2deg); }
  90% { transform: translateY(-2px) rotateZ(1.2deg); }
  92% { transform: translateY(-1px) rotateZ(-.8deg); }
  94% { transform: translateY(-1px) rotateZ(.6deg); }
  96% { transform: rotateZ(-.3deg); }
}

/* desktop: with a film chosen, the photo slides a little right so the cover card and player sit beside it, not on it */
@media (min-width: 1101px) {
  body.has-cover:not(.is-home):not(.is-reading) .bg__home {
    transform: translateX(11vw); transition: opacity 1.6s ease, transform 1.4s var(--ease);   /* slides out; back home it is there at once */
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 16%); mask-image: linear-gradient(90deg, transparent, #000 16%);
  }
}
@media (max-width: 720px), (max-height: 560px) and (max-width: 900px) {
  /* phones: the photo steps back as the works come up, so the shelf reads clearly */
  body:not(.is-reading) .bg__home { opacity: calc(1 - var(--p-bg, 0) * .72) !important; }
}
/* tablets: the filter bar starts below the logo instead of beside it */
@media (min-width: 721px) and (max-width: 1100px) and (min-height: 561px), (min-width: 901px) and (max-width: 1100px) {
  .index { padding-top: 58px; }
}

@media (hover: none) { .shelf .case { -webkit-touch-callout: none; } }
/* a soft shadow under the shelf */
.plank__shadow { position: absolute; left: 0; top: 0; width: calc(var(--w) * 1.12); height: calc(var(--d) * .8); pointer-events: none;
  transform: translate(-50%, var(--h)) translateZ(calc(var(--d) / 2));
  background: radial-gradient(ellipse 50% 70% at 50% 0%, rgba(0,0,0,.78), rgba(0,0,0,.32) 50%, transparent 100%); }
/* a faint light on the wall behind the shelf, so its shadow reads on the dark background */
.plank__glow { position: absolute; left: 0; top: 0; width: calc(var(--w) * 1.5); height: calc(var(--gh) * 1.35); pointer-events: none;
  transform: translate(-50%, calc(var(--gh) * -.78)) translateZ(calc(var(--d) / -2 - 10px));
  background: radial-gradient(ellipse 50% 50% at 50% 55%, rgba(243,232,214,.075), rgba(243,232,214,.025) 55%, transparent 75%); }

/* ===== phones and tablets: the details of the chosen work sit beside its cover ===== */
@media (max-width: 1100px) {
  .info:not([hidden]) { display: grid; gap: 2px; align-self: center; min-width: 0; color: var(--ink); text-align: left; }
  .info__k { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
  .info__t { margin: 2px 0 0; font-family: var(--serif); font-weight: 400; font-size: 19px; line-height: 1.15; }
  .info__alt { margin: 0; font-size: 12px; color: var(--muted); }
  .info__r { margin: 5px 0 0; font-size: 13px; color: var(--ink-2); }
  .info__m { margin: 0; font-size: 12px; line-height: 1.4; color: var(--muted); }
  .info__b { margin: 4px 0 0; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
}
@media (max-width: 720px), (max-height: 560px) and (max-width: 900px) {
  body.has-info .poster, body.has-info.is-home .poster { grid-template-columns: auto minmax(0, 1fr); justify-items: start; align-items: center; column-gap: 16px; }
  body.has-info .poster__frame { width: min(40vw, calc(var(--cover) * var(--ar, .75))); max-height: var(--cover); }
  body.has-info .info__m + .info__m { display: none; }   /* keep it short on a phone: one line of notes */
  body.has-info .info__m { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  body.has-info .info { padding-right: 46px; }   /* clear of the menu button */
}
/* the filter bar: a touch larger, and a little lower so it sits with the shelf (desktop and tablet) */
@media (min-width: 721px) and (min-height: 561px), (min-width: 901px) {
  .filters { font-size: 13.5px; gap: 16px; }
}
@media (min-width: 1101px) { .index { padding-top: 7vh; } }
@media (min-width: 721px) and (max-width: 1100px) and (min-height: 561px), (min-width: 901px) and (max-width: 1100px) {
  .index { padding-top: calc(58px + 3vh); }
}

/* phones: the list scrolls only up and down, never sideways */
@media (max-width: 720px), (max-height: 560px) and (max-width: 900px) {
  .works { overflow-x: hidden; overscroll-behavior: contain; touch-action: pan-y; }
}
/* phones: no dark band behind the player; the player card itself is a darker glass */
@media (max-width: 720px), (max-height: 560px) and (max-width: 900px) {
  .stage > .bottom { background: transparent !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
  .mini { background: linear-gradient(145deg, rgba(255,255,255,.08), rgba(255,255,255,.02) 60%), rgba(12,9,7,.66);
    backdrop-filter: blur(24px) saturate(1.4); -webkit-backdrop-filter: blur(24px) saturate(1.4); box-shadow: 0 16px 44px rgba(0,0,0,.45); }
}

/* ===== tablets: logo at the top right, London and the clock under the card, a wider card ===== */
@media (min-width: 721px) and (max-width: 1100px) and (min-height: 561px), (min-width: 901px) and (max-width: 1100px) {
  .stage { grid-template-columns: minmax(330px, 42vw) 1fr; grid-template-areas: "card index" "top index" "poster index" "bottom bottom"; grid-template-rows: auto auto 1fr auto; }
  .card { width: 100%; box-sizing: border-box; }
  .card__nav { flex-wrap: nowrap; }
  :root { --pad: clamp(20px, 2.7vw, 30px); }   /* more air around the edges on tablets */
  /* the logo: in line with the top of the card on the left and the right edge of the filter bar below it */
  .brand { left: auto; right: var(--pad); top: calc(var(--pad) + 4px); margin: 0; }
  .brand img { width: 100px; }
  .top { justify-content: flex-start; padding: 0 0 0 18px; }
  .index { padding-top: 112px; }   /* the filter bar starts a clear step below the logo */
}

/* ===== the list on phones and tablets: two lines per work, nothing cut off =====
   line 1: the full title (it may wrap) and, at the right, the type or length
   line 2: the role, smaller, under the title */
@media (max-width: 1100px) {
  .work { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "t c" "r r"; column-gap: 12px; row-gap: 1px; align-items: baseline; padding: 6px 10px; }
  .work__t { grid-area: t; white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.22; }
  .work__c { grid-area: c; }
  .work__r { grid-area: r; display: block !important; padding-left: 32px; font-size: 12.5px; line-height: 1.35; color: var(--muted);
    white-space: normal; overflow: hidden; text-overflow: clip; -webkit-mask-image: none !important; mask-image: none !important;
    display: -webkit-box !important; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .work__r .work__rt { display: inline; animation: none !important; }
  .work.is-active .work__r { color: rgba(18,13,8,.62); }
  .work--spot + .work:not(.work--spot) { margin-top: 8px; }
}
/* desktop: a long title wraps onto a second line instead of being cut; the list never scrolls sideways */
@media (min-width: 1101px) {
  .work__t { white-space: normal; overflow: visible; text-overflow: clip; }
  .works { overflow-x: hidden; }
}
/* a title that wraps keeps its second line under the first word, not under the play mark */
.work__t { padding-left: 32px; text-indent: -32px; }
.work__t sup { text-indent: 0; }

/* with "reduce motion" on (common on iPads) the site keeps still, except these two quiet things the owner wants everywhere:
   the photos fade from one to the next, and the two spotlight cases give their small shiver */
@media (prefers-reduced-motion: reduce) {
  .home-shot { transition-duration: 3s !important; }
  .home-shot.is-on { transition-duration: 4s !important; transition-delay: 2.2s !important; }
  .case.is-spot .case__in { animation: spotShiver 6s ease-in-out infinite !important; }
  .case.is-spot ~ .case.is-spot .case__in { animation-delay: -3s !important; }
}
/* tablets: the menu spreads across the card, the same space at both ends */
@media (min-width: 721px) and (max-width: 1100px) and (min-height: 561px), (min-width: 901px) and (max-width: 1100px) {
  .card__nav { flex: 1 1 auto; width: 100%; justify-content: space-between; gap: 6px 12px; }
}
/* the work lists never move sideways, on any device: the rows' highlight bleed sits inside the list's own padding */
.works { overflow-x: hidden !important; overscroll-behavior-x: none; touch-action: pan-y; padding-left: 10px; padding-right: 10px; margin-left: -10px; margin-right: -10px; }

/* iPad / touch screens: nothing on the page may drift sideways
   - no double-tap zoom (quick taps on the list zoomed the page in, which then panned left and right); pinch zoom still works
   - tablets and desktops never scroll the page itself (the stage is fixed), so the page is locked and does not rubber-band
   - lists bounce only within themselves, never sideways */
html { touch-action: manipulation; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (min-width: 721px) and (min-height: 561px), (min-width: 901px) {
  html, body { overflow: hidden; overscroll-behavior: none; }
}
.works { overscroll-behavior: contain; }
/* touch tablets: the page itself is pinned, so a sideways swipe cannot pull it (the stage and panels are fixed already) */
@media (hover: none) and (min-width: 721px) and (min-height: 561px), (hover: none) and (min-width: 901px) {
  html, body { position: fixed; inset: 0; width: 100%; height: 100%; }
}

/* Journal by email: one thin line at the bottom of the Journal — the address and a + */
.sub { margin: 30px 0 8px; }
.sub__row { display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); transition: border-color .3s; }
.sub__row:focus-within { border-color: rgba(227,180,111,.6); }
.sub input[type=email] { flex: 1 1 auto; min-width: 0; font: inherit; font-size: 15px; color: var(--ink); background: none; border: 0; padding: 10px 0; }
.sub input[type=email]::placeholder { color: var(--muted); }
.sub input[type=email]:focus { outline: none; }
.sub.is-bad .sub__row { border-color: #c96a5a; }
.sub__go { flex: 0 0 auto; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: var(--accent); border: 1px solid rgba(227,180,111,.45); transition: background .3s, color .3s; }
.sub__go svg { width: 14px; height: 14px; }
.sub__go:hover { background: var(--accent); color: #14100c; }
.sub__go:disabled { opacity: .5; }
.sub__msg { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.sub__msg:empty { display: none; }
.sub__msg.is-ok { color: var(--accent); }
.sub__msg.is-err { color: #e09080; }
@media (max-width: 720px), (max-height: 560px) and (max-width: 900px) { .sub input[type=email] { font-size: 16px; } }   /* 16px: no iPhone zoom on focus */
/* the Subscribe button on the Journal heading, top right */
.phead__sub { flex: 0 0 auto; color: var(--accent); border: 1px solid rgba(227,180,111,.45); border-radius: 999px; padding: 7px 14px; transition: background .3s, color .3s; }
.phead__sub:hover { background: var(--accent); color: #14100c; }
/* tablets: London and the clock sit flush with the card's left edge; the filter bar (and the shelf under it)
   comes down to the same line as London and the clock */
@media (min-width: 721px) and (max-width: 1100px) and (min-height: 561px), (min-width: 901px) and (max-width: 1100px) {
  .top { padding-left: 2px; }
  .index { padding-top: var(--head-y, 140px); }
}

/* link to the 3D studio (studio/index.html) */
.card__nav a { text-decoration: none; }
.card__studio { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.card__3d { font-size: 8.5px; font-weight: 500; letter-spacing: .1em; line-height: 1; padding: 2px 4px 2px 5px; border: 1px solid var(--accent); border-radius: 3px; color: var(--accent); animation: studio3d 3.2s ease-in-out infinite; }
@keyframes studio3d { 0%, 100% { box-shadow: 0 0 0 0 rgba(227,180,111,0); } 50% { box-shadow: 0 0 10px 0 rgba(227,180,111,.35); } }
.card__nav button, .card__nav a { white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .card__3d { animation: none; } }
/* the section menu stays on one line at every width above phones (phones use the menu button) */
@media (min-width: 721px) and (min-height: 561px), (min-width: 901px) {
  .card__nav { flex-wrap: nowrap; column-gap: clamp(10px, 1.25vw, 18px); }
  .card { max-width: none; }
}
@media (min-width: 721px) and (max-width: 1100px) and (min-height: 561px), (min-width: 901px) and (max-width: 1100px) {
  .card { width: max-content; min-width: 100%; }
  .card__nav button, .card__nav a { font-size: 13.5px; }
}
