/* ============================================
   YOUR NAME — Portfolio
   Theme: dark / cinematic / editorial
   ============================================ */

:root {
  --bg: #0a0a0a;
  --bg-2: #131313;
  --bg-3: #1c1c1c;
  --fg: #f3f1ec;
  --fg-muted: #888782;
  --fg-dim: #56554f;
  --line: rgba(243, 241, 236, 0.1);
  --line-strong: rgba(243, 241, 236, 0.2);
  --accent: #ff4d2d;
  --live: #5ee08c;

  /* One clean grotesque everywhere — the refined, minimal type discipline of
     felicityingram.com (Helvetica Neue, no serif/mono mix). */
  --font-display: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-body: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: "Helvetica Neue", Helvetica, Arial, sans-serif;

  --pad: clamp(20px, 4vw, 56px);
  --max: 1680px;

  --ease: cubic-bezier(0.65, 0.05, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
*::selection { background: var(--fg); color: var(--bg); }

html { scroll-behavior: auto; }
html, body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body { overflow-x: hidden; }

a { color: inherit; text-decoration: none; }
img, video, iframe { display: block; max-width: 100%; }
button { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; }
ul { list-style: none; }
em {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
}

/* ===== Custom cursor ===== */
.cursor {
  position: fixed;
  top: 0; left: 0;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--fg);
  pointer-events: none;
  mix-blend-mode: difference;
  transform: translate(-50%, -50%);
  transition: width 0.3s var(--ease-out), height 0.3s var(--ease-out), background 0.3s;
  z-index: 9999;
}
.cursor.is-hover { width: 56px; height: 56px; }
.cursor.is-play  { width: 96px; height: 96px; background: var(--accent); mix-blend-mode: normal; }
.cursor.is-play::after {
  content: "PLAY";
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--bg);
}
@media (hover: none) { .cursor { display: none; } }

/* ===== Loader ===== */
.loader {
  position: fixed; inset: 0;
  background: var(--bg);
  display: grid; place-items: center;
  z-index: 1000;
  transition: opacity 0.8s var(--ease), visibility 0.8s;
}
.loader.is-done { opacity: 0; visibility: hidden; }
.loader__inner { text-align: center; }
.loader__name {
  display: block;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(48px, 8vw, 120px);
  letter-spacing: -0.03em;
  line-height: 1;
}
.loader__bar {
  width: clamp(180px, 30vw, 340px);
  height: 1px;
  background: var(--line);
  margin: 28px auto 14px;
  overflow: hidden;
}
.loader__bar span {
  display: block;
  height: 100%; width: 0%;
  background: var(--fg);
  transition: width 0.2s linear;
}
.loader__count {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--fg-muted);
}
.loader__count i { font-style: normal; margin-left: 2px; }

/* ===== Nav ===== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  padding: 22px var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 50;
  mix-blend-mode: difference;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.nav__logo { display: inline-flex; align-items: center; gap: 10px; }
.nav__dot {
  width: 8px; height: 8px;
  background: var(--fg);
  border-radius: 50%;
  display: inline-block;
}
.nav__menu { display: flex; gap: 28px; }
.nav__menu a { position: relative; }
.nav__menu a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -4px;
  width: 0; height: 1px;
  background: var(--fg);
  transition: width 0.4s var(--ease-out);
}
.nav__menu a:hover::after { width: 100%; }
.nav__cta { display: inline-flex; align-items: center; gap: 8px; }
.nav__cta i { font-style: normal; transition: transform 0.3s var(--ease-out); }
.nav__cta:hover i { transform: translate(4px, -4px); }

@media (max-width: 720px) {
  .nav__menu { display: none; }
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  padding: 140px var(--pad) 60px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hero__eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--fg-muted);
  display: inline-block;
}
.dot.live {
  background: var(--live);
  box-shadow: 0 0 0 0 rgba(94, 224, 140, 0.6);
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0   rgba(94, 224, 140, 0.6); }
  70%  { box-shadow: 0 0 0 12px rgba(94, 224, 140, 0); }
  100% { box-shadow: 0 0 0 0   rgba(94, 224, 140, 0); }
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(56px, 11vw, 180px);
  line-height: 0.92;
  letter-spacing: -0.035em;
  margin-top: 8vh;
}
.hero__title .line { display: block; overflow: hidden; }
.hero__title .line > span { display: block; will-change: transform; }

.hero__bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  margin-top: 6vh;
}
.hero__sub {
  max-width: 460px;
  font-size: clamp(15px, 1.15vw, 18px);
  line-height: 1.5;
  color: var(--fg-muted);
}
.hero__scroll {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.hero__line {
  display: inline-block;
  width: 50px; height: 1px;
  background: var(--fg-muted);
  position: relative;
  overflow: hidden;
}
.hero__line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--fg);
  transform: translateX(-100%);
  animation: slide 2.4s var(--ease) infinite;
}
@keyframes slide {
  0%   { transform: translateX(-100%); }
  50%  { transform: translateX(0%); }
  100% { transform: translateX(100%); }
}

.hero__reel {
  position: absolute;
  right: var(--pad);
  top: 50%;
  transform: translateY(-50%);
  width: 140px; height: 140px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  display: grid; place-items: center;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg);
  transition: background 0.4s, color 0.4s;
}
.hero__reel i {
  display: block;
  font-style: normal;
  color: var(--fg-muted);
  margin-top: 4px;
}
.hero__reel:hover { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.hero__reel:hover i { color: var(--bg); }
@media (max-width: 900px) { .hero__reel { display: none; } }

/* ===== Marquee ===== */
.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 22px 0;
}
.marquee__track {
  display: inline-flex;
  align-items: center;
  gap: 40px;
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 56px);
  font-style: italic;
  white-space: nowrap;
  animation: marquee 30s linear infinite;
}
.marquee__track i { color: var(--accent); font-style: normal; }
@keyframes marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ===== Sections ===== */
section { padding: clamp(80px, 12vh, 160px) var(--pad); }
.section__head { margin-bottom: 60px; }
.section__eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 18px;
}
.section__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(40px, 6vw, 88px);
  line-height: 1;
  letter-spacing: -0.025em;
}

