/* Yint Studio — restrained museum / editorial */
:root {
  --bg: #0f0e0c;
  --bg-soft: #161410;
  --wall: #1c1914;
  --ink: #ebe6dc;
  --ink-dim: #a39a8c;
  --ink-mute: #6e675c;
  --line: rgba(235, 230, 220, 0.12);
  --line-strong: rgba(235, 230, 220, 0.22);
  --accent: #c4b49a;
  --frame: #2a2620;
  --mat: #0a0908;
  --serif: "Noto Serif SC", "Songti SC", "SimSun", serif;
  --sans: "Noto Sans SC", "PingFang SC", "Helvetica Neue", sans-serif;
  --latin: "Cormorant Garamond", "Times New Roman", serif;
  --shell: min(1080px, calc(100% - 3rem));
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
a:hover { color: var(--accent); }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.shell { width: var(--shell); margin-inline: auto; }
.muted { color: var(--ink-mute); }
.eyebrow {
  font-family: var(--latin);
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0 0 0.75rem;
}
.chip {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  padding: 0.15rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-dim);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  background: rgba(15, 14, 12, 0.78);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 3.75rem;
  gap: 1rem;
}
.brand {
  font-family: var(--latin);
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--ink);
}
.brand span {
  font-weight: 400;
  opacity: 0.55;
  margin-left: 0.15em;
}
.nav-links {
  display: flex;
  gap: 1.35rem;
  align-items: center;
}
.nav-links a {
  text-decoration: none;
  font-size: 0.92rem;
  color: var(--ink-dim);
}
.nav-links a:hover,
.nav-links a.active { color: var(--ink); }
.nav-toggle {
  display: none;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 1.1rem;
  height: 1px;
  background: var(--ink);
  position: relative;
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}
.nav-toggle span::before { top: -5px; }
.nav-toggle span::after { top: 5px; }

@media (max-width: 720px) {
  .nav-toggle { display: grid; }
  .nav-links {
    display: none;
    position: absolute;
    inset: 3.75rem 0 auto;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 1.5rem 1.25rem;
    background: rgba(15, 14, 12, 0.96);
    border-bottom: 1px solid var(--line);
    gap: 0.85rem;
  }
  .nav-links.open { display: flex; }
}

/* Footer */
.site-footer {
  margin-top: 4rem;
  border-top: 1px solid var(--line);
  padding: 2.5rem 0 3rem;
  color: var(--ink-dim);
  font-size: 0.9rem;
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.footer-brand {
  font-family: var(--latin);
  font-size: 1.2rem;
  color: var(--ink);
  margin-bottom: 0.4rem;
}
.footer-meta { text-align: right; }
.footer-meta a { text-decoration: none; border-bottom: 1px solid var(--line); }
@media (max-width: 640px) {
  .footer-meta { text-align: left; }
}

/* ========== HOME: quiet portal ========== */
body.is-portal {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body.is-portal .site-footer { margin-top: auto; }
.portal {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 4rem 0 3rem;
}
.portal-inner {
  width: var(--shell);
  display: grid;
  gap: 3.5rem;
}
.portal-identity {
  text-align: center;
  max-width: 28rem;
  margin-inline: auto;
}
.portal-identity h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2rem, 4vw, 2.75rem);
  letter-spacing: 0.08em;
  margin: 0 0 0.85rem;
}
.portal-identity .who {
  margin: 0;
  color: var(--ink-dim);
  font-size: 0.98rem;
}
.portal-identity .hint {
  margin: 1.25rem 0 0;
  color: var(--ink-mute);
  font-size: 0.88rem;
  letter-spacing: 0.04em;
}
.doors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
@media (max-width: 720px) {
  .doors { grid-template-columns: 1fr; }
}
.door {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 15rem;
  padding: 1.75rem 1.6rem;
  text-decoration: none;
  color: var(--ink);
  background: linear-gradient(165deg, #1a1712 0%, #12100d 100%);
  border: 1px solid var(--line);
  transition: border-color 0.35s var(--ease), transform 0.35s var(--ease), background 0.35s var(--ease);
}
.door:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
  color: var(--ink);
  background: linear-gradient(165deg, #211d17 0%, #15130f 100%);
}
.door .door-kicker {
  font-family: var(--latin);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.door h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.55rem, 3vw, 2rem);
  margin: 1.5rem 0 0.6rem;
  letter-spacing: 0.06em;
}
.door p {
  margin: 0;
  color: var(--ink-dim);
  font-size: 0.92rem;
  max-width: 18rem;
}
.door .door-go {
  margin-top: 2rem;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  color: var(--accent);
}

