:root {
  color-scheme: dark;
  --ink: #0b0f14;
  --paper: #f6f1e8;
  --muted: #a8b0b7;
  --line: rgba(246, 241, 232, 0.18);
  --red: #ff4d2e;
  --cyan: #00c2ff;
  --yellow: #ffd447;
  --tone: #0b0f14;
  --tone-soft: #101821;
  --tone-warm: #15100f;
  --accent: #00c2ff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--tone);
  color: var(--paper);
  font-family: Inter, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.5;
}

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

body[data-theme="en"] {
  --tone: #0b0f14;
  --tone-soft: #101821;
  --tone-warm: #15100f;
  --accent: #00c2ff;
}

body[data-theme="zh"] {
  --tone: #160d12;
  --tone-soft: #24121a;
  --tone-warm: #2d1111;
  --accent: #ff4d2e;
}

body[data-theme="es"] {
  --tone: #102016;
  --tone-soft: #14291d;
  --tone-warm: #202112;
  --accent: #ffd447;
}

body[data-theme="fr"] {
  --tone: #101538;
  --tone-soft: #151d4b;
  --tone-warm: #241845;
  --accent: #7dd3fc;
}

body[data-theme="ar"] {
  --tone: #17120a;
  --tone-soft: #241b0e;
  --tone-warm: #2d1f0b;
  --accent: #d7ff72;
}

body[data-theme="ja"] {
  --tone: #121212;
  --tone-soft: #1c1c1c;
  --tone-warm: #2a1515;
  --accent: #ff8ab3;
}

