/* The date records the release, not the visitor's current date. */
.footer-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.last-updated {
  font-size: 12px;
  line-height: 1.7;
  letter-spacing: 0.02em;
}
.footer .last-updated > span {
  display: inline;
}
html:is(:lang(zh), :lang(ja)) .last-updated {
  font-size: 13px;
}

/* Language controls share the site's sharp-edged, theme-aware design. */
.language-picker {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 10px;
  letter-spacing: 0.04em;
}
.language-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}
.language-trigger { display: inline-flex; align-items: center; justify-content: space-between; gap: 10px; }
.language-trigger > span { white-space: nowrap; }
.language-trigger > svg { width: 14px; height: 14px; flex: 0 0 14px; fill: none; stroke: currentColor; stroke-width: 1.5; transition: transform 220ms ease; }
.is-open .language-trigger > svg { transform: rotate(180deg); }
.language-picker .language-trigger:active { transform: none; }
.language-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 12px);
  right: 0;
  width: 180px;
  padding: 6px;
  border: 1px solid #b6ddeb55;
  background: #13253be6;
  box-shadow: inset 0 1px #effaff24, 0 12px 32px #02061066;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 200ms ease, transform 220ms ease, visibility 0s linear 220ms;
}
.is-open .language-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
  transition-delay: 0s;
}
@supports (backdrop-filter: blur(18px)) {
  .language-menu { background: #14283bd1; backdrop-filter: blur(18px) saturate(115%); -webkit-backdrop-filter: blur(18px) saturate(115%); }
}
.language-option {
  position: relative;
  display: block;
  width: 100%;
  padding: 11px 30px 11px 12px;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  font: inherit;
  font-size: 14px;
  line-height: 1.5;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease;
}
.language-option:is(:hover, :focus-visible) { outline: none; background: #b3e8ff18; color: #e6fcff; }
.language-option[aria-selected="true"] { color: #b2f0f2; background: #a0dce40d; }
.language-option[aria-selected="true"]::after { content: ""; position: absolute; right: 12px; top: 50%; width: 5px; height: 5px; margin-top: -2px; background: #c4faff; box-shadow: 0 0 6px #a6eaff80; }
.language-picker :is(select, .language-trigger) {
  min-width: 0;
  max-width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  padding: 6px 8px;
  cursor: pointer;
}
.language-picker option {
  color: var(--ink);
  background: var(--paper);
}
.language-picker :is(select, .language-trigger):focus-visible {
  outline: 2px solid var(--accent, var(--aqua));
  outline-offset: 3px;
}
.language-picker :is(select, .language-trigger):hover {
  border-color: var(--accent, var(--aqua));
}
.navlinks {
  gap: clamp(12px, 2vw, 26px);
}
.navlinks > a {
  white-space: nowrap;
}
html:lang(zh) body {
  font-family: Inter, "Noto Sans SC", "Noto Sans TC", "Microsoft YaHei", "PingFang SC", "PingFang TC", sans-serif;
}
html:lang(zh-Hant) body {
  font-family: Inter, "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
}
/* CJK headings need more leading than the compact Latin display type. */
html:not(:lang(en)) .section h2,
html:not(:lang(en)) .page-intro h1,
html:not(:lang(en)) .hero-subtitle {
  line-height: 1.2;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}
html:not(:lang(en)) .contact-page h1 {
  font-size: clamp(38px, 6.4vw, 92px);
}
html:not(:lang(en)) .hero-subtitle {
  font-size: clamp(28px, 3.4vw, 48px);
}
/* Translated titles need natural CJK spacing; original event names keep Latin styling. */
[data-artwork-title]:is(:lang(zh), :lang(ja)) {
  line-height: 1.35;
  letter-spacing: 0.02em;
  overflow-wrap: anywhere;
}
@media (max-width: 1050px) {
  .navlinks {
    gap: 14px;
    letter-spacing: 0.04em;
  }

}
/* Two rows keep all four page links and the language selector accessible on phones. */
@media (max-width: 800px) {
  .detail {
    scroll-margin-top: 108px;
  }
  .site-header {
    height: auto;
    min-height: 96px;
  }
  .site-header .nav {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 8px;
    padding-block: 10px;
  }
  .nav .brand {
    grid-column: 1 / 4;
    grid-row: 1;
  }
  .navlinks {
    display: contents;
  }
  .navlinks > a {
    grid-row: 2;
    grid-column: span 3;
    text-align: center;
    padding-block: 5px;
    font-size: 10px;
    letter-spacing: 0.02em;
  }

  .language-picker {
    grid-column: 8 / 13;
    grid-row: 1;
    justify-content: flex-end;
  }
  .language-menu { top: calc(100% + 52px); }
  .language-picker :is(select, .language-trigger) {
    width: calc(100% - 26px);
    font-size: 11px;
  }
}

/* Dense CJK glyphs need larger controls, not the Latin display tracking. */
html:is(:lang(zh), :lang(ja)) .navlinks > a,

html:is(:lang(zh), :lang(ja)) .language-picker :is(select, .language-trigger),
html:is(:lang(zh), :lang(ja)) .variant > span {
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

html:is(:lang(zh), :lang(ja)) .text-link,
html:is(:lang(zh), :lang(ja)) .hero-footer a {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.03em;
}
@media (max-width: 800px) {

  html:is(:lang(zh), :lang(ja)) .language-picker :is(select, .language-trigger) {
    letter-spacing: 0;
  }
  html:is(:lang(zh), :lang(ja)) .language-picker :is(select, .language-trigger) {
    padding-inline: 4px;
  }
  /* Give the longer Japanese labels more room without shrinking the type. */
  html:lang(ja) .site-header .nav {
    column-gap: 4px;
  }
  html:lang(ja) .navlinks > a:nth-child(-n + 2) {
    grid-column: span 2;
  }
  html:lang(ja) .navlinks > a:nth-child(n + 3) {
    grid-column: span 4;
  }
}

/* A single, square-edged A/B switch, matching the rest of the interface. */
.variant .expression-switch {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 104px;
  height: 44px;
  padding: 3px;
  flex: 0 0 104px;
  isolation: isolate;
  border-radius: 0;
  transform: none;
}
.expression-switch::before {
  content: "";
  position: absolute;
  inset: 3px auto 3px 3px;
  width: calc(50% - 3px);
  background: var(--accent, var(--aqua));
  z-index: -1;
  transition: transform 320ms ease-in-out;
}
.expression-switch[aria-checked="true"]::before {
  transform: translateX(100%);
}
.expression-switch > span {
  align-self: center;
  color: var(--muted);
  transition: color 320ms ease;
}
.expression-switch[aria-checked="false"] > span:first-child,
.expression-switch[aria-checked="true"] > span:last-child {
  color: #0b2428;
}
.expression-switch:focus-visible {
  outline: 2px solid var(--accent, var(--aqua));
  outline-offset: 4px;
}
.variant-error {
  color: var(--muted);
  font-size: 13px;
}
.artist-story {
  border-top: 1px solid var(--line);
}
.artist-story h2 {
  max-width: 18ch;
  margin: 0 0 clamp(32px, 5vw, 64px);
  font-size: clamp(30px, 4.4vw, 60px);
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.artist-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}
.artist-timeline li {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: clamp(24px, 5vw, 72px);
  padding: 32px 0;
  border-top: 1px solid var(--line);
}
.artist-timeline :is(time, .timeline-date) {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent, var(--aqua));
}
.artist-timeline h3,
.story-closing h3 {
  font-size: clamp(20px, 2.5vw, 28px);
  line-height: 1.45;
  margin: 0 0 14px;
}
.artist-timeline p,
.story-closing p {
  max-width: 70ch;
  margin: 0;
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.9;
}
.story-closing {
  margin-top: 40px;
  padding: clamp(24px, 4vw, 48px);
  border-left: 2px solid var(--accent, var(--aqua));
  background: color-mix(in srgb, var(--accent, var(--aqua)) 5%, transparent);
}
@media (max-width: 600px) {
  html:lang(en) .works-intro h1 {
    font-size: clamp(36px, 10vw, 60px);
  }
  .artist-timeline li {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}
