/* ---------- NUMERAL SIZE FIX ---------- */
/* IMFellEnglish renders old-style numerals at roughly x-height.
   .num boosts them so they sit visually level with the surrounding caps. */
.num {
  font-size: 1.20em;
  line-height: 1;
}

/* ---------- FONTS ---------- */

@font-face {
  font-family: 'Nosferatu';
  src: url('../fonts/nosferatu/NO.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'IMFellEnglish';
  src: url('../fonts/IM_Fell_English/IMFellEnglish-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --roller-slot: 82px;
  --theme-slot: 200px;
  --panel-bg: rgba(5, 6, 8, 0.38);
  --panel-border: rgba(255,255,255,0.09);
  --text-soft: rgba(255,255,255,0.70);
  --bg-dark: #050608;
  --bg-mid: #091018;
  --link-bg: rgba(255,255,255,0.06);
  --link-border: rgba(255,255,255,0.13);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: 'IMFellEnglish', Georgia, "Times New Roman", serif;
  color: white;
  background: var(--bg-dark);
  overflow-x: hidden;
}

body {
  position: relative;
}

/* ---------- HEADINGS ---------- */

.site-title,
.panel-title,
.year-title,
.content-box h1 {
  font-family: 'Nosferatu', serif;
  letter-spacing: 0.03em;
}

/* ---------- STUDIO BACKGROUND ---------- */

#bg {
  position: fixed;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: opacity 1s ease, transform 0.5s ease;
  z-index: 0;
}

#bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.24), rgba(0,0,0,0.58)),
    radial-gradient(circle at 70% 35%, rgba(255,255,255,0.06), transparent 25%);
}

/* ---------- SHARED PAGE LAYOUT ---------- */

.page,
.year-page {
  position: relative;
  z-index: 2;
  min-height: 100vh;
}

/* ---------- STUDIO PAGE ---------- */

.page {
  padding: 22px 22px 120px 190px; /* bottom pad keeps content above fixed theme rail */
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.site-title {
  font-size: clamp(2.2rem, 5vw, 5rem);
  line-height: 0.95;
  margin: 0;
  font-weight: 400;
  text-shadow: 0 2px 4px rgba(0,0,0,0.9), 0 8px 28px rgba(0,0,0,0.6);
}

.tagline {
  margin-top: 8px;
  font-size: 1.5rem;
  color: var(--text-soft);
}

.studio-link,
.nav-link,
.button {
  display: inline-block;
  text-decoration: none;
  border-radius: 999px;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.studio-link,
.nav-link {
  color: rgba(255,255,255,0.86);
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.08);
  padding: 10px 16px;
  white-space: nowrap;
}

@media (hover: hover) {
  .studio-link:hover,
  .nav-link:hover,
  .button:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.28);
    transform: translateY(-1px);
  }
}

/* ---------- LEFT RAIL (fixed sidebar) ---------- */

.left-rail {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 168px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  z-index: 3;
  padding: 20px 18px;
}

.roller {
  position: relative;
  width: 132px;
  height: calc(var(--roller-slot) * 3);
  overflow: hidden;
  border-radius: 18px;
  background: rgba(0,0,0,0.28);
  border: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(8px);
  touch-action: none;
  flex-shrink: 0;
  -webkit-user-select: none;
  user-select: none;
}

/* ---------- SIDE NAV ---------- */

.side-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 100%;
}

.side-nav > a {
  display: block;
  text-align: center;
  text-decoration: none;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(255,255,255,0.48);
  padding: 5px 6px;
  transition: color 0.22s ease;
  text-shadow: 0 1px 6px rgba(0,0,0,0.9);
  white-space: nowrap;
}

@media (hover: hover) {
  .side-nav > a:hover {
    color: rgba(255,255,255,0.86);
  }
}

.side-socials {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 6px;
}

.side-socials a {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.32);
  text-decoration: none;
  transition: color 0.22s ease;
  text-shadow: 0 1px 6px rgba(0,0,0,0.9);
}

@media (hover: hover) {
  .side-socials a:hover {
    color: rgba(255,255,255,0.72);
  }
}

.side-socials a img {
  display: block;
  width: 20px;
  height: 20px;
  opacity: 0.45;
  transition: opacity 0.22s ease;
}

@media (hover: hover) {
  .side-socials a:hover img {
    opacity: 1;
  }
}

/* ---------- INLINE TEXT LINKS (year pages) ---------- */
/* Targets bare <a> tags with no class — inline body links only.
   Nav/button links all have classes and are unaffected. */

.studio-page a:not([class]) {
  color: rgba(238, 216, 173, 0.64);
  text-decoration: none;
  transition: color 0.2s;
}

@media (hover: hover) {
  .studio-page a:not([class]):hover {
    color: rgba(255, 230, 170, 0.85);
  }
}

/* Left rail nav keeps its own white styling */
.studio-page .side-nav > a:not([class]) {
  color: rgba(255,255,255,0.48);
}
@media (hover: hover) {
  .studio-page .side-nav > a:not([class]):hover {
    color: rgba(255,255,255,0.86);
  }
}

