/* ==========================================================================
   Yingjie Li — Online Gallery
   Editorial / Museum-grade design
   ========================================================================== */

:root {
  /* ——— Light theme (default): paper & ink ——— */
  --paper:        #f4ede0;     /* primary background */
  --paper-deep:   #ede4d2;     /* deeper section bg */
  --paper-warm:   #faf5ec;     /* lighter elevated surface */
  --frame:        #faf5ec;     /* paper frame around art (constant across themes) */
  --frame-deep:   #ede4d2;
  --ink:          #1a1714;     /* primary text */
  --ink-bright:   #000000;     /* highest-contrast text */
  --ink-soft:     #2a2520;
  --ink-deep:     #1a1714;     /* dark text constant — for use on light frames */
  --mute:         #6b5e4f;
  --mute-soft:    #8b8074;
  --rule:         #d6cab2;
  --rule-soft:    #e3d9c4;
  --accent:       #8a6d3b;     /* muted bronze */
  --accent-warm:  #b18a4d;
  --highlight:    #d4b078;

  /* ——— Type ——— */
  --serif:  'Fraunces', 'Cormorant Garamond', 'Times New Roman', Georgia, serif;
  --sans:   'Inter Tight', 'Helvetica Neue', Arial, sans-serif;

  /* ——— Layout ——— */
  --gutter: clamp(1.25rem, 3.5vw, 2.5rem);
  --maxw:   1440px;
  --radius: 2px;

  /* ——— Motion ——— */
  --ease:   cubic-bezier(.2, .65, .25, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

/* ——— Dark theme — toggleable gallery wall mode ——— */
[data-theme="dark"] {
  --paper:        #2c2c2c;     /* gallery wall */
  --paper-deep:   #232323;
  --paper-warm:   #383838;
  --frame:        #f5efe2;     /* art frame stays paper-like */
  --frame-deep:   #ebe4d2;
  --ink:          #f4ede0;
  --ink-bright:   #ffffff;
  --ink-soft:     #d8d0bf;
  --ink-deep:     #1a1714;     /* still dark — for text on light frames */
  --mute:         #a8a098;
  --mute-soft:    #7d7770;
  --rule:         rgba(244, 237, 224, 0.16);
  --rule-soft:    rgba(244, 237, 224, 0.08);
  --accent:       #c69b5e;
  --accent-warm:  #d6b078;
  --highlight:    #e8c89a;
}

/* Smooth theme transition */
body, .work-frame, .contact-card, .exhib-section, .works-section, .bio-section, .site-header {
  transition: background-color .5s var(--ease), color .5s var(--ease), border-color .5s var(--ease);
}

/* ——— Reset ——— */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: transparent; border: 0; cursor: pointer; }
ol, ul { list-style: none; }
em, i { font-style: italic; }

/* ——— Paper grain ——— */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: .35;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240' viewBox='0 0 240 240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.10 0 0 0 0 0.09 0 0 0 0 0.08 0 0 0 0.10 0'/></filter><rect width='240' height='240' filter='url(%23n)'/></svg>");
}
[data-theme="dark"] .grain {
  opacity: .14;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='280' height='280' viewBox='0 0 280 280'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.6 0'/></filter><rect width='280' height='280' filter='url(%23n)'/></svg>");
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.1rem var(--gutter);
  background: color-mix(in srgb, var(--paper) 78%, transparent);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  border-bottom: 1px solid transparent;
  transition: border-color .4s var(--ease), padding .4s var(--ease);
}
.site-header.is-scrolled {
  border-bottom-color: var(--rule-soft);
  padding-block: .85rem;
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 2rem;
}

/* Monogram */
.monogram {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.45rem;
  font-weight: 400;
  letter-spacing: .02em;
  color: var(--ink);
}
.mono-mark {
  position: relative;
  font-variation-settings: 'opsz' 28, 'SOFT' 100, 'WONK' 1;
}
.mono-line {
  display: inline-block;
  width: 28px; height: 1px;
  background: var(--ink);
  opacity: .65;
}

/* Primary nav */
.primary-nav {
  display: flex;
  justify-content: center;
  gap: 2.4rem;
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--mute);
}
.primary-nav a {
  position: relative;
  padding-block: .25rem;
  transition: color .25s var(--ease);
}
.primary-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s var(--ease);
}
.primary-nav a:hover { color: var(--ink); }
.primary-nav a:hover::after { transform: scaleX(1); }

