/* ==========================================================================
   Treasure Fatile, portfolio
   Calm, warm paper background so the colour stays in the work.
   ========================================================================== */

:root {
  --bg: #f4efe7;
  --bg-2: #ece5d9;
  --ink: #2a2320;
  --ink-2: #5c5048;
  --ink-3: #8b7f75;
  --line: rgba(42, 35, 32, 0.14);
  --accent: #9e4a2c;

  --serif: "Cormorant Garamond", "Cormorant", "Iowan Old Style", Georgia, serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1360px;
  --header-h: 76px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --slow: 1.1s;
}

@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.55s;
  animation-timing-function: var(--ease);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

::selection {
  background: var(--ink);
  color: var(--bg);
}

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

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

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

.skip {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 999px;
  font-size: 14px;
  transform: translateY(-200%);
  transition: transform 0.3s var(--ease);
}

.skip:focus {
  transform: none;
}

/* Small type helpers ------------------------------------------------------ */

.eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0;
}

.arrow {
  display: inline-block;
  width: 0.9em;
  height: 0.9em;
  vertical-align: -0.08em;
  transition: transform 0.6s var(--ease-out);
}

/* Header ------------------------------------------------------------------ */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 40;
  height: var(--header-h);
  transition:
    transform 0.7s var(--ease-out),
    background-color 0.5s var(--ease),
    box-shadow 0.5s var(--ease);
}

.site-header.is-scrolled {
  background: rgba(244, 239, 231, 0.82);
  -webkit-backdrop-filter: saturate(1.2) blur(14px);
  backdrop-filter: saturate(1.2) blur(14px);
  box-shadow: 0 1px 0 var(--line);
}

.site-header.is-hidden {
  transform: translateY(-101%);
}

.site-header .wrap {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.wordmark {
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1;
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 36px);
}

.nav a {
  position: relative;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding-block: 6px;
  color: var(--ink-2);
  transition: color 0.4s var(--ease);
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.6s var(--ease-out);
}

.nav a:hover,
.nav a[aria-current] {
  color: var(--ink);
}

.nav a:hover::after,
.nav a[aria-current]::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav .nav__ig svg {
  width: 17px;
  height: 17px;
  display: block;
}

.nav .nav__ig::after {
  display: none;
}

/* Reveal on scroll ---------------------------------------------------------- */

.js [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  transition:
    opacity var(--slow) var(--ease),
    transform calc(var(--slow) * 1.2) var(--ease-out);
  transition-delay: var(--d, 0s);
}

.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* Artwork image (shared) ---------------------------------------------------- */

.art {
  display: flex;
  gap: var(--dip-gap, 3%);
  width: 100%;
}

.art__panel {
  position: relative;
  flex: var(--grow, 100) 1 0;
  min-width: 0;
  aspect-ratio: var(--ar);
  overflow: hidden;
  background-color: var(--tone, var(--bg-2));
}

.art__panel::before {
  content: "";
  position: absolute;
  inset: -12px;
  background-image: var(--lqip);
  background-size: cover;
  background-position: center;
  filter: blur(14px);
  transform: scale(1.06);
  transition: opacity 0.9s var(--ease);
}

.art__panel img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transform: scale(1.015);
  transition:
    opacity 1s var(--ease),
    transform 1.6s var(--ease-out);
}

.art__panel.is-loaded img {
  opacity: 1;
  transform: none;
}

.art__panel.is-loaded::before {
  opacity: 0;
}

.art-link {
  display: block;
  cursor: zoom-in;
}

.art-link .art__panel img {
  transition:
    opacity 1s var(--ease),
    transform 1.6s var(--ease-out),
    filter 0.8s var(--ease);
}

@media (hover: hover) {
  .art-link:hover .art__panel.is-loaded img {
    transform: scale(1.025);
  }
}

.caption {
  margin-top: 14px;
  display: grid;
  gap: 2px;
}

.caption__title {
  font-family: var(--serif);
  font-size: 21px;
  font-style: italic;
  font-weight: 400;
  line-height: 1.25;
  margin: 0;
  overflow-wrap: anywhere;
}