/* ---------- IMAGE CAPTION ---------- */
.img-caption {
  font-family: 'IMFellEnglish', Georgia, serif;
  font-size: 0.83rem;
  font-style: italic;
  color: rgba(255,255,255,0.40);
  letter-spacing: 0.02em;
  margin: 5px 0 20px;
  line-height: 1.5;
}
.img-caption a, .about-caption a {
  color: rgba(255,255,255,0.55);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---------- YEAR PREV / NEXT NAVIGATION ---------- */
.year-nav-prev,
.year-nav-next {
  position: fixed;
  top: 290px;
  z-index: 4;
  font-family: 'IMFellEnglish', Georgia, serif;
  font-size: 0.68rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.42);
  text-decoration: none;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.13);
  backdrop-filter: blur(6px);
  padding: 16px 7px;
  writing-mode: vertical-rl;
  white-space: nowrap;
  transition: color 0.22s, background 0.22s, border-color 0.22s;
}
.year-nav-prev {
  left: 0;
  border-radius: 0 6px 6px 0;
  transform: rotate(180deg);
}
.year-nav-next {
  right: 0;
  border-radius: 6px 0 0 6px;
}
@media (hover: hover) {
  .year-nav-prev:hover,
  .year-nav-next:hover {
    color: rgba(255,255,255,0.82);
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,220,120,0.30);
  }
}
.ynav-label {
  font-size: 0.62rem;
  opacity: 0.75;
  display: inline;
}
.ynav-date {
  font-family: 'Nosferatu', serif;
  font-size: 1.5rem;
  line-height: 1;
  display: inline;
}

/* ---------- SITE HEADER (mobile-only title strip) ---------- */
/* Hidden on desktop — .topbar inside .page handles the title there. */

.site-header {
  display: none;
  position: relative;
  z-index: 4;
  text-align: center;
  padding: 14px 16px 8px;
  background: linear-gradient(180deg, rgba(0,0,0,0.55), transparent);
}

.site-header .site-title {
  font-size: clamp(1.3rem, 6vw, 2rem);
  margin: 0;
}

.site-header .tagline {
  font-size: 0.78rem;
  margin-top: 4px;
}

.site-header .home-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

/* ---------- ROLLER WRAP + PREV / NEXT BUTTONS ---------- */

.roller-wrap {
  display: contents; /* transparent on desktop — rail lays out roller directly */
}

.roll-btn {
  display: none; /* hidden on desktop */
}

.roller::before,
.roller::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 54px;
  z-index: 2;
  pointer-events: none;
}

.roller::before {
  top: 0;
  background: linear-gradient(180deg, rgba(5,6,8,0.95), rgba(5,6,8,0));
}

.roller::after {
  bottom: 0;
  background: linear-gradient(0deg, rgba(5,6,8,0.95), rgba(5,6,8,0));
}

.track {
  position: absolute;
  left: 0;
  right: 0;
  top: var(--roller-slot);
  transition: transform 1.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.year {
  height: var(--roller-slot);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.22;
  filter: blur(2px);
  transform: scale(0.92);
  transition: all 0.9s ease;
  cursor: pointer;
  padding: 0 10px;
}

.year img {
  width: 96px;
  height: 58px;
  object-fit: contain;
  display: block;
  pointer-events: none;
}

.year.active {
  opacity: 1;
  filter: blur(0);
  transform: scale(1.03);
}

.main-grid {
  display: grid;
  grid-template-columns: minmax(220px, 480px);
  gap: 14px;
  align-items: start;
}

.panel {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  backdrop-filter: blur(3px);
}

.info-panel {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 6px;
  min-height: 0;
  /* Clear — no panel shading */
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 8px;
  text-shadow: 0 1px 6px rgba(0,0,0,0.9);
}

.year-label {
  font-size: 0.9rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-bottom: 10px;
  text-shadow: 0 1px 6px rgba(0,0,0,0.9);
}

.panel-title,
.year-title {
  font-size: clamp(1.4rem, 2.2vw, 2.4rem);
  line-height: 1.0;
  margin: 0 0 10px;
  font-weight: 400;
}

.panel-text,
.year-intro,
.content-box p {
  color: var(--text-soft);
  font-size: 0.92rem;
  line-height: 1.7;
  text-shadow: 0 1px 6px rgba(0,0,0,0.85);
}

.panel-actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.button {
  padding: 11px 16px;
  border: 1px solid rgba(255,255,255,0.16);
  color: white;
  background: rgba(255,255,255,0.08);
}

.button.primary {
  background: rgba(255,255,255,0.92);
  color: #0d0f13;
}

.feature-panel {
  /* No panel styling — floats clear over the background */
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  overflow: visible;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end; /* everything right-justified */
}

.feature-image-wrap {
  position: relative;
  width: 200px;
  height: auto;
  background: none;
  flex-shrink: 0;
}

.feature-image {
  width: 200px;
  height: auto;   /* full painting, no crop */
  min-height: 0;
  display: block;
  transition: opacity 0.8s ease;
}

.feature-caption {
  width: 200px;
  padding: 8px 0 0;
  border-top: none;
  text-align: right; /* right-justified */
  background: transparent;
}

.feature-caption h3 {
  margin: 0 0 3px;
  font-size: 0.72rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: rgba(255,255,255,0.6);
  text-shadow: 0 1px 6px rgba(0,0,0,0.9);
}

.content-box h2 {
  margin: 0 0 6px;
  font-size: 1.3rem;
  font-weight: 400;
}

.feature-caption p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.5;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-shadow: 0 1px 6px rgba(0,0,0,0.9);
}

