:root {
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: black;
  color: white;
  font-family: monospace;
  overflow-x: hidden;
}

#noise {
  position: fixed;
  inset: 0;
  background: repeating-radial-gradient(circle, #000 0, #111 1px, #000 2px);
  animation: noiseMove 0.3s infinite;
  opacity: 0.15;
  pointer-events: none;
  z-index: 10;
}

@keyframes noiseMove {
  from { transform: translate(0, 0); }
  to { transform: translate(10px, -10px); }
}

.glitchText { animation: textGlitch 1.5s infinite; }

@keyframes textGlitch {
  0% { transform: translate(0); opacity: 0.8; }
  40% { transform: translate(2px, -1px); opacity: 0.4; }
  80% { transform: translate(-1px, 2px); }
  100% { transform: translate(0); }
}

.hero {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  padding: 24px;
}

h1 {
  letter-spacing: 0.3em;
  line-height: 1.5;
  text-align: center;
  animation: glitch 2s infinite;
}

@keyframes glitch {
  0%, 100% { transform: translate(0); }
  50% { transform: translate(2px, -2px); }
}

.enter {
  margin-top: 30px;
  border: 1px solid white;
  padding: 10px 20px;
  color: white;
  background: black;
  font: inherit;
  cursor: pointer;
}

.enter:focus-visible,
.tile:focus-visible {
  outline: 2px solid white;
  outline-offset: 5px;
}

.museum {
  min-height: 100vh;
  background: #ecebe6;
  color: #111;
  font-family: Arial, Helvetica, sans-serif;
}

.museumHeader {
  height: 74px;
  display: grid;
  grid-template-columns: 90px 1fr auto;
  align-items: center;
  border-bottom: 1px solid #111;
  padding: 0 3vw;
  font-size: .75rem;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.museumMark { font: 800 1.3rem/1 Arial, sans-serif; letter-spacing: -.08em; }
.museumMode { text-align: right; }

.exhibition {
  min-height: calc(100vh - 74px);
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 24px 3vw 20px;
}

.workMeta,
.exhibitionFooter {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  align-items: center;
  gap: 24px;
  font-size: .72rem;
  letter-spacing: .12em;
}

.stage {
  min-height: 560px;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, .8fr);
  align-items: center;
  position: relative;
  gap: 5vw;
  padding: 28px 2vw;
  overflow: hidden;
}

.stageVisual {
  height: min(60vh, 620px);
  background: #161616;
  position: relative;
  overflow: hidden;
  box-shadow: 22px 22px 0 #d7d5ce;
  transition: opacity .45s ease, transform .45s ease;
}

.stageVisual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%) contrast(125%);
  mix-blend-mode: luminosity;
}

.stageVisual.is-type {
  display: flex;
  align-items: flex-end;
  padding: 6%;
  color: #ecebe6;
  background: #1746d1;
}

.stageVisual.is-type::before {
  content: "";
  width: 38%;
  aspect-ratio: 1;
  position: absolute;
  right: 7%;
  top: 10%;
  background: #ff3b20;
  border-radius: 50%;
  mix-blend-mode: multiply;
}

.visualWord {
  position: relative;
  z-index: 1;
  font-size: clamp(3rem, 7vw, 8rem);
  font-weight: 800;
  line-height: .78;
  letter-spacing: -.08em;
}

.stageAccent {
  position: absolute;
  width: clamp(70px, 9vw, 145px);
  aspect-ratio: 1;
  background: #f04124;
  border-radius: 50%;
  right: 25%;
  top: 10%;
  z-index: 2;
  pointer-events: none;
  mix-blend-mode: multiply;
  transition: transform .5s ease, border-radius .5s ease;
}

.stageCopy {
  align-self: end;
  padding-bottom: 8vh;
  position: relative;
  z-index: 3;
}

.stageKicker,
.stageDetail {
  font-size: .75rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  max-width: 33ch;
}