/* ===== Filters ===== */
.filters {
  margin-top: 28px;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}
.filter {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--fg-muted);
  transition: all 0.3s var(--ease-out);
}
.filter:hover { color: var(--fg); border-color: var(--line-strong); }
.filter.is-active {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

/* ===== Section head — editorial variant ===== */
.section__head--editorial {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: end;
  margin-bottom: 64px;
}
@media (max-width: 720px) {
  .section__head--editorial { grid-template-columns: 1fr; align-items: start; }
}

/* ===== Work grid — Bernotat editorial 2-col ===== */
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 64px clamp(24px, 3vw, 48px);
}
@media (max-width: 900px) {
  .work-grid { grid-template-columns: 1fr; gap: 48px; }
}

.card {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.card__media {
  position: relative;
  aspect-ratio: 1920 / 1200;       /* match Bernotat preview ratio */
  background: var(--bg-2);
  overflow: hidden;
  border-radius: 0;
}
.card__media img,
.card__media > video {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: opacity 0.5s var(--ease-out), transform 0.9s var(--ease-out);
}
.card__media .card__hover-video {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}
.card:hover .card__media .card__hover-video {
  opacity: 1;
}
.card:hover .card__media img {
  opacity: 0;                       /* fade poster out while hover video plays */
}

/* Editorial caption — CLIENT label above TITLE */
.card__caption {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.card__client {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.card__title {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(20px, 1.6vw, 26px);
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--fg);
}
.card__meta-line {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--fg-muted);
}
/* Index number, small mono in top corner */
.card__num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-dim);
  letter-spacing: 0.08em;
}

/* ===== Catalog list — same editorial language, list orientation ===== */
.catalog__lede {
  margin-top: 18px;
  max-width: 56ch;
  font-size: clamp(15px, 1.05vw, 17px);
  color: var(--fg-muted);
  line-height: 1.55;
}
.catalog__inquire {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: all 0.3s var(--ease-out);
  white-space: nowrap;
}
.catalog__inquire i { font-style: normal; transition: transform 0.3s var(--ease-out); }
.catalog__inquire:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.catalog__inquire:hover i { transform: translate(4px, -4px); }

.catalog-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}
.lecture-row {
  display: grid;
  grid-template-columns: 64px 1.4fr 1fr 220px 48px;
  align-items: center;
  gap: 32px;
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: padding 0.3s var(--ease-out), background 0.3s var(--ease-out);
}
.lecture-row:hover { padding-left: 16px; padding-right: 16px; background: rgba(255,255,255,0.02); }