.caption__meta {
  margin: 0;
  font-size: 13px;
  color: var(--ink-3);
  letter-spacing: 0.01em;
}

/* Buttons ------------------------------------------------------------------- */

.btn-line {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 6px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
  transition: border-color 0.5s var(--ease);
}

.btn-line:hover {
  border-color: var(--ink);
}

/* Home: one work fills the screen ------------------------------------------ */

.is-landing,
.is-landing body {
  height: 100%;
  overflow: hidden;
  scrollbar-gutter: auto;
}

.landing {
  --on-image: #f8f4ee;
  --panel: rgba(22, 17, 14, 0.8);
  position: relative;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: #1d1714;
  color: var(--on-image);
  touch-action: pan-y;
}

.landing__slides {
  position: absolute;
  inset: 0;
}

/* The new work fades in over the old one, which only disappears once covered. */
.landing__slide {
  position: absolute;
  inset: 0;
  margin: 0;
  overflow: hidden;
  background: var(--tone, #1d1714);
  opacity: 0;
  z-index: 0;
  transition: opacity 0s linear 1.8s;
}

.landing__slide.is-active {
  opacity: 1;
  z-index: 1;
  transition: opacity 1.8s var(--ease);
}

.landing__slide::before {
  content: "";
  position: absolute;
  inset: -24px;
  background: var(--lqip) var(--focus, 50% 50%) / cover no-repeat;
  filter: blur(20px);
}

.landing__slide img,
.landing__fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--focus, 50% 50%);
}

.landing__slide img {
  opacity: 0;
  transform: scale(1.06);
  transition:
    opacity 1.2s var(--ease),
    transform 0s linear 1.8s;
}

.landing__slide.is-loaded img {
  opacity: 1;
}

/* A slow drift inward while a work is on screen. */
.landing__slide.is-active.is-loaded img {
  transform: none;
  transition:
    opacity 1.2s var(--ease),
    transform 11s cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* Soft shade at the top and bottom so the menu and label stay readable. */
.landing::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(16, 11, 9, 0.5), rgba(16, 11, 9, 0) 24%),
    linear-gradient(to top, rgba(16, 11, 9, 0.32), rgba(16, 11, 9, 0) 22%);
}

.landing__label,
.landing__next,
.landing__peek {
  position: absolute;
  z-index: 3;
}

.landing__label {
  left: var(--gutter);
  bottom: clamp(24px, 5.5vh, 52px);
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  max-width: calc(100% - 2 * var(--gutter) - 240px);
  padding: 13px 22px 14px;
  background: var(--panel);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--on-image);
  transition:
    background-color 0.45s var(--ease),
    opacity 0.45s var(--ease),
    transform 0.6s var(--ease-out);
}

.landing__label:hover {
  background: rgba(22, 17, 14, 0.94);
}

.landing__label.is-changing {
  opacity: 0;
  transform: translateY(6px);
}

.landing__title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--serif);
  font-style: italic;
  font-size: 21px;
  line-height: 1.25;
}

.landing__sep {
  flex: none;
  color: rgba(248, 244, 238, 0.45);
}

.landing__year {
  flex: none;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2em;
}

.landing__next {
  right: var(--gutter);
  top: 50%;
  width: 64px;
  height: 64px;
  margin-top: -32px;
  display: grid;
  place-items: center;
  background: var(--panel);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--on-image);
  transition: background-color 0.45s var(--ease);
}

.landing__next svg {
  width: 24px;
  height: 24px;
  transition: transform 0.6s var(--ease-out);
}

.landing__next:hover {
  background: rgba(22, 17, 14, 0.94);
}

.landing__next:hover svg {
  transform: translateX(3px);
}

.landing__peek {
  right: var(--gutter);
  bottom: clamp(24px, 5.5vh, 52px);
  width: 200px;
  aspect-ratio: 16 / 10;
  padding: 0;
  overflow: hidden;
  border: 2px solid rgba(248, 244, 238, 0.92);
  outline: 1px solid rgba(16, 11, 9, 0.5);
  background: #1d1714;
}