/* ---------- THEME RAIL (horizontal, fixed bottom) ---------- */

.theme-rail {
  position: fixed;
  bottom: 0;
  left: 160px;
  right: 0;
  display: flex;
  align-items: center;
  padding: 14px 16px 18px;
  background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.60));
  z-index: 2;
}

.theme-roller {
  overflow: hidden;
  width: calc(var(--theme-slot) * 3);
  flex-shrink: 0;
  margin: 0 auto;
}

.theme-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.theme-slot {
  width: var(--theme-slot);
  flex-shrink: 0;
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.07);
  background: rgba(5,6,8,0.42);
  margin: 0 4px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
  color: rgba(255,255,255,0.72);
  transition: opacity 0.4s, filter 0.4s, border-color 0.3s;
  user-select: none;
}

.theme-slot.active {
  border-color: rgba(255,220,120,0.45);
  color: #fff;
}

.theme-slot.dimmed,
.year.dimmed {
  opacity: 0.28;
  filter: grayscale(40%);
  transition: opacity 0.4s, filter 0.4s;
}

.theme-btn {
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.72);
  font-size: 1.8rem;
  line-height: 1;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
  touch-action: manipulation;
}

@media (hover: hover) {
  .theme-btn:hover {
    background: rgba(255,255,255,0.14);
    color: #fff;
  }
}
.theme-btn:active {
  background: rgba(255,255,255,0.14);
  color: #fff;
}

.mobile-roller-buttons {
  display: none;
}

.mobile-roller-buttons button {
  background: rgba(255,255,255,0.08);
  color: white;
  border: 1px solid rgba(255,255,255,0.16);
  padding: 10px 14px;
  border-radius: 999px;
  font: inherit;
}

/* ---------- YEAR TEMPLATE PAGES ---------- */

.year-page {
  padding: 28px 22px 40px;
  background:
    radial-gradient(circle at 20% 18%, rgba(42, 98, 144, 0.18), transparent 28%),
    radial-gradient(circle at 72% 20%, rgba(194, 153, 78, 0.12), transparent 24%),
    linear-gradient(180deg, #06080b 0%, #091018 44%, #05070a 100%);
}

.year-page.has-bg {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.year-page-overlay {
  min-height: calc(100vh - 56px);
  background: linear-gradient(180deg, rgba(0,0,0,0.24), rgba(0,0,0,0.58));
  border-radius: 28px;
  padding: 12px 0 0;
}

.year-shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 10px;
}

.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 38px;
}

.nav-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.year-title {
  font-size: clamp(2.6rem, 7vw, 6rem);
  line-height: 0.94;
  margin: 0 0 18px;
  text-shadow: 0 12px 34px rgba(0,0,0,0.35);
}

.year-intro {
  max-width: 42rem;
  margin-bottom: 34px;
}

.content-box {
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  border-radius: 28px;
  padding: 24px;
  box-shadow: 0 24px 70px rgba(0,0,0,0.28);
  backdrop-filter: blur(8px);
}

.placeholder-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.placeholder-card {
  min-height: 220px;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  display: flex;
  align-items: flex-end;
  padding: 16px;
  color: rgba(255,255,255,0.78);
  background-size: cover;
  background-position: center;
  overflow: hidden;
  position: relative;
}

.placeholder-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.65));
}

.placeholder-card span {
  position: relative;
  z-index: 1;
}

/* ---------- MOBILE ---------- */