.lecture-row__num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-dim);
  letter-spacing: 0.08em;
}
.lecture-row__title {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(20px, 1.8vw, 28px);
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--fg);
}
.lecture-row__title em {
  font-family: var(--font-display);
  font-style: italic;
}
.lecture-row__tag {
  display: block;
  margin-top: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--fg-muted);
  letter-spacing: 0;
  text-transform: none;
}
.lecture-row__meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--fg-muted);
  text-transform: uppercase;
  line-height: 1.6;
}
.lecture-row__audience {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--fg-muted);
  line-height: 1.4;
}
.lecture-row__arrow {
  justify-self: end;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  display: grid; place-items: center;
  font-size: 14px;
  transition: all 0.3s var(--ease-out);
}
.lecture-row:hover .lecture-row__arrow {
  background: var(--fg); color: var(--bg); border-color: var(--fg);
  transform: translate(3px, -3px);
}

@media (max-width: 900px) {
  .lecture-row {
    grid-template-columns: 48px 1fr 36px;
    grid-template-rows: auto auto;
    row-gap: 12px;
    padding: 24px 0;
  }
  .lecture-row__meta,
  .lecture-row__audience {
    grid-column: 2 / 3;
    font-size: 12px;
  }
  .lecture-row__arrow { grid-row: 1 / 3; align-self: center; }
}

/* ===== About ===== */
.about__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(40px, 6vw, 96px);
}
@media (max-width: 900px) { .about__grid { grid-template-columns: 1fr; } }
.about__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(28px, 3.4vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 32px;
}
.about__bio p {
  margin-top: 20px;
  font-size: clamp(15px, 1.1vw, 17px);
  color: var(--fg-muted);
  max-width: 56ch;
}
.about__side { display: flex; flex-direction: column; gap: 24px; }
.about__card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg-2);
}
.card__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 12px;
}
.about__card ul { display: flex; flex-direction: column; gap: 6px; color: var(--fg-muted); font-size: 14px; }

/* ===== CV ===== */
.cv__block { margin-top: 60px; }
.cv__block h3 {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-muted);
  font-weight: 500;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}
.cv__list { display: flex; flex-direction: column; }
.cv__list li {
  display: grid;
  grid-template-columns: 180px 1fr 1fr;
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.cv__year {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--fg-muted);
}
.cv__role { font-family: var(--font-display); font-size: clamp(20px, 2vw, 26px); letter-spacing: -0.01em; }
.cv__org  { color: var(--fg-muted); font-size: 14px; text-align: right; }
@media (max-width: 720px) {
  .cv__list li { grid-template-columns: 1fr; gap: 4px; }
  .cv__org { text-align: left; }
}
.cv__tags { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 12px; }
.cv__tags li {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--fg-muted);
}