/* Nav actions cluster */
.nav-actions {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
}

/* Theme toggle button */
.theme-toggle {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  color: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 50%;
  cursor: pointer;
  transition: all .3s var(--ease);
  position: relative;
  overflow: hidden;
}
.theme-toggle:hover {
  background: var(--ink);
  color: var(--paper);
}
.theme-toggle .ti-sun,
.theme-toggle .ti-moon {
  position: absolute;
  transition: transform .5s var(--ease-out), opacity .35s var(--ease);
}
/* Light mode → show moon (offer dark) */
.theme-toggle .ti-sun  { opacity: 0; transform: rotate(-90deg) scale(.6); }
.theme-toggle .ti-moon { opacity: 1; transform: rotate(0) scale(1); }
/* Dark mode → show sun (offer light) */
[data-theme="dark"] .theme-toggle .ti-sun  { opacity: 1; transform: rotate(0) scale(1); }
[data-theme="dark"] .theme-toggle .ti-moon { opacity: 0; transform: rotate(90deg) scale(.6); }

@media (max-width: 480px) {
  .nav-cta { display: none; }
}

/* Nav CTA */
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .6rem 1rem;
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 999px;
  transition: all .3s var(--ease);
}
.nav-cta:hover {
  background: var(--ink);
  color: var(--paper);
}
.nav-cta svg { transition: transform .3s var(--ease); }
.nav-cta:hover svg { transform: translate(2px, -2px); }

@media (max-width: 760px) {
  .primary-nav { display: none; }
  .nav-inner { grid-template-columns: auto 1fr; gap: 1rem; }
}

/* ==========================================================================
   Hero — full-bleed artwork background with overlay text
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
}

/* Full-bleed painting background */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  animation: heroZoom 18s var(--ease-out) both;
  will-change: transform;
}
@keyframes heroZoom {
  from { transform: scale(1.08); }
  to   { transform: scale(1); }
}

/* Layered overlays so the text reads without losing the painting */
.hero-bg-fade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg,
      rgba(15, 12, 10, .7) 0%,
      rgba(15, 12, 10, .45) 22%,
      rgba(15, 12, 10, .45) 70%,
      rgba(15, 12, 10, .85) 100%);
}
.hero-bg-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 50%, rgba(0,0,0,.7) 0%, rgba(0,0,0,.25) 70%, transparent 95%),
    radial-gradient(ellipse at center, transparent 35%, rgba(0,0,0,.55) 100%);
  pointer-events: none;
}

/* Content overlay */
.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 880px;
  padding: clamp(6rem, 12vh, 8rem) var(--gutter) 5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero-content .eyebrow { margin-bottom: 1.6rem; }
.hero-content .hero-tag { margin-bottom: 2rem; }
.hero-content .hero-meta { margin-bottom: 2rem; }

/* Variant overrides — text on the painting */
.eyebrow-on-art {
  color: #ffffff;
  text-shadow:
    0 2px 18px rgba(0,0,0,.7),
    0 1px 4px rgba(0,0,0,.5);
  padding: .35rem .85rem;
  background: rgba(0, 0, 0, .28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 999px;
}
.eyebrow-on-art .dot {
  background: var(--highlight);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--highlight) 22%, transparent);
}

.display-on-art {
  color: #fff !important;
  text-shadow:
    0 4px 40px rgba(0,0,0,.6),
    0 2px 8px rgba(0,0,0,.4),
    0 0 80px rgba(0,0,0,.3);
  margin-bottom: 1.4rem;
  font-size: clamp(3.5rem, 9vw, 7.5rem) !important;
  line-height: 1;
  white-space: nowrap;
}
.display-on-art em {
  color: var(--highlight);
}
.display-on-art .dn-word {
  display: inline-block;
  animation: revealUp 1.1s var(--ease-out) both;
}
.display-on-art .dn-word:nth-child(1) { animation-delay: .15s; }
.display-on-art .dn-word:nth-child(3) { animation-delay: .35s; }
.display-on-art .dn-space {
  display: inline-block;
  width: clamp(1.2rem, 2vw, 2rem);
}
@media (max-width: 520px) {
  .display-on-art {
    white-space: normal;
    font-size: clamp(3.2rem, 17vw, 5rem) !important;
  }
  .display-on-art .dn-space {
    display: block;
    height: 0;
    width: 0;
  }
}