@media (max-width: 980px) {

  /* ---- Mobile title at very top ---- */
  .site-header {
    display: block;
  }

  /* Hide the duplicate title inside .page on mobile */
  .topbar .site-title,
  .topbar .tagline {
    display: none;
  }

  /* ---- Left rail: strip across full width below the title ---- */
  .left-rail {
    position: relative;
    width: 100%;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 8px 14px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
  }

  /* ---- Roller wrap: horizontal row with flanking buttons ---- */
  .roller-wrap {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
  }

  /* ---- Prev / Next arrow buttons ---- */
  .roll-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.18);
    background: rgba(0,0,0,0.35);
    color: rgba(255,255,255,0.72);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
    touch-action: manipulation;
    transition: background 0.2s ease, color 0.2s ease;
  }

  @media (hover: hover) {
    .roll-btn:hover {
      background: rgba(255,255,255,0.14);
      color: white;
    }
  }
  .roll-btn:active {
    background: rgba(255,255,255,0.14);
    color: white;
  }

  /* ---- Horizontal roller: 4 slots wide on mobile, so it reads as a slider ---- */
  .roller {
    width: calc(var(--roller-slot) * 4);
    height: var(--roller-slot);
    overflow: hidden;
  }

  /* Hide top/bottom fade overlays — irrelevant in horizontal mode */
  .roller::before,
  .roller::after {
    display: none;
  }

  /* Horizontal track: items laid out in a flex row */
  .roller .track {
    display: flex;
    flex-direction: row;
    top: 0;
    left: calc(var(--roller-slot) * 1.5); /* centres active item in the 4-slot window */
    right: auto;                         /* override base right:0 — must be free to overflow */
    width: max-content;
    transition: transform 1.25s cubic-bezier(0.22, 1, 0.36, 1);
  }

  /* Each year cell: square slot */
  .roller .year {
    width: var(--roller-slot);
    height: var(--roller-slot);
    flex-shrink: 0;
  }

  /* ---- Side-nav: single horizontal row below the roller ---- */
  .side-nav {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0 14px;
  }

  .side-nav > a {
    font-size: 0.65rem;
    padding: 3px 2px;
  }

  .side-socials {
    margin-top: 0;
  }

  /* ---- Page content: no left indent, rail is above it now ---- */
  .page {
    padding: 14px 14px 140px 14px;
  }

  .topbar {
    display: none; /* title shown in .site-header; Studio link redundant on mobile */
  }

  .main-grid {
    grid-template-columns: 1fr;
  }

  /* Hide painting title / caption beneath feature image */
  .feature-caption {
    display: none;
  }

  .theme-rail {
    left: 0;
  }

  /* Theme roller: fill available space instead of overflowing at 600px */
  .theme-roller {
    flex: 1;
    min-width: 0;
    max-width: calc(var(--theme-slot) * 3);
  }

  /* Larger touch targets for theme nav buttons */
  .theme-btn {
    width: 44px;
    height: 44px;
  }

  .feature-panel {
    align-items: flex-start;
  }

  .feature-image-wrap,
  .feature-image {
    width: 130px;
  }

  .placeholder-grid {
    grid-template-columns: 1fr;
  }

  .top-nav {
    flex-direction: column;
    align-items: flex-start;
  }

  .year img {
    max-height: 54px;
  }
}

/* ---------- MOBILE REDESIGN (≤980px additions) ---------- */

@media (max-width: 980px) {

  /* Hide panel elements not needed on mobile */
  .eyebrow,
  .panel-text,
  .panel-actions,
  .year-details {
    display: none;
  }

  /* Header: tighter padding, gradient doesn't go full transparent — ends at
     the same dark value the nav strip uses, so they read as one band */
  .site-header {
    padding: 4px 16px 6px;
    background: linear-gradient(180deg, rgba(0,0,0,0.55), rgba(0,0,0,0.40));
  }

  /* Left rail: dark background picks up where the header gradient ends.
     Specificity bump (body.studio-page) beats the global year-page rule
     at line ~1269 which sets padding-top:80px and align-items:flex-start. */
  body.studio-page .left-rail {
    background: rgba(0,0,0,0.38);
    padding: 0 14px 6px;
    padding-top: 0 !important;   /* beats global year-page rule: padding-top:80px */
    gap: 0;
    align-items: center;
  }

  /* Hide roller in its original left-rail position */
  .left-rail .roller-wrap {
    display: none;
  }

  /* Restore socials — tiny icons pushed to right end of nav row */
  .side-socials {
    display: flex;
    flex-direction: row;
    gap: 6px;
    margin-top: 0;
    margin-left: auto;
    align-items: center;
  }
  .side-socials a img {
    width: 15px;
    height: 15px;
  }

  /* Nav: tighter, one line, no wrap */
  .side-nav {
    gap: 0 8px;
    flex-wrap: nowrap;
    align-items: center;
  }
  .side-nav > a {
    font-size: 0.60rem;
    padding: 2px 0;
  }

  /* Page: enough bottom padding to clear both fixed bars */
  .page {
    padding: 0 14px 130px;
  }

  /* Panel title snug under nav strip */
  .main-grid {
    margin-top: 4px;
  }

  /* Year roller: fixed at bottom, just above the theme rail */
  .roller-wrap {
    position: fixed;
    bottom: 58px;   /* theme rail = 44px slot + 6px top + 8px bottom padding */
    left: 0;
    right: 0;
    height: 60px;
    z-index: 5;
  }
  .roller {
    width: 100%;
    height: 60px;
    border-radius: 0;
    border-left: none;
    border-right: none;
    background: rgba(0,0,0,0.45);
  }
  .roller .track {
    top: 0;
    left: calc(50% - var(--roller-slot) / 2);
    right: auto;
  }

  /* Theme rail: shorter height and less padding */
  .theme-slot {
    height: 44px;
    font-size: 0.82rem;
  }
  .theme-rail {
    padding: 6px 16px 8px;
  }
}

/* ---------- SMALL PHONE (≤480px) ---------- */