/* ===== Contact ===== */
.contact { text-align: left; }
.contact__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(48px, 9vw, 152px);
  line-height: 1;
  letter-spacing: -0.03em;
  margin-top: 20px;
}
.contact__email {
  display: inline-block;
  margin-top: 60px;
  font-family: var(--font-display);
  font-size: clamp(28px, 3.4vw, 56px);
  font-style: italic;
  letter-spacing: -0.02em;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 6px;
  transition: color 0.3s, border-color 0.3s;
}
.contact__email:hover { color: var(--accent); border-color: var(--accent); }
.contact__list {
  margin-top: 80px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
}
@media (max-width: 720px) { .contact__list { grid-template-columns: 1fr; } }
.contact__list li {
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.contact__list li:nth-child(odd) { padding-right: 24px; }
.contact__list li:nth-child(even) { padding-left: 24px; border-left: 1px solid var(--line); }
@media (max-width: 720px) {
  .contact__list li:nth-child(even) { padding-left: 0; border-left: 0; }
}
.contact__list span {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.contact__list a { font-family: var(--font-display); font-size: 20px; letter-spacing: -0.01em; }

/* ===== Footer ===== */
.footer {
  padding: 28px var(--pad);
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.footer > div { display: inline-flex; align-items: center; gap: 10px; }
@media (max-width: 720px) {
  .footer { flex-direction: column; align-items: flex-start; }
}

/* ===== Modal ===== */
.modal {
  position: fixed; inset: 0;
  z-index: 200;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.5s var(--ease), visibility 0.5s;
}
.modal.is-open { visibility: visible; opacity: 1; }
.modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(20px);
}
.modal__close {
  position: fixed;
  top: 24px; right: var(--pad);
  z-index: 210;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 12px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(20, 20, 20, 0.6);
  backdrop-filter: blur(8px);
}
.modal__close:hover { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.modal__scroll {
  position: absolute; inset: 0;
  overflow-y: auto;
  padding: 80px var(--pad);
}
.modal__inner {
  max-width: 1200px;
  margin: 0 auto;
}
.modal__media {
  width: 100%;
  background: var(--bg-2);
  border-radius: 4px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}
.modal__media iframe,
.modal__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  border: 0;
}
.modal__media video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
  object-fit: contain;     /* preserve original aspect, letterbox if needed */
  outline: none;
}

/* Wide media facade clips (e.g. 2560×640, 3200×960) */
.modal__media.is-wide {
  aspect-ratio: auto;       /* inline style sets the exact ratio */
  background: #000;
  max-height: 80vh;
}
.modal__media.is-wide video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Native-video state — taller cinematic ratio when source is 4:3 / square */
.modal__media.is-native { aspect-ratio: 16 / 9; }
/* Modal — editorial project page (Bernotat-style) */
.modal__header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 32px;
}
.modal__header .modal__client {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.modal__header h2 {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(36px, 4.4vw, 64px);
  letter-spacing: -0.02em;
  line-height: 1.02;
  color: var(--fg);
}
.modal__header h2 em {
  font-family: var(--font-display);
  font-style: italic;
}

.modal__info {
  margin-top: 48px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(40px, 5vw, 80px);
}
@media (max-width: 720px) { .modal__info { grid-template-columns: 1fr; } }
.modal__cat {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.modal__body p {
  margin-top: 0;
  color: var(--fg);
  font-size: clamp(15px, 1.05vw, 17px);
  line-height: 1.55;
  max-width: 56ch;
}
.modal__body p + p { margin-top: 16px; }

.modal__credits {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px 28px;
  font-size: 14px;
  align-content: start;
}
.modal__credits dt {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.modal__credits dd { color: var(--fg); font-size: 14px; line-height: 1.5; }
.modal__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  padding: 14px 22px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: all 0.3s;
}
.modal__link:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }

/* ===== Card placeholders / stub state ===== */
.card.is-stub .card__media {
  background: linear-gradient(135deg, var(--bg-2), var(--bg-3));
}
.card__placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  text-align: center;
  background: linear-gradient(135deg, var(--bg-2), var(--bg-3));
  color: var(--fg-muted);
}
.card__placeholder em {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.4vw, 32px);
  font-style: italic;
  letter-spacing: -0.02em;
  color: var(--fg);
  max-width: 80%;
  line-height: 1.05;
}

/* Modal stub state */
.modal__media.is-stub { aspect-ratio: 16 / 9; display: grid; place-items: center; padding: 60px; }
.modal__stub { text-align: center; max-width: 540px; color: var(--fg-muted); }
.modal__stub em {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(40px, 5vw, 72px);
  font-style: italic;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin-bottom: 16px;
}
.modal__stub code {
  background: var(--bg-3);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.85em;
}

/* Modal link variants */
.modal__link + .modal__link { margin-left: 8px; }
.modal__link--ghost { background: transparent; }

/* ===== Lecture modal — editorial catalog page ===== */
.modal__lecture-header {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
}
.modal__lecture-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.modal__lecture-title {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(36px, 4.4vw, 64px);
  letter-spacing: -0.025em;
  line-height: 1.02;
  color: var(--fg);
}
.modal__lecture-title em {
  font-family: var(--font-display);
  font-style: italic;
}
.modal__lecture-tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(18px, 1.6vw, 24px);
  color: var(--fg-muted);
  letter-spacing: -0.01em;
  line-height: 1.3;
  max-width: 56ch;
}

.modal__lecture-meta {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px 24px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
}
@media (max-width: 720px) { .modal__lecture-meta { grid-template-columns: repeat(2, 1fr); } }
.modal__lecture-meta dt {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 6px;
}
.modal__lecture-meta dd { font-family: var(--font-body); font-size: 14px; color: var(--fg); line-height: 1.4; }

.modal__lecture-block {
  margin-top: 40px;
}
.modal__lecture-block h3 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-muted);
  font-weight: 500;
  margin-bottom: 20px;
}

.modal__lecture-anchor {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.6;
  padding: 16px 20px;
  background: var(--bg-2);
  border-left: 2px solid var(--accent);
  border-radius: 0 4px 4px 0;
}

.modal__lecture-goals {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.modal__lecture-goals li {
  font-family: var(--font-body);
  font-size: clamp(15px, 1.05vw, 16px);
  color: var(--fg);
  line-height: 1.5;
  padding-left: 28px;
  position: relative;
}
.modal__lecture-goals li::before {
  content: "→";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent);
  font-family: var(--font-mono);
}