.hero-tag.hero-tag-on-art {
  color: #ffffff;
  text-shadow:
    0 2px 24px rgba(0,0,0,.75),
    0 1px 6px rgba(0,0,0,.55),
    0 0 60px rgba(0,0,0,.3);
  text-align: center;
  max-width: 40ch;
  margin-inline: auto;
  font-weight: 400;
}

.hero-meta-on-art {
  justify-content: center;
  color: #fff;
}
.hero-meta-on-art .meta-label {
  color: rgba(255, 255, 255, .65);
  text-shadow: 0 1px 6px rgba(0,0,0,.5);
}
.hero-meta-on-art .meta-value {
  color: #fff;
  text-shadow: 0 1px 12px rgba(0,0,0,.6), 0 1px 3px rgba(0,0,0,.4);
}
.hero-meta-on-art .meta-divider { background: rgba(255, 255, 255, .3); }

.hero-actions-on-art {
  justify-content: center;
}
.btn-on-art {
  background: rgba(255, 255, 255, .96);
  color: var(--ink-deep);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.btn-on-art::before {
  background: var(--highlight);
}
.btn-on-art:hover { color: var(--ink-deep); }

.text-on-art {
  color: #ffffff;
  border-bottom-color: rgba(255, 255, 255, .7);
  text-shadow: 0 1px 12px rgba(0,0,0,.6), 0 1px 3px rgba(0,0,0,.4);
}
.text-on-art:hover {
  color: var(--highlight);
  border-bottom-color: var(--highlight);
}

/* Bottom-left attribution label, like a museum wall card */
.hero-attribution {
  position: absolute;
  left: var(--gutter);
  bottom: 2rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: .85rem;
  padding: .55rem .9rem;
  background: rgba(0, 0, 0, .35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .92);
  font-variant-numeric: tabular-nums;
  animation: fadeUp 1s var(--ease-out) 1s both;
}
.ha-num { color: var(--highlight); }
.ha-divider {
  width: 14px; height: 1px;
  background: rgba(255, 255, 255, .35);
}
.ha-title {
  font-family: var(--serif);
  font-style: italic;
  font-size: .9rem;
  letter-spacing: .02em;
  text-transform: none;
  font-variation-settings: 'opsz' 36, 'SOFT' 50;
}

/* eyebrow */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--mute);
  font-weight: 500;
  margin-bottom: 2.5rem;
  animation: fadeUp .9s var(--ease-out) both;
}
.eyebrow .dot {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
}

/* Display name */
.display-name {
  font-family: var(--serif);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -.025em;
  color: var(--ink);
  margin-bottom: 2rem;
  font-size: clamp(4.5rem, 12vw, 11rem);
  font-variation-settings: 'opsz' 144, 'SOFT' 0, 'WONK' 0;
}
.dn-line {
  display: block;
  padding-bottom: .12em;
}
.dn-line .dn-1, .dn-1 {
  font-weight: 300;
}
.dn-line em, .dn-2 em {
  font-style: italic;
  font-weight: 300;
  font-variation-settings: 'opsz' 144, 'SOFT' 50, 'WONK' 1;
  color: var(--ink);
  position: relative;
  padding-right: .15em;
}
.dn-line.dn-1 { animation: revealUp 1.1s var(--ease-out) .15s both; }
.dn-line.dn-2 {
  animation: revealUp 1.1s var(--ease-out) .35s both;
  padding-left: clamp(2rem, 5vw, 5rem);
  margin-top: -.18em;
}

/* hero tag */
.hero-tag {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.15rem, 1.4vw, 1.4rem);
  line-height: 1.45;
  color: var(--ink-soft);
  max-width: 32ch;
  margin-bottom: 2.5rem;
  font-variation-settings: 'opsz' 36;
  animation: fadeUp 1s var(--ease-out) .55s both;
}
.nowrap { white-space: nowrap; }

