:root {
  color-scheme: light;
  --ink: #161616;
  --muted: #7c7c7c;
  --line: #d9d9d9;
  --paper: #f7f7f5;
  --shadow: 0 28px 70px rgba(0, 0, 0, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, "Noto Sans TC", "PingFang TC", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.shell {
  width: 100%;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 82px 1fr;
  background: var(--paper);
}

.rail {
  position: relative;
  display: grid;
  grid-template-rows: 86px 1fr auto;
  justify-items: center;
  align-items: center;
  overflow: hidden;
  background: #0d0d0d;
  color: #fff;
}

.mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.35);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0;
}

.rail-line {
  width: 1px;
  height: 68%;
  background: rgba(255, 255, 255, 0.2);
}

.rail-word {
  margin-bottom: 32px;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 10px;
  letter-spacing: 0.32em;
}

.stage {
  position: relative;
  min-width: 0;
  min-height: 100vh;
  overflow: hidden;
}

.topbar {
  height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(22px, 4vw, 62px);
  font-size: 10px;
  letter-spacing: 0.28em;
}

.nav {
  display: flex;
  gap: clamp(24px, 5vw, 72px);
}

.nav a {
  color: #595959;
  transition: color 160ms ease;
}

.nav a.is-active,
.nav a:hover {
  color: var(--ink);
}

.page {
  position: absolute;
  inset: 86px 0 0;
  display: grid;
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px);
  transition: opacity 240ms ease, transform 240ms ease;
}

.page.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.page-home {
  overflow: hidden;
  grid-template-columns: minmax(230px, 0.8fr) minmax(360px, 1.7fr);
  grid-template-rows: 1fr 88px;
  align-items: center;
  padding: 0 clamp(22px, 4vw, 62px) 20px;
}

.intro {
  position: relative;
  z-index: 2;
  align-self: start;
  padding-top: clamp(34px, 8vh, 84px);
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.38em;
}

h1,
h2 {
  margin: 0;
  line-height: 0.88;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(48px, 6vw, 92px);
}

h2 {
  font-size: clamp(56px, 11vw, 166px);
}

.copy,
.page-heading p,
.artist-text p,
.work-meta {
  color: #555;
  font-size: 13px;
  line-height: 1.75;
}

.copy {
  max-width: 290px;
  margin: 18px 0 20px;
}

.outline-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 118px;
  min-height: 30px;
  padding: 0 18px;
  border: 1px solid #9a9a9a;
  background: transparent;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.35em;
}

.hero-visual {
  position: relative;
  min-height: 360px;
  display: grid;
  place-items: center;
}

.hero-visual img {
  position: relative;
  z-index: 2;
  width: min(104%, 720px);
  max-height: 480px;
  object-fit: contain;
  filter: drop-shadow(0 20px 28px rgba(0, 0, 0, 0.13));
}

.hero-number {
  position: absolute;
  z-index: 1;
  top: 45%;
  left: 52%;
  transform: translate(-50%, -50%);
  color: #d5d5d3;
  font-size: clamp(160px, 25vw, 330px);
  font-weight: 900;
  line-height: 0.76;
  letter-spacing: 0;
}

.carousel-controls {
  grid-column: 2;
  align-self: end;
  display: grid;
  grid-template-columns: 38px 42px minmax(120px, 280px) 42px 38px;
  align-items: center;
  justify-content: end;
  gap: 12px;
}

.carousel-controls button {
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: #777;
  font-size: 24px;
  cursor: pointer;
}

.carousel-controls span,
.carousel-controls strong {
  font-size: 26px;
  letter-spacing: 0.12em;
}

.carousel-controls span {
  color: #aaa;
}

.progress {
  height: 1px;
  background: #cfcfcd;
}

.progress span {
  display: block;
  width: 20%;
  height: 100%;
  background: var(--ink);
  transition: width 240ms ease;
}

.page-artist,
.page-work {
  grid-template-columns: minmax(220px, 0.8fr) minmax(360px, 1.2fr);
  gap: clamp(24px, 5vw, 70px);
  align-items: start;
  padding: 70px clamp(22px, 5vw, 72px) 76px;
}

.page-artist {
  grid-template-rows: auto auto;
}

.page-heading {
  max-width: 380px;
}

.page-heading p:last-child {
  margin-top: 22px;
}

.page-work h2 {
  font-size: clamp(54px, 8vw, 118px);
}

.artist-card {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(180px, 330px) minmax(180px, 260px);
  align-items: end;
  gap: 24px;
}

.artist-card img {
  width: 100%;
  aspect-ratio: 0.9;
  object-fit: cover;
}

.artist-card figcaption {
  border-left: 1px solid var(--line);
  padding-left: 22px;
}

.artist-card span,
.artist-card strong {
  display: block;
}

.artist-card span {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.38em;
}