.modal__lecture-curriculum {
  display: flex;
  flex-direction: column;
}
.modal__lecture-curriculum li {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 24px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.modal__lecture-curriculum li:last-child { border-bottom: 1px solid var(--line); }
.modal__lecture-curriculum .cur__time {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--fg-muted);
  padding-top: 2px;
}
.modal__lecture-curriculum .cur__topic {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--fg);
  line-height: 1.45;
}
.modal__lecture-curriculum .cur__detail {
  display: block;
  margin-top: 4px;
  color: var(--fg-muted);
  font-size: 13px;
}

.modal__lecture-cta {
  margin-top: 48px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.modal__lecture-cta a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: all 0.3s var(--ease-out);
}
.modal__lecture-cta a.is-primary { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.modal__lecture-cta a:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.modal__lecture-cta a.is-primary:hover { filter: brightness(1.1); }

/* ===== Work — extruded video slab viewer (room3d.js) ===== */
.work__hint {
  justify-self: end;
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-muted);
  line-height: 1.5;
}
@media (max-width: 720px) {
  .work__hint { justify-self: start; text-align: left; }
}

/* ===== Viewer-only mode: white void, everything but the video viewer hidden ===== */
body.viewer-only { background: #fff; color: #000; }
body.viewer-only .loader,
body.viewer-only .cursor,
body.viewer-only .nav,
body.viewer-only .hero,
body.viewer-only .marquee,
body.viewer-only .catalog,
body.viewer-only .about,
body.viewer-only .cv,
body.viewer-only .contact,
body.viewer-only .footer,
body.viewer-only .work .section__head { display: none !important; }
body.viewer-only .work { margin: 0; padding: 0; }
body.viewer-only .room3d {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  margin: 0;
  border: 0;
  z-index: 1;
}
body.viewer-only .room3d__fallback button span { color: #000; }
body.viewer-only .room3d__fallback button i { color: #666; }
/* Soft white scrims so the felicityingram-style black text stays legible over video */
body.viewer-only .room3d::before,
body.viewer-only .room3d::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  z-index: 2;
  pointer-events: none;
  box-shadow: none;
}
body.viewer-only .room3d::before {
  top: 0; height: 26%;
  background: linear-gradient(180deg, rgba(255,255,255,0.5), rgba(255,255,255,0));
}
body.viewer-only .room3d::after {
  bottom: 0; height: 42%;
  background: linear-gradient(0deg, rgba(255,255,255,0.62), rgba(255,255,255,0));
}

.room3d {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);   /* full-bleed out of the padded section */
  height: clamp(600px, 88vh, 1060px);
  background: #fff;
  overflow: hidden;
  touch-action: pan-y;
}
.room3d__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: pan-y;
  cursor: default;
}
.room3d.is-curled .room3d__canvas { cursor: grab; }
.room3d.is-curled .room3d__canvas:active { cursor: grabbing; }

/* Top bar: wordmark (left) + Archive button (right) — mahferraz-minimal */
.rv__top {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px clamp(14px, 1.6vw, 22px);   /* matches the archive top bar */
  pointer-events: none;
}
.rv__brand, .rv__tool, .rv__archive-btn { pointer-events: auto; color: #000; }
.rv__tools {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.6vw, 22px);
  pointer-events: none;
}
.rv__tool {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.01em;
  transition: opacity 0.25s;
}
.rv__tool:hover { opacity: 0.55; }
.rv__brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;                    /* same as the archive's SANEI */
  letter-spacing: 0;
}
.rv__lead {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 30px);
  pointer-events: none;
}
.rv__viz {
  display: flex;
  align-items: center;
  gap: clamp(9px, 1.2vw, 16px);
  pointer-events: none;
}
.rv__vizbtn {                          /* visualization switcher — one label per method */
  pointer-events: auto;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #000;
  opacity: 0.38;
  transition: opacity 0.25s;
}
.rv__vizbtn:hover { opacity: 0.7; }
.rv__vizbtn.is-on { opacity: 1; }

