/* ==========================================================================
   Tokens
   ========================================================================== */

:root {
  --bg: #fafaf7;
  --ink: #161616;
  --muted: #65635d;
  --line: #e4e2dc;
  --button: #3a3a3a;
  --accent: #b83a6e;
  --accent-soft: color-mix(in srgb, var(--accent) 14%, transparent);

  /* Noto Sans KR draws the Hangul (only downloaded when Korean text is on the page) */
  --sans: "Instrument Sans", "Noto Sans KR", "Helvetica Neue", Arial, sans-serif;

  /* --page-w: page width without the scrollbar, set by boot.js (falls back to vw/% without JS) */
  --gutter: clamp(16px, calc(var(--page-w, 100vw) * .04), 64px);
  --max: 1480px;
  /* Horizontal padding that aligns every full-width row to the same content edge */
  --inline: max(var(--gutter), calc((var(--page-w, 100%) - var(--max)) / 2 + var(--gutter)));
  --header-h: 76px;
  --wordmark-size: 22px;

  --ease: cubic-bezier(.22, .61, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-soft: cubic-bezier(.45, 0, .55, 1);
  --fade-text: .3s; /* hover colour change on text */
  --fade-fill: .3s; /* hover colour change on filled buttons */
}

/* ==========================================================================
   Base
   ========================================================================== */

* { box-sizing: border-box; }
[hidden] { display: none !important; }
/* Korean pages wait for their text (see boot.js) so the English never flashes */
.i18n-pending body { visibility: hidden; }

/* Korean: words never break mid-syllable; Hangul has no capitals or italics, so the wide
   tracking of the uppercase labels is reduced and emphasis stays upright */
html[lang="ko"] { word-break: keep-all; }
html[lang="ko"] :is(.nav-desktop .link, .menu-sub, .menu-toggle-label, .filters, .views, .btn) { letter-spacing: .04em; }
html[lang="ko"] :is(em, .about-tagline, .viewer-info h2, .menu nav > a[aria-current="page"]) { font-style: normal; }

html { scroll-padding-top: calc(var(--header-h) + 28px); scrollbar-gutter: stable; }
html:has(dialog[open]) { overflow: hidden; }
::selection { background: var(--accent-soft); }

body {
  margin: 0;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr; /* header / main */
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a[data-href] { cursor: pointer; } /* address held aside while hovered, see setupQuietLinks() */
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 1px solid var(--accent); outline-offset: 4px; }

h1, h2, h3 { margin: 0; font-weight: 400; }

.page-title { font-size: clamp(32px, 4vw, 54px); line-height: 1.05; letter-spacing: -.02em; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--gutter); top: 12px; z-index: 30; padding: 6px 10px; background: var(--bg); }

