/* Keam Tallaa: one stylesheet for the whole site.
   Look of her former Squarespace site: navy ground, pale lavender text,
   Marcellus display capitals, Xanh Mono typewriter text.
   No tints or filters on artworks (studio photos only get a light navy veil
   under the giant page words, as on the old site). */

@font-face {
  font-family: "Marcellus";
  src: url("/assets/fonts/marcellus.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Xanh Mono";
  src: url("/assets/fonts/xanh-mono.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Xanh Mono";
  src: url("/assets/fonts/xanh-mono-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg: #1b1d3e;
  --bg-2: #232650;
  --text: #e6e8fb;
  --muted: #a7abd3;
  --line: rgba(230, 232, 251, 0.28);
  --line-strong: rgba(230, 232, 251, 0.7);
  --box: #8592dd;
  --box-text: #1b1d3e;

  --display: "Marcellus", "Trajan Pro", "Optima", Georgia, serif;
  --mono: "Xanh Mono", "Courier Prime", "Courier New", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(16px, 3.2vw, 48px);
  --max: 1600px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --header-h: 72px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 1rem;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img { display: block; max-width: 100%; height: auto; }
picture { display: contents; }
a { color: inherit; }
button { font: inherit; color: inherit; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3 { margin: 0; font-weight: 400; }
cite { font-style: italic; }
blockquote { margin: 0; }

::selection { background: var(--box); color: var(--box-text); }

:focus-visible {
  outline: 1.5px solid var(--text);
  outline-offset: 4px;
  border-radius: 2px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: 8px;
  z-index: 100;
  padding: 8px 14px;
  background: var(--text);
  color: var(--bg);
  text-transform: uppercase;
  text-decoration: none;
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ------------------------------------------------------------ type */

.title-xl,
.title-lg,
.title-md,
.hero-title,
.footer-name,
.series-name,
.pager-title,
.lead {
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

.title-xl {
  font-size: clamp(2.5rem, 1.4rem + 5vw, 6.5rem);
  line-height: 1;
  text-wrap: balance;
}
.title-lg {
  font-size: clamp(2.25rem, 1.5rem + 3.5vw, 5rem);
  line-height: 1;
}
.title-md {
  font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.5rem);
  line-height: 1.1;
}

/* the typewriter capitals of the old site */
.caption,
.wordmark,
.page-sub,
.exhibition-line,
.statement-by,
.cv-list,
.pager-dir,
.series-years,
.other-text summary,
.text-link,
.viewer-count,
.viewer-close,
.menu-toggle,
.video-cta,
.hero-credit {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.text {
  max-width: 68ch;
  font-family: var(--sans);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.7;
  letter-spacing: 0;
  text-transform: none;
  color: rgba(236, 237, 252, 0.92);
  text-wrap: pretty;
}
.text strong { font-weight: 600; color: var(--text); }
.text p + p { margin-top: 1.4em; }

.text-link {
  display: inline-block;
  padding-block: 4px;
  font-size: 0.9375rem;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3em;
  transition: opacity 0.2s ease;
}
.text-link:hover { opacity: 0.7; }
.text-link:active { opacity: 0.5; }

/* ------------------------------------------------------------ header */

/* header bar: name left, links centred, "Contact me →" right, no rule underneath */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: transparent;
}
/* fully clear bar (Mustafa's choice): no background, no frost, also when scrolled */
.is-home .site-header {
  position: fixed;
  left: 0;
  right: 0;
}
.nav-open .site-header { background: var(--bg); }

.header-inner {
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
  height: var(--header-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}
.wordmark { justify-self: start; }
.header-end {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 18px;
}

/* FR | EN toggle, far right of the bar */
.lang-switch {
  display: inline-flex;
  padding: 3px;
  border: 1px solid rgba(230, 232, 251, 0.2);
  border-radius: 999px;
  background: rgba(21, 23, 47, 0.58);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.lang-switch a {
  display: grid;
  place-items: center;
  min-width: 34px;
  min-height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  color: rgba(230, 232, 251, 0.7);
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.lang-switch a:hover { color: #fff; }
.lang-switch a:active { transform: scale(0.95); }
.lang-switch a.is-active { background: var(--text); color: var(--bg); }
.lang-switch a:focus-visible { outline-offset: 2px; }

.wordmark {
  font-size: clamp(1.625rem, 1.2rem + 1vw, 2.25rem);
  letter-spacing: 0.04em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  /* soft shadow so the name holds over light parts of a painting */
  text-shadow: 0 1px 14px rgba(10, 12, 30, 0.75), 0 0 2px rgba(10, 12, 30, 0.5);
  transition: opacity 0.2s ease;
}
.wordmark:hover { opacity: 0.75; }
.wordmark:active { opacity: 0.55; }

.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(20px, 2.2vw, 32px);
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0;
}
.nav-list > li > a {
  display: inline-block;
  padding: 10px 0;
  color: rgba(230, 232, 251, 0.88);
  text-decoration: none;
  text-underline-offset: 0.5em;
  text-decoration-thickness: 1px;
  transition: color 0.2s ease;
}
.nav-list > li > a:hover { color: #fff; }
.nav-list > li > a[aria-current="page"],
.nav-list > li > a.is-section { color: #fff; text-decoration-line: underline; text-decoration-color: rgba(230, 232, 251, 0.45); }
.nav-list > li > a:active { opacity: 0.6; }

/* Desktop: the links sit in a small glass capsule, so they stay readable
   over any painting while the bar itself stays clear. */
@media (min-width: 901px) {
  .nav-list {
    gap: 2px;
    padding: 5px;
    border: 1px solid rgba(230, 232, 251, 0.14);
    border-radius: 999px;
    background: rgba(21, 23, 47, 0.58);
    -webkit-backdrop-filter: blur(14px) saturate(1.3);
    backdrop-filter: blur(14px) saturate(1.3);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 10px 28px -10px rgba(6, 7, 20, 0.55);
  }
  .nav-list > li > a {
    padding: 8px 14px;
    border-radius: 999px;
    transition: color 0.2s ease, background-color 0.2s ease;
  }
  .nav-list > li > a:hover { background: rgba(230, 232, 251, 0.08); }
  .nav-list > li > a[aria-current="page"],
  .nav-list > li > a.is-section { text-decoration-line: none; background: rgba(230, 232, 251, 0.14); }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  @media (min-width: 901px) { .nav-list { background: rgba(21, 23, 47, 0.92); } }
}

.has-sub { position: relative; display: flex; align-items: center; }

.nav-list > li > a.sub-link { display: none; }
.sub-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px 8px 14px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: rgba(230, 232, 251, 0.88);
  font: inherit;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease;
}
.sub-toggle svg {
  width: 12px; height: 12px;
  fill: none; stroke: currentColor; stroke-width: 1.4;
  transition: transform 0.3s var(--ease);
}
.sub-toggle:hover { color: #fff; background: rgba(230, 232, 251, 0.08); }
.sub-toggle:active { opacity: 0.7; }
.sub-toggle.is-section,
.sub-toggle[aria-expanded="true"] { color: #fff; background: rgba(230, 232, 251, 0.14); }
.sub-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }

.sub-list {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  min-width: 380px;
  margin-left: -190px;
  padding: 8px;
  background: #15172f;
  border: 1px solid rgba(230, 232, 251, 0.12);
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(8, 9, 24, 0.45);
  font-weight: 500;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.2s ease, transform 0.25s var(--ease), visibility 0s linear 0.25s;
}
.sub-list::before { content: ""; position: absolute; inset: -14px 0 auto 0; height: 14px; }
.has-sub.is-open .sub-list {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.2s ease, transform 0.25s var(--ease), visibility 0s;
}
.sub-list a {
  display: block;
  padding: 9px 12px;
  border-radius: 8px;
  line-height: 1.3;
  text-decoration: none;
  transition: background-color 0.15s ease;
}
.sub-list a:hover { background: rgba(230, 232, 251, 0.08); }
.sub-list a:active { opacity: 0.7; }
.sub-all { margin-bottom: 4px; padding-bottom: 4px; border-bottom: 1px solid rgba(230, 232, 251, 0.1); }
.sub-all a { color: var(--muted); }
.sub-list a[aria-current="page"] { text-decoration: underline; text-underline-offset: 0.35em; }
.sub-list a:focus-visible { outline-offset: -2px; }

.header-cta {
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
}


/* ------------------------------------------------------------ liquid glass button
   Layers: lens (refracts what is behind; frosted fallback here, SVG refraction
   added by liquid-glass.js on Chromium), glow (pointer-tracked light), rim
   (specular edge map), label. */
.glass {
  --lg-shadow: 0 2px 8px rgb(0 0 0 / 0.14), 0 10px 28px -8px rgb(0 0 0 / 0.35);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 999px;
  color: #fff;
  box-shadow: var(--lg-shadow);
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.glass-lens,
.glass-glow-clip {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}
.glass-lens {
  background: rgba(255, 255, 255, 0.05);
  -webkit-backdrop-filter: blur(10px) saturate(1.2) brightness(1.05);
  backdrop-filter: blur(10px) saturate(1.2) brightness(1.05);
  /* fallback rim until the generated map is in place */
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}
.glass.is-glass .glass-lens { box-shadow: none; }
.glass.is-refracting .glass-lens { background: rgba(255, 255, 255, 0.03); }
.glass-glow-clip { overflow: hidden; }
.glass-glow {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--lg-glow-size, 80px);
  height: var(--lg-glow-size, 80px);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0));
  opacity: var(--lg-glow, 0);
  translate: calc(var(--lg-glow-x, 0px) - var(--lg-glow-size, 80px) / 2) calc(var(--lg-glow-y, 0px) - var(--lg-glow-size, 80px) / 2);
}
.glass-rim {
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  pointer-events: none;
}
.glass-label { position: relative; display: inline-flex; align-items: center; gap: 6px; }
.glass:focus-visible { outline: 2px solid rgba(255, 255, 255, 0.8); outline-offset: 3px; }
/* without the script the button still answers a press */
.glass:not(.is-glass):active { transform: scale(0.97); }

.menu-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 2px;
  border: 0;
  background: none;
  cursor: pointer;
  font-size: 0.9375rem;
}
.menu-bars { position: relative; width: 20px; height: 9px; }
.menu-bars::before,
.menu-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.3s var(--ease);
}
.menu-bars::before { top: 0; }
.menu-bars::after { bottom: 0; }
.menu-toggle[aria-expanded="true"] .menu-bars::before { transform: translateY(3.75px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-bars::after { transform: translateY(-3.75px) rotate(-45deg); }
.menu-toggle:active { opacity: 0.6; }

@media (max-width: 900px) {
  .menu-toggle { display: inline-flex; }
  .header-cta { display: none; }
  .header-inner { grid-template-columns: 1fr auto; }
  .header-end { grid-column: 2; gap: 14px; }

  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 0 0;
    z-index: 40;
    overflow-y: auto;
    padding: 16px var(--gutter) 48px;
    background: var(--bg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.35s var(--ease), visibility 0s linear 0.35s;
  }
  .nav-open .site-nav {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity 0.25s ease, transform 0.35s var(--ease), visibility 0s;
  }
  .nav-open { overflow: hidden; }

  /* the phone menu keeps the old site's capitals */
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; font-weight: 400; }
  .nav-list > li { border-bottom: 1px solid var(--line); }
  .nav-list > li > a {
    padding: 16px 0;
    color: var(--text);
    font-family: var(--display);
    font-size: 2rem;
    text-transform: uppercase;
  }
  .has-sub { flex-wrap: wrap; }
  .nav-list > li > a.sub-link { display: inline-block; flex: 1; }
  .sub-toggle { display: none; }
  .sub-all { display: none; }
  .sub-list,
  .has-sub:hover .sub-list {
    position: static;
    flex-basis: 100%;
    min-width: 0;
    margin-left: 0;
    padding: 0 0 16px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: none;
    font-family: var(--mono);
    text-transform: uppercase;
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: none;
  }
  .sub-list::before { display: none; }
  .sub-list a { padding: 8px 0 8px 14px; color: var(--muted); }
  .sub-list a:hover { background: none; color: var(--text); }
  .sub-list a[aria-current="page"] { color: var(--text); }
}

/* ------------------------------------------------------------ captions */

.caption {
  margin-top: 18px;
  font-size: 0.875rem;
  line-height: 1.45;
  text-align: center;
  text-wrap: balance;
}
.credit {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

/* ------------------------------------------------------------ home */

.hero {
  position: relative;
  display: grid;
  align-items: end;
  min-height: max(600px, 100dvh);
  overflow: hidden;
  isolation: isolate;
}
.hero-bg { position: absolute; inset: 0; z-index: -2; }
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 18%;
}
/* the painting detail fades into the page at the bottom, so the text
   reads on any part of it (the upper part of the painting stays untouched) */
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 72%;
  z-index: -1;
  background: linear-gradient(to bottom, rgba(27, 29, 62, 0) 0%, rgba(27, 29, 62, 0.62) 48%, rgba(27, 29, 62, 0.9) 78%, var(--bg) 100%);
  pointer-events: none;
}
.hero-content {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding: calc(var(--header-h) + 24px) var(--gutter) clamp(64px, 11vh, 128px);
}
.hero-title {
  font-size: clamp(3rem, 1.4rem + 6.2vw, 7.5rem);
  line-height: 0.98;
  letter-spacing: 0.005em;
  text-wrap: balance;
}
.nowrap { white-space: nowrap; }
.hero-line {
  max-width: 34ch;
  margin-top: 22px;
  font-family: var(--sans);
  font-size: clamp(1.0625rem, 0.95rem + 0.5vw, 1.3125rem);
  line-height: 1.5;
  color: rgba(240, 241, 252, 0.92);
  text-wrap: pretty;
}
.hero-actions { margin-top: 32px; }
.hero-credit {
  position: absolute;
  right: var(--gutter);
  bottom: 18px;
  padding: 7px 14px 6px;
  border: 1px solid rgba(230, 232, 251, 0.18);
  border-radius: 999px;
  background: rgba(21, 23, 47, 0.78);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--text);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
}
@media (max-width: 700px) {
  .hero-credit { bottom: 14px; font-size: 0.6875rem; padding: 5px 11px 4px; }
}

/* primary button: one shape (pill) for every button on the site */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 26px;
  border: 0;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s var(--ease);
}
.btn-primary:hover { background: #fff; }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.btn-primary:disabled { opacity: 0.6; cursor: progress; transform: none; }
.btn-block { width: 100%; }

.stagger {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(56px, 8vw, 120px) clamp(16px, 2vw, 32px);
  padding-top: clamp(72px, 10vw, 160px);
  padding-bottom: clamp(72px, 10vw, 160px);
}
.stagger-item { margin: 0; }
.stagger-item a { display: block; cursor: zoom-in; }
.stagger-item img { width: 100%; transition: transform 0.6s var(--ease); }
.stagger-item a:hover img { transform: translateY(-4px); }
.stagger-item a:active img { transform: translateY(-1px) scale(0.998); }
.stagger-1 { grid-column: 4 / span 6; }
.stagger-2 { grid-column: 1 / span 5; }
.stagger-3 { grid-column: 7 / span 6; align-self: end; margin-top: clamp(40px, 10vw, 180px); }
@media (max-width: 700px) {
  .stagger-1, .stagger-2, .stagger-3 { grid-column: 1 / -1; margin-top: 0; }
}

.feature {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: center;
  padding-bottom: clamp(80px, 10vw, 160px);
}
.feature-img { grid-column: 1 / span 8; grid-row: 1; margin: 0; }
.feature-img a { display: block; cursor: zoom-in; }
.feature-img img { width: 100%; }
.feature-img .caption { text-align: left; }
.feature-box {
  grid-column: 8 / span 5;
  grid-row: 1;
  z-index: 1;
  margin: 0;
  padding: clamp(32px, 4vw, 64px);
  background: var(--box);
  color: var(--box-text);
}
.feature-quote p {
  font-family: var(--display);
  font-size: clamp(1.25rem, 1rem + 1vw, 1.875rem);
  line-height: 1.3;
  text-wrap: pretty;
}
.feature-by {
  margin-top: 20px;
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 600;
}
.feature-box .text-link { margin-top: 24px; }
@media (max-width: 900px) {
  .feature-img, .feature-box { grid-column: 1 / -1; }
  .feature-box { grid-row: 2; margin-top: 32px; }
}

.home-series { padding-bottom: clamp(80px, 10vw, 160px); }
.home-series .title-lg { margin-bottom: 32px; }
.series-list { border-top: 1px solid var(--line); }
.series-list li { border-bottom: 1px solid var(--line); }
.series-link {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: clamp(20px, 3vw, 48px);
  padding: clamp(20px, 2.4vw, 32px) 0;
  text-decoration: none;
}
.series-link { align-items: center; }
.series-thumb {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(110px, 15vw, 210px);
  height: clamp(84px, 11.25vw, 158px);
  padding: clamp(8px, 1vw, 14px);
  border-radius: 6px;
  background: var(--bg-2);
}
.series-thumb img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  transition: transform 0.45s var(--ease);
}
.series-link:hover .series-thumb img { transform: scale(1.04); }
.series-name {
  flex: 1;
  font-size: clamp(1.375rem, 1rem + 1.8vw, 2.75rem);
  line-height: 1.1;
  transition: transform 0.45s var(--ease);
}
.series-years { flex: none; color: #fff; font-size: clamp(1.0625rem, 0.95rem + 0.4vw, 1.25rem); letter-spacing: 0.04em; }
.series-link:hover .series-name { transform: translateX(10px); }
.series-link:active .series-name { transform: translateX(4px); }
.series-link:focus-visible { outline-offset: -2px; }

/* ------------------------------------------------------------ page heads & texts */

.page-head {
  padding-top: clamp(56px, 8vw, 120px);
  padding-bottom: clamp(40px, 5vw, 72px);
}
/* an image in place of the big title (Rome 2017 invitation): shown at most at its own size,
   centred, with the line below it starting at the image's left edge */
.page-head--img { display: grid; grid-template-columns: minmax(0, max-content); justify-content: center; }
.page-head-img { margin: 0; }
.page-sub { margin-top: 18px; color: #fff; font-size: clamp(1.0625rem, 0.95rem + 0.4vw, 1.25rem); letter-spacing: 0.04em; }

.texts {
  display: grid;
  gap: clamp(48px, 6vw, 80px);
  padding-bottom: clamp(64px, 8vw, 120px);
}
.statement .text,
.statement .other-text { max-width: 72ch; }
.statement-by { margin-bottom: 20px; color: var(--muted); font-size: 0.875rem; }
/* an exhibition photo between two texts, about as wide as the text column */
.text-photo { margin: 0; max-width: 720px; }
.text-photo img { width: 100%; }
.text-photo .caption { margin-top: 14px; }

/* press posts (/presse/…): a short account, one brief quote, the works named */
.post-title { max-width: 26ch; text-wrap: balance; }
.post-quote { margin: 0; max-width: 72ch; padding-left: clamp(16px, 2vw, 28px); border-left: 1px solid var(--line); }
.post-quote blockquote { margin: 0; }
.post-quote blockquote p {
  font-family: var(--display);
  font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem);
  line-height: 1.3;
}
.post-quote-tr { margin-top: 10px; font-family: var(--sans); color: var(--muted); }
.post-quote .statement-by { margin: 14px 0 0; }
.post-works-h { margin-bottom: clamp(32px, 4vw, 56px); }
.post-back { padding-bottom: clamp(64px, 8vw, 120px); }
.press-text { margin-top: clamp(24px, 3vw, 36px); }
.exhibition-line {
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 0.9375rem;
}

.other-text {
  max-width: 78ch;
  margin-top: 28px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.other-text + .other-text { margin-top: -1px; }
.other-text summary {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  cursor: pointer;
  list-style: none;
  font-size: 0.875rem;
  color: var(--muted);
  transition: color 0.2s ease;
}
.other-text summary::-webkit-details-marker { display: none; }
.other-text summary:hover { color: var(--text); }
.other-text summary:active { opacity: 0.7; }
.icon-toggle {
  width: 11px; height: 11px;
  flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.3;
  transition: transform 0.3s var(--ease);
}
.other-text[open] .icon-toggle { transform: rotate(45deg); }
.other-text-body { padding: 4px 0 28px; color: var(--muted); }

/* ------------------------------------------------------------ works */

.works {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-end;
  gap: clamp(72px, 8vw, 128px) clamp(32px, 6vw, 112px);
  padding-bottom: clamp(80px, 10vw, 160px);
}
.work {
  --h: clamp(260px, 30vw, 540px);
  width: min(100%, calc(var(--ar) * var(--h)));
}
.work figure { margin: 0; }
.work--feature {
  flex-basis: 100%;
  display: flex;
  justify-content: center;
}
.work--feature figure { width: min(100%, calc(var(--ar) * min(80vh, 780px))); }
/* a row to itself, at the normal grid height */
.work--alone {
  flex-basis: 100%;
  display: flex;
  justify-content: center;
}
.work--alone figure { width: min(100%, calc(var(--ar) * var(--h))); }
.work img { width: 100%; }

.work-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}
.work-open img { transition: transform 0.5s var(--ease); }
.work-open:hover img { transform: translateY(-4px); }
.work-open:active img { transform: translateY(-1px) scale(0.998); }
.work-open:hover + .caption cite { text-decoration: underline; text-underline-offset: 0.3em; }

@media (max-width: 640px) {
  .work, .work--feature figure, .work--alone figure { width: 100%; }
}

/* ------------------------------------------------------------ timeline (gallery index)
   One entry per series, oldest first. Phone: line on the left, year above the
   card. Desktop: line in the middle, entries alternate left and right. */

.timeline {
  --tl-img-h: clamp(220px, 26vw, 360px);
  position: relative;
  display: grid;
  gap: clamp(56px, 7vw, 112px);
  padding: 16px 0 clamp(80px, 10vw, 160px);
}
.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: clamp(80px, 10vw, 160px);
  left: 11px;
  width: 1px;
  background: var(--line);
}
.tl-item {
  position: relative;
  display: grid;
  grid-template-columns: 23px minmax(0, 1fr);
  column-gap: 20px;
  row-gap: 18px;
}
.tl-dot {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  justify-self: center;
  width: 11px;
  height: 11px;
  border: 1.5px solid var(--text);
  border-radius: 50%;
  background: var(--bg);
}
.tl-year {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 0.3em;
  font-family: var(--display);
  font-size: clamp(2.25rem, 1.3rem + 3.6vw, 4.75rem);
  line-height: 1;
}
.tl-end { color: var(--muted); font-size: 0.55em; }
.tl-card {
  grid-column: 2;
  grid-row: 2;
  display: block;
  width: 100%;
  max-width: 560px;
  overflow: hidden;
  border: 1px solid rgba(230, 232, 251, 0.14);
  border-radius: 10px;
  background: var(--bg-2);
  text-decoration: none;
  box-shadow: 0 24px 60px -24px rgba(6, 7, 20, 0.6);
  transition: border-color 0.2s ease;
}
.tl-img {
  display: grid;
  place-items: center;
  height: var(--tl-img-h);
  padding: 24px 24px 0;
}
.tl-img img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(var(--tl-img-h) - 24px);
  transition: transform 0.5s var(--ease);
}
.tl-text { display: flex; flex-direction: column; gap: 6px; padding: 20px 24px 24px; }
.tl-title { font-family: var(--display); text-transform: uppercase; font-size: clamp(1.25rem, 1rem + 0.8vw, 1.75rem); line-height: 1.15; }
.tl-sub,
.tl-meta,
.tl-cta { font-family: var(--mono); text-transform: uppercase; font-size: 0.8125rem; }
.tl-sub, .tl-meta { color: var(--muted); }
/* the photographer of the cover photo, when it isn't Keam's own image */
.tl-credit { display: block; margin-top: 4px; color: var(--muted); font-size: 0.75rem; }
.tl-cta { margin-top: 10px; }
.tl-cta span { display: inline-block; transition: transform 0.25s var(--ease); }
.tl-card:hover { border-color: rgba(230, 232, 251, 0.42); }
.tl-card:hover .tl-img img { transform: translateY(-3px); }
.tl-card:hover .tl-cta { text-decoration: underline; text-underline-offset: 0.3em; }
.tl-card:hover .tl-cta span { transform: translateX(4px); }
.tl-card:active .tl-img img { transform: translateY(-1px) scale(0.998); }
.tl-card:focus-visible { outline-offset: 4px; }

@media (min-width: 900px) {
  .timeline::before { left: 50%; }
  .tl-item {
    grid-template-columns: minmax(0, 1fr) 48px minmax(0, 1fr);
    column-gap: clamp(24px, 3vw, 56px);
    align-items: center;
  }
  .tl-dot { grid-column: 2; grid-row: 1; width: 13px; height: 13px; }
  .tl-year { grid-row: 1; }
  .tl-card { grid-row: 1; }
  .tl-item:nth-child(odd) .tl-year { grid-column: 1; justify-self: end; justify-content: flex-end; text-align: right; }
  .tl-item:nth-child(odd) .tl-card { grid-column: 3; justify-self: start; }
  .tl-item:nth-child(even) .tl-year { grid-column: 3; justify-self: start; }
  .tl-item:nth-child(even) .tl-card { grid-column: 1; justify-self: end; }
}

/* ------------------------------------------------------------ video */

.video-block { padding-bottom: clamp(80px, 10vw, 140px); }
.video {
  position: relative;
  max-width: 960px;
  margin-inline: auto;
  aspect-ratio: 16 / 9;
  background: var(--bg-2);
}
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 6%;
  border: 0;
  background: var(--bg-2);
  cursor: pointer;
}
.video-play img { height: 100%; width: auto; max-width: 100%; object-fit: contain; }
.video-cta {
  position: absolute;
  left: 16px;
  bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px 9px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--bg);
  font-size: 0.875rem;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.video-cta svg { width: 16px; height: 16px; fill: currentColor; }
.video-note { color: var(--muted); }
.video-play:hover .video-cta { background: var(--text); color: var(--bg); }
.video-play:hover .video-note { color: inherit; }
.video-play:active .video-cta { transform: scale(0.98); }
@media (max-width: 520px) { .video-note { display: none; } }

/* ------------------------------------------------------------ pager */

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding-top: 36px;
  padding-bottom: clamp(64px, 8vw, 112px);
  border-top: 1px solid var(--line);
}
.pager-link { display: flex; flex-direction: column; gap: 8px; text-decoration: none; }
.pager-next { text-align: right; }
.pager-dir { color: var(--muted); font-size: 0.875rem; }
.pager-title { font-size: clamp(1.0625rem, 0.9rem + 0.8vw, 1.75rem); line-height: 1.15; text-wrap: balance; }
.pager-link:hover .pager-title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.pager-link:active { opacity: 0.7; }

/* ------------------------------------------------------------ about */

/* biography text left, studio photo right (photo first on phones) */
.about-bio {
  display: grid;
  gap: 48px;
  padding-top: clamp(48px, 6vw, 96px);
  padding-bottom: clamp(64px, 8vw, 128px);
}
@media (min-width: 900px) {
  .about-bio { grid-template-columns: 7fr 5fr; gap: clamp(48px, 5vw, 96px); align-items: start; }
  .about-bio-img { grid-column: 2; grid-row: 1; }
}
.about-bio .title-lg { margin-bottom: clamp(32px, 4vw, 56px); }
.lead {
  max-width: 30ch;
  margin-bottom: 40px;
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.5rem);
  line-height: 1.15;
}
.lead:has(+ .bio-studio) { margin-bottom: 14px; }
.bio-studio {
  margin-bottom: 40px;
  font-family: var(--sans);
  color: #fff;
  font-size: clamp(0.9375rem, 0.88rem + 0.25vw, 1.0625rem);
}

.about-split {
  display: grid;
  gap: 48px;
  padding-bottom: clamp(64px, 8vw, 128px);
}
@media (min-width: 900px) {
  .about-split { grid-template-columns: 5fr 7fr; gap: clamp(48px, 5vw, 96px); align-items: start; }
}
.about-portrait { margin: 0; }
.about-portrait img { width: 100%; }

.cv-block { padding-bottom: clamp(56px, 7vw, 104px); }
.cv-block .title-md { margin-bottom: 20px; }
.more { margin-top: 28px; display: flex; gap: 28px; }

.cv-list { border-top: 1px solid var(--line); font-size: 0.9375rem; }
.cv-list li { border-bottom: 1px solid var(--line); }
.cv-list > li:not(:has(.press-link)) {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 16px;
  padding: 14px 0;
  line-height: 1.4;
}
.cv-year { color: #fff; font-size: clamp(1.0625rem, 0.95rem + 0.4vw, 1.25rem); letter-spacing: 0.04em; line-height: 1.3; font-variant-numeric: tabular-nums; }
.press-link {
  display: grid;
  grid-template-columns: 150px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px 0;
  line-height: 1.4;
  text-decoration: none;
}
.icon-arrow {
  width: 12px; height: 12px;
  fill: none; stroke: currentColor; stroke-width: 1.3;
  transition: transform 0.3s var(--ease);
}
.press-link:hover .cv-what { text-decoration: underline; text-underline-offset: 0.3em; }
.press-link:hover .icon-arrow { transform: translate(2px, -2px); }
.press-link:active { opacity: 0.7; }
.press-link:focus-visible { outline-offset: -2px; }
@media (max-width: 560px) {
  .cv-list > li:not(:has(.press-link)),
  .press-link { grid-template-columns: 1fr; gap: 2px; }
  .press-link .icon-arrow { display: none; }
}

.events { padding-bottom: clamp(24px, 3vw, 48px); }

/* ------------------------------------------------------------ contact
   A framed split card: studio photo left, form panel right. */

.contact-wrap {
  max-width: 1240px;
  padding-top: clamp(16px, 3vw, 40px);
  padding-bottom: clamp(32px, 5vw, 64px);
}
.contact-frame {
  display: grid;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(230, 232, 251, 0.12);
  border-radius: 28px;
  background: rgba(230, 232, 251, 0.06);
  box-shadow: 0 40px 90px -40px rgba(6, 7, 20, 0.7);
}
@media (min-width: 900px) {
  .contact-frame { grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); }
}
.contact-photo {
  position: relative;
  margin: 0;
  min-height: 280px;
  overflow: hidden;
  border-radius: 20px;
}
.contact-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 15% 40%;  /* Keam sits on the left of the portrait */
}
.contact-panel {
  padding: clamp(28px, 4vw, 56px);
  border-radius: 20px;
  background: #15172f;
  font-family: var(--sans);
}
.contact-title {
  font-family: var(--display);
  font-size: clamp(2.5rem, 1.8rem + 2.6vw, 4rem);
  line-height: 1;
  text-transform: uppercase;
}
.contact-lead {
  max-width: 44ch;
  margin-top: 16px;
  color: rgba(230, 232, 251, 0.82);
  font-size: 1rem;
  line-height: 1.6;
}