/* ========== Shared page hero ========== */
.page-hero {
  padding: 3.5rem 0 1.5rem;
}
.page-hero h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2rem, 4.5vw, 2.8rem);
  letter-spacing: 0.06em;
  margin: 0 0 0.75rem;
}
.page-hero .lede {
  margin: 0;
  max-width: 36rem;
  color: var(--ink-dim);
}

.band { padding: 1.5rem 0 3rem; }
.band-tight { padding-top: 0.5rem; }

/* ========== Exhibits lobby ========== */
.exhibit-grid {
  display: grid;
  gap: 1.5rem;
}
.exhibit-card {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 0;
  text-decoration: none;
  color: inherit;
  background: var(--wall);
  border: 1px solid var(--line);
  overflow: hidden;
  min-height: 18rem;
  transition: border-color 0.3s var(--ease);
}
.exhibit-card:hover { border-color: var(--line-strong); color: inherit; }
.exhibit-card .poster {
  position: relative;
  min-height: 16rem;
  background: #0a0908;
  overflow: hidden;
}
.exhibit-card .poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.88;
  transition: transform 0.7s var(--ease), opacity 0.4s;
}
.exhibit-card:hover .poster img {
  transform: scale(1.03);
  opacity: 1;
}
.exhibit-card .poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 55%, rgba(28, 25, 20, 0.55) 100%);
  pointer-events: none;
}
.exhibit-card .info {
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.exhibit-card .info h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.85rem;
  letter-spacing: 0.08em;
  margin: 0.35rem 0 0.75rem;
}
.exhibit-card .meta {
  margin: 0;
  color: var(--ink-mute);
  font-size: 0.88rem;
  line-height: 1.8;
}
.exhibit-card .blurb {
  margin: 1rem 0 0;
  color: var(--ink-dim);
  font-size: 0.95rem;
}
.exhibit-card .enter {
  margin-top: 1.5rem;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  color: var(--accent);
}
@media (max-width: 800px) {
  .exhibit-card { grid-template-columns: 1fr; }
  .exhibit-card .poster { min-height: 12rem; }
  .exhibit-card .poster::after { display: none; }
}

/* ========== Virtual exhibition ========== */
body.is-exhibit {
  background: #0a0908;
}
body.is-exhibit .site-header {
  background: rgba(10, 9, 8, 0.82);
}
body.is-exhibit .site-footer {
  background: #0a0908;
  margin-top: 0;
}

.exhibit-title-wall {
  min-height: calc(100vh - 3.75rem);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 3rem 1.5rem 4rem;
  position: relative;
  background:
    radial-gradient(ellipse 70% 55% at 50% 40%, rgba(80, 70, 50, 0.18), transparent 70%),
    #0a0908;
}
.exhibit-title-wall .wall-inner {
  max-width: 34rem;
}
.exhibit-title-wall .show-label {
  font-family: var(--latin);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--ink-mute);
  margin: 0 0 1.5rem;
}
.exhibit-title-wall h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.4rem, 7vw, 3.6rem);
  letter-spacing: 0.18em;
  margin: 0 0 1.25rem;
}
.exhibit-title-wall .statement {
  margin: 0 auto 1.75rem;
  color: var(--ink-dim);
  font-size: 1.02rem;
  line-height: 1.9;
  max-width: 28rem;
}
.exhibit-title-wall .tech {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  display: grid;
  gap: 0.35rem;
  color: var(--ink-mute);
  font-size: 0.86rem;
  letter-spacing: 0.04em;
}
.exhibit-title-wall .scroll-hint {
  position: absolute;
  bottom: 1.75rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--ink-mute);
}

/* Gallery corridor — vertical sequential walls */
.gallery-corridor {
  padding: 0 0 4rem;
}
.hung-work {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 3.5rem 1.25rem;
  background:
    radial-gradient(ellipse 55% 45% at 50% 42%, rgba(90, 78, 55, 0.14), transparent 68%),
    #0a0908;
  border-top: 1px solid rgba(235, 230, 220, 0.04);
}
.hung-work .artwork {
  width: min(920px, 100%);
  display: grid;
  justify-items: center;
  gap: 1.35rem;
}
.hung-work .frame-mat {
  background: var(--frame);
  padding: clamp(0.55rem, 1.4vw, 0.9rem);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 28px 80px rgba(0, 0, 0, 0.55);
  cursor: zoom-in;
  max-width: 100%;
}
.hung-work .frame-mat img {
  width: 100%;
  height: auto;
  max-height: min(68vh, 720px);
  object-fit: contain;
  background: var(--mat);
  display: block;
}
.wall-label {
  text-align: center;
  max-width: 26rem;
}
.wall-label .num {
  font-family: var(--latin);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  color: var(--ink-mute);
  margin: 0 0 0.35rem;
}
.wall-label h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.15rem;
  letter-spacing: 0.12em;
  margin: 0 0 0.35rem;
}
.wall-label p {
  margin: 0;
  color: var(--ink-dim);
  font-size: 0.9rem;
}