@media (max-width: 480px) {

  /* Tighter rail padding so roller has more room */
  .left-rail {
    padding: 6px 10px 8px;
  }

  /* Slightly smaller roller so buttons fit comfortably */
  .roller {
    width: calc(var(--roller-slot) * 3);
  }

  .roller .track {
    left: var(--roller-slot);
  }

  /* Site title fits on one line */
  .site-header .site-title {
    font-size: clamp(1.4rem, 7vw, 2rem);
  }

  /* Panel title readable but not oversized */
  .panel-title {
    font-size: clamp(1.2rem, 5vw, 2rem);
  }

  /* Full-width CTA button */
  .panel-actions .button {
    width: 100%;
    text-align: center;
  }
}


/* ============================================================
   STUDIO YEAR PAGES
   Shared across all html/YYYY/ pages.
   Only #bg { background-image } stays page-specific inline.
   ============================================================ */

/* Fixed top-left title — sits in the left rail */
.year-sitetitle {
  position: fixed; top: 16px; left: 18px; z-index: 4;
}
.year-sitetitle h1 {
  font-family: 'Nosferatu', serif;
  font-size: clamp(1.6rem, 3.5vw, 2.8rem);
  font-weight: 400; margin: 0; line-height: 1.0;
  white-space: nowrap;
  text-shadow: 0 2px 8px rgba(0,0,0,0.9);
}
.year-sitetitle h1 a { color: inherit; text-decoration: none; }
.studio-page .year-sitetitle h1 a { color: white; }
.year-sitetitle .tagline {
  font-size: clamp(0.70rem, 1.3vw, 0.90rem);
  color: rgba(255,255,255,0.55); margin-top: 4px;
}

/* Left-rail year badge */
.year-badge {
  font-family: 'IMFellEnglish', Georgia, serif;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 6px; padding: 5px 14px 7px;
  letter-spacing: 0.04em; color: rgba(255,255,255,0.90);
  backdrop-filter: blur(6px); margin-top: 32px;
  width: fit-content; white-space: nowrap;
  display: flex; align-items: baseline; gap: 8px;
}
.year-badge .badge-year {
  font-family: 'Nosferatu', serif; font-size: 1.5rem; line-height: 1;
}
.year-badge .badge-title {
  font-size: 0.80rem; opacity: 0.85;
}

/* Fixed top-right home link */
.labyrinth-link {
  position: fixed; top: 16px; right: 18px;
  font-family: 'IMFellEnglish', Georgia, serif;
  font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(255,255,255,0.80); text-decoration: none;
  background: rgba(255,255,255,0.10); border: 1px solid rgba(255,255,255,0.20);
  border-radius: 6px; padding: 6px 14px;
  backdrop-filter: blur(6px); z-index: 4;
  transition: background 0.22s, color 0.22s;
  text-align: center; line-height: 1.5;
}
@media (hover: hover) {
  .labyrinth-link:hover { background: rgba(255,255,255,0.18); color: #fff; }
}

/* Main content column */
.year-main {
  position: relative; z-index: 2; min-height: 100vh;
  padding: 100px 0 100px 168px;
  display: flex; flex-direction: column; align-items: center; gap: 0;
}
.year-main section[id] { scroll-margin-top: 80px; }

/* Intro caption box */
.year-caption {
  margin: 22px auto 0; width: min(750px, 72vw);
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 8px; padding: 14px 20px 16px;
  backdrop-filter: blur(8px); text-align: center;
}
.year-caption h2 {
  font-family: 'Nosferatu', serif;
  font-size: clamp(1.2rem, 2.2vw, 1.8rem);
  font-weight: 400; line-height: 1.0; margin: 0 0 8px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.9);
}
.year-caption p {
  font-family: 'IMFellEnglish', Georgia, serif;
  font-size: 1.06rem; letter-spacing: 0.06em;
  color: rgba(255,255,255,0.60); margin: 0;
  text-shadow: 0 1px 8px rgba(0,0,0,0.97), 0 3px 18px rgba(0,49,83,0.48);
  line-height: 1.6;
}

/* Pull quote */
.year-pullquote {
  width: min(680px, 72vw);
  font-family: 'IMFellEnglish', Georgia, serif;
  font-size: 1.10rem; font-style: italic;
  color: rgba(255,255,255,0.58); line-height: 1.85;
  text-align: center; text-shadow: 0 1px 8px rgba(0,0,0,0.97); margin: 0 auto;
}

/* Horizontal rule dividers */
.year-divider {
  width: min(750px, 72vw); border: none;
  border-top: 1px solid rgba(255,255,255,0.12); margin: 36px 0;
}

/* Side-by-side hero pair */
.diptych-hero {
  display: flex; gap: 16px; justify-content: center;
  align-items: flex-start; flex-wrap: nowrap;
}
.diptych-hero img {
  display: block; width: min(330px, 42vw); height: auto;
  border-radius: 4px; box-shadow: 0 12px 55px rgba(0,0,0,0.72);
}