/* hero meta */
.hero-meta {
  display: flex;
  align-items: stretch;
  gap: 1.4rem;
  margin-bottom: 2.8rem;
  flex-wrap: wrap;
  animation: fadeUp 1s var(--ease-out) .75s both;
}
.meta-block {
  display: flex;
  flex-direction: column;
  gap: .25rem;
}
.meta-label {
  font-size: .68rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--mute-soft);
  font-weight: 500;
}
.meta-value {
  font-size: .9rem;
  color: var(--ink);
  font-weight: 400;
}
.meta-divider {
  width: 1px;
  background: var(--rule);
  align-self: stretch;
}

/* hero actions */
.hero-actions {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  animation: fadeUp 1s var(--ease-out) .9s both;
}
.btn-link {
  display: inline-flex;
  align-items: center;
  gap: .85rem;
  padding: 1.05rem 1.7rem;
  background: var(--ink);
  color: var(--paper);
  font-size: .78rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  font-weight: 500;
  border-radius: 999px;
  transition: all .35s var(--ease);
  position: relative;
  overflow: hidden;
}
.btn-link::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: translateX(-101%);
  transition: transform .55s var(--ease-out);
}
.btn-link span, .btn-link svg { position: relative; z-index: 1; }
.btn-link:hover::before { transform: translateX(0); }
.btn-link svg { transition: transform .35s var(--ease); }
.btn-link:hover svg { transform: translateX(4px); }

.text-link {
  position: relative;
  font-size: .82rem;
  letter-spacing: .04em;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
  transition: color .25s var(--ease);
}
.text-link:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* Hero scroll cue (right side) */
.hero-scroll {
  position: absolute;
  right: var(--gutter);
  bottom: 2rem;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: .9rem;
  font-size: .68rem;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .85);
  text-shadow: 0 1px 8px rgba(0,0,0,.4);
  animation: fadeUp 1s var(--ease-out) 1.2s both;
}
.scroll-line {
  width: 60px;
  height: 1px;
  background: currentColor;
  position: relative;
  overflow: hidden;
  opacity: .55;
}
.scroll-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent);
  animation: scrollPulse 2.6s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { transform: translateX(-101%); }
  50%      { transform: translateX(101%); }
}

@media (max-width: 960px) {
  .hero {
    min-height: 100vh;
    min-height: 100svh;
  }
  .hero-bg img { object-position: center 30%; }
  .display-name { font-size: clamp(3.6rem, 16vw, 5.5rem); }
  .hero-meta { gap: 1rem; }
}
@media (max-width: 640px) {
  .hero-content { padding-bottom: 7rem; }
  .hero-meta { flex-direction: column; align-items: center; gap: .9rem; }
  .hero-meta-on-art .meta-divider { display: none; }
  .hero-attribution {
    left: 50%;
    transform: translateX(-50%);
    bottom: 1.25rem;
    font-size: .65rem;
    padding: .45rem .75rem;
    white-space: nowrap;
  }
  .hero-scroll { display: none; }
}

/* ==========================================================================
   Section heads (shared)
   ========================================================================== */
.section-head {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: baseline;
  gap: 1.25rem;
  max-width: var(--maxw);
  margin: 0 auto 3rem;
  padding-inline: var(--gutter);
}
.section-num {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: 1.1rem;
  color: var(--accent);
  letter-spacing: .04em;
}
.section-title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  letter-spacing: -.015em;
  line-height: 1.05;
  color: var(--ink);
  font-variation-settings: 'opsz' 144, 'SOFT' 30;
}
.section-rule {
  display: block;
  height: 1px;
  background: var(--rule);
}

/* ==========================================================================
   Biography
   ========================================================================== */
.bio-section { padding: clamp(5rem, 10vh, 8rem) 0; }
.bio-grid {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--gutter);
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: clamp(2rem, 6vw, 6rem);
}
.bio-aside {
  position: sticky;
  top: 7rem;
  align-self: start;
  padding-top: .5rem;
}
.aside-eyebrow {
  font-size: .7rem;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 1.25rem;
}
.aside-quote {
  position: relative;
  font-family: var(--serif);
  font-weight: 300;
  font-style: normal;
  font-size: clamp(1.5rem, 2.4vw, 2.1rem);
  line-height: 1.25;
  color: var(--ink);
  font-variation-settings: 'opsz' 72, 'SOFT' 50;
  max-width: 22ch;
}
.aside-quote em {
  font-style: italic;
  font-variation-settings: 'opsz' 72, 'SOFT' 100, 'WONK' 1;
}
.quote-mark {
  position: absolute;
  top: -.5em;
  left: -.5em;
  font-family: var(--serif);
  font-style: italic;
  font-size: 4rem;
  color: var(--accent);
  opacity: .35;
  line-height: 1;
}