.exhibit-colophon {
  padding: 4rem 1.5rem 2rem;
  text-align: center;
  color: var(--ink-mute);
  font-size: 0.9rem;
  border-top: 1px solid var(--line);
}
.exhibit-colophon a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.exhibit-colophon .title {
  font-family: var(--serif);
  color: var(--ink-dim);
  letter-spacing: 0.12em;
  margin-bottom: 0.75rem;
}

/* Reveal */
.hung-work .artwork {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.hung-work.is-in .artwork {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .hung-work .artwork { opacity: 1; transform: none; }
}

/* ========== Notes / about ========== */
.note-list {
  display: grid;
  gap: 1rem;
  max-width: 42rem;
}
.note-card {
  display: block;
  padding: 1.35rem 1.4rem;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.25s;
}
.note-card:hover { border-color: var(--line-strong); color: inherit; }
.note-meta {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  color: var(--ink-mute);
  font-size: 0.82rem;
  margin-bottom: 0.55rem;
}
.note-card h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.25rem;
  margin: 0 0 0.45rem;
  letter-spacing: 0.03em;
}
.note-card p {
  margin: 0;
  color: var(--ink-dim);
  font-size: 0.92rem;
}
.note-card .read {
  display: inline-block;
  margin-top: 0.85rem;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.essay {
  max-width: 40rem;
  padding: 3rem 0 2rem;
}
.essay .back {
  display: inline-block;
  margin-bottom: 1.75rem;
  color: var(--ink-mute);
  text-decoration: none;
  font-size: 0.88rem;
}
.essay .back:hover { color: var(--accent); }
.essay-header h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.7rem, 4vw, 2.2rem);
  letter-spacing: 0.04em;
  margin: 0.4rem 0 0.85rem;
}
.essay-lead {
  color: var(--ink-dim);
  font-size: 1.05rem;
  margin: 0 0 2rem;
}
.essay-body p {
  margin: 0 0 1.15rem;
  color: #d9d2c6;
}
.essay-body .drop::first-letter {
  font-family: var(--serif);
  font-size: 2.6em;
  float: left;
  line-height: 0.85;
  padding: 0.12em 0.12em 0 0;
  color: var(--accent);
}
.essay-body .pull {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--ink);
  margin: 1.6rem 0;
  padding-left: 1rem;
  border-left: 1px solid var(--line-strong);
}
.essay-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--ink-mute);
  font-size: 0.85rem;
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.9fr);
  gap: 2rem;
  align-items: start;
}
@media (max-width: 800px) {
  .about-layout { grid-template-columns: 1fr; }
}
.about-prose h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.5rem;
  margin: 0 0 1rem;
}
.about-prose p {
  color: var(--ink-dim);
  margin: 0 0 1rem;
}
.about-card {
  border: 1px solid var(--line);
  background: var(--bg-soft);
  padding: 1.4rem 1.35rem;
}
.about-card dl { margin: 0; }
.about-card dl > div {
  display: grid;
  gap: 0.15rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--line);
}
.about-card dl > div:last-child { border-bottom: 0; padding-bottom: 0; }
.about-card dt {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.about-card dd { margin: 0; color: var(--ink); font-size: 0.95rem; }
.about-card a { color: var(--accent); text-decoration: none; }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  place-items: center;
  background: rgba(5, 4, 3, 0.94);
  padding: 1.5rem;
}
.lightbox.open { display: grid; }
.lightbox-inner {
  width: min(1100px, 100%);
  display: grid;
  gap: 0.85rem;
  justify-items: center;
}
.lightbox-media img {
  max-height: min(82vh, 900px);
  width: auto;
  max-width: 100%;
  object-fit: contain;
}
.lightbox-caption {
  color: var(--ink-dim);
  font-size: 0.9rem;
  text-align: center;
}
.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.1rem;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--ink-dim);
  width: 2.5rem;
  height: 2.5rem;
}
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.4rem;
  color: var(--ink-dim);
  width: 3rem;
  height: 3rem;
  line-height: 1;
}
.lightbox-prev { left: 0.5rem; }
.lightbox-next { right: 0.5rem; }
.lightbox-close:hover,
.lightbox-nav:hover { color: var(--ink); }

/* Redirect stub */
.redirect-note {
  min-height: 50vh;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--ink-dim);
  padding: 2rem;
}