/* Content images */
.section-img {
  display: block; width: min(580px, 68vw); height: auto;
  border-radius: 4px; box-shadow: 0 8px 40px rgba(0,0,0,0.65); margin: 0 auto;
}
.section-img-sm {
  display: block; width: min(420px, 52vw); height: auto;
  border-radius: 4px; box-shadow: 0 8px 40px rgba(0,0,0,0.65); margin: 0 auto;
}

/* Italic caption / body text beneath images */
.section-text {
  margin-top: 18px; width: min(600px, 70vw);
  margin-left: auto; margin-right: auto; text-align: center;
  font-family: 'IMFellEnglish', Georgia, serif;
  font-size: 0.95rem; font-style: italic; letter-spacing: 0.05em;
  color: rgba(255,255,255,0.62);
  text-shadow: 0 1px 8px rgba(0,0,0,0.97), 0 3px 18px rgba(0,49,83,0.48);
  line-height: 1.75;
}

/* Video embed */
.video-wrap {
  width: min(700px, 90vw);
  margin: 1.5rem auto;
}
.video-wrap iframe {
  width: 100%; aspect-ratio: 16/9; border: none; display: block;
  border-radius: 4px; box-shadow: 0 8px 40px rgba(0,0,0,0.65);
}
.video-cover {
  position: relative; cursor: pointer; display: block;
  border-radius: 4px; overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.65);
}
.video-cover img { width: 100%; display: block; }
.video-cover .play-btn {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 68px; height: 68px; border-radius: 50%;
  background: rgba(0,0,0,0.62);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; color: #fff;
  transition: background 0.2s;
}
@media (hover: hover) {
  .video-cover:hover .play-btn { background: rgba(180,0,0,0.85); }
}

/* Two-column image pairs */
.detail-pair {
  display: flex; gap: 30px; justify-content: center;
  align-items: flex-start; flex-wrap: wrap;
}
.detail-block {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  width: min(330px, 42vw);
}
.detail-block > a { display: block; width: 100%; }
.detail-block img {
  display: block; width: 100%; height: auto;
  border-radius: 4px; box-shadow: 0 8px 36px rgba(0,0,0,0.68);
}
.detail-block p {
  font-family: 'IMFellEnglish', Georgia, serif;
  font-size: 0.82rem; font-style: italic; letter-spacing: 0.05em;
  color: rgba(255,255,255,0.55); text-shadow: 0 1px 6px rgba(0,0,0,0.9);
  line-height: 1.7; text-align: center; margin: 0;
}

/* Three-column image rows */
.triple-row {
  display: flex; gap: 18px; justify-content: center;
  align-items: flex-start; flex-wrap: wrap;
}
.triple-block {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  width: min(210px, 30vw);
}
.triple-block img {
  display: block; width: 100%; height: auto;
  border-radius: 4px; box-shadow: 0 6px 28px rgba(0,0,0,0.62);
}
.triple-block p {
  font-family: 'IMFellEnglish', Georgia, serif;
  font-size: 0.76rem; font-style: italic; letter-spacing: 0.04em;
  color: rgba(255,255,255,0.50); text-shadow: 0 1px 6px rgba(0,0,0,0.9);
  line-height: 1.65; text-align: center; margin: 0;
}

/* Section heading */
.section-heading {
  font-family: 'Nosferatu', serif;
  font-size: clamp(1.4rem, 2.8vw, 2.2rem);
  font-weight: 400; color: rgba(255,255,255,0.88);
  text-shadow: 0 2px 12px rgba(0,0,0,0.9); margin: 0;
  letter-spacing: 0.04em; text-align: center;
}

/* Large studio/event photo */
.studio-photo {
  display: block; width: min(680px, 100vw); height: auto;
  border-radius: 4px; box-shadow: 0 10px 48px rgba(0,0,0,0.68); margin: 0 auto;
}

/* Left-rail layout overrides for year pages */
.left-rail {
  justify-content: flex-start; padding-top: 80px;
  align-items: flex-start; gap: 8px;
}
.left-rail .side-nav { align-items: flex-start; }
.left-rail .side-nav > a { font-size: 0.70rem; text-align: left; padding: 3px 6px; }
.left-rail .side-socials { justify-content: flex-start; padding-left: 6px; }

/* Painting image */
.painting-img {
  display: block; width: min(560px, 68vw); height: auto;
  border-radius: 4px; box-shadow: 0 8px 40px rgba(0,0,0,0.65); margin: 0 auto;
}

/* LQIP blur-up */
.lqip-img {
  filter: blur(12px);
  transform: scale(1.04);
  transition: filter 0.8s ease, transform 0.8s ease, opacity 0.8s ease;
  will-change: filter, transform;
}
.lqip-img.lqip-loaded {
  filter: blur(0);
  transform: scale(1);
}

/* Painting caption */
.about-caption {
  width: min(560px, 68vw); margin: 10px auto 0; text-align: left;
  font-family: 'IMFellEnglish', Georgia, serif;
  font-size: 0.82rem; font-style: italic; letter-spacing: 0.05em;
  color: rgba(255,255,255,0.512); text-shadow: 0 1px 6px rgba(0,0,0,0.9);
  line-height: 1.7;
}
.caption-year { font-size: 1.12em; }