/* Lens turret — radial effect switcher (replaces the top-left tabs) */
.rv__viz { display: none; }
.rv-dial { position: fixed; right: 30px; bottom: 30px; width: 132px; height: 132px; z-index: 50; color: #000; pointer-events: none; }
body.viewer-dark .rv-dial { color: #fff; }
.rv-dial__ring { position: absolute; inset: 5px; border-radius: 50%; border: 0.5px solid currentColor; opacity: 0.22; pointer-events: none; }
.rv-dial__name { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 0 30px; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.82; pointer-events: none; }
.rv-dial__dot { position: absolute; width: 8px; height: 8px; margin: -4px 0 0 -4px; padding: 0; border: 0; border-radius: 50%; background: currentColor; opacity: 0.3; cursor: pointer; pointer-events: auto; transition: opacity 0.25s, transform 0.25s; }
.rv-dial__dot:hover { opacity: 0.8; transform: scale(1.4); }
.rv-dial__dot.is-on { opacity: 1; transform: scale(1.6); }
.rv__archive-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.01em;
  transition: opacity 0.25s;
}
.rv__archive-btn i { font-style: normal; }
.rv__archive-btn:hover { opacity: 0.55; }

/* Active-work info — centred over the video (felicityingram treatment).
   Title and meta share one size; only weight separates them. */
.rv__info {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 5;
  max-width: min(86%, 760px);
  pointer-events: none;
}
.rv__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(13px, 1.05vw, 15px);
  line-height: 1.3;
  letter-spacing: 0.005em;
  color: #000;
  word-break: keep-all;
}
.rv__meta {
  margin-top: 3px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(13px, 1.05vw, 15px);
  line-height: 1.3;
  letter-spacing: 0.005em;
  color: #000;
}

/* Thumbnail playbar (bottom, mahferraz) — poster tiles, drag/click to scrub.
   Each tile grows on hover; a progress fill sweeps the active tile. */
.rv__bar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 6;
  padding-top: clamp(18px, 3vh, 32px);
  cursor: pointer;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  background: linear-gradient(0deg, rgba(255,255,255,0.55), rgba(255,255,255,0));
}
.rv__strip {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  padding: 0 2px 2px;
}
.rv__seg {
  position: relative;
  flex: 1 1 0;             /* width ∝ inline flex-grow (= reel duration) */
  min-width: 0;
  height: clamp(36px, 3.8vw, 48px);
  overflow: hidden;
  background: #e9e9e7;
  opacity: 0.5;
  transition: height 0.3s var(--ease-out), opacity 0.3s;
}
.rv__seg-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.rv__seg.is-active { opacity: 1; }
.rv__bar:hover .rv__seg { height: clamp(58px, 6.4vw, 88px); opacity: 0.86; }
.rv__seg:hover { opacity: 1; }
.rv__seg-prog {
  position: absolute;
  left: 0; bottom: 0;
  z-index: 2;
  height: 3px;
  width: 0%;
  background: #000;
  will-change: width;
}
.rv__seg-label {
  position: absolute;
  left: 6px; right: 6px; bottom: 7px;
  z-index: 3;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
  line-height: 1.1;
  color: #fff;
  text-shadow: 0 1px 7px rgba(0, 0, 0, 0.6);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
}
.rv__seg.is-active .rv__seg-label,
.rv__bar:hover .rv__seg-label { opacity: 1; }

/* ===== Archive overlay — brunoarizio-style grid, always WHITE =====
   Opening plays a white-sheet wipe (clip-path top→down), then the grid fades in.
   The archive ignores the viewer's dark theme — it is always white. */