.landing__peek img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition:
    opacity 0.6s var(--ease),
    transform 1.2s var(--ease-out);
}

.landing__peek img.is-loaded {
  opacity: 1;
}

.landing__peek:hover img {
  transform: scale(1.06);
}

.landing__next[hidden],
.landing__peek[hidden] {
  display: none;
}

.landing__label:focus-visible,
.landing__next:focus-visible,
.landing__peek:focus-visible {
  outline: 2px solid var(--on-image);
  outline-offset: 3px;
}

/* Menu sits on the image in light type. */
.is-landing .site-header {
  color: var(--bg);
}

.is-landing .wordmark {
  color: #fbf8f3;
  text-shadow: 0 1px 12px rgba(16, 11, 9, 0.25);
}

.is-landing .nav a {
  color: rgba(251, 248, 243, 0.84);
}

.is-landing .nav a:hover {
  color: #fff;
}

.is-landing .skip {
  z-index: 50;
}

/* Footer -------------------------------------------------------------------- */

.site-footer {
  padding-block: 34px 40px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-3);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 28px;
}

.site-footer a {
  color: var(--ink-2);
  transition: color 0.4s var(--ease);
}

.site-footer a:hover {
  color: var(--accent);
}

/* Inner pages: shared head ------------------------------------------------- */

.page-head {
  padding-top: calc(var(--header-h) + clamp(48px, 10vh, 120px));
  padding-bottom: clamp(32px, 6vh, 64px);
}

.page-title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(56px, 9vw, 132px);
  line-height: 0.9;
  letter-spacing: -0.015em;
  margin: 18px 0 0;
}

.page-sub {
  margin: 22px 0 0;
  font-family: var(--serif);
  font-size: clamp(19px, 1.7vw, 23px);
  color: var(--ink-2);
  max-width: 44ch;
}

/* Works: filters ------------------------------------------------------------ */

.filters {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(244, 239, 231, 0.88);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-block: 1px solid var(--line);
  transition: top 0.7s var(--ease-out);
}

.header-shown .filters {
  top: var(--header-h);
}

.filters .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 32px;
  padding-block: 14px;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.filter-group .eyebrow {
  margin-right: 10px;
  font-size: 11px;
}

.chips {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.chips::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: none;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 7px 15px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13.5px;
  line-height: 1.2;
  color: var(--ink-2);
  transition:
    background-color 0.45s var(--ease),
    color 0.45s var(--ease),
    border-color 0.45s var(--ease);
}

.chip sup {
  font-size: 10px;
  color: var(--ink-3);
  transition: color 0.45s var(--ease);
}

.chip:hover {
  border-color: var(--ink-3);
  color: var(--ink);
}