body[data-theme="black"] { --tone: #000000; }
body[data-theme="blue"] { --tone: #dff5fa; }
body[data-theme="pink"] { --tone: #fce6f2; }
body[data-theme="mint"] { --tone: #e1faee; }
body[data-theme="lavender"] { --tone: #eedff7; }
body[data-theme="gray"] { --tone: #d6d5d7; }
body[data-theme="white"] { --tone: #fafbf2; }
body[data-theme="blue"], body[data-theme="pink"], body[data-theme="mint"],
body[data-theme="lavender"], body[data-theme="gray"], body[data-theme="white"] {
  color-scheme: light;
  --paper: #202124;
  --ink: #ffffff;
  --muted: #4b5157;
  --line: rgba(32, 33, 36, 0.12);
  --accent: #9f332a;
  --cyan: #005d75;
  --red: #a62e20;
  --yellow: #735300;
}

.brand-stack { display: grid; gap: 4px; min-width: 0; }
.brand-stack .color-controls { margin-inline-start: 46px; }
.color-controls { display: flex; align-items: center; gap: 0; flex-wrap: wrap; }
.color-controls button {
  width: 26px; height: 28px; padding: 7px; border: 0;
  background: transparent; cursor: pointer; flex: 0 0 26px;
  display: grid; place-items: center;
}
.color-controls button::before {
  content: ""; width: 10px; height: 10px; border-radius: 50%;
  background: var(--swatch); border: 0;
}
.color-controls button { position: relative; }
.color-controls button[data-color="black"]::before { background: #303030; }
.color-controls button:focus-visible { outline: none; box-shadow: inset 0 -1px var(--muted); }
.site-header { flex-wrap: wrap; }

.language-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  gap: 1px;
  align-items: center;
  overflow-x: auto;
  background: var(--tone);
  color: var(--paper);
  border-bottom: 1px solid var(--line);
  scrollbar-width: thin;
  scrollbar-color: var(--muted) var(--tone);
  height: 46px;
  direction: ltr;
}

.language-bar::-webkit-scrollbar {
  height: 4px;
}
.language-bar::-webkit-scrollbar-thumb { background: var(--muted); }

.language-bar button {
  appearance: none;
  border: 0;
  font: inherit;
  flex: 0 0 auto;
  height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  background: transparent;
  border-right: 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
}

.language-bar button:hover,
.language-bar button:focus-visible,
.language-bar button.active {
  background: var(--tone);
  color: var(--paper);
  box-shadow: inset 0 -2px var(--accent);
}

.site-header {
  position: sticky;
  top: 46px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 5vw, 64px);
  background: var(--tone);
  border-bottom: 1px solid var(--line);
}

.brand,
nav,
.hero-actions,
footer {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  font-weight: 600;
  text-transform: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  background: transparent;
  color: var(--paper);
  font-size: 1rem;
}

nav {
  gap: clamp(14px, 3vw, 34px);
  color: var(--muted);
  font-size: 0.95rem;
}

nav a:hover,
nav a:focus-visible {
  color: var(--paper);
}

nav .participate-link {
  padding: 10px 16px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 700;
  white-space: nowrap;
}

nav .participate-link:hover,
nav .participate-link:focus-visible {
  color: var(--ink);
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.hero {
  position: relative;
  min-height: 560px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
  padding: clamp(44px, 8vw, 108px) clamp(18px, 5vw, 64px) 40px;
  overflow: hidden;
}

.hero-grid {
  position: absolute;
  inset: 0;
  display: none;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(3, 1fr);
  opacity: 0.38;
}

.hero-grid span {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.hero-content,
.hero-panel,
.intro,
.section,
.identity,
.press,
footer {
  position: relative;
}

.kicker {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 980px;
  margin-bottom: 22px;
  font-size: 80px;
  font-weight: 500;
  line-height: 1.12;
  overflow-wrap: anywhere;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 40px;
  font-weight: 500;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

h3 {
  margin-bottom: 10px;
  font-size: 18px;
  font-weight: 500;
}

.biennial-motto {
  max-width: 780px;
  margin: 28px 0 24px;
  color: var(--paper);
  font-size: 28px;
  font-weight: 500;
  line-height: 1.5;
  text-wrap: balance;
}

.hero-copy {
  max-width: 680px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  border: 1px solid var(--paper);
  font-weight: 500;
}

.button.primary {
  background: var(--paper);
  color: var(--ink);
}

.button.secondary {
  color: var(--paper);
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.hero-panel {
  display: grid;
  gap: 1px;
  background: transparent;
  border: 0;
}

.hero-panel div {
  padding: 24px 0;
  border-top: 1px solid var(--line);
  background: var(--tone);
}

.metric {
  display: block;
  color: var(--paper);
  font-size: 32px;
  font-weight: 400;
  line-height: 1.4;
}

.intro,
.section,
.identity,
.press {
  padding: clamp(48px, 8vw, 104px) clamp(18px, 5vw, 64px);
}

.intro {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--tone);
  color: var(--paper);
}

.intro p {
  max-width: 1080px;
  margin-bottom: 0;
  font-size: 28px;
  font-weight: 400;
  line-height: 1.65;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 34px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.program-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
  background: transparent;
  border: 0;
}

.program-grid article {
  min-height: 0;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  background: var(--tone);
}

.tag {
  display: inline-block;
  margin-bottom: 32px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

.program-grid p,
.identity-notes p,
.press p,
.timeline span {
  color: var(--muted);
}

.identity {
  background: var(--tone);
}

.identity-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: stretch;
}

.featured-artwork {
  margin: 0 0 40px;
  min-width: 0;
}

.featured-artwork iframe {
  display: block;
  width: 100%;
  height: clamp(380px, 72vh, 850px);
  border: 0;
  background: #000;
}

.featured-artwork figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px 32px;
  padding: 20px 0;
}

.featured-artwork figcaption p { margin: 0; flex: 1 1 260px; }
.featured-artwork figcaption a { color: inherit; text-underline-offset: 5px; }
.identity-layout.artwork-details { grid-template-columns: minmax(0, 1fr); }

.poster {
  min-height: 640px;
  display: grid;
  align-content: space-between;
  padding: 26px;
  background: var(--paper);
  color: var(--ink);
  overflow: hidden;
}

.poster span {
  font-size: clamp(6rem, 16vw, 13rem);
  font-weight: 950;
  line-height: 0.82;
}

.poster strong {
  max-width: 7ch;
  font-size: clamp(3rem, 8vw, 7rem);
  line-height: 0.82;
  word-break: break-word;
}

.poster em {
  justify-self: end;
  font-size: 2rem;
  font-style: normal;
  font-weight: 900;
}

.identity-notes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  background: transparent;
  border: 0;
}

.identity-notes > div {
  padding: 24px 0;
  border-top: 1px solid var(--line);
  background: var(--tone);
}

.swatches {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.swatch {
  min-height: 86px;
  display: flex;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--line);
  font-size: 0.86rem;
  font-weight: 800;
}

.swatch.black { background: var(--ink); color: var(--paper); }
.swatch.ivory { background: var(--paper); color: var(--ink); }
.swatch.red { background: var(--red); color: var(--ink); }
.swatch.cyan { background: var(--cyan); color: var(--ink); }

.timeline {
  display: grid;
  border-top: 1px solid var(--line);
}

.timeline div {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 18px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

time {
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
}

.press {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: end;
  background: var(--paper);
  color: var(--ink);
}

.press .kicker,
.press p {
  color: #5a646e;
}

.press h2 {
  max-width: 780px;
}

.press .button.primary {
  flex: 0 0 auto;
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

footer {
  justify-content: space-between;
  gap: 18px;
  padding: 22px clamp(18px, 5vw, 64px);
  color: var(--muted);
  border-top: 1px solid var(--line);
}

@media (max-width: 900px) {
  .site-header,
  .press,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    width: 100%;
    justify-content: space-between;
  }

  .hero,
  .identity-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

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

  .poster {
    min-height: 480px;
  }
}

@media (max-width: 560px) {
  .site-header {
    position: sticky;
  }

  nav {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  h1 {
    font-size: 40px;
  }

  h2 { font-size: 28px; }
  .biennial-motto { font-size: 22px; }
  .intro p { font-size: 22px; }
  .hero-copy { font-size: 16px; }
  .identity-notes { grid-template-columns: 1fr; }
  .site-header { gap: 12px; padding-block: 12px; }
  nav { font-size: 13px; gap: 16px; }

  .program-grid,
  .swatches {
    grid-template-columns: 1fr;
  }

  .timeline div {
    grid-template-columns: 1fr;
  }

  footer {
    flex-direction: column;
    align-items: flex-start;
  }
}