/* Expandable painting details */
.painting-details {
  width: min(560px, 68vw); margin: 10px auto 0;
}
.painting-details summary {
  font-family: 'IMFellEnglish', Georgia, serif;
  font-size: 0.78rem; font-style: italic; letter-spacing: 0.08em;
  color: rgba(255,255,255,0.38); text-shadow: 0 1px 6px rgba(0,0,0,0.9);
  cursor: pointer; list-style: none; text-align: left; transition: color 0.2s;
}
.painting-details summary::-webkit-details-marker { display: none; }
.painting-details summary::before { content: '+ '; font-style: normal; }
.painting-details[open] summary::before { content: '− '; }
@media (hover: hover) {
  .painting-details summary:hover { color: rgba(255,255,255,0.65); }
}
.painting-details .detail-text {
  margin-top: 10px;
  font-family: 'IMFellEnglish', Georgia, serif;
  font-size: 0.88rem; font-style: italic; letter-spacing: 0.04em;
  color: rgba(255,255,255,0.52); text-shadow: 0 1px 6px rgba(0,0,0,0.9);
  line-height: 1.75; text-align: left;
}

/* "Coming soon" notice */
.coming-soon {
  width: min(600px, 72vw);
  font-family: 'IMFellEnglish', Georgia, serif;
  font-size: 0.88rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: rgba(255,220,120,0.55); text-align: center;
  text-shadow: 0 1px 6px rgba(0,0,0,0.9);
}

/* Hub grid (era overview pages — columns set per-page) */
.hub-section-heading {
  font-family: 'Nosferatu', serif;
  font-size: clamp(1.2rem, 2.2vw, 1.8rem);
  font-weight: 400; color: rgba(255,255,255,0.85);
  text-shadow: 0 2px 12px rgba(0,0,0,0.9);
  margin: 0 0 6px; text-align: center; letter-spacing: 0.04em;
}
.hub-section-sub {
  font-family: 'IMFellEnglish', Georgia, serif;
  font-size: 0.90rem; color: rgba(255,255,255,0.50);
  text-align: center; margin: 0 0 22px; letter-spacing: 0.05em;
}
.hub-grid { display: grid; }
.hub-card {
  display: flex; flex-direction: column;
  align-items: center; text-decoration: none; gap: 8px;
  aspect-ratio: 2 / 3;
}
.hub-card img {
  display: block; width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 4px; box-shadow: 0 8px 40px rgba(0,0,0,0.65);
  transition: box-shadow 0.2s, transform 0.2s;
}
@media (hover: hover) {
  .hub-card:hover img {
    box-shadow: 0 12px 50px rgba(0,0,0,0.80); transform: translateY(-2px);
  }
}
.hub-label {
  font-family: 'Nosferatu', serif; font-size: 1.1rem;
  color: rgba(255,255,255,0.78); text-shadow: 0 1px 6px rgba(0,0,0,0.9);
  text-align: center;
}
.hub-sublabel {
  font-family: 'IMFellEnglish', Georgia, serif;
  font-size: 0.72rem; font-style: italic;
  color: rgba(255,255,255,0.48); text-align: center; margin-top: -4px;
}

/* Fixed bottom theme/section navigation */
.year-theme-rail {
  position: fixed; bottom: 0; left: 168px; right: 0;
  display: flex; align-items: center; justify-content: center;
  gap: 8px; padding: 12px 22px 20px;
  background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.65));
  flex-wrap: wrap; z-index: 3;
}
.year-theme-btn {
  display: inline-block; text-decoration: none;
  font-family: 'IMFellEnglish', Georgia, serif; font-size: 0.88rem;
  color: rgba(255,255,255,0.82); background: rgba(255,255,255,0.09);
  border: 1px solid rgba(255,255,255,0.20);
  border-radius: 6px; padding: 8px 20px; text-align: center;
  transition: background 0.22s, border-color 0.22s, color 0.22s; cursor: pointer;
}
@media (hover: hover) {
  .year-theme-btn:hover {
    background: rgba(255,255,255,0.16);
    border-color: rgba(255,220,120,0.35); color: #fff;
  }
}
.year-theme-btn.active {
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,220,120,0.40); color: #fff;
}

/* Mobile meta bar (replaces badge + labyrinth link on small screens) */
.mobile-meta { display: none; }