.chip[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

.chip[aria-pressed="true"] sup {
  color: rgba(244, 239, 231, 0.6);
}

.chip:disabled {
  opacity: 0.35;
  cursor: default;
}

/* Works: year sections ------------------------------------------------------ */

.gallery {
  padding-block: clamp(40px, 8vh, 90px) clamp(80px, 14vh, 160px);
  transition: opacity 0.35s var(--ease);
}

.gallery.is-switching {
  opacity: 0;
}

.year {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
  padding-block: clamp(36px, 7vh, 80px);
  border-top: 1px solid var(--line);
}

.year:first-child {
  border-top: 0;
  padding-top: 0;
}

.year__label {
  grid-column: 1 / span 3;
  align-self: start;
  position: sticky;
  top: calc(var(--filters-h, 64px) + 28px);
  transition: top 0.7s var(--ease-out);
}

.header-shown .year__label {
  top: calc(var(--header-h) + var(--filters-h, 64px) + 28px);
}

.year__num {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(56px, 6.4vw, 96px);
  line-height: 0.9;
  margin: 0;
  font-variant-numeric: lining-nums;
}

.year__count {
  margin-top: 12px;
}

.masonry {
  grid-column: 4 / span 9;
  display: flex;
  gap: clamp(20px, 2.4vw, 36px);
  align-items: flex-start;
}

.masonry__col {
  flex: 1 1 0;
  min-width: 0;
  display: grid;
  gap: clamp(40px, 6vh, 64px);
}

.card {
  margin: 0;
}

.empty {
  padding-block: 12vh;
  text-align: center;
}

.empty p {
  font-family: var(--serif);
  font-size: 28px;
  margin: 0 0 22px;
}

/* About --------------------------------------------------------------------- */

.about {
  padding-top: calc(var(--header-h) + clamp(40px, 9vh, 110px));
  padding-bottom: clamp(80px, 14vh, 160px);
}

.about .wrap {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
}

.about__portrait {
  grid-column: 1 / span 5;
  align-self: start;
  position: sticky;
  top: calc(var(--header-h) + 24px);
  margin: 0;
}

.about__portrait .art,
.about__portrait .art-link {
  max-width: 520px;
}

.about__portrait figcaption {
  margin-top: 14px;
}

.about__body {
  grid-column: 7 / span 6;
}

.about__lead {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(30px, 3.3vw, 46px);
  line-height: 1.14;
  margin: 18px 0 0;
}

.about__lead em {
  font-style: italic;
}

.about__text {
  margin: 30px 0 0;
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink-2);
  max-width: 54ch;
}

.about-section {
  margin-top: clamp(64px, 11vh, 120px);
}

.about-section h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(28px, 2.6vw, 36px);
  line-height: 1.1;
  margin: 0 0 8px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.ex-year {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 16px;
  padding-block: 22px;
  border-bottom: 1px solid var(--line);
}

.ex-year h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 24px;
  line-height: 1.2;
  font-variant-numeric: lining-nums;
}

.ex-year ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

.ex-year li {
  line-height: 1.4;
}

.ex-title {
  display: block;
  font-family: var(--serif);
  font-style: italic;
  font-size: 21px;
  line-height: 1.25;
}

.ex-venue {
  display: block;
  margin-top: 3px;
  font-size: 14px;
  color: var(--ink-3);
}

.doc-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.doc-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 20px;
  border-bottom: 1px solid var(--line);
  font-family: var(--serif);
  font-size: 24px;
  transition: color 0.45s var(--ease);
}

a.doc-link:hover {
  color: var(--accent);
}

a.doc-link:hover .arrow {
  transform: translate(4px, -4px);
}

.doc-link .arrow {
  width: 18px;
  height: 18px;
}

a.doc-link--internal:hover .arrow {
  transform: translateX(4px);
}

/* Breadcrumb above a sub-page title, e.g. "About / CV". */
.crumb a {
  color: inherit;
  border-bottom: 1px solid var(--line);
  transition:
    color 0.4s var(--ease),
    border-color 0.4s var(--ease);
}

.crumb a:hover {
  color: var(--ink);
  border-color: currentColor;
}

/* Artist statement ---------------------------------------------------------- */

.about__title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(46px, 5.6vw, 84px);
  line-height: 0.95;
  letter-spacing: -0.01em;
  margin: 18px 0 0;
}

.prose {
  margin-top: clamp(28px, 5vh, 48px);
  max-width: 34em;
  font-family: var(--serif);
  font-size: clamp(20px, 1.5vw, 22.5px);
  line-height: 1.62;
}

.prose p {
  margin: 0 0 1.15em;
}

.prose a {
  border-bottom: 1px solid var(--line);
  transition:
    color 0.4s var(--ease),
    border-color 0.4s var(--ease);
}

.prose a:hover {
  color: var(--accent);
  border-color: currentColor;
}

/* CV ------------------------------------------------------------------------ */

.cv__body {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
  padding-bottom: clamp(80px, 14vh, 160px);
}

.cv-section {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
  padding-block: clamp(36px, 6vh, 64px);
  border-top: 1px solid var(--line);
}