.rv-archive {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: #fff;
  color: #000;
  overflow: hidden;
  visibility: hidden;
  clip-path: inset(0 0 100% 0);                  /* white sheet collapsed at the top */
  transition: clip-path 0.6s var(--ease-out), visibility 0s linear 0.6s;
}
.rv-archive[aria-hidden="false"] {
  visibility: visible;
  clip-path: inset(0 0 0 0);                      /* sheet wipes down to cover */
  transition: clip-path 0.6s var(--ease-out), visibility 0s;
}
.rv-archive__top {
  position: absolute;                /* overlay — the strip uses the full height beneath */
  top: 0; left: 0; right: 0;
  z-index: 5;
  display: flex;
  align-items: flex-start;
  gap: clamp(18px, 3vw, 52px);
  padding: 8px clamp(14px, 1.6vw, 22px) 0;   /* texts hug the top-left edge */
  pointer-events: none;              /* let scroll/hover pass through to the strip below */
}
.rv-archive__top > * { pointer-events: auto; }
.rv-archive__brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  color: #111;
  white-space: nowrap;
}
.rv-archive__navlink {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 13px;
  color: #111;
  white-space: nowrap;
}
.rv-archive__about {
  margin-left: auto;                  /* bio + inquiry pushed to the right */
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: clamp(230px, 26vw, 320px);
}
.rv-archive__bio,
.rv-archive__inquiry {
  margin: 0;
  font-family: var(--font-display);
  font-size: 11px;
  line-height: 1.45;
  color: #9a978f;
}
.rv-archive__inquiry a { color: #111; text-decoration: underline; }
.rv-archive__clock {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: #111;
  white-space: nowrap;
}
.rv-archive__clock::before { content: "● "; font-size: 8px; vertical-align: middle; }
.rv-archive__close {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 13px;
  color: #111;
  white-space: nowrap;
  transition: opacity 0.25s;
}
.rv-archive__close:hover { opacity: 0.55; }
/* brunoarizio.com homepage: a narrow LEFT strip of small thumbnails scrolling as an
   infinite vertical loop; the rest is a BLACK player panel with the active work's
   info overlaid (● title bottom-left, label bottom-right). Fades in after the wipe. */
.rv-archive__body {
  position: absolute;                 /* fills the archive; anchor for the active caption */
  inset: 0;
  display: flex;                      /* strip LEFT, white caption gap, player right */
  opacity: 0;
  transition: opacity 0.45s var(--ease-out) 0.26s;
}
.rv-archive[aria-hidden="false"] .rv-archive__body { opacity: 1; }

/* left strip — the scroll viewport (track is translated inside) */
.rv-archive__strip {
  position: relative;
  flex: 0 0 auto;
  width: clamp(72px, 6.5vw, 92px);         /* smaller thumbnails */
  overflow: hidden;
  padding: clamp(40px, 5vw, 52px) clamp(14px, 1.6vw, 22px) clamp(16px, 3vh, 36px);  /* top clears the SANEI line */
  user-select: none;
  -webkit-user-select: none;
  /* soft fade at the strip edges so scrolling thumbnails don't hard-cut */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 46px, #000 calc(100% - 22px), transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 46px, #000 calc(100% - 22px), transparent 100%);
}
.rv-archive__track {
  display: flex;
  flex-direction: column;
  gap: clamp(40px, 4.5vw, 80px);           /* much more space between thumbnails */
  padding: 0;
  will-change: transform;
}
.rv-arch-item {
  position: relative;
  display: block;
  width: 100%;
  background: none;
  cursor: pointer;
  transform-origin: center;
  will-change: transform, opacity;   /* JS drives scale + opacity per frame (centre focus) */
}
.rv-arch-item__thumb {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;                /* square — object-fit:cover centre-crops out letterbox */
  overflow: hidden;
  background: #ededed;
}
.rv-arch-item__thumb.is-noimg { background: #e4e4e2; }
.rv-arch-item__img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.55s var(--ease-out);   /* hover zoom within the square */
}
.rv-arch-item:hover .rv-arch-item__img { transform: scale(1.06); }

/* active work's caption — sits in the white gap, beside its thumbnail (JS sets top/left) */
.rv-archive__active {
  position: absolute;
  top: 0; left: 140px;
  transform: translateY(-50%);        /* vertical centre aligns with the thumbnail centre */
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: clamp(110px, 12vw, 170px);
  pointer-events: none;
}
.rv-archive__active-t {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 11px;
  line-height: 1.25;
  color: #111;
  word-break: keep-all;
}
.rv-archive__active-m {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 11px;
  line-height: 1.25;
  color: #9a978f;
}

/* right — a black player panel with the active video + info overlay */
.rv-archive__stage {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  margin-left: clamp(180px, 18vw, 280px);   /* roomy white gap for the active caption */
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;                   /* no black panel — sits on white */
  padding: clamp(24px, 3vw, 60px);
}
.rv-archive__frame {
  position: relative;                 /* JS sizes width/height to fit the stage at content ratio */
  overflow: hidden;
}
.rv-archive__player {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;                  /* fills the content-ratio frame → crops baked-in letterbox */
}
.rv-archive__meta {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: clamp(18px, 2.6vw, 40px) clamp(22px, 3.2vw, 52px);
  pointer-events: none;
}
.rv-archive__tag {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: #111;
}
.rv-archive__tag::before { content: "● "; font-size: 9px; vertical-align: middle; }
.rv-archive__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: #9a978f;
  text-align: right;
}
@media (max-width: 720px) {
  .rv-archive__strip { width: clamp(76px, 22vw, 100px); padding: 0 8px; }
  .rv-archive__stage { padding: 16px; }
  .rv-archive__meta { padding: 16px; }
}