.contact-form { display: grid; gap: 20px; margin-top: 32px; }
.contact-form[hidden] { display: none; }
.field-row { display: grid; gap: 20px; }
@media (min-width: 560px) {
  .field-row { grid-template-columns: 1fr 1fr; gap: 16px; }
}
.field { display: grid; gap: 8px; align-content: start; }
.field label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}
.req { margin-left: 3px; color: var(--box); }
.opt { font-weight: 400; color: rgba(230, 232, 251, 0.6); }
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  border: 1px solid rgba(230, 232, 251, 0.24);
  border-radius: 10px;
  background: rgba(230, 232, 251, 0.04);
  color: var(--text);
  font: inherit;
  font-size: 0.9375rem;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.field textarea { min-height: 132px; resize: none; line-height: 1.5; }
.field select {
  appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 4.5L6 8.5l4-4' fill='none' stroke='%23e6e8fb' stroke-width='1.4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px;
}
.field select option { background: #15172f; color: var(--text); }
.field input:hover,
.field select:hover,
.field textarea:hover { border-color: rgba(230, 232, 251, 0.42); }
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--box);
  outline-offset: 1px;
  border-color: var(--box);
  background-color: rgba(230, 232, 251, 0.07);
}
.field [aria-invalid="true"] { border-color: #f2a7a7; }
.field-error { color: #f6b8b8; font-size: 0.8125rem; }
/* hidden from people, visible to simple bots that fill every field */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.field-count { justify-self: end; color: rgba(230, 232, 251, 0.6); font-size: 0.75rem; font-variant-numeric: tabular-nums; }
.field-count.is-near { color: #f6d58e; }
.form-note { color: rgba(230, 232, 251, 0.66); font-size: 0.8125rem; line-height: 1.55; }
.form-status:empty { display: none; }
.form-status { color: var(--text); font-size: 0.875rem; }

/* shown in place of the form once the message has been sent */
.form-done {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: clamp(40px, 6vw, 72px) 0;
  text-align: center;
  outline: none;
  animation: form-done-in 0.45s var(--ease) both;
}
.form-done[hidden] { display: none; }
.form-done-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 1px solid rgba(230, 232, 251, 0.35);
  border-radius: 50%;
  background: rgba(133, 146, 221, 0.16);
}
.form-done-icon svg { width: 28px; height: 28px; fill: none; stroke: var(--text); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.form-done-title { font-family: var(--display); font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); text-transform: uppercase; }
.form-done-text { max-width: 36ch; color: rgba(230, 232, 251, 0.8); line-height: 1.55; }
.form-done-text strong { color: var(--text); font-weight: 600; overflow-wrap: anywhere; }
.form-again { margin-top: 6px; padding: 0; border: 0; background: none; color: var(--text); cursor: pointer; }
@keyframes form-done-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.contact-direct {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid rgba(230, 232, 251, 0.12);
  font-size: 0.9375rem;
}
.contact-direct-label { color: rgba(230, 232, 251, 0.7); }
.contact-direct-mail { font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.contact-direct-mail:hover { text-decoration: underline; text-underline-offset: 0.25em; }
.copy-btn {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(230, 232, 251, 0.3);
  border-radius: 999px;
  background: none;
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.copy-btn:hover { background: var(--text); color: var(--bg); }
.copy-btn:active { transform: scale(0.97); }
.copy-btn.is-done { border-color: var(--box); color: var(--text); background: none; }
.contact-place { margin-top: 16px; color: rgba(230, 232, 251, 0.66); font-size: 0.875rem; }
.contact-place a { text-decoration: underline; text-underline-offset: 0.25em; }
.contact-place a:hover { color: #fff; }
.contact-sep { margin: 0 6px; }

/* ------------------------------------------------------------ footer
   Brand and one line left, two link columns right, a rule, the copyright. */

.site-footer {
  margin-top: clamp(64px, 10vw, 160px);
  background: #15172f;
  font-family: var(--sans);
}
.footer-inner {
  max-width: 1200px;
  margin-inline: auto;
  padding: 56px var(--gutter) 40px;
  display: grid;
  gap: 40px;
}
@media (min-width: 900px) {
  .footer-inner { grid-template-columns: 1fr auto; gap: 64px; }
}
.footer-name {
  display: inline-block;
  font-size: 1.5rem;
  line-height: 1;
  text-decoration: none;
  transition: opacity 0.2s ease;
}
.footer-name:hover { opacity: 0.75; }
.footer-name:active { opacity: 0.55; }
.footer-about {
  max-width: 34ch;
  margin-top: 18px;
  color: rgba(230, 232, 251, 0.78);
  font-size: 0.9375rem;
  line-height: 1.6;
}
.footer-cols { display: flex; gap: clamp(48px, 9vw, 140px); }
.footer-head {
  margin-bottom: 16px;
  color: rgba(230, 232, 251, 0.55);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.footer-col ul { display: grid; gap: 12px; }
.footer-col a {
  color: rgba(230, 232, 251, 0.9);
  font-size: 0.9375rem;
  text-decoration: none;
  transition: color 0.2s ease;
}
.footer-col a:hover { color: #fff; text-decoration: underline; text-underline-offset: 0.25em; }
.footer-col a:active { opacity: 0.6; }
.footer-bottom {
  max-width: 1200px;
  margin-inline: auto;
  padding: 0 var(--gutter) 40px;
}
.footer-bottom p {
  padding-top: 28px;
  border-top: 1px solid rgba(230, 232, 251, 0.12);
  color: rgba(230, 232, 251, 0.55);
  font-size: 0.8125rem;
}

.not-found { min-height: 50vh; }
.not-found .text { margin-top: 24px; }

/* ------------------------------------------------------------ viewer (lightbox) */

.viewer {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
}
.viewer[open] {
  display: grid;
  grid-template-rows: auto 1fr auto;
  animation: viewer-in 0.3s ease both;
}
.viewer::backdrop { background: var(--bg); }
@keyframes viewer-in { from { opacity: 0; } to { opacity: 1; } }

.viewer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px var(--gutter);
  min-height: 64px;
}
.viewer-count { font-size: 0.875rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.viewer-close {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: none;
  cursor: pointer;
  font-size: 0.875rem;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.viewer-close:hover { background: var(--text); color: var(--bg); }
.viewer-close:active { transform: scale(0.97); }

.viewer-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 0;
  overflow: hidden;
  padding-inline: calc(var(--gutter) - 16px);
  touch-action: pan-y pinch-zoom;
}
.viewer-pic { display: contents; }
.viewer-stage img {
  /* absolutely placed so max-height resolves against the stage's real height */
  position: absolute;
  inset: 0;
  margin: auto;
  width: auto;
  height: auto;
  max-width: calc(100% - 2 * (var(--gutter) + 56px));
  max-height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  transition: opacity 0.25s ease;
}
.viewer-stage img.is-loading { opacity: 0; }

.viewer-nav {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: none;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.viewer-nav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.3; }
.viewer-nav:hover { background: var(--bg-2); }
.viewer-nav:active { transform: scale(0.95); }

.viewer-caption { margin: 0; padding: 16px var(--gutter) 28px; }

@media (max-width: 640px) {
  .viewer-stage img { max-width: calc(100% - 24px); }
  .viewer-nav { display: none; }
  .viewer-caption { padding-bottom: max(24px, env(safe-area-inset-bottom)); }
}

/* ------------------------------------------------------------ motion */

.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: calc(var(--i, 0) * 80ms);
}
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}