.stageCopy h2 {
  margin: 22px 0 26px;
  font-size: clamp(3.4rem, 7vw, 8rem);
  line-height: .78;
  letter-spacing: -.075em;
  overflow-wrap: anywhere;
}

.timeline { height: 2px; background: #bab8b0; overflow: hidden; }
.timeline span { display: block; width: 0; height: 100%; background: #111; }
.timeline span.running { animation: countFive 5s linear forwards; }
@keyframes countFive { from { width: 0; } to { width: 100%; } }

#showAll {
  border: 0;
  border-bottom: 1px solid #111;
  background: transparent;
  padding: 7px 0;
  font: inherit;
  letter-spacing: inherit;
  cursor: pointer;
}

.collection {
  padding: 6vw 3vw 9vw;
}

.collectionIntro {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4vw;
  align-items: end;
  border-bottom: 1px solid #111;
  padding-bottom: 5vw;
  margin-bottom: 5vw;
}

.collectionIntro p { font-size: .75rem; letter-spacing: .12em; }
.collectionIntro h2 {
  margin: 0;
  font-size: clamp(3.2rem, 8vw, 8rem);
  line-height: .83;
  letter-spacing: -.07em;
}

.collectionGrid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 5vw 2vw;
}

.workCard {
  grid-column: span 6;
  color: #111;
  text-decoration: none;
  border-top: 1px solid #111;
  padding-top: 12px;
}

.workCard:nth-child(3n) { grid-column: 3 / span 8; }
.workCard:nth-child(even) { margin-top: 8vw; }

.cardHead {
  display: flex;
  justify-content: space-between;
  font-size: .72rem;
  letter-spacing: .1em;
  margin-bottom: 12px;
}

.cardVisual {
  aspect-ratio: 16 / 9;
  background: #161616;
  overflow: hidden;
  position: relative;
}

.cardVisual img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(100%) contrast(125%); transition: filter .3s; }
.workCard:hover img { filter: grayscale(0%) contrast(110%); }
.cardVisual.typeWork { background: #1746d1; color: white; display: flex; align-items: flex-end; padding: 7%; }
.cardVisual.typeWork::after { content: ""; position: absolute; width: 30%; aspect-ratio: 1; border-radius: 50%; background: #f04124; right: 8%; top: 10%; mix-blend-mode: multiply; }
.cardVisual .visualWord { font-size: clamp(2rem, 5vw, 5rem); }

.workCard h3 {
  font-size: clamp(1.8rem, 3vw, 3.6rem);
  line-height: .9;
  letter-spacing: -.05em;
  margin: 18px 0 8px;
}

.workCard p { margin: 0; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; }

@media (max-width: 600px) {
  h1 { font-size: 1.45rem; }
  .museumHeader { grid-template-columns: 52px 1fr; padding: 0 20px; }
  .museumName { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .museumMode { display: none; }
  .exhibition { padding: 18px 20px 16px; }
  .workMeta, .exhibitionFooter { grid-template-columns: 1fr auto; }
  .workMeta span:last-child { text-align: right; }
  .stage { grid-template-columns: 1fr; min-height: auto; padding: 22px 0; gap: 28px; }
  .stageVisual { height: 40vh; min-height: 300px; box-shadow: 12px 12px 0 #d7d5ce; }
  .stageAccent { right: 7%; top: 44%; }
  .stageCopy { padding-bottom: 0; }
  .stageCopy h2 { font-size: clamp(3.2rem, 18vw, 5.3rem); margin: 16px 0 20px; }
  .timeline { grid-column: 1 / -1; grid-row: 2; }
  .exhibitionFooter > span { display: none; }
  .collection { padding: 50px 20px 90px; }
  .collectionIntro { grid-template-columns: 1fr; }
  .collectionIntro h2 { font-size: 16vw; }
  .workCard, .workCard:nth-child(3n) { grid-column: 1 / -1; }
  .workCard:nth-child(even) { margin-top: 3vw; }
}

@media (prefers-reduced-motion: reduce) {
  #noise, .glitchText, h1 { animation: none; }
  .timeline span.running { animation: none; width: 100%; }
}