/* Body */
.bio-body {
  max-width: 56ch;
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--ink-soft);
}
.bio-body p + p { margin-top: 1.4rem; }
.bio-body strong { color: var(--ink); font-weight: 500; }
.bio-body a {
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 50%, transparent);
  color: var(--accent);
  transition: color .25s var(--ease), border-color .25s var(--ease);
}
.bio-body a:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}
.lead { font-size: 1.18rem; color: var(--ink); line-height: 1.55; }
.dropcap {
  float: left;
  font-family: var(--serif);
  font-weight: 300;
  font-size: 4.4rem;
  line-height: .85;
  margin: .15rem .55rem -.1rem 0;
  color: var(--accent);
  font-variation-settings: 'opsz' 144, 'SOFT' 100;
}
.bio-aside-cta {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-style: italic;
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--ink-soft);
}

@media (max-width: 880px) {
  .bio-grid { grid-template-columns: 1fr; }
  .bio-aside { position: static; }
}

/* ==========================================================================
   Works gallery
   ========================================================================== */
.works-section {
  padding: clamp(5rem, 10vh, 8rem) 0;
  background: linear-gradient(180deg, var(--paper) 0%, var(--paper-deep) 100%);
  position: relative;
}
.works-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 0%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 50%);
  pointer-events: none;
}
.works-intro {
  max-width: var(--maxw);
  margin: 0 auto 3.5rem;
  padding-inline: var(--gutter);
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.works-intro p {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--mute);
  max-width: 42ch;
  font-variation-settings: 'opsz' 36;
}

/* filter chips */
.works-filter {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}
.chip {
  padding: .5rem 1rem;
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--mute);
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
  transition: all .25s var(--ease);
  background: transparent;
}
.chip:hover { color: var(--ink); border-color: var(--ink); }
.chip.is-active {
  color: var(--paper);
  background: var(--ink);
  border-color: var(--ink);
}

/* gallery — true masonry via columns */
.gallery {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--gutter);
  column-count: 3;
  column-gap: clamp(1rem, 2.5vw, 2rem);
}
@media (max-width: 920px) { .gallery { column-count: 2; } }
@media (max-width: 560px) { .gallery { column-count: 1; } }

.work {
  position: relative;
  display: block;
  break-inside: avoid;
  margin-bottom: clamp(1rem, 2.5vw, 2rem);
  transform: translateY(20px);
  opacity: 0;
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
  cursor: zoom-in;
}
.work.is-in { opacity: 1; transform: translateY(0); }
.work.is-hidden { display: none; }

.work-frame {
  position: relative;
  overflow: hidden;
  background: var(--frame);
  padding: .85rem;
  box-shadow:
    0 1px 0 rgba(0,0,0,.06),
    0 18px 38px -16px rgba(26, 23, 20, .35),
    0 36px 80px -36px rgba(26, 23, 20, .25);
  transition: transform .55s var(--ease-out), box-shadow .55s var(--ease-out);
}
.work-frame::after {
  content: "";
  position: absolute;
  inset: .3rem;
  border: 1px solid rgba(26, 23, 20, .12);
  pointer-events: none;
}
.work:hover .work-frame {
  transform: translateY(-5px);
  box-shadow:
    0 1px 0 rgba(0,0,0,.08),
    0 28px 52px -16px rgba(26, 23, 20, .45),
    0 56px 110px -42px rgba(26, 23, 20, .35);
}
[data-theme="dark"] .work-frame,
[data-theme="dark"] .hero-frame {
  box-shadow:
    0 1px 0 rgba(0,0,0,.2),
    0 14px 36px -10px rgba(0, 0, 0, .55),
    0 32px 80px -30px rgba(0, 0, 0, .55);
}
[data-theme="dark"] .work:hover .work-frame {
  box-shadow:
    0 1px 0 rgba(0,0,0,.25),
    0 24px 48px -12px rgba(0, 0, 0, .65),
    0 50px 100px -30px rgba(0, 0, 0, .65);
}