.cv-section > h2 {
  grid-column: 1 / span 3;
  align-self: start;
  position: sticky;
  top: 28px;
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(26px, 2.4vw, 34px);
  line-height: 1.1;
  transition: top 0.7s var(--ease-out);
}

.header-shown .cv-section > h2 {
  top: calc(var(--header-h) + 24px);
}

.cv-section > .cv-content,
.cv-next > .doc-links {
  grid-column: 4 / span 9;
}

.cv-sub {
  margin: 0 0 4px;
}

.cv-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cv-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 32px;
  align-items: baseline;
  padding-block: 16px;
  border-bottom: 1px solid var(--line);
}

.cv-title {
  display: block;
  font-family: var(--serif);
  font-style: italic;
  font-size: 21px;
  line-height: 1.25;
}

.cv-title--plain {
  font-style: normal;
}

.cv-where {
  display: block;
  margin-top: 3px;
  font-size: 14px;
  color: var(--ink-3);
}

.cv-date {
  font-size: 13px;
  color: var(--ink-3);
  white-space: nowrap;
  font-variant-numeric: lining-nums;
}

.cv-points {
  grid-column: 1 / -1;
  margin: 12px 0 2px;
  padding-left: 1.1em;
  display: grid;
  gap: 6px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-2);
  max-width: 70ch;
}

.cv-points li::marker {
  color: var(--ink-3);
}

.cv-note {
  margin: 14px 0 0;
  font-size: 14px;
  color: var(--ink-3);
}

.cv-next {
  border-top: 0;
  padding-top: 0;
}

/* Lightbox ------------------------------------------------------------------ */

.lb {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  grid-template-rows: minmax(0, 1fr);
  padding: 72px 40px 40px 40px;
  column-gap: 40px;
  visibility: hidden;
  transition: visibility 0s linear 0.7s;
}

.lb.is-open {
  visibility: visible;
  transition: visibility 0s;
}

.lb__backdrop {
  position: absolute;
  inset: 0;
  background: var(--bg);
  opacity: 0;
  transition: opacity 0.6s var(--ease);
}

.lb.is-open .lb__backdrop {
  opacity: 1;
}

.lb__stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: pan-y;
}

.lb__art {
  --dip-gap: 14px;
  position: relative;
  transform-origin: 0 0;
}

.lb__art .art {
  height: 100%;
}

.lb__art .art__panel {
  box-shadow: 0 30px 60px -30px rgba(42, 35, 32, 0.35);
}

.lb__art .art__panel .lb__low {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 1;
  transform: none;
}

.lb__info {
  position: relative;
  align-self: end;
  padding-bottom: 6px;
}

.lb__count {
  font-variant-numeric: tabular-nums;
}

.lb__title {
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(28px, 2.4vw, 36px);
  line-height: 1.12;
  margin: 18px 0 26px;
}

.lb__meta {
  margin: 0;
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 10px 12px;
  font-size: 14.5px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.lb__meta dt {
  color: var(--ink-3);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding-top: 3px;
}

.lb__meta dd {
  margin: 0;
  color: var(--ink);
}

.lb__nav {
  display: flex;
  gap: 10px;
  margin-top: 34px;
}

.lb__btn {
  width: 48px;
  height: 48px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  transition:
    background-color 0.4s var(--ease),
    border-color 0.4s var(--ease),
    color 0.4s var(--ease);
}

.lb__btn svg {
  width: 18px;
  height: 18px;
}

.lb__btn:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

.lb__close {
  position: absolute;
  top: 18px;
  right: 24px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 6px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-2);
  transition: color 0.4s var(--ease);
}

.lb__close svg {
  width: 16px;
  height: 16px;
  transition: transform 0.6s var(--ease-out);
}

.lb__close:hover {
  color: var(--ink);
}

.lb__close:hover svg {
  transform: rotate(90deg);
}

.lb__fade {
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.45s var(--ease),
    transform 0.45s var(--ease);
}

.lb.is-open .lb__fade {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.8s var(--ease) 0.25s,
    transform 1s var(--ease-out) 0.25s;
}

.lb__btn[hidden] {
  display: none;
}