/* ---- Year pages: mobile breakpoint ---- */
@media (max-width: 980px) {
  .labyrinth-link { display: none; }
  .year-badge { display: none; }

  /* Nav strip: one unwrapped line */
  .side-nav { flex-wrap: nowrap; }

  /* Year-nav: smaller on mobile, positioned below the header strip */
  .year-nav-prev, .year-nav-next {
    top: 150px;
    font-size: 0.58rem;
    padding: 12px 5px;
  }
  .year-nav-prev .ynav-date,
  .year-nav-next .ynav-date { font-size: 1.0rem; }

  .year-sitetitle {
    position: relative;
    z-index: 2;
    top: auto;
    left: auto;
    padding: 8px 14px 4px 18px;
    text-align: left;
  }
  .year-sitetitle h1 { font-size: clamp(1.4rem, 5.5vw, 1.8rem); white-space: nowrap; }
  .year-sitetitle .tagline { display: block; }

  .year-main { padding: 16px 0 100px 0; }
  .year-main section[id] { scroll-margin-top: 130px; }
  .year-caption { width: min(94vw, 660px); }
  .year-divider { width: min(94vw, 660px); }
  .diptych-hero img { width: min(40vw, 220px); }
  .section-img { width: min(94vw, 580px); }
  .section-img-sm { width: min(90vw, 420px); }
  .section-text { width: min(94vw, 600px); }
  .detail-block { width: min(42vw, 260px); }
  .triple-block { width: min(28vw, 180px); }
  .studio-photo { width: min(92vw, 680px); }
  .mobile-meta {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 8px; padding: 8px 14px 4px;
    width: 100%; box-sizing: border-box; position: relative; z-index: 2;
  }
  .mobile-meta .badge-inline {
    font-family: 'IMFellEnglish', Georgia, serif; font-size: 0.90rem;
    background: rgba(255,255,255,0.10); border: 1px solid rgba(255,255,255,0.22);
    border-radius: 6px; padding: 4px 12px 5px; letter-spacing: 0.04em;
    color: rgba(255,255,255,0.90); backdrop-filter: blur(6px);
  }
  .mobile-meta .back-inline {
    font-family: 'IMFellEnglish', Georgia, serif; font-size: 0.68rem;
    letter-spacing: 0.14em; text-transform: uppercase;
    color: rgba(255,255,255,0.80); text-decoration: none;
    background: rgba(255,255,255,0.10); border: 1px solid rgba(255,255,255,0.20);
    border-radius: 6px; padding: 5px 12px; backdrop-filter: blur(6px);
  }
  .painting-img { width: min(92vw, 560px); }
  .about-caption { width: min(92vw, 560px); }
  .coming-soon { width: min(94vw, 600px); }
  .year-theme-rail { left: 0; }
}

/* ── 2026 / The Path — page-specific ─────────────────────────── */
.cascade-poem {
  margin-top: 18px;
  width: min(600px, 70vw);
  margin-left: auto;
  margin-right: auto;
  font-family: 'IMFellEnglish', Georgia, serif;
  font-size: 0.95rem;
  font-style: italic;
  letter-spacing: 0.05em;
  color: rgba(255,255,255,0.55);
  text-shadow: 0 1px 8px rgba(0,0,0,0.97);
  line-height: 2.2;
}
.cascade-poem span { display: block; }
.cascade-poem .i1 { padding-left: 0; }
.cascade-poem .i2 { padding-left: 1.4em; }
.cascade-poem .i3 { padding-left: 2.8em; }
.cascade-poem .i4 { padding-left: 4.2em; }
.cascade-poem .i5 { padding-left: 5.6em; }

@media (max-width: 980px) {
  .cascade-poem { width: min(94vw, 600px); }
}
/* ---- Lightbox ------------------------------------------------------------ */

#lb-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0, 0, 0, 0.93);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
#lb-overlay.lb-open {
  opacity: 1;
  pointer-events: auto;
}
#lb-img {
  max-width: 90vw;
  max-height: 88vh;
  object-fit: contain;
  box-shadow: 0 6px 60px rgba(0, 0, 0, 0.9);
  cursor: zoom-out;
  display: block;
}
#lb-close {
  position: absolute;
  top: 18px;
  right: 24px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 2.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 6px;
  transition: color 0.2s;
}
@media (hover: hover) {
  #lb-close:hover { color: #fff; }
}

/* Hover cue on expandable images */
img.lb-img {
  cursor: zoom-in;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
@media (hover: hover) {
  img.lb-img:hover {
    opacity: 0.82;
    transform: scale(1.015);
  }
}

/* ---- Back to top -------------------------------------------------------- */
.back-to-top {
  position: fixed;
  right: 18px;
  bottom: 92px;
  z-index: 120;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.24);
  background: rgba(0,0,0,0.56);
  color: rgba(255,255,255,0.86);
  font-family: 'IMFellEnglish', Georgia, serif;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: manipulation;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.22s ease, transform 0.22s ease, background 0.22s ease;
  box-shadow: 0 8px 28px rgba(0,0,0,0.45);
}
.back-to-top svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.back-to-top.is-visible {
  opacity: 0.68;
  pointer-events: auto;
  transform: translateY(0);
}
@media (hover: hover) {
  .back-to-top:hover {
    opacity: 0.94;
    background: rgba(0,0,0,0.74);
    color: #fff;
  }
}
@media (max-width: 980px) {
  .back-to-top {
    right: 12px;
    bottom: 86px;
    width: 36px;
    height: 36px;
  }
  .back-to-top svg {
    width: 19px;
    height: 19px;
  }
}