.work img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 1.4s var(--ease-out), filter .55s var(--ease-out);
  filter: saturate(.96);
}
.work:hover img { transform: scale(1.025); filter: saturate(1.02); }

.work-meta {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 1rem;
  padding-top: 1rem;
  margin-top: .25rem;
  border-top: 1px solid var(--rule-soft);
}
.work-meta .wm-num {
  font-size: .7rem;
  color: var(--mute);
  letter-spacing: .14em;
  text-transform: uppercase;
  grid-column: 1 / -1;
  margin-bottom: -.4rem;
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: center;
  gap: .65rem;
}
.wm-gallery {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .15rem .55rem .2rem;
  font-size: .58rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: 999px;
  font-weight: 500;
}
.wm-gallery::before {
  content: "";
  display: inline-block;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

.inline-link {
  color: var(--accent);
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 50%, transparent);
  padding-bottom: 1px;
  font-style: normal;
  transition: color .25s var(--ease), border-color .25s var(--ease);
}
.inline-link:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}
.work-meta .wm-title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.08rem;
  color: var(--ink);
  font-variation-settings: 'opsz' 36, 'SOFT' 50;
  line-height: 1.25;
}
.work-meta .wm-year {
  font-size: .82rem;
  letter-spacing: .14em;
  color: var(--mute);
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Exhibitions
   ========================================================================== */
.exhib-section {
  padding: clamp(5rem, 10vh, 8rem) 0;
  background: var(--ink);
  color: var(--paper);
}
.exhib-section .section-num { color: var(--highlight); }
.exhib-section .section-title { color: var(--paper); }
.exhib-section .section-rule { background: color-mix(in srgb, var(--paper) 18%, transparent); }

.exhib-list {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--gutter);
}
.exhib-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  align-items: center;
  gap: 2rem;
  padding: 2rem 0;
  position: relative;
  transition: padding-left .4s var(--ease);
}
.exhib-item:not(:last-child) {
  border-bottom: 1px solid color-mix(in srgb, var(--paper) 12%, transparent);
}
.exhib-item:hover { padding-left: 1rem; }
.ex-marker {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: 1.6rem;
  color: var(--highlight);
  font-variation-settings: 'opsz' 72;
  font-variant-numeric: tabular-nums;
}
.ex-content { display: flex; flex-direction: column; gap: .35rem; }
.ex-name {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.4rem, 2.4vw, 1.95rem);
  letter-spacing: -.01em;
  color: var(--paper);
  font-variation-settings: 'opsz' 72, 'SOFT' 50;
}
.ex-name a {
  display: inline-flex;
  align-items: baseline;
  gap: .5rem;
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), color .3s var(--ease);
}
.ex-name a:hover { color: var(--highlight); border-bottom-color: var(--highlight); }
.link-arrow {
  font-size: .9em;
  display: inline-block;
  transition: transform .3s var(--ease);
}
.ex-name a:hover .link-arrow { transform: translate(3px, -3px); }
.ex-meta {
  font-size: .82rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--paper) 55%, transparent);
}

@media (max-width: 600px) {
  .exhib-item { grid-template-columns: 50px 1fr; gap: 1rem; padding: 1.5rem 0; }
  .ex-marker { font-size: 1.2rem; }
}

/* ==========================================================================
   Contact
   ========================================================================== */
.contact-section {
  padding: clamp(5rem, 12vh, 9rem) 0;
}
.contact-grid {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--gutter);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
}
.contact-headline {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2rem, 4.5vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -.015em;
  color: var(--ink-bright);
  font-variation-settings: 'opsz' 144, 'SOFT' 30;
}
.contact-headline em {
  font-style: italic;
  font-variation-settings: 'opsz' 144, 'SOFT' 100, 'WONK' 1;
  color: var(--accent-warm);
}