.lb-open {
  overflow: hidden;
}

/* Responsive ---------------------------------------------------------------- */

@media (max-width: 1100px) {
  .lb {
    grid-template-columns: minmax(0, 1fr) 280px;
    padding-inline: 28px;
    column-gap: 28px;
  }
}

@media (max-width: 960px) {
  .year__label {
    grid-column: 1 / -1;
    position: static;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 32px;
  }

  .year__count {
    margin-top: 0;
  }

  .masonry {
    grid-column: 1 / -1;
  }

  .about__portrait {
    grid-column: 1 / -1;
    position: static;
    margin-bottom: 56px;
  }

  .about__portrait .art,
  .about__portrait .art-link {
    max-width: 440px;
  }

  .cv-section {
    padding-block: 32px 40px;
  }

  .cv-section > h2,
  .cv-section > .cv-content,
  .cv-next > .doc-links {
    grid-column: 1 / -1;
  }

  .cv-section > h2 {
    position: static;
    margin-bottom: 8px;
  }

  .about__body {
    grid-column: 1 / -1;
  }

  /* Lightbox stacks: art on top, details underneath. */
  .lb {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
    padding: 64px 16px 20px;
    row-gap: 18px;
  }

  .lb__info {
    align-self: start;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 16px;
    align-items: end;
  }

  .lb__count {
    grid-column: 1 / -1;
  }

  .lb__title {
    font-size: 25px;
    margin: 8px 0 10px;
  }

  .lb__meta {
    grid-column: 1;
    grid-template-columns: 1fr;
    gap: 0;
    padding-top: 0;
    border-top: 0;
    font-size: 13.5px;
    color: var(--ink-2);
  }

  .lb__meta dt {
    display: none;
  }

  .lb__nav {
    grid-column: 2;
    grid-row: 2 / span 2;
    align-self: end;
    margin-top: 0;
  }

  .lb__btn {
    width: 44px;
    height: 44px;
  }

  .lb__close {
    top: 10px;
    right: 8px;
  }
}

@media (max-width: 720px) {
  :root {
    --header-h: 64px;
  }

  .wordmark {
    font-size: 21px;
  }

  .nav {
    gap: 18px;
  }

  .nav a {
    font-size: 12px;
    letter-spacing: 0.08em;
  }

  /* Home: smaller controls, label and arrow along the bottom. */
  .landing__label {
    bottom: max(20px, env(safe-area-inset-bottom));
    max-width: calc(100% - 2 * var(--gutter) - 60px);
    padding: 11px 16px 12px;
    gap: 10px;
  }

  .landing__title {
    font-size: 18px;
    white-space: normal;
  }

  .landing__year {
    font-size: 11px;
    letter-spacing: 0.16em;
  }

  .landing__next {
    top: auto;
    bottom: max(20px, env(safe-area-inset-bottom));
    margin-top: 0;
    width: 48px;
    height: 48px;
  }

  .landing__peek {
    display: none;
  }

  .filters .wrap {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    padding-block: 12px;
    gap: 10px;
  }

  .filter-group .eyebrow {
    width: 52px;
    flex: none;
    margin-right: 4px;
  }

  .chip {
    padding: 6px 13px 7px;
    font-size: 13px;
  }

  .ex-year {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .cv-row {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 6px;
  }

  .cv-title {
    font-size: 20px;
  }

  .caption__title {
    font-size: 20px;
  }
}

/* Short screens (a phone on its side): skip the next-work preview. */
@media (max-height: 560px) {
  .landing__peek {
    display: none;
  }

  .landing__label {
    max-width: calc(100% - 2 * var(--gutter) - 90px);
  }
}

/* Works page: one column on phones, so let the work run edge to edge there too. */
@media (max-width: 559px) {
  .card .art-link {
    margin-inline: calc(-1 * var(--gutter));
  }
}

@media (max-width: 400px) {
  .nav {
    gap: 14px;
  }

  .wordmark {
    font-size: 19px;
  }
}

/* Calm everything down for people who ask for less motion. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }

  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
