:root {
  --ink: #141412;
  --paper: #e7e1d5;
  --paper-deep: #cfc6b6;
  --white: #f4f0e8;
  --muted: #9b968d;
  --accent: #b34f38;
  --line: rgba(228, 221, 209, 0.18);
  --serif: "Newsreader", Georgia, serif;
  --sans: "Manrope", Arial, sans-serif;
  --mono: "DM Mono", monospace;
}

* { box-sizing: border-box; }

html, body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  background: var(--ink);
  color: var(--white);
  font-family: var(--sans);
  overflow: hidden;
}

button, input { font: inherit; }
button { color: inherit; }

button:focus-visible {
  outline: 1px solid var(--white);
  outline-offset: 5px;
}

[hidden] { display: none !important; }

.grain {
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
  opacity: .055;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 220 220' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: 82px;
  padding: 0 36px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,.1);
  background: rgba(20,20,18,.94);
  backdrop-filter: blur(12px);
}

.brand {
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
}

.brand-mark {
  width: 31px;
  height: 33px;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  transform: skewY(-12deg);
}

.brand-mark i { display: block; width: 8px; background: var(--white); }
.brand-mark i:nth-child(1) { height: 23px; }
.brand-mark i:nth-child(2) { height: 32px; background: var(--accent); }
.brand-mark i:nth-child(3) { height: 18px; }

.brand strong {
  display: block;
  font: 500 16px/1 var(--mono);
  letter-spacing: .08em;
}

.brand small {
  display: block;
  margin-top: 5px;
  color: #8f8b83;
  font: 400 8px/1 var(--mono);
  letter-spacing: .28em;
}

.header-context {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #b7b2a9;
  font: 400 9px/1 var(--mono);
  letter-spacing: .18em;
}

.header-context b { color: #5f5d58; font-weight: 300; }

.pulse {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent), transparent 75%);
  animation: pulse 2.4s ease-in-out infinite;
}

.sound-button {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border: 0;
  background: none;
  color: #aaa59c;
  font: 400 8px/1 var(--mono);
  letter-spacing: .16em;
  cursor: pointer;
}

.sound-button b { color: var(--white); font-weight: 400; }
.sound-lines { height: 15px; display: flex; align-items: center; gap: 2px; }
.sound-lines i { width: 1px; height: 4px; background: currentColor; transition: height .2s; }
.sound-lines i:nth-child(2) { height: 10px; }
.sound-lines i:nth-child(3) { height: 14px; }
.sound-lines i:nth-child(4) { height: 7px; }
.sound-button[aria-pressed="true"] .sound-lines i { animation: bars .7s ease-in-out infinite alternate; }
.sound-button[aria-pressed="true"] .sound-lines i:nth-child(2) { animation-delay: -.2s; }
.sound-button[aria-pressed="true"] .sound-lines i:nth-child(3) { animation-delay: -.5s; }

main { position: relative; width: 100vw; height: 100vh; }

.timeline-view, .gallery-view {
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity .25s ease;
}

.timeline-view.visible, .gallery-view.visible { opacity: 1; }

.timeline-view {
  display: grid;
  grid-template-columns: 220px 1fr;
  grid-template-rows: minmax(0, 1fr);
  min-height: 0;
  padding-top: 82px;
  background: #171715;
}

.timeline-nav {
  position: relative;
  z-index: 20;
  min-height: 0;
  padding: 48px 34px 32px 38px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid rgba(255,255,255,.09);
  background: #151513;
}

.timeline-label {
  color: #6c6963;
  font: 400 8px/1 var(--mono);
  letter-spacing: .28em;
}

.timeline-label::after {
  content: "15 ARTYSTÓW · 105 DZIEŁ";
  display: block;
  margin-top: 8px;
  color: #45433f;
  font-size: 6px;
  letter-spacing: .13em;
}

.era-filters {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}

.era-filters button:first-child { grid-column: 1 / -1; }

.era-filters button {
  min-width: 0;
  padding: 6px 4px;
  border: 1px solid #34332f;
  background: transparent;
  color: #615f59;
  font: 400 6px/1 var(--mono);
  letter-spacing: .08em;
  cursor: pointer;
  transition: color .2s, border-color .2s, background .2s;
}