/* Small labels */
.viewer-index, .inquiry label > span, .viewer-info dt {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

/* Text links: a hairline underline draws in on hover */
.link {
  padding-bottom: 2px;
  background: linear-gradient(var(--accent), var(--accent)) no-repeat 100% 100% / 0 1px;
  transition: background-size .4s var(--ease-out), color var(--fade-text) var(--ease-soft);
}
.link:hover, .link:focus-visible { background-size: 100% 1px; background-position: 0 100%; color: var(--accent); }
.link.is-current, .link[aria-current="page"] { background-size: 100% 1px; color: var(--accent); }
/* Underlined at rest (e.g. the email address); the underline retracts on hover */
.link.is-underlined { background-image: linear-gradient(currentColor, currentColor); background-size: 100% 1px; }
.link.is-underlined:hover { background-size: 0 1px; background-position: 100% 100%; }

/* ==========================================================================
   Header and mobile menu
   ========================================================================== */

.site-header {
  position: sticky; top: 0; z-index: 20;
  height: var(--header-h);
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 var(--inline);
}

/* Frosted glass behind the header: blurs what scrolls underneath, under a thin tint. It extends a
   little below the header and fades out (--glass-fade), so there's no hard bottom edge. Home
   overrides these values for a dark version over the film. The blur only works because the header
   has no view-transition-name at rest (see boot.js): that would make it a backdrop root. */
:root {
  --glass-tint: linear-gradient(rgb(255 255 255 / .2), rgb(250 250 247 / .1));
  --glass-filter: blur(5px) saturate(1.3);
  --glass-edge: inset 0 1px 0 rgb(255 255 255 / .22);
  --glass-fade: 28px; /* how far the bottom edge fades out */
}
.site-header::before {
  content: ""; position: absolute; inset: 0 0 calc(var(--glass-fade) * -.65); z-index: -1;
  pointer-events: none; /* the faded band below the header doesn't catch clicks */
  background: var(--glass-tint);
  -webkit-backdrop-filter: var(--glass-filter); backdrop-filter: var(--glass-filter);
  box-shadow: var(--glass-edge);
  -webkit-mask-image: linear-gradient(#000 calc(100% - var(--glass-fade)), transparent);
  mask-image: linear-gradient(#000 calc(100% - var(--glass-fade)), transparent);
}

.wordmark { font-size: var(--wordmark-size); font-weight: 500; letter-spacing: .2em; text-transform: uppercase; }

.nav-desktop {
  --nav-size: 14px;
  display: flex; align-self: stretch; align-items: center; gap: clamp(20px, calc(var(--page-w, 100vw) * .03), 44px);
  /* Both are centred in the header, which leaves the larger wordmark's baseline lower. In Instrument
     Sans the baseline sits .3em below a line's centre, so this moves the links onto the same baseline */
  padding-top: calc((var(--wordmark-size) - var(--nav-size)) * .6);
  font-size: var(--nav-size); font-weight: 500; letter-spacing: .12em; text-transform: uppercase;
}
.nav-desktop a { padding-block: 6px; }

/* Instagram / Facebook: thin line icons in the text colour, accent on hover. In the header
   they sit left of Works, set off by a hairline; on phones they're at the foot of the menu */
.social { display: inline-flex; color: inherit; transition: color var(--fade-text) var(--ease-soft); }
.social:hover, .social:focus-visible { color: var(--accent); }
.social svg {
  width: 20px; height: 20px;
  fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round;
}
.social .dot { fill: currentColor; stroke: none; }
/* EN / KR: the current language in the text colour, the other muted, accent on hover.
   Set a little apart from the icons */
.lang-switch {
  --lang-off: var(--muted);
  display: inline-flex; align-items: baseline; gap: 6px; margin-right: 12px;
  font-size: 12px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase;
}
.page-home .site-header .lang-switch { --lang-off: var(--home-muted); }
.lang-switch > span { color: var(--lang-off); opacity: .6; }
.lang-switch a { color: var(--lang-off); transition: color var(--fade-text) var(--ease-soft); }
.lang-switch a.is-current { color: inherit; }
.lang-switch a:hover, .lang-switch a:focus-visible { color: var(--accent); } /* after the rules above, so it always wins */
.nav-social {
  display: flex; align-items: center; gap: 16px;
  padding-right: clamp(20px, calc(var(--page-w, 100vw) * .03), 44px);
  border-right: 1px solid color-mix(in srgb, currentColor 22%, transparent);
}

/* Works dropdown: categories from categories.json (renderCategoryNav). The item spans the
   header's height so the pointer can travel from the link to the panel without closing it */
.nav-item { position: relative; align-self: stretch; display: flex; align-items: center; }
.dropdown {
  position: absolute; top: 100%; left: -22px;
  display: grid; gap: 2px;
  min-width: 190px; margin: 0; padding: 12px 22px 14px;
  list-style: none;
  font-size: 13px;
  background: var(--bg); border: 1px solid var(--line);
  box-shadow: 0 18px 40px rgb(0 0 0 / .06);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .35s var(--ease), transform .5s var(--ease-out), visibility 0s linear .35s;
}
.dropdown:empty { display: none; }
/* Quicker than other links, so only the item under the pointer looks selected */
.dropdown a {
  display: inline-block; white-space: nowrap; color: var(--muted);
  transition: background-size .3s var(--ease-out), color .2s var(--ease-soft);
}
.dropdown a:hover, .dropdown a:focus-visible, .dropdown a.is-current { color: var(--accent); }
/* The current category steps back while another item is pointed at */
.dropdown:hover a.is-current:not(:hover) { color: var(--muted); background-size: 0 1px; }
.nav-item:hover .dropdown, .nav-item:focus-within .dropdown {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity .35s var(--ease), transform .5s var(--ease-out);
}
/* After a choice, stays closed until the pointer leaves (setupDropdown) */
.nav-item.is-closed .dropdown {
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .35s var(--ease), transform .5s var(--ease-out), visibility 0s linear .35s;
}

.menu-toggle {
  display: none;
  padding: 12px 0 12px 20px;
  font-size: 14px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase;
  transition: color var(--fade-text) var(--ease-soft);
}
.menu-toggle:hover, .menu-toggle:focus-visible { color: var(--accent); }

.menu {
  position: fixed; inset: var(--header-h) 0 0; z-index: 19;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: clamp(32px, 10vh, 80px) var(--inline) 40px;
  background: var(--bg);
  opacity: 0; visibility: hidden;
  transition: opacity .5s var(--ease), visibility 0s linear .5s;
}
.menu nav { display: flex; flex-direction: column; gap: 8px; }
.menu nav > * {
  opacity: 0; transform: translateY(18px);
  transition: opacity .5s var(--ease), transform .7s var(--ease-out), color var(--fade-text) var(--ease-soft);
}
.menu nav > a { font-size: clamp(34px, 10vw, 48px); line-height: 1.2; letter-spacing: -.01em; }
.menu nav > a:hover, .menu nav > a:focus-visible { color: var(--accent); }
.menu nav > a[aria-current="page"] { font-style: italic; color: var(--accent); }
/* Work categories under "Works" */
.menu-sub {
  display: flex; flex-wrap: wrap; gap: 4px 22px;
  margin: -2px 0 14px; padding: 0; list-style: none;
  font-size: 13px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase;
}
.menu-sub:empty { display: none; }
.menu-sub a { display: inline-block; padding-block: 6px; color: var(--muted); }
.menu-sub a:hover, .menu-sub a:focus-visible, .menu-sub a.is-current { color: var(--accent); }
.menu-foot { display: flex; align-items: center; gap: 24px; margin: 0; color: var(--muted); }
.menu-foot .lang-switch { font-size: 14px; margin-right: 16px; }
.menu-foot .social svg { width: 24px; height: 24px; }

.menu-open { overflow: hidden; }
.menu-open .site-header::before { background: var(--bg); } /* solid while the menu is open */
.menu-open .menu { opacity: 1; visibility: visible; transition: opacity .5s var(--ease); }
.menu-open .menu nav > * { opacity: 1; transform: none; }
.menu-open .menu nav > :nth-child(2) { transition-delay: .05s; }
.menu-open .menu nav > :nth-child(3) { transition-delay: .1s; }
.menu-open .menu nav > :nth-child(4) { transition-delay: .15s; }

/* ==========================================================================
   Page transitions (cross-document View Transitions)
   ========================================================================== */

/* Between inner pages the content fades while the header holds still (it's named only
   for the transition, :root.vt-header, see boot.js). Browsers without these transitions fade in. */
@view-transition { navigation: auto; }
:root.vt-header .site-header { view-transition-name: site-header; }
/* Only one copy of the header shows at a time (two overlaid copies would thicken the text). A Korean
   page is captured before its text is in (.i18n-pending, see boot.js), so until then the outgoing
   header stays, and the header never blinks empty. */
::view-transition-group(site-header), ::view-transition-old(site-header), ::view-transition-new(site-header) { animation: none; }
::view-transition-old(site-header), :root.i18n-pending::view-transition-new(site-header) { opacity: 0; }
:root.i18n-pending::view-transition-old(site-header) { opacity: 1; }
::view-transition-old(root) { animation: page-out .25s var(--ease) both; }
::view-transition-new(root) { animation: page-in .4s var(--ease) both; }
.no-vt main { animation: page-in .4s var(--ease) both; }

/* To or from home (light header over the film), switching language, and opening a work in the
   viewer: a plain crossfade with the header included (:root.vt-fade, set by boot.js / morph()). Equal timing on
   both sides keeps the crossfade at full opacity throughout. */
:root.vt-fade::view-transition-old(root) { animation: vt-fade-out .5s var(--ease) both; }
:root.vt-fade::view-transition-new(root) { animation: vt-fade-in .5s var(--ease) both; }

@keyframes page-out { to { opacity: 0; } }
@keyframes page-in { from { opacity: 0; } }
@keyframes vt-fade-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes vt-fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ==========================================================================
   Home
   ========================================================================== */

/* Single screen, no scrollbar gutter */
html:has(.page-home) { scrollbar-gutter: auto; }

/* Full-screen film behind the header; header text in whitish grey */
.page-home {
  --home-text: #e7e5e0;
  --home-muted: rgb(231 229 224 / .72);
  /* Dark glass over the film: blurrier, and fading out over a long stretch with no line beneath,
     so it melts into the film (including while the film fades in) */
  --glass-tint: linear-gradient(rgb(18 18 16 / .12), rgb(18 18 16 / .04));
  --glass-filter: blur(14px) saturate(1.2);
  --glass-edge: inset 0 1px 0 rgb(255 255 255 / .05);
  --glass-fade: 64px;
  background: #121210; /* also what the loop fades through */
}
/* Lighter pink, legible on the darkened film */
.page-home :is(.site-header, .home) { --accent: #ee8fb6; }

.home-film { position: fixed; inset: 0; z-index: 0; }
.home-film-link { position: absolute; inset: 0; }
.home-film-link:focus-visible { outline-offset: -8px; }
/* Slight darkening, a little deeper behind the header and towards the bottom edge */
.home-film-link::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(rgb(0 0 0 / .35), transparent 22%, transparent 70%, rgb(0 0 0 / .45)),
    rgb(0 0 0 / .22);
}
.home-video { display: block; width: 100%; height: 100%; object-fit: cover; transition: opacity 1s var(--ease-soft); }
.home-video.is-dimmed { opacity: 0; transition-duration: .7s; } /* loop fade, see renderFilm() */

/* The header floats over the film. Home has no scrollbar strip, so the right padding adds its
   width (--sbw, see boot.js) to put the text where it sits on every other page */
.page-home .site-header {
  position: fixed; inset: 0 0 auto;
  padding-right: calc(var(--inline) + var(--sbw, 0px));
  color: var(--home-text);
}

/* Works dropdown: dark glass instead of the cream panel */
.page-home .dropdown {
  background: rgb(18 18 16 / .55);
  border-color: rgb(255 255 255 / .12);
  box-shadow: none;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.page-home .dropdown a { color: var(--home-muted); }
.page-home .dropdown a:hover, .page-home .dropdown a:focus-visible { color: var(--accent); }

/* Mobile menu: the header returns to the cream style while the menu is open */
.menu-open .page-home .site-header { --accent: inherit; color: var(--ink); }

.js .home-film { animation: film-in 1s var(--ease-soft) both; }
@keyframes film-in { from { opacity: 0; } }

/* ==========================================================================
   Inner pages
   ========================================================================== */

.page { padding: clamp(40px, 7vw, 96px) var(--inline) clamp(96px, 11vw, 160px); }
.page-head {
  display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 20px 32px;
  margin-bottom: clamp(48px, 7vw, 96px);
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.page-tools { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px 40px; }
.page-split { display: grid; grid-template-columns: 5fr 7fr; gap: 32px var(--gutter); }
.page-split > .page-title, .page-aside { position: sticky; top: calc(var(--header-h) + 32px); align-self: start; }
.page-body { max-width: 40em; padding-top: 14px; font-size: 18px; }

/* ==========================================================================
   Works
   ========================================================================== */

.filters, .views { display: flex; flex-wrap: wrap; gap: 10px 24px; font-size: 13px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; }
.filter, .view { padding-block: 6px; color: var(--muted); }
.views { padding-left: 24px; border-left: 1px solid var(--line); }

/* Gallery: staggered editorial grid; JS assigns each visible item a slot (0–3) */
.works-list {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(16px, 2.5vw, 40px);
  row-gap: clamp(72px, 10vw, 150px);
  align-items: start;
  transition: opacity .3s var(--ease);
}
.works-list.is-switching { opacity: 0; }
.works-list > li[data-slot="0"] { grid-column: 1 / 8; }
.works-list > li[data-slot="1"] { grid-column: 9 / 13; margin-top: clamp(80px, 16vw, 260px); }
.works-list > li[data-slot="2"] { grid-column: 2 / 7; }
.works-list > li[data-slot="3"] { grid-column: 8 / 13; margin-top: clamp(40px, 8vw, 140px); }

.work { display: block; width: 100%; text-align: left; cursor: default; } /* plain arrow, by request */
.work-media { display: block; overflow: hidden; }
.work-media img {
  width: 100%; height: auto; max-height: 82vh;
  object-fit: contain; object-position: left bottom;
}
.work-caption { display: grid; gap: 1px; margin-top: 16px; }
.work-title { font-size: 17px; line-height: 1.35; }
.work-title em { transition: color var(--fade-text) var(--ease-soft); }
.work:hover .work-title em { color: var(--accent); }
.work-meta { font-size: 14px; color: var(--muted); }
.work-count, .status { margin-top: 6px; font-size: 13px; color: var(--muted); }
.work-count { display: block; }
.status::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 8px; border-radius: 50%; vertical-align: 1px; }
.status.sold::before { background: #a8402f; }
.status.hold::before { background: #c2973a; }

/* Index: compact contact sheet */
.works-list.is-index { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 40px 24px; }
.works-list.is-index > li[data-slot] { grid-column: auto; margin-top: 0; padding-left: 0; }
.works-list.is-index .work-media { display: flex; align-items: flex-end; aspect-ratio: 1; }
.works-list.is-index .work-media img { height: 100%; max-height: 100%; }
.works-list.is-index .work-caption { margin-top: 10px; }
.works-list.is-index .work-title { font-size: 14px; }
.works-list.is-index :is(.work-meta, .work-count, .status) { display: none; }

/* ==========================================================================
   About
   ========================================================================== */

.page-about { padding-top: clamp(32px, 5vh, 64px); padding-bottom: clamp(24px, 4vh, 48px); }
.page-about .page-aside { position: static; }
@media (min-width: 761px) and (min-height: 1000px) {
  .page-about .page-aside { position: sticky; }
}
/* Sized to fit one screen without scrolling (CV and Press closed) */
.page-about .page-body { padding-top: 6px; max-width: 720px; }

.portrait { max-width: 360px; margin: clamp(24px, 3vh, 40px) 0 0; }
/* Shrinks on shorter screens so the left column fits too (~480px is the rest of the column) */
.portrait img { width: auto; max-width: 100%; height: auto; max-height: max(240px, calc(100svh - 480px)); }

.about-tagline { margin: 0 0 .8em; font-style: italic; font-size: 16px; line-height: 1.4; color: var(--accent); }
.about-bio { font-size: 15px; line-height: 1.6; }
.about-bio p { margin: 0 0 .85em; }
.page-about .accordion summary { padding: 10px 0; font-size: 15px; }
@media (min-width: 761px) and (max-height: 860px) {
  .page-about .page-body { padding-top: 0; }
  .about-bio { font-size: 14px; }
  .cv-tools { margin-top: -6px; }
}
@media (min-width: 761px) and (max-height: 760px) {
  .page-about { padding-top: 24px; }
  .about-bio { font-size: 13.5px; line-height: 1.55; }
  .page-about .accordion summary { padding-block: 6px; }
}

/* Press, under the portrait */
.about-press { max-width: 360px; margin-top: clamp(24px, 3vh, 36px); }
.press-quote { margin: 0 0 18px; }
.press-quote blockquote { margin: 0; font-size: 16px; line-height: 1.55; }
.press-quote figcaption { margin-top: 10px; font-size: 13px; color: var(--accent); }
.press-list { list-style: none; margin: 0; padding: 0 0 8px; }
.press-list li + li { border-top: 1px solid var(--line); }
.press-list a { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 1px 12px; padding: 11px 0; }
.press-outlet { grid-column: 1; font-size: 15px; line-height: 1.35; transition: color var(--fade-text) var(--ease-soft); }
.press-note { grid-column: 1; font-size: 13px; color: var(--muted); }
.press-arrow { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: 14px; color: var(--accent); }
.press-list a:hover .press-outlet { color: var(--accent); }

/* Dropdowns (CV sections and Press); open/close animation in setupAccordions() */
.accordion { border-top: 1px solid var(--line); }
.accordion details { border-bottom: 1px solid var(--line); }
.accordion summary {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 20px 0;
  list-style: none; cursor: pointer;
  font-size: 18px; line-height: 1.3;
  transition: color var(--fade-text) var(--ease-soft);
}
.accordion summary:hover { color: var(--accent); }
.accordion summary::-webkit-details-marker { display: none; }
/* Chevron: down when closed, up when open */
.accordion summary::after {
  content: ""; flex: none; align-self: center;
  width: 7px; height: 7px; margin: 0 3px 4px 0;
  border-right: 1px solid var(--accent); border-bottom: 1px solid var(--accent);
  transform: rotate(45deg);
  transition: transform .55s var(--ease-out);
}
.accordion details[open] summary::after { transform: translateY(4px) rotate(225deg); }
.accordion details.is-closing summary::after { transform: rotate(45deg); }
.cv-count { margin-left: auto; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* Expand all / Collapse all (CV and Press) */
.cv-tools {
  display: flex; justify-content: flex-end; gap: 24px; margin-top: 0;
  font-size: 14px;
}
.cv-tools button { padding-block: 4px; color: var(--muted); }
.cv { margin-top: 2px; }
.cv ul { list-style: none; margin: 0; padding: 0 0 24px; font-size: 16px; }
.cv li { display: grid; grid-template-columns: 72px 1fr; gap: 16px; padding: 6px 0; }
.cv-year { color: var(--muted); font-variant-numeric: tabular-nums; }

/* ==========================================================================
   Contact
   ========================================================================== */

.contact-intro { margin-bottom: 48px; }
.contact-intro p { margin: 0 0 .6em; }

.inquiry { display: grid; grid-template-columns: 1fr 1fr; gap: 30px 32px; max-width: 760px; }
.inquiry label { display: flex; flex-direction: column; gap: 6px; }
.inquiry .full { grid-column: 1 / -1; }
.optional { font-weight: 400; }
.inquiry input, .inquiry select, .inquiry textarea {
  padding: 8px 0;
  font: 400 17px/1.4 var(--sans); color: var(--ink);
  background: transparent;
  border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
  appearance: none;
  transition: border-color .4s var(--ease);
}
.inquiry textarea { resize: vertical; }
.inquiry :is(input, select, textarea):focus { outline: none; border-bottom-color: var(--accent); }
.inquiry [aria-invalid="true"] { border-bottom-color: #a8402f; }
.inquiry label.check { flex-direction: row; align-items: center; gap: 12px; cursor: pointer; }
.inquiry label.check span { font-size: 16px; font-weight: 400; color: var(--ink); }
.inquiry input[type="checkbox"] {
  flex: none; display: grid; place-content: center;
  width: 18px; height: 18px; margin: 0; padding: 0;
  border: 1px solid var(--ink); border-radius: 0;
  cursor: pointer;
}
.inquiry input[type="checkbox"]::before { content: ""; width: 10px; height: 10px; background: var(--accent); transform: scale(0); transition: transform .25s var(--ease-out); }
.inquiry input[type="checkbox"]:checked::before { transform: scale(1); }
.hp { position: absolute; left: -9999px; } /* honeypot */
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; margin-top: 8px; }
.form-status { margin: 0; font-size: 15px; color: var(--muted); }

.btn {
  display: inline-block;
  /* Extra left padding offsets the trailing letter-spacing so the label is optically centred */
  padding: 16px 34px 16px calc(34px + .14em);
  text-align: center;
  font: 500 13px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase;
  color: var(--bg); background: var(--button);
  border: 1px solid var(--button);
  transition: background-color var(--fade-fill) var(--ease-soft), border-color var(--fade-fill) var(--ease-soft);
}
.btn:hover { background: var(--accent); border-color: var(--accent); }
.btn:disabled { opacity: .4; cursor: default; }

/* ==========================================================================
   Artwork viewer (Works)
   ========================================================================== */

.viewer {
  width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: clamp(28px, 7vh, 80px) clamp(20px, 6vw, 112px);
  overflow: hidden; /* modal dialogs default to overflow:auto */
  border: 0; background: transparent; color: var(--ink);
}
.viewer[open] { display: grid; place-items: center; animation: dialog-in .5s var(--ease) both; }
.viewer:focus { outline: none; }
.viewer::backdrop { background: rgb(16 17 13 / .82); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.viewer[open]::backdrop { animation: backdrop-in .5s var(--ease) both; }
.viewer.is-closing { animation: dialog-out .42s var(--ease) both; }
.viewer.is-closing::backdrop { animation: backdrop-out .42s var(--ease) both; }
/* Opened from the home film: hide the grid behind the panel (closing returns home) */
.from-home main { visibility: hidden; }

.viewer-inner {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1fr) 400px;
  width: min(1320px, 100%); height: min(860px, 100%);
  overflow: hidden;
  background: var(--bg);
  box-shadow: 0 30px 90px rgb(0 0 0 / .35);
}
.viewer[open] .viewer-inner { animation: panel-in .6s var(--ease-out) both; }
.viewer.is-closing .viewer-inner { animation: panel-out .42s var(--ease) both; }
/* The thumbnail-to-panel View Transition supplies the fade */
.viewer.via-morph[open], .viewer.via-morph[open]::backdrop, .viewer.via-morph[open] .viewer-inner { animation: none; }

/* Scrollable areas scroll without a visible bar */
.viewer-info, .viewer-inner, .viewer-thumbs { scrollbar-width: none; }
.viewer-info::-webkit-scrollbar, .viewer-inner::-webkit-scrollbar, .viewer-thumbs::-webkit-scrollbar { display: none; }

.viewer-stage {
  display: flex; flex-direction: column; gap: 18px; min-height: 0;
  padding: clamp(24px, 3.5vw, 56px) clamp(24px, 3.5vw, 56px) 20px;
  overflow: hidden; /* a dragged image stays on this side, clear of the details */
}
/* Dragged sideways between images (see setupViewer): horizontal moves are handled by script,
   vertical scrolling and pinch-zoom stay with the browser */
.viewer-image {
  position: relative;
  flex: 1; display: flex; align-items: center; justify-content: center; min-height: 0;
  touch-action: pan-y pinch-zoom; user-select: none; -webkit-user-select: none;
}
/* The neighbouring image, alongside the current one while dragging */
.viewer-image .viewer-peek { position: absolute; inset: 0; margin: auto; pointer-events: none; }
.viewer-image img { /* width/height set by fit() */
  max-width: 100%; max-height: 100%; object-fit: contain;
  -webkit-user-drag: none;
  transition: opacity .5s var(--ease), transform .8s var(--ease-out);
}
.viewer-image img.is-loading { opacity: 0; transform: scale(.985); transition: none; }
.viewer-thumbs { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.viewer-thumbs:empty { display: none; }
.viewer-thumbs button {
  width: 56px; height: 59px; padding-bottom: 3px;
  opacity: .45; border-bottom: 1px solid transparent; outline-offset: 2px;
  transition: opacity var(--fade-text) var(--ease-soft), border-color var(--fade-text) var(--ease-soft);
}
.viewer-thumbs button[aria-current="true"] { opacity: 1; border-bottom-color: var(--accent); }
.viewer-thumbs button:hover { opacity: 1; }
.viewer-thumbs img { width: 100%; height: 100%; object-fit: cover; }

.viewer-info { display: flex; flex-direction: column; overflow-y: auto; padding: 80px 40px 0; border-left: 1px solid var(--line); }
.viewer-info > * { transition: opacity .6s var(--ease), transform .8s var(--ease-out); }
.viewer-info > .btn { transition: opacity .6s var(--ease), transform .8s var(--ease-out), background-color var(--fade-fill) var(--ease-soft), border-color var(--fade-fill) var(--ease-soft); }
.viewer[open] .viewer-info > * { opacity: 1; transform: none; }
@starting-style { .viewer[open] .viewer-info > * { opacity: 0; transform: translateY(12px); } }

.viewer-index { margin: 0 0 18px; color: var(--accent); }
.viewer-info h2 { margin: 0 0 32px; font-size: clamp(24px, 2.2vw, 32px); font-style: italic; line-height: 1.15; letter-spacing: -.01em; }
.viewer-info dl { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 10px 24px; margin: 0 0 28px; font-size: 15px; }
.viewer-info dd { margin: 0; }
.viewer-note { margin: 0 0 28px; font-size: 15px; line-height: 1.6; }
.viewer-note:empty { display: none; }
.viewer-status { margin: 0 0 28px; font-size: 15px; }
.viewer-nav {
  position: sticky; bottom: 0;
  display: flex; justify-content: space-between;
  margin: auto -40px 0; padding: 18px 40px 22px;
  background: var(--bg); border-top: 1px solid var(--line);
  font-size: 14px;
}
.viewer-nav button { padding-block: 6px; }
.viewer-close { position: absolute; top: 22px; right: 40px; z-index: 1; padding: 6px 0; font-size: 14px; }

@keyframes dialog-in { from { opacity: 0; } }
@keyframes dialog-out { to { opacity: 0; } }
@keyframes backdrop-in { from { opacity: 0; } }
@keyframes backdrop-out { to { opacity: 0; } }
@keyframes panel-in { from { opacity: 0; transform: translateY(16px) scale(.98); } }
@keyframes panel-out { to { opacity: 0; transform: translateY(10px) scale(.98); } }

/* Thumbnail ⇄ panel morph (same-document View Transition, see morph() in main.js) */
::view-transition-group(work-image) { animation-duration: .65s; animation-timing-function: var(--ease-out); }
::view-transition-old(work-image), ::view-transition-new(work-image) { height: 100%; object-fit: contain; }
.no-motion, .no-motion * { transition: none !important; }

/* ==========================================================================
   Artwork reveal
   ========================================================================== */

.js .works-list > li :is(.work-media, .work-caption) {
  transition: opacity .9s var(--ease-soft) var(--delay, 0s), transform 1.1s var(--ease-out) var(--delay, 0s);
}
.js .works-list > li .work-caption { transition-delay: calc(var(--delay, 0s) + .1s); }
.js .works-list > li:not(.is-in) .work-media { opacity: 0; transform: translate3d(0, 16px, 0); will-change: opacity, transform; }
.js .works-list > li:not(.is-in) .work-caption { opacity: 0; transform: translate3d(0, 8px, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
  .js .works-list > li:not(.is-in) :is(.work-media, .work-caption) { opacity: 1; transform: none; }
}

/* ==========================================================================
   Mobile
   ========================================================================== */

@media (max-width: 760px) {
  :root { --header-h: 60px; --wordmark-size: 15px; }

  .wordmark { letter-spacing: .16em; }
  .nav-desktop { display: none; }
  .menu-toggle { display: block; }

  .page-split { grid-template-columns: 1fr; }
  .page-split > .page-title, .page-aside { position: static; }
  .page-body { padding-top: 0; }
  .page-head { flex-direction: column; align-items: flex-start; }
  .views { padding-left: 0; border-left: 0; }

  .works-list { grid-template-columns: 1fr; row-gap: 64px; }
  .works-list > li[data-slot] { grid-column: 1; margin-top: 0; }
  .works-list > li:is([data-slot="1"], [data-slot="3"]) { padding-left: 18%; }
  .works-list.is-index { grid-template-columns: repeat(2, 1fr); gap: 32px 16px; }
  .work-media img { max-height: 70vh; }

  /* About: title, portrait, biography and CV, then press */
  .page-about { display: flex; flex-direction: column; gap: 0; }
  .page-about .page-aside { display: contents; }
  .page-about .page-title { order: 1; }
  .page-about .portrait { order: 2; max-width: none; margin: 24px 0 32px; }
  .page-about .portrait img { width: 100%; max-height: none; } /* phones scroll anyway */
  .page-about .page-body { order: 3; }
  .page-about .about-press { order: 4; max-width: none; margin-top: 48px; }
  .cv li { grid-template-columns: 56px 1fr; }

  .inquiry { grid-template-columns: 1fr; }
  .btn { width: 100%; }

  .viewer { padding: 10px; }
  .viewer-inner { grid-template-columns: 1fr; grid-template-rows: max-content max-content; height: 100%; overflow-y: auto; }
  .viewer-stage { height: auto; min-height: max-content; padding: 52px 14px 12px; }
  .viewer-image { flex: none; }
  .viewer-thumbs { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; }
  .viewer-thumbs button { flex: none; width: 48px; height: 51px; }
  .viewer-info { overflow: visible; padding: 28px 16px 0; border-left: 0; border-top: 1px solid var(--line); }
  .viewer-close { top: 14px; right: 16px; }
  .viewer-nav { position: static; margin: 32px -16px 0; padding: 16px; }
}