.contact-right {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.contact-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 1.6rem 1.8rem;
  background: var(--paper-warm);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  transition: all .4s var(--ease);
}
.contact-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform: translateY(101%);
  transition: transform .55s var(--ease-out);
  z-index: 0;
}
.contact-card > * { position: relative; z-index: 1; transition: color .4s var(--ease); }
.contact-card:hover { border-color: var(--ink); }
.contact-card:hover::before { transform: translateY(0); }
.contact-card:hover > * { color: var(--paper); }

.cc-label {
  grid-column: 1 / -1;
  font-size: .7rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: -.4rem;
}
.contact-card:hover .cc-label { color: color-mix(in srgb, var(--paper) 70%, transparent); }
.cc-value {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  color: var(--ink);
  font-variation-settings: 'opsz' 36, 'SOFT' 50;
}
.cc-arrow {
  font-size: 1.4rem;
  color: var(--ink);
  transition: transform .3s var(--ease);
}
.contact-card:hover .cc-arrow { transform: translate(4px, -4px); }

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

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  padding: 3rem var(--gutter) 2.5rem;
  border-top: 1px solid var(--rule);
}
.footer-grid {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 2rem;
}
.footer-mark {
  display: flex;
  align-items: baseline;
  gap: .65rem;
}
.fmark-mono {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.4rem;
  color: var(--ink);
  font-variation-settings: 'opsz' 36, 'SOFT' 100, 'WONK' 1;
}
.fmark-name {
  font-size: .8rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--mute);
}
.footer-disclaimer {
  font-size: .76rem;
  color: var(--mute);
  text-align: center;
  max-width: 60ch;
  margin: 0 auto;
  line-height: 1.5;
}
.footer-meta {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--mute);
}
.dot-sep { opacity: .5; }

@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr; gap: 1.25rem; text-align: center; }
  .footer-mark, .footer-meta { justify-content: center; }
}

/* ==========================================================================
   Lightbox
   ========================================================================== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(20, 18, 16, .96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vh, 3rem);
  opacity: 0;
  visibility: hidden;
  transition: opacity .5s var(--ease), visibility .5s var(--ease);
}
.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}
.lb-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  color: var(--paper);
  border: 1px solid rgba(244, 237, 224, .25);
  border-radius: 50%;
  transition: all .25s var(--ease);
}
.lb-close:hover {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
  transform: rotate(90deg);
}
.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  color: var(--paper);
  border: 1px solid rgba(244, 237, 224, .2);
  border-radius: 50%;
  transition: all .3s var(--ease);
  background: rgba(0,0,0,.2);
}
.lb-prev { left: clamp(1rem, 3vw, 2.5rem); }
.lb-next { right: clamp(1rem, 3vw, 2.5rem); }
.lb-nav:hover {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
}

.lb-figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  max-width: min(92vw, 1100px);
  max-height: 86vh;
  margin: 0;
}
.lb-image-wrap {
  flex: 1;
  min-height: 0;
  background: var(--paper);
  padding: clamp(.5rem, 1.5vw, 1rem);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.5);
  position: relative;
  display: flex;
}
.lb-image-wrap::before {
  content: "";
  position: absolute;
  inset: .35rem;
  border: 1px solid var(--rule-soft);
  pointer-events: none;
}
.lb-image {
  max-width: 100%;
  max-height: calc(86vh - 8rem);
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
}
.lb-caption {
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  color: var(--paper);
  font-size: .85rem;
  letter-spacing: .04em;
  flex-wrap: wrap;
  justify-content: center;
}
.lb-num {
  font-variant-numeric: tabular-nums;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--highlight);
  font-weight: 500;
}
.lb-title {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.2rem;
  font-variation-settings: 'opsz' 36, 'SOFT' 50;
}
.lb-year {
  font-variant-numeric: tabular-nums;
  letter-spacing: .18em;
  color: rgba(244, 237, 224, .6);
}

@media (max-width: 600px) {
  .lb-nav { width: 44px; height: 44px; }
  .lb-prev { left: .75rem; }
  .lb-next { right: .75rem; }
  .lb-close { top: .75rem; right: .75rem; width: 44px; height: 44px; }
}

/* ==========================================================================
   Animations
   ========================================================================== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes revealUp {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}

.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease-out), transform 1s var(--ease-out); }
.reveal.is-in { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* ==========================================================================
   Utilities
   ========================================================================== */
::selection {
  background: var(--accent);
  color: var(--paper);
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