.era-filters button:hover { color: #aaa69e; border-color: #55524c; }
.era-filters button.active { color: var(--white); border-color: var(--accent); background: color-mix(in srgb, var(--accent), transparent 84%); }

.timeline-artists {
  min-height: 0;
  height: auto;
  flex: 1 1 auto;
  margin-top: 15px;
  padding: 2px 7px 26px 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 12px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #44413c transparent;
}

.timeline-artists::-webkit-scrollbar { width: 3px; }
.timeline-artists::-webkit-scrollbar-thumb { background: #44413c; }

.timeline-node {
  position: relative;
  width: 100%;
  min-height: 43px;
  flex: 0 0 auto;
  padding: 0 0 0 30px;
  border: 0;
  background: none;
  color: #65635e;
  text-align: left;
  cursor: pointer;
  transition: color .3s;
}

.timeline-node::after {
  content: "";
  position: absolute;
  top: 16px;
  left: 6px;
  width: 1px;
  height: calc(100% + 4px);
  background: #363530;
  transition: background .35s ease;
}

.timeline-node.visited::after { background: var(--accent); }

.timeline-node:hover { color: #bbb6ad; }
.timeline-node.active { color: var(--white); }

.node-dot {
  position: absolute;
  top: 9px;
  left: 3px;
  width: 7px;
  height: 7px;
  border: 1px solid #595751;
  border-radius: 50%;
  background: #151513;
  transform: translateX(-.5px);
  transition: all .3s;
}

.timeline-node.active .node-dot {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent), transparent 80%);
}

.timeline-node.visited .node-dot { background: var(--accent); border-color: var(--accent); }
.node-year { display: block; font: 400 9px/1 var(--mono); letter-spacing: .14em; }
.node-name { display: block; margin-top: 9px; font: 400 12px/1.2 var(--serif); }
.timeline-node.active .node-name { font-size: 15px; font-style: italic; }

.timeline-endcap {
  position: relative;
  min-height: 45px;
  flex: 0 0 auto;
  padding: 4px 0 0 30px;
  color: #5e5b55;
}
.timeline-endcap > span { position: absolute; top: 7px; left: 3px; width: 7px; height: 7px; border: 1px solid var(--accent); border-radius: 50%; background: #151513; }
.timeline-endcap b { display: block; font: 400 9px/1 var(--mono); letter-spacing: .14em; }
.timeline-endcap small { display: block; margin-top: 8px; font: 400 6px/1 var(--mono); letter-spacing: .1em; }

.timeline-stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #44413c transparent;
  display: grid;
  grid-template-columns: minmax(420px, 1.15fr) minmax(370px, .85fr);
  align-items: center;
  padding: 50px 7vw 54px 5.7vw;
  isolation: isolate;
}

.timeline-stage::-webkit-scrollbar { width: 3px; }
.timeline-stage::-webkit-scrollbar-thumb { background: #44413c; }

.stage-architecture { position: absolute; inset: 0; z-index: -2; perspective: 900px; overflow: hidden; }
.stage-architecture .ceiling { position: absolute; left: 0; right: 0; top: 0; height: 20%; background: #1c1c19; border-bottom: 1px solid #24241f; transform-origin: top; transform: perspective(900px) rotateX(-8deg); }
.stage-architecture .left-wall { position: absolute; left: 0; top: 0; bottom: 0; width: 16%; background: #191917; clip-path: polygon(0 0,100% 17%,100% 85%,0 100%); border-right: 1px solid rgba(255,255,255,.03); }
.stage-architecture .right-wall { position: absolute; right: 0; top: 0; bottom: 0; width: 18%; background: #131311; clip-path: polygon(0 18%,100% 0,100% 100%,0 84%); }
.stage-architecture .floor { position: absolute; left: 0; right: 0; bottom: 0; height: 28%; background-color: #11110f; background-image: linear-gradient(100deg, transparent 49.7%, rgba(255,255,255,.035) 50%, transparent 50.3%); background-size: 120px 100%; clip-path: polygon(16% 0,82% 0,100% 100%,0 100%); }

.era-watermark {
  position: absolute;
  right: 4vw;
  bottom: 0;
  z-index: -1;
  color: rgba(255,255,255,.025);
  font: 300 clamp(130px, 18vw, 300px)/.75 var(--serif);
  letter-spacing: -.07em;
  overflow: hidden;
  pointer-events: none;
  transition: color .5s;
}

.artist-visual {
  position: relative;
  justify-self: center;
  width: min(35vw, 510px);
  height: min(65vh, 660px);
  padding: 12px 0 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.spotlight {
  position: absolute;
  width: 120%;
  height: 125%;
  top: -25%;
  left: -10%;
  opacity: .18;
  clip-path: polygon(36% 0,64% 0,100% 100%,0 100%);
  background: #eee6d4;
  filter: blur(18px);
}

.museum-frame {
  position: relative;
  padding: 10px;
  background: #1e1a13;
  border: 2px solid #6d5940;
  box-shadow: inset 0 0 0 3px #2e281d, inset 0 0 0 5px #958064, 0 38px 75px rgba(0,0,0,.52), 0 4px 8px rgba(0,0,0,.7);
}

.hero-frame {
  width: fit-content;
  max-width: 86%;
  max-height: calc(100% - 52px);
  flex: 0 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: perspective(1000px) rotateY(3deg) rotateX(.8deg);
}

.frame-inner {
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  padding: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #090908;
  border: 1px solid #847052;
}

.hero-frame img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(54vh - 42px);
  object-fit: contain;
  background: #090908;
}

.art-label {
  position: static;
  align-self: flex-end;
  flex: 0 0 auto;
  margin-right: 3%;
  min-width: 140px;
  padding: 9px 12px;
  background: #ded7c9;
  color: #22211e;
  box-shadow: 0 7px 15px rgba(0,0,0,.35);
  font: 400 8px/1.35 var(--mono);
}

.art-label b { float: right; color: #766d61; font-weight: 400; }

.artist-intro { max-width: 510px; padding-left: 4vw; align-self: center; }
.eyebrow { display: flex; align-items: center; gap: 14px; color: var(--accent); font: 400 9px/1 var(--mono); letter-spacing: .2em; }
.eyebrow i { width: 34px; height: 1px; background: currentColor; }

.artist-intro h1 {
  margin: 24px 0 15px;
  max-width: 500px;
  font: 300 clamp(50px, 5.2vw, 88px)/.88 var(--serif);
  letter-spacing: -.055em;
  text-wrap: balance;
}

.artist-meta { display: flex; gap: 0; color: #a7a299; font: 400 8px/1 var(--mono); letter-spacing: .18em; }
.artist-meta span { padding-right: 15px; }
.artist-meta span + span { padding-left: 15px; border-left: 1px solid #4c4a45; }
.artist-lead { margin: 38px 0 13px; color: #dad4ca; font: italic 300 21px/1.3 var(--serif); }
.artist-description { margin: 0; max-width: 470px; color: #8e8a83; font: 300 12px/1.75 var(--sans); }

.enter-gallery {
  position: relative;
  margin-top: 34px;
  min-width: 230px;
  padding: 17px 18px 16px 21px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid #57544d;
  background: transparent;
  color: var(--white);
  font: 500 9px/1 var(--mono);
  letter-spacing: .17em;
  cursor: pointer;
  overflow: hidden;
  transition: border-color .3s;
}

.enter-gallery::before { content: ""; position: absolute; inset: 0; background: var(--accent); transform: translateX(-102%); transition: transform .35s cubic-bezier(.2,.8,.2,1); z-index: -1; }
.enter-gallery:hover { border-color: var(--accent); }
.enter-gallery:hover::before { transform: translateX(0); }
.enter-gallery i { font: 300 20px/1 var(--sans); }

.timeline-controls {
  position: absolute;
  right: 7vw;
  bottom: 36px;
  display: flex;
  align-items: center;
  gap: 17px;
}

.timeline-controls button {
  width: 36px;
  height: 36px;
  border: 1px solid #494741;
  border-radius: 50%;
  background: rgba(20,20,18,.4);
  cursor: pointer;
  transition: background .2s, border .2s;
}
.timeline-controls button:hover { background: var(--accent); border-color: var(--accent); }
.timeline-controls > span { color: #6e6b65; font: 400 8px/1 var(--mono); letter-spacing: .12em; }
.timeline-controls b { color: var(--white); font-weight: 400; }

.navigation-hint { position: absolute; left: 29px; bottom: 29px; display: flex; align-items: center; gap: 12px; color: #5b5954; font: 400 7px/1.6 var(--mono); letter-spacing: .14em; }
.mouse { width: 18px; height: 27px; border: 1px solid #4e4c47; border-radius: 12px; position: relative; }
.mouse i { position: absolute; width: 2px; height: 4px; top: 6px; left: 7px; background: #77736c; animation: scroll 1.8s ease-in-out infinite; }

.reveal-next { animation: revealNext .62s cubic-bezier(.2,.8,.2,1) both; }
.reveal-prev { animation: revealPrev .62s cubic-bezier(.2,.8,.2,1) both; }

/* Gallery */
.gallery-view { padding-top: 82px; background: #1b1a17; display: grid; grid-template-rows: 70px 1fr 52px; }
.gallery-topbar { position: relative; z-index: 5; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 35px; background: #e4ded2; color: #1d1d1a; border-bottom: 1px solid #beb7ab; }
.back-button, .gallery-footer button { border: 0; background: none; cursor: pointer; }
.back-button { justify-self: start; padding: 11px 0; color: #5f5a51; font: 500 8px/1 var(--mono); letter-spacing: .16em; }
.back-button span { margin-right: 11px; color: #1d1d1a; font-size: 14px; }
.gallery-title { align-self: stretch; min-width: 300px; display: flex; align-items: center; justify-content: center; gap: 14px; border-left: 1px solid #c6beb2; border-right: 1px solid #c6beb2; }
.gallery-title small { color: #837b70; font: 400 7px/1 var(--mono); letter-spacing: .16em; }
.gallery-title strong { font: italic 400 21px/1 var(--serif); }
.gallery-tip { justify-self: end; color: #857e73; font: 400 7px/1 var(--mono); letter-spacing: .12em; }
.gallery-tip span { display: inline-grid; place-items: center; width: 17px; height: 17px; margin-right: 8px; border: 1px solid #9f978b; border-radius: 50%; color: #4b4841; }

.museum-room { position: relative; overflow: hidden; perspective: 950px; background: #bdb5a9; isolation: isolate; }
.room-ceiling { position: absolute; inset: 0 8% auto; height: 20%; background: #d8d1c4; clip-path: polygon(0 0,100% 0,88% 100%,12% 100%); z-index: 2; border-bottom: 1px solid rgba(60,55,48,.18); }
.room-ceiling::before, .room-ceiling::after { content:""; position:absolute; top:0; bottom:0; width:1px; background:rgba(50,45,40,.14); }
.room-ceiling::before { left:34%; transform:rotate(8deg); }.room-ceiling::after { right:34%; transform:rotate(-8deg); }
.room-ceiling i { position: absolute; top: 48%; width: 7px; height: 7px; border-radius: 50%; background: #ede8df; box-shadow: 0 0 20px 10px rgba(255,245,219,.6); }
.room-ceiling i:nth-child(1) { left: 24%; }.room-ceiling i:nth-child(2) { left: 50%; }.room-ceiling i:nth-child(3) { left: 76%; }
.room-left, .room-right { position: absolute; top: 0; bottom: 0; width: 19%; background: #aaa398; z-index: 1; }
.room-left { left: 0; clip-path: polygon(0 0,100% 20%,100% 80%,0 100%); border-right: 1px solid rgba(50,45,40,.2); }
.room-right { right: 0; clip-path: polygon(0 20%,100% 0,100% 100%,0 80%); border-left: 1px solid rgba(50,45,40,.2); }
.room-back-wall { position: absolute; left: 16%; right: 16%; top: 14%; bottom: 21%; background: #cac2b6; box-shadow: inset 0 0 70px rgba(65,58,50,.12); border: 1px solid rgba(50,45,40,.2); }
.room-back-wall::after { content: ""; position: absolute; inset: auto 0 0; height: 8px; background: #8d8579; border-top: 2px solid #e0d9cc; }
.room-heading { position: absolute; inset: 28px 0 auto; z-index: 3; text-align: center; color: #34312c; }
.room-heading span { font: 500 7px/1 var(--mono); letter-spacing: .25em; color: #776f65; }
.room-heading h2 { margin: 8px 0 0; font: italic 300 clamp(20px, 2.5vw, 36px)/1 var(--serif); }
.artworks-wall { position: absolute; left: 4%; right: 4%; top: 24%; bottom: 10%; display: grid; grid-template-columns: .9fr 1.16fr .9fr; align-items: center; gap: clamp(22px, 4vw, 75px); }
.wall-artwork { position: relative; border: 0; padding: 0; background: none; cursor: pointer; transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.wall-artwork:hover { transform: translateY(-8px) scale(1.025); z-index: 5; }
.wall-frame { display: block; width: 100%; padding: clamp(5px, .7vw, 10px); background: #2a241c; border: 2px solid #75624b; box-shadow: inset 0 0 0 2px #ad9168, 0 18px 28px rgba(35,29,23,.32); }
.wall-frame-inner { display: grid; place-items: center; height: clamp(150px, 27vh, 290px); padding: 5px; background: #12110f; border: 1px solid #9d835d; }
.wall-frame img { display: block; width: 100%; height: 100%; object-fit: contain; background: #12110f; }
.artwork-1 .wall-frame-inner, .artwork-3 .wall-frame-inner { height: clamp(140px, 23vh, 250px); }
.wall-plaque { display: block; width: max-content; min-width: 88px; max-width: 95%; margin: 13px auto 0; padding: 6px 9px; border: 1px solid #a9a094; background: #ded8cd; color: #4f4a43; text-align: left; }
.wall-plaque b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 7px/1 var(--mono); letter-spacing: .06em; }
.wall-plaque small { display: block; margin-top: 4px; color: #8a8277; font: 400 6px/1 var(--mono); }
.artwork-hotspot { position: absolute; top: -10px; right: -10px; display: grid; place-items: center; width: 25px; height: 25px; border: 1px solid rgba(255,255,255,.7); border-radius: 50%; background: var(--accent); color: white; box-shadow: 0 4px 13px rgba(0,0,0,.25); opacity: 0; transform: scale(.7); transition: .25s; }
.wall-artwork:hover .artwork-hotspot { opacity: 1; transform: scale(1); }
.room-floor { position: absolute; left: 0; right: 0; bottom: 0; height: 25%; background-color: #8b8378; background-image: linear-gradient(90deg, transparent 49.7%, rgba(55,50,45,.15) 50%, transparent 50.3%), linear-gradient(0deg, transparent 49.5%, rgba(55,50,45,.12) 50%, transparent 50.5%); background-size: 150px 100%, 100% 34px; clip-path: polygon(16% 0,84% 0,100% 100%,0 100%); z-index: 3; }
.bench { position: absolute; width: 24%; height: 34px; left: 38%; top: 38%; background: #3a3530; transform: perspective(500px) rotateX(55deg); box-shadow: 0 20px 20px rgba(0,0,0,.22); }
.bench i { position: absolute; top: 24px; width: 7px; height: 45px; background: #282522; }.bench i:first-child { left: 10%; }.bench i:last-child { right: 10%; }

.gallery-footer { position: relative; z-index: 5; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 35px; background: #171715; color: #77736c; font: 400 7px/1 var(--mono); letter-spacing: .14em; }
.gallery-footer > div:first-child { display: flex; align-items: center; gap: 9px; }
.key { padding: 5px 6px; border: 1px solid #4a4843; color: #aaa59c; }
.gallery-pagination { display: flex; gap: 8px; }.gallery-pagination i { width: 18px; height: 1px; background: #4d4a45; }.gallery-pagination i.active { background: var(--accent); }
.gallery-footer button { justify-self: end; color: #aaa59c; font: 400 7px/1 var(--mono); letter-spacing: .14em; }.gallery-footer button span { margin-left: 10px; color: white; font-size: 13px; }

/* Walkable WebGL gallery */
.museum-room-3d {
  perspective: none;
  background: #b8b3aa;
  cursor: default;
}

.gallery-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  background: #b8b3aa;
}

.gallery-canvas canvas {
  display: block;
  width: 100%;
  height: 100%;
  outline: 0;
  touch-action: none;
  cursor: grab;
}

.gallery-canvas canvas:active { cursor: grabbing; }
.gallery-canvas.pointer-locked canvas { cursor: none; }

.gallery-3d-title {
  position: absolute;
  z-index: 5;
  top: 26px;
  left: 50%;
  transform: translateX(-50%);
  min-width: 320px;
  color: rgba(244,240,232,.85);
  text-align: center;
  text-shadow: 0 2px 14px rgba(0,0,0,.5);
  pointer-events: none;
  transition: opacity .5s, transform .5s;
}

.gallery-3d-title span {
  font: 400 7px/1 var(--mono);
  letter-spacing: .24em;
}

.gallery-3d-title h2 {
  margin: 7px 0 0;
  font: italic 300 clamp(22px, 2.4vw, 37px)/1 var(--serif);
}

.museum-room-3d.is-walking .gallery-3d-title {
  opacity: 0;
  transform: translate(-50%, -10px);
}

.walk-intro {
  position: absolute;
  z-index: 10;
  top: 50%;
  left: clamp(28px, 5vw, 80px);
  width: min(390px, 38vw);
  padding: 35px 38px 31px;
  transform: translateY(-50%);
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(20,20,18,.9);
  box-shadow: 0 28px 80px rgba(0,0,0,.35);
  transition: opacity .45s, transform .45s, visibility .45s;
}

.walk-intro.is-hidden {
  opacity: 0;
  visibility: hidden;
  transform: translate(-20px, -50%);
  pointer-events: none;
}

.walk-intro-number {
  color: var(--accent);
  font: 400 8px/1 var(--mono);
  letter-spacing: .2em;
}

.walk-intro-number b { font-weight: 400; }

.walk-intro h3 {
  margin: 20px 0 15px;
  color: var(--white);
  font: 300 clamp(48px, 5vw, 70px)/.8 var(--serif);
  letter-spacing: -.05em;
}

.walk-intro h3 i { color: #aaa59c; font-weight: 300; }

.walk-intro p {
  max-width: 295px;
  margin: 0;
  color: #aaa69e;
  font: 300 11px/1.65 var(--sans);
}

.walk-intro button {
  width: 100%;
  margin-top: 25px;
  padding: 16px 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #68645d;
  background: transparent;
  color: var(--white);
  font: 500 8px/1 var(--mono);
  letter-spacing: .16em;
  cursor: pointer;
  transition: background .25s, border-color .25s;
}

.walk-intro button:hover { background: var(--accent); border-color: var(--accent); }
.walk-intro button b { font-size: 16px; font-weight: 300; }

.walk-intro small {
  display: block;
  margin-top: 15px;
  color: #67645f;
  font: 400 6px/1 var(--mono);
  letter-spacing: .12em;
}

.gallery-crosshair {
  position: absolute;
  z-index: 6;
  top: 50%;
  left: 50%;
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  border: 1px solid rgba(255,255,255,.45);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s, border-color .25s, transform .25s;
}

.museum-room-3d.is-walking .gallery-crosshair { opacity: 1; }
.gallery-crosshair i { position: absolute; background: rgba(255,255,255,.7); }
.gallery-crosshair i:first-child { left: 7px; right: 7px; top: 10px; height: 1px; }
.gallery-crosshair i:last-child { top: 7px; bottom: 7px; left: 10px; width: 1px; }
.gallery-crosshair.is-targeting { border-color: var(--accent); transform: scale(1.35); }
.gallery-crosshair.is-targeting i { background: var(--accent); }

.artwork-focus {
  position: absolute;
  z-index: 8;
  left: 50%;
  bottom: 26px;
  min-width: 280px;
  padding: 13px 14px 12px 17px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 13px;
  border: 1px solid rgba(255,255,255,.32);
  background: rgba(18,18,16,.9);
  color: white;
  transform: translateX(-50%);
  cursor: pointer;
  box-shadow: 0 13px 35px rgba(0,0,0,.3);
}

.artwork-focus span { color: #817d76; font: 400 6px/1 var(--mono); letter-spacing: .14em; }
.artwork-focus strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; font: italic 300 15px/1 var(--serif); }
.artwork-focus kbd { display: grid; place-items: center; width: 26px; height: 26px; border: 1px solid #625e58; font: 400 8px/1 var(--mono); }
.artwork-focus:hover { border-color: var(--accent); }

.room-portal-prompt {
  position: absolute;
  z-index: 8;
  left: 50%;
  top: 78px;
  min-width: 270px;
  padding: 12px 17px 11px;
  transform: translateX(-50%);
  border: 1px solid color-mix(in srgb, var(--accent), white 25%);
  background: rgba(18,18,16,.88);
  color: white;
  text-align: center;
  pointer-events: none;
  box-shadow: 0 14px 35px rgba(0,0,0,.28);
}

.room-portal-prompt span,
.room-portal-prompt small {
  display: block;
  color: #938e86;
  font: 400 6px/1 var(--mono);
  letter-spacing: .15em;
}

.room-portal-prompt strong {
  display: block;
  margin: 7px 0 6px;
  font: italic 300 19px/1 var(--serif);
}

.room-transition-overlay {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: grid;
  place-content: center;
  gap: 10px;
  background: #161512;
  color: white;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .28s ease, visibility .28s ease;
}

.museum-room-3d.is-room-transitioning .room-transition-overlay {
  opacity: 1;
  visibility: visible;
}

.room-transition-overlay span {
  color: var(--accent);
  font: 400 7px/1 var(--mono);
  letter-spacing: .22em;
}

.room-transition-overlay strong {
  max-width: 560px;
  padding: 0 24px;
  font: italic 300 clamp(32px, 5vw, 68px)/.95 var(--serif);
}

.walk-controls {
  position: absolute;
  z-index: 7;
  left: 24px;
  right: 24px;
  bottom: 20px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .4s .15s;
}

.museum-room-3d.is-walking .walk-controls { opacity: 1; }

.desktop-controls { display: flex; align-items: flex-end; gap: 22px; }
.control-item { display: flex; align-items: center; gap: 9px; }
.control-item > b { color: rgba(255,255,255,.63); font: 400 6px/1 var(--mono); letter-spacing: .13em; text-shadow: 0 2px 5px rgba(0,0,0,.5); }
.keys { width: 47px; height: 34px; display: grid; place-items: start center; gap: 2px; }
.keys i { display: flex; gap: 2px; }
.keys kbd { display: grid; place-items: center; width: 14px; height: 14px; border: 1px solid rgba(255,255,255,.42); background: rgba(18,18,16,.65); color: white; font: 400 6px/1 var(--mono); font-style: normal; }
.mouse-control { position: relative; width: 18px; height: 27px; border: 1px solid rgba(255,255,255,.5); border-radius: 9px; background: rgba(18,18,16,.55); }
.mouse-control i { position: absolute; top: 4px; left: 8px; width: 1px; height: 6px; background: white; }
.desktop-controls > button { margin-left: auto; padding: 9px 12px; border: 1px solid rgba(255,255,255,.28); background: rgba(18,18,16,.6); color: rgba(255,255,255,.78); font: 400 6px/1 var(--mono); letter-spacing: .12em; pointer-events: auto; cursor: pointer; }
.desktop-controls > button span { margin-right: 7px; font-size: 12px; }
.desktop-controls > button:hover { border-color: var(--accent); color: white; }
.mobile-controls { display: none; }

/* Artwork detail */
.artwork-modal { position: fixed; inset: 0; z-index: 500; display: grid; grid-template-columns: minmax(46%, 1.15fr) minmax(420px, .85fr); background: #11110f; opacity: 0; transform: translateY(12px); transition: opacity .3s, transform .3s; }
.artwork-modal.open { opacity: 1; transform: none; }
.modal-close { position: absolute; z-index: 10; top: 27px; right: 31px; width: 38px; height: 38px; border: 1px solid #55514b; border-radius: 50%; background: #171715; font: 300 23px/1 var(--sans); cursor: pointer; transition: background .2s; }.modal-close:hover { background: var(--accent); }
.modal-visual { position: relative; min-width: 0; display: grid; place-items: center; padding: 70px 5vw 58px; background: #0b0b0a; overflow: hidden; }
.modal-visual::before { content:""; position:absolute; top:0; width:45%; height:90%; background:#e2d7c2; opacity:.09; clip-path:polygon(22% 0,78% 0,100% 100%,0 100%); filter:blur(20px); }
.modal-visual img { position: relative; max-width: 100%; max-height: calc(100vh - 150px); object-fit: contain; box-shadow: 0 35px 70px rgba(0,0,0,.7); cursor: zoom-in; transition: transform .45s cubic-bezier(.2,.8,.2,1); }
.zoom-button { position: absolute; z-index: 4; top: 28px; left: 31px; padding: 8px 12px; border: 1px solid #484641; background: rgba(15,15,13,.75); color: #aaa69f; font: 400 7px/1 var(--mono); letter-spacing: .12em; cursor: pointer; }.zoom-button span { margin-right: 7px; color: white; }
.modal-image-index { position: absolute; bottom: 26px; left: 32px; color: #5e5b55; font: 400 8px/1 var(--mono); letter-spacing: .13em; }.modal-image-index span { color: white; }
.artwork-modal.zoomed .modal-visual { overflow: auto; place-items: start center; }.artwork-modal.zoomed .modal-visual img { max-width: none; max-height: none; width: 145%; cursor: zoom-out; }.artwork-modal.zoomed .modal-content { opacity: .16; pointer-events: none; }
.modal-content { position: relative; overflow-y: auto; padding: clamp(90px, 11vh, 130px) clamp(55px, 6vw, 100px) 50px; background: #e4ded3; color: #22211e; transition: opacity .3s; }
.modal-kicker { display: flex; align-items: center; gap: 12px; color: var(--accent); font: 500 7px/1 var(--mono); letter-spacing: .16em; }.modal-kicker i { width: 27px; height: 1px; background: currentColor; }
.modal-content h2 { margin: 21px 0 14px; font: 300 clamp(45px, 5vw, 74px)/.93 var(--serif); letter-spacing: -.045em; text-wrap: balance; }
.modal-intro { max-width: 540px; margin: 0 0 33px; color: #5f5a52; font: italic 300 17px/1.5 var(--serif); }
.modal-content dl { margin: 0; border-top: 1px solid #bdb5aa; border-bottom: 1px solid #bdb5aa; }
.modal-content dl div { display: grid; grid-template-columns: 105px 1fr; gap: 20px; padding: 11px 0; }.modal-content dl div + div { border-top: 1px solid #cbc4b9; }
.modal-content dt { color: #8a8277; font: 500 7px/1.4 var(--mono); letter-spacing: .14em; }.modal-content dd { margin: 0; color: #47433d; font: 400 9px/1.35 var(--mono); }
.story-divider { margin-top: 34px; display: flex; align-items: center; gap: 13px; color: #787166; font: 500 7px/1 var(--mono); letter-spacing: .15em; }.story-divider::after { content:""; height: 1px; flex: 1; background: #c5bdb2; }
.modal-story { color: #555048; font: 300 12px/1.75 var(--sans); }
.modal-more { margin-top: 24px; padding: 13px 15px; display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 12px; border: 1px solid #aaa297; color: #37332f; text-decoration: none; transition: color .2s, border-color .2s, background .2s; }
.modal-more span { font: 500 7px/1 var(--mono); letter-spacing: .15em; }
.modal-more b { color: #8a8277; font: 400 6px/1 var(--mono); letter-spacing: .1em; }
.modal-more i { font: 300 17px/1 var(--sans); }
.modal-more:hover { color: white; border-color: var(--accent); background: var(--accent); }
.modal-more:hover b { color: rgba(255,255,255,.7); }
.modal-nav { margin-top: 27px; display: flex; align-items: center; justify-content: space-between; color: #888075; font: 400 7px/1 var(--mono); letter-spacing: .13em; }.modal-nav button { width: 34px; height: 34px; border: 1px solid #aaa297; border-radius: 50%; background: none; color: #3f3b36; cursor: pointer; }.modal-nav button:hover { color: white; border-color: var(--accent); background: var(--accent); }

.sound-toast { position: fixed; z-index: 800; right: 30px; bottom: 30px; max-width: 280px; padding: 15px 18px; border: 1px solid #55514a; background: #1b1a17; color: #b8b2a8; font: 400 9px/1.5 var(--mono); transform: translateY(20px); opacity: 0; pointer-events: none; transition: .3s; }.sound-toast.show { transform: none; opacity: 1; }

@keyframes revealNext { from { opacity: 0; transform: translateY(20px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes revealPrev { from { opacity: 0; transform: translateY(-20px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes pulse { 50% { opacity: .4; box-shadow: 0 0 0 7px transparent; } }
@keyframes scroll { 0% { opacity:0; transform:translateY(-2px); } 40% { opacity:1; } 100% { opacity:0; transform:translateY(8px); } }
@keyframes bars { to { height: 3px; } }

@media (max-width: 1050px) {
  .timeline-view { grid-template-columns: 160px 1fr; }
  .timeline-nav { padding-left: 24px; padding-right: 16px; }
  .timeline-stage { grid-template-columns: minmax(330px, 1fr) minmax(330px, .9fr); padding-left: 2vw; padding-right: 4vw; }
  .artist-visual { width: min(39vw, 430px); }
  .artist-intro { padding-left: 2vw; }
  .navigation-hint { display: none; }
  .artworks-wall { gap: 25px; }
  .modal-content { padding-left: 45px; padding-right: 45px; }
}

@media (max-height: 700px) and (min-width: 761px) {
  .timeline-stage {
    align-items: start;
    padding-top: 32px;
    padding-bottom: 0;
  }

  .spotlight {
    top: 0;
    height: 100%;
  }

  .era-watermark { bottom: 0; }

  .artist-visual,
  .artist-intro { align-self: start; }

  .artist-intro { padding-top: 12px; }
}

@media (max-width: 760px) {
  html, body { overflow: hidden; }
  .site-header { height: 66px; padding: 0 18px; grid-template-columns: 1fr auto; }
  .header-context { display: none; }
  .sound-button { font-size: 0; }
  .timeline-view { padding-top: 66px; grid-template-columns: 1fr; }
  .timeline-nav { position: absolute; z-index: 40; left: 0; right: 0; bottom: 0; height: 82px; padding: 0 18px; border: 0; border-top: 1px solid rgba(255,255,255,.1); }
  .timeline-label, .node-name { display: none; }
  .era-filters { position: absolute; left: 14px; right: 14px; bottom: 92px; z-index: 45; margin: 0; padding: 5px; display: flex; gap: 4px; background: rgba(20,20,18,.88); border: 1px solid rgba(255,255,255,.08); backdrop-filter: blur(8px); }
  .era-filters button:first-child { grid-column: auto; }
  .era-filters button { flex: 1; padding: 7px 3px; font-size: 5px; }
  .timeline-artists { height: 100%; padding: 0; flex-direction: row; align-items: center; gap: 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
  .timeline-artists::-webkit-scrollbar { display: none; }
  .timeline-node { width: 56px; flex: 0 0 56px; min-height: 50px; padding: 26px 0 0; text-align: center; }
  .timeline-node::after { top: 13px; left: calc(50% + 4px); width: calc(100% - 4px); height: 1px; }
  .node-dot { top: 10px; left: 50%; transform: translateX(-50%); }
  .node-year { font-size: 7px; }
  .timeline-endcap { width: 66px; min-height: 50px; flex: 0 0 66px; padding: 26px 0 0; text-align: center; }
  .timeline-endcap > span { top: 10px; left: 50%; transform: translateX(-50%); }
  .timeline-endcap b { font-size: 7px; }
  .timeline-endcap small { display: none; }
  .timeline-stage { padding: 20px 20px 105px; grid-template-columns: 1fr; grid-template-rows: 45% 55%; align-items: center; }
  .artist-visual { width: 72vw; height: 34vh; align-self: end; }
  .hero-frame { width: auto; max-width: 80%; max-height: 90%; padding: 6px; }
  .frame-inner { padding: 4px; }
  .hero-frame img { width: auto; max-width: 100%; max-height: 27vh; }
  .art-label { margin-right: 1%; min-width: 110px; font-size: 6px; padding: 6px; }
  .artist-intro { align-self: start; padding: 9px 10px 0; text-align: center; }
  .eyebrow { justify-content: center; font-size: 7px; }
  .artist-intro h1 { margin: 12px 0 7px; max-width: none; font-size: clamp(38px, 11vw, 56px); }
  .artist-meta { justify-content: center; font-size: 6px; }
  .artist-lead { margin: 13px 0 7px; font-size: 15px; }
  .artist-description { max-width: none; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 9px; line-height: 1.55; }
  .enter-gallery { margin: 15px auto 0; min-width: 200px; padding: 12px 15px; font-size: 7px; }
  .timeline-controls { display: none; }
  .era-watermark { font-size: 38vw; bottom: 5%; }
  .gallery-view { padding-top: 66px; grid-template-rows: 57px 1fr 45px; }
  .gallery-topbar { padding: 0 17px; grid-template-columns: auto 1fr; }
  .gallery-title { justify-self: end; min-width: 0; padding-left: 17px; border-left: 1px solid #c6beb2; border-right: 0; }
  .gallery-title strong { font-size: 15px; }
  .gallery-tip { display: none; }
  .room-left, .room-right { width: 8%; }
  .room-back-wall { left: 6%; right: 6%; top: 9%; bottom: 17%; }
  .room-ceiling { inset-left: 3%; inset-right: 3%; }
  .room-heading { top: 17px; }
  .room-heading h2 { font-size: 20px; }
  .artworks-wall { top: 20%; left: 4%; right: 4%; bottom: 7%; grid-template-columns: repeat(3, 1fr); gap: 9px; }
  .wall-frame { padding: 3px; border-width: 1px; box-shadow: inset 0 0 0 1px #ad9168, 0 9px 14px rgba(35,29,23,.3); }
  .wall-frame-inner, .artwork-1 .wall-frame-inner, .artwork-3 .wall-frame-inner { height: 22vh; padding: 2px; }
  .wall-plaque { min-width: 0; width: 90%; padding: 4px; margin-top: 7px; }
  .wall-plaque b { font-size: 5px; }.wall-plaque small { font-size: 5px; }
  .gallery-footer { padding: 0 16px; grid-template-columns: 1fr auto; }.gallery-footer > div:first-child { display: none; }.gallery-pagination { display: none; }.gallery-footer button { grid-column: 2; }
  .gallery-3d-title { top: 18px; min-width: 240px; }
  .gallery-3d-title h2 { font-size: 20px; }
  .walk-intro { left: 18px; right: 18px; top: auto; bottom: 22px; width: auto; padding: 25px 25px 22px; transform: none; }
  .walk-intro.is-hidden { transform: translateY(20px); }
  .walk-intro h3 { margin: 13px 0 11px; font-size: 48px; }
  .walk-intro p { font-size: 10px; }
  .walk-intro button { margin-top: 17px; padding: 14px; }
  .walk-intro small { margin-top: 11px; }
  .walk-controls { left: 13px; right: 13px; bottom: 13px; }
  .room-portal-prompt { top: 66px; min-width: 230px; padding: 10px 13px; }
  .room-portal-prompt strong { font-size: 16px; }
  .desktop-controls { display: none; }
  .mobile-controls { display: flex; justify-content: center; gap: 6px; pointer-events: auto; }
  .mobile-controls button { width: 46px; height: 46px; border: 1px solid rgba(255,255,255,.38); border-radius: 50%; background: rgba(18,18,16,.72); color: white; font-size: 16px; touch-action: none; }
  .mobile-controls button:active { background: var(--accent); border-color: var(--accent); }
  .artwork-focus { bottom: 70px; min-width: 0; width: calc(100% - 32px); }
  .gallery-crosshair { width: 18px; height: 18px; margin: -9px 0 0 -9px; }
  .gallery-crosshair i:first-child { left: 5px; right: 5px; top: 8px; }
  .gallery-crosshair i:last-child { top: 5px; bottom: 5px; left: 8px; }
  .artwork-modal { grid-template-columns: 1fr; grid-template-rows: 45vh 1fr; overflow-y: auto; }
  .modal-visual { min-height: 45vh; padding: 45px 20px 25px; position: sticky; top: 0; z-index: 2; }
  .modal-visual img { max-height: 36vh; }
  .zoom-button { top: 13px; left: 15px; }
  .modal-image-index { bottom: 12px; left: 15px; }
  .modal-close { position: fixed; top: 13px; right: 15px; width: 32px; height: 32px; }
  .modal-content { overflow: visible; padding: 35px 24px 45px; }
  .modal-content h2 { font-size: 43px; }
  .modal-intro { font-size: 15px; }
  .artwork-modal.zoomed .modal-visual { position: fixed; inset: 0; height: 100vh; }
  .artwork-modal.zoomed .modal-visual img { width: 170%; }
  .artwork-modal.zoomed .modal-content { display: none; }
}

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