/* ===== Detail player — oliverbernotat-style immersive view ===== */
.rv-detail {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: #000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s var(--ease-out), visibility 0.5s;
}
.rv-detail[aria-hidden="false"] { opacity: 1; visibility: visible; }
.rv-detail__video {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  background: #000;
}
.rv-detail__chrome {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.45s var(--ease-out);
}
.rv-detail__chrome > * { pointer-events: auto; }
.rv-detail.is-idle .rv-detail__chrome { opacity: 0; }
.rv-detail__top {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(16px, 2.4vw, 30px) clamp(18px, 3vw, 40px);
}
.rv-detail__brand, .rv-detail__back {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 14px;
  color: #fff;
  transition: opacity 0.25s;
}
.rv-detail__back:hover { opacity: 0.6; }
/* centred minimal bottom (oliverbernotat): title, then a thin scrubber line with
   the time at its left, then centred text controls. */
.rv-detail__bottom {
  position: absolute;
  left: 50%;
  bottom: clamp(22px, 4vh, 48px);
  transform: translateX(-50%);
  width: min(92%, 720px);
  text-align: center;
  color: #fff;
}
.rv-detail__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(20px, 2.2vw, 28px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: #fff;
}
.rv-detail__credit {
  margin-top: 6px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.66);
}
.rv-detail__bar {
  width: 100%;
  margin-top: 18px;
  height: 22px;                       /* tall transparent hit area — easy to grab */
  display: flex;
  align-items: center;
  cursor: pointer;
  touch-action: none;
}
.rv-detail__bar-track {
  position: relative;
  width: 100%;
  height: 1px;                        /* hairline — no thick bar, no circle */
  background: rgba(255, 255, 255, 0.3);
}
.rv-detail__bar-fill {
  position: absolute;
  left: 0; top: 0;
  height: 100%;
  width: 0%;
  background: #fff;
  will-change: width;
}
.rv-detail__bar-time {                /* running time sits IN the line at the playhead */
  position: absolute;
  right: 0; top: 50%;
  transform: translate(50%, -50%);
  padding: 0 8px;
  background: #000;                   /* masks the line so the time breaks into it */
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: #fff;
  white-space: nowrap;
  pointer-events: none;
}
.rv-detail__controls {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
}
.rv-detail__btn {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.02em;
  color: #fff;
  transition: opacity 0.25s;
}
.rv-detail__btn:hover { opacity: 0.6; }

/* Loading / status */
.room3d__status {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  pointer-events: none;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #888;
}

/* No-WebGL fallback — simple list that still opens the modal */
.room3d.is-fallback {
  height: auto;
  background: transparent;
  border: 0;
  overflow: visible;
}
.room3d__fallback { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.room3d__fallback button {
  width: 100%;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  transition: padding 0.3s var(--ease-out), background 0.3s var(--ease-out);
}
.room3d__fallback button:hover { padding-left: 16px; background: rgba(255, 255, 255, 0.02); }
.room3d__fallback button span {
  font-family: var(--font-body);
  font-size: clamp(20px, 1.8vw, 28px);
  color: var(--fg);
}
.room3d__fallback button i {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

/* ===== Dark theme (toggle) — self-contained; delete this whole block to drop it.
   Detail player is black in both themes, so it needs no override here. ===== */
body.viewer-dark.viewer-only { background: #000; color: #fff; }
body.viewer-dark .room3d { background: #000; }
body.viewer-dark.viewer-only .room3d::before {
  background: linear-gradient(180deg, rgba(0,0,0,0.5), rgba(0,0,0,0));
}
body.viewer-dark.viewer-only .room3d::after {
  background: linear-gradient(0deg, rgba(0,0,0,0.66), rgba(0,0,0,0));
}
body.viewer-dark .rv__brand,
body.viewer-dark .rv__tool,
body.viewer-dark .rv__archive-btn,
body.viewer-dark .rv__vizbtn,
body.viewer-dark .rv__title,
body.viewer-dark .rv__meta { color: #fff; }
body.viewer-dark .rv__bar { background: linear-gradient(0deg, rgba(0,0,0,0.6), rgba(0,0,0,0)); }
body.viewer-dark .rv__seg { background: #1b1b1b; }
body.viewer-dark .rv__seg-prog { background: #fff; }
body.viewer-dark .room3d__fallback button span { color: #fff; }
/* the archive has no dark override — it is always white (per the brief) */

@media (max-width: 720px) {
  .room3d { height: clamp(460px, 76vh, 680px); }
  .rv__info { max-width: 90%; }
  .rv__seg { height: clamp(30px, 8vw, 42px); }
  .rv__bar:hover .rv__seg,
  .rv__seg.is-active { height: clamp(44px, 12vw, 64px); }
  .rv-detail__title { font-size: clamp(20px, 6vw, 26px); }
}

/* ===== Reveal animations ===== */
.reveal { opacity: 0; transform: translateY(40px); }