.artist-card strong {
  max-width: 210px;
  font-size: 28px;
  line-height: 1.12;
}

.artist-text {
  grid-column: 2;
  max-width: 560px;
  margin-top: -22px;
}

.work-meta {
  display: grid;
  gap: 8px;
  margin: 0 0 22px;
}

.work-meta div {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 18px;
  border-bottom: 1px solid #e1e1de;
  padding-bottom: 8px;
}

.work-meta dt {
  color: var(--ink);
  font-weight: 800;
  letter-spacing: 0.12em;
}

.work-meta dd {
  margin: 0;
}

.artist-text h3 {
  margin: 0 0 10px;
  font-size: 14px;
  letter-spacing: 0.22em;
}

.artist-text p {
  margin: 0 0 12px;
}

.mode-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 28px;
}

.mode-buttons button {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: transparent;
  color: #4c4c4c;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.mode-buttons button.is-active,
.mode-buttons button:hover {
  border-color: var(--ink);
  background: #fff;
  color: var(--ink);
}

.swatch {
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  border: 1px solid #aaa;
  border-radius: 50%;
}

.swatch-normal {
  background: #eee7d7;
}

.swatch-red {
  background: #ff6a63;
}

.swatch-green {
  background: #6bd487;
}

.swatch-blue {
  background: #5f8dff;
}

.rotator {
  min-width: 0;
  align-self: center;
}

.rotator-frame {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 370px;
  overflow: hidden;
  background: #fff;
  cursor: grab;
  user-select: none;
}

.rotator-frame:active {
  cursor: grabbing;
}

.rotator-frame img {
  position: relative;
  z-index: 2;
  width: min(100%, 760px);
  aspect-ratio: 821 / 496;
  object-fit: contain;
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.1));
}

.rotator-number {
  position: absolute;
  z-index: 1;
  right: 20px;
  bottom: -14px;
  color: #e2e2df;
  font-size: clamp(86px, 12vw, 150px);
  font-weight: 900;
  line-height: 0.78;
  letter-spacing: 0;
}

.rotator-controls {
  display: grid;
  grid-template-columns: 36px minmax(120px, 1fr) 36px 74px;
  gap: 12px;
  align-items: center;
  margin-top: 18px;
}

.rotator-controls button {
  height: 34px;
  border: 0;
  background: transparent;
  color: #666;
  cursor: pointer;
}

.rotator-controls button:not(.play-button) {
  font-size: 28px;
}

.play-button {
  border: 1px solid var(--line) !important;
  background: #fff !important;
  color: var(--ink) !important;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.22em;
}

.play-button[aria-pressed="false"] {
  color: #888 !important;
}

.rotation-progress {
  height: 1px;
  background: #d7d7d4;
}

.rotation-progress span {
  display: block;
  width: 5.56%;
  height: 100%;
  background: var(--ink);
  transition: width 140ms ease;
}

.drag-hint {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.34em;
  text-align: right;
}

@media (max-width: 820px) {
  body {
    background: var(--paper);
  }

  .shell {
    min-height: 100vh;
    grid-template-columns: 54px 1fr;
  }

  .topbar {
    height: 70px;
    padding: 0 18px;
  }

  .nav {
    gap: 16px;
    font-size: 9px;
    letter-spacing: 0.16em;
  }

  .page {
    inset: 70px 0 0;
  }

  .page-home {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
    padding: 0 18px 22px;
  }

  .intro {
    padding-top: 14px;
  }

  .hero-visual {
    min-height: 330px;
  }

  .hero-visual img {
    width: 108%;
  }

  .carousel-controls {
    grid-column: 1;
    grid-template-columns: 34px 40px 1fr 40px 34px;
    justify-content: stretch;
  }

  .page-artist,
  .page-work {
    position: relative;
    inset: auto;
    min-height: auto;
    display: none;
    overflow: visible;
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: start;
    padding: 24px 18px 42px;
  }

  .page-artist.is-active,
  .page-work.is-active {
    display: grid;
  }

  .page-home:not(.is-active) {
    display: none;
  }

  h2 {
    font-size: clamp(48px, 18vw, 86px);
  }

  .artist-card {
    grid-template-columns: 1fr;
  }

  .artist-card img {
    max-height: 520px;
    object-position: top center;
  }

  .artist-text {
    grid-column: 1;
    margin-top: 0;
  }

  .work-meta div {
    grid-template-columns: 76px 1fr;
    gap: 12px;
  }

  .mode-buttons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rotator-frame {
    min-height: 260px;
  }

  .rotator-controls {
    grid-template-columns: 34px 1fr 34px 70px;
  }
}

@media (max-width: 520px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .rail {
    display: none;
  }

  .topbar {
    padding-inline: 14px;
  }

  .nav {
    gap: 12px;
  }

  .hero-number {
    font-size: 148px;
  }

  .mode-buttons {
    grid-template-columns: 1fr;
  }
}
