/* Self-hosted: Andale Mono only exists on macOS, so Windows/Android fell back
   to an arbitrary system monospace. IBM Plex Mono (SIL OFL 1.1) renders the
   same everywhere — see fonts/IBM-Plex-Mono-LICENSE.txt */
@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/ibm-plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/ibm-plex-mono-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #171a1a;
  --paper: #fff;
  --coral: #f37f61;
  --section-overlap: clamp(3.5rem, 9vw, 10rem);
  --display: blakely, Arial, sans-serif;
  --sans: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

@view-transition {
  navigation: auto;
}

::view-transition-group(root) {
  animation: none;
}

::view-transition-old(root) {
  z-index: 1;
  animation: page-transition-out 850ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

::view-transition-new(root) {
  z-index: 2;
  animation: page-transition-in 850ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

* {
  box-sizing: border-box;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
*::-webkit-scrollbar {
  display: none;
}
html {
  background: var(--paper);
  scroll-behavior: smooth;
}
body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 80%;
}
a {
  color: inherit;
  text-decoration: none;
}

.site-loader {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: var(--paper);
  font-size: 0.69rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  animation: loader-out 1035ms ease 1.21s both;
}
.site-loader.is-hidden,
html.skip-preloader .site-loader {
  display: none;
}
.site-loader__line {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 1px;
  transform-origin: left;
  background: rgb(23 26 26 / 45%);
  animation: loader-line-in 1035ms ease both;
}

.site-header {
  position: fixed;
  z-index: 20;
  inset: 0 0 auto;
}
.brand {
  position: fixed;
  z-index: 20;
  top: 1.35rem;
  left: 1.5rem;
  font-family: var(--display);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 1;
  text-decoration: none;
}
.brand--light {
  color: var(--paper);
}
.brand img {
  display: block;
  width: 2rem;
  height: 2rem;
  object-fit: contain;
}
.home {
  --hero-size: min(50svh, calc(100vw - 2rem));
  --parallax-x: 0px;
  --parallax-y: 0px;
  position: relative;
  display: grid;
  width: var(--hero-size);
  min-height: var(--hero-size);
  height: var(--hero-size);
  margin: 0 auto;
  align-content: center;
  padding: clamp(6rem, 13vw, 13rem) clamp(1rem, 4vw, 4rem);
  isolation: isolate;
  overflow: hidden;
  color: var(--paper);
  background: linear-gradient(120deg, rgb(10 18 17 / 18%), rgb(10 18 17 / 2%));
}
.home::before {
  position: absolute;
  z-index: -2;
  inset: -40%;
  content: "";
  /* plain url(), not image-set(): Firefox can pick the AVIF candidate, fail to
     decode it, and never fall back to webp the way a <picture> would */
  background: url("assets/home/background.webp") center / cover;
  transform: translate3d(var(--parallax-x), var(--parallax-y), 0) scale(1.05);
  will-change: transform;
}
.hero-showcase {
  position: sticky;
  z-index: 0;
  top: 0;
  display: grid;
  min-height: 100svh;
  margin-bottom: calc(-1 * var(--section-overlap));
  align-items: center;
}
.hero-title {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: clamp(1rem, 4vw, 4rem);
  margin: 0;
  color: var(--coral);
  transform: translateY(-50%);
}
.home::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, rgb(23 26 26 / 8%), rgb(23 26 26 / 30%));
}
.hero-meta {
  position: absolute;
  z-index: 1;
  right: 1.5rem;
  bottom: 1.35rem;
  margin: 0;
  color: var(--paper);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.035em;
  line-height: 1.25;
  text-align: right;
  text-transform: uppercase;
}
.goutes,
#drops {
  position: absolute;
  z-index: -1;
  inset: 0;
  width: 100%;
  height: 100%;
}

.title {
  max-width: 12ch;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(7.8rem, 23.4vw, 24.7rem);
  font-weight: 100;
  letter-spacing: -0.095em;
  line-height: 0.74;
  text-transform: uppercase;
}
.title .word {
  display: inline-block;
  vertical-align: top;
}
.title .letter {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.35em);
  transition:
    opacity 0.6s ease,
    transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
  transition-delay: calc(var(--i) * 26ms);
}
.title.is-revealed .letter {
  opacity: 1;
  transform: translateY(0);
}
section {
  position: relative;
  padding: clamp(6rem, 13vw, 13rem) clamp(1rem, 4vw, 4rem);
}

.work-intro {
  display: grid;
  position: relative;
  z-index: 1;
  min-height: 92svh;
  padding-top: calc(clamp(6rem, 13vw, 13rem) + var(--section-overlap));
  isolation: isolate;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-content: center;
}
.work-intro::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background: var(--paper);
}
.eyebrow {
  grid-column: 1 / span 4;
  align-self: start;
  margin: 0 0 2rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}
.work-intro .title {
  grid-column: 1 / span 9;
}
.work-copy {
  grid-column: 8 / span 4;
  grid-row: 2;
  align-self: start;
  margin: 0;
  line-height: 1.2;
}

.project-index {
  display: grid;
  position: relative;
  z-index: 1;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(5rem, 12vw, 12rem) 0;
  background: var(--paper);
  padding-top: 0;
}
.project-card {
  position: relative;
  display: block;
  overflow: hidden;
  color: var(--paper);
  text-decoration: none;
}
.project-card picture,
.project-card picture > img {
  display: block;
  width: 100%;
  height: 100%;
}
.project-card picture > img,
.artwork img {
  --scroll-image-scale: 1.08;
  --scroll-image-warp: 0;
  object-fit: cover;
  transform: scale(
    var(--scroll-image-scale),
    calc(var(--scroll-image-scale) * (1 + var(--scroll-image-warp)))
  );
  transform-origin: center;
  filter: grayscale(1);
  transition:
    transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1),
    filter 0.5s ease;
  will-change: transform;
}
.project-card:hover picture > img {
  --scroll-image-scale: 1.12;
  filter: grayscale(0) saturate(1.1);
}
.project-card::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, transparent 40%, rgb(0 0 0 / 45%));
}
.project-card__label {
  position: absolute;
  z-index: 1;
  right: 1.5rem;
  bottom: 1.35rem;
  left: 1.5rem;
  display: flex;
  align-items: end;
  justify-content: space-between;
  font-family: var(--display);
  font-size: clamp(3.5rem, 8vw, 8rem);
  letter-spacing: -0.08em;
  line-height: 0.8;
  text-transform: uppercase;
}
.css-arrow > span {
  position: absolute;
  display: block;
  width: 100%;
  height: 100%;
}
.css-arrow > span,
.css-arrow > span::before,
.css-arrow > span::after {
  background: var(--coral);
  border-radius: 999px;
}
.css-arrow > span {
  top: 50%;
  height: 0.18rem;
  transform: translateY(-50%);
}
.css-arrow > span::before,
.css-arrow > span::after {
  position: absolute;
  top: calc(50% - 0.09rem);
  right: 0;
  width: 0.9rem;
  height: 0.18rem;
  content: "";
  transform-origin: right center;
}
.css-arrow > span::before {
  transform: rotate(45deg);
}
.css-arrow > span::after {
  transform: rotate(-45deg);
}
/* the svh term keeps every card inside the viewport on short screens */
.project-card--mouvements {
  grid-column: 1 / span 8;
  height: min(62vw, 51rem, 86svh);
  --pigment: #f1760e;
}
.project-card--fleurs {
  grid-column: 7 / -1;
  height: min(48vw, 38rem, 86svh);
  --pigment: #e1214f;
}
.project-card--femmes {
  grid-column: 1 / span 6;
  height: min(48vw, 38rem, 86svh);
  --pigment: #e61380;
}
.project-card--amis {
  grid-column: 5 / -1;
  height: min(58vw, 48rem, 86svh);
  --pigment: #6240f2;
}

.project-card__pigment {
  position: absolute;
  z-index: 1;
  top: 1.5rem;
  left: 1.5rem;
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  background: var(--pigment, var(--coral));
  opacity: 0;
  transform: scale(0.3);
  transition:
    opacity 0.35s ease,
    transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
}
.project-card:hover .project-card__pigment,
.project-card:focus-visible .project-card__pigment {
  opacity: 1;
  transform: scale(1);
}
@media (prefers-reduced-motion: reduce) {
  .project-card__pigment {
    transition: opacity 0.2s ease;
  }
}

.contact {
  position: relative;
  display: grid;
  min-height: 100svh;
  padding: clamp(5rem, 10vw, 9rem) clamp(1rem, 4vw, 4rem) 2rem;
  grid-template-rows: 1fr auto 1fr;
  color: var(--ink);
  background-color: var(--paper);
}
.contact .title {
  grid-row: 2;
  max-width: 7ch;
  margin-bottom: 0;
  color: var(--coral);
}
.contact p {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.3;
}
.contact a {
  text-decoration: none;
}
.contact nav {
  grid-row: 3;
  align-self: start;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.6rem;
  margin-top: 4rem;
  font-size: 0.8rem;
}
.logo {
  position: absolute;
  right: clamp(1rem, 4vw, 4rem);
  bottom: 1.5rem;
  margin: 0;
  font-size: 0.6rem !important;
  line-height: 0.92 !important;
  text-align: right;
}
.logo a {
  color: inherit;
  text-decoration: none;
}
.site-credit {
  position: relative;
  min-height: 5.5rem;
}

.project-header {
  position: fixed;
  z-index: 20;
  inset: 0 0 auto;
  display: flex;
  justify-content: space-between;
  padding: 1.35rem 1.5rem;
  background: transparent;
}
.project-header .brand {
  position: static;
}
.project-header a {
  text-decoration: none;
}
.project-nav {
  display: flex;
  gap: 1.25rem;
}
.project-back {
  position: fixed;
  z-index: 20;
  top: 50%;
  left: 1.5rem;
  transform: translateY(-50%);
  color: var(--coral);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}
.site-menu-trigger {
  position: fixed;
  z-index: 30;
  top: 1.35rem;
  right: 1.5rem;
  border: 0;
  padding: 0;
  color: var(--coral);
  background: transparent;
  font: inherit;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.site-menu-open {
  overflow: hidden;
}
.site-menu {
  position: fixed;
  z-index: 90;
  inset: 0;
  display: grid;
  align-items: center;
  justify-items: end;
  padding: 1rem;
  background: rgb(23 26 26 / 88%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.site-menu.is-open {
  opacity: 1;
  pointer-events: auto;
}
.site-menu__dialog {
  position: relative;
  width: min(100%, 46rem);
  padding: clamp(4rem, 9vw, 7rem) clamp(1.5rem, 6vw, 5rem) clamp(2rem, 5vw, 4rem);
  color: var(--ink);
  background: var(--paper);
  text-align: right;
}
.site-menu__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  border: 0;
  padding: 0.5rem;
  color: var(--coral);
  background: transparent;
  font: inherit;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.site-menu__links {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
}
.site-menu__links a {
  font-family: var(--display);
  font-size: clamp(2.8rem, 8vw, 7rem);
  letter-spacing: -0.08em;
  line-height: 0.82;
  text-transform: uppercase;
}
.site-menu__links a:hover,
.site-menu__links a:focus-visible,
.site-menu__links a.is-current {
  color: var(--coral);
}
.site-header .project-nav {
  position: fixed;
  z-index: 20;
  top: 1.35rem;
  right: 1.5rem;
}
.project-hero {
  padding-top: clamp(8rem, 18vw, 16rem);
  padding-bottom: clamp(4rem, 9vw, 8rem);
}
.project-meta {
  max-width: 28rem;
  margin: 2rem 0 0 auto;
  line-height: 1.3;
}
/* flex, not grid: .eyebrow carries a grid-column that would spawn implicit columns */
.error-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: 100svh;
  padding-top: clamp(8rem, 18vw, 16rem);
}
.error-hero .title {
  color: var(--coral);
  font-size: clamp(6rem, 30vw, 18rem);
}
.error-hero .project-meta {
  max-width: 24rem;
  margin: 2rem 0 0;
}
.error-hero .eyebrow {
  max-width: none;
  margin-left: 0;
}
.error-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
  margin-top: 2.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}
.error-links a:hover,
.error-links a:focus-visible {
  color: var(--coral);
}

.artwork-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(4rem, 10vw, 10rem) clamp(1rem, 5vw, 5rem);
  padding-top: 0;
}
/* Default items start flush at column line 1 (the left edge). The two offset
   variants below used to end at line 12 in this 12-column grid (lines 1-13) —
   one track short of line 13, the true right edge — so every other row left a
   permanent gap on the right that the flush-left rows never had on the left.
   Same widths (5 and 7 columns), just anchored to the right edge instead. */
.artwork {
  grid-column: span 6;
  margin: 0;
}
.artwork:nth-child(3n + 2) {
  grid-column: span 5 / -1;
}
.artwork:nth-child(3n) {
  grid-column: span 7 / -1;
}
/* A definite width (not shrink-to-fit) matters even before the file has loaded:
   it's the anchor the aspect-ratio below needs to size correctly pre-load, since
   an "auto" width with nothing concrete to resolve against collapses to 0x0. */
.artwork picture {
  display: block;
  width: 100%;
  overflow: hidden;
  cursor: zoom-in;
}
/* Both axes auto + both capped: the browser scales down to fit inside whichever
   limit bites first, always preserving the true aspect ratio (never stretches).
   script.js sets an explicit aspect-ratio per image so this also sizes correctly
   before the file has loaded. Height cap: svh guards mobile browser chrome, vh
   guards desktop — the smaller of the two always wins, so no artwork can ever
   exceed the viewport. */
.artwork img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(82svh, 82vh);
  /* when the height cap wins, the image is narrower than its column; without
     this it hugs the left edge and dumps all the leftover space on the right */
  margin-inline: auto;
}
.artwork:hover img {
  --scroll-image-scale: 1.04;
  filter: grayscale(0) saturate(1.1);
}
.artwork figcaption {
  margin-top: 0.55rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.025em;
  line-height: 1.35;
  text-transform: uppercase;
}
.artwork-video {
  grid-column: span 6;
  margin: 0;
}
.artwork-video__link {
  position: relative;
  display: block;
  overflow: hidden;
}
.artwork-video picture,
.artwork-video img {
  display: block;
  width: 100%;
}
.artwork-video img {
  height: auto;
  filter: grayscale(1);
  transition: filter 0.5s ease, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.artwork-video__play {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  padding: 0.55rem 0.7rem;
  color: var(--paper);
  background: var(--ink);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}
.artwork-video:hover img,
.artwork-video__link:focus-visible img {
  filter: grayscale(0) saturate(1.1);
  transform: scale(1.04);
}
.artwork-video__link:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 0.3rem;
}
.artwork-video figcaption {
  margin-top: 0.55rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.025em;
  line-height: 1.35;
  text-transform: uppercase;
}

body.artwork-lightbox-open {
  overflow: hidden;
}
.biography-modal-open {
  overflow: hidden;
}
.biography-modal {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 4rem);
  background: rgb(255 255 255 / 60%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.biography-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}
.biography-modal__dialog {
  position: relative;
  width: min(100%, 68rem);
  height: min(54rem, calc(100svh - 2rem));
  overflow: hidden;
  padding: clamp(3.5rem, 8vw, 6rem) clamp(1.25rem, 5vw, 5rem) clamp(1.25rem, 4vw, 3rem);
  color: var(--ink);
  background: var(--paper);
}
.biography-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  border: 0;
  padding: 0.5rem;
  color: var(--coral);
  background: transparent;
  font: inherit;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.biography-modal__content {
  display: grid;
  height: 100%;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  gap: clamp(0.8rem, 2vw, 1.5rem);
}
.biography-modal__title {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(4.5rem, 10vw, 9rem);
  font-weight: 100;
  letter-spacing: -0.095em;
  line-height: 0.78;
  text-transform: uppercase;
}
.biography_EN,
.biography_PT {
  align-self: center;
  font-size: clamp(0.66rem, 1.15vw, 0.92rem);
  line-height: 1.3;
}
.biography_EN::before,
.biography_PT::before {
  display: block;
  margin-bottom: 0.7rem;
  color: var(--coral);
  font-size: 0.72em;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.biography_EN::before { content: "EN"; }
.biography_PT::before { content: "PT"; }
.biography_EN p,
.biography_PT p { margin: 0 0 clamp(0.35rem, 1vw, 0.7rem); }
.artwork-lightbox {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  color: var(--ink);
  background: rgb(255 255 255 / 60%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.artwork-lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}
.artwork-lightbox__stage {
  position: relative;
  display: grid;
  width: min(100%, 92rem);
  height: min(100%, 92svh);
  place-items: center;
}
.artwork-lightbox__image {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  max-width: calc(100% - 5rem);
  max-height: calc(100% - 5rem);
  filter: none !important;
  object-fit: contain;
  transform: translate(-50%, -50%) scale(1) !important;
  opacity: 1;
  transition:
    opacity 0.26s ease,
    transform 0.26s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.artwork-lightbox__image.is-swapping {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.96) !important;
}
.artwork-lightbox__close,
.artwork-lightbox__previous,
.artwork-lightbox__next {
  position: absolute;
  z-index: 1;
  border: 0;
  color: inherit;
  background: none;
  font: inherit;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.artwork-lightbox__close {
  top: 0;
  right: 0;
  padding: 1rem;
  color: var(--coral);
}
.artwork-lightbox__previous,
.artwork-lightbox__next {
  top: 50%;
  padding: 2rem 1rem;
  transform: translateY(-50%);
}
.artwork-lightbox__previous {
  left: 0;
}
.artwork-lightbox__next {
  right: 0;
}
.artwork-lightbox__arrow {
  position: relative;
  top: auto;
  display: block;
  width: 1.8rem;
  height: 0.75rem;
  transform: none;
  transition: transform 0.3s ease;
}
.artwork-lightbox__previous .artwork-lightbox__arrow {
  transform: rotate(180deg);
}
.artwork-lightbox__next:hover .artwork-lightbox__arrow,
.artwork-lightbox__next:focus-visible .artwork-lightbox__arrow {
  transform: translateX(0.25rem);
}
.artwork-lightbox__previous:hover .artwork-lightbox__arrow,
.artwork-lightbox__previous:focus-visible .artwork-lightbox__arrow {
  transform: translateX(-0.25rem) rotate(180deg);
}
.artwork-lightbox__caption {
  position: absolute;
  right: 4.2rem;
  bottom: 0;
  left: 4.2rem;
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.025em;
  text-align: center;
  text-transform: uppercase;
}

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

@keyframes page-transition-out {
  0% {
    filter: blur(0);
    opacity: 1;
  }
  64% {
    filter: blur(10px);
    opacity: 1;
  }
  100% {
    filter: blur(10px);
    opacity: 0;
  }
}

@keyframes loader-line-in {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@keyframes loader-out {
  to {
    transform: translateY(-100%);
  }
}

@keyframes page-transition-in {
  0% {
    filter: blur(10px);
    opacity: 1;
  }
  100% {
    filter: blur(0);
    opacity: 1;
  }
}

html.page-transition-leaving body {
  overflow: hidden;
  pointer-events: none;
  animation: page-transition-out 420ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

html.page-transition-arrival body {
  animation: page-transition-in 450ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

@supports (animation-timeline: view()) {
  .work-intro::before {
    animation: section-background-in linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 35%;
  }

  [data-reveal] {
    animation: reveal-up linear both;
    animation-timeline: view();
    animation-range: entry 10% cover 25%;
  }

  [data-reveal="fade-down"] {
    animation-name: reveal-down;
  }

  /* Kinetic titles: drift sideways across the whole time they're in view,
     layered on top of whichever reveal the element already has. title-drift
     animates `left` rather than `transform` on purpose — reveal-down and
     contact-content below both already animate `transform`, and two
     animations on the same property don't add, the later one fully replaces
     the earlier one's contribution. Different properties compose cleanly. */
  .project-hero .title,
  .title[data-reveal="fade-down"] {
    position: relative;
  }

  .project-hero .title {
    animation: title-drift 1s linear both;
    animation-timeline: view();
    animation-range: entry 0% exit 100%;
  }

  .title[data-reveal="fade-down"] {
    animation-name: reveal-down, title-drift;
    animation-duration: 1s, 1s;
    animation-timing-function: linear, linear;
    animation-fill-mode: both, both;
    animation-timeline: view(), view();
    animation-range: entry 10% cover 25%, entry 0% exit 100%;
  }

  .contact {
    animation: contact-enter linear both;
    animation-timeline: view();
    animation-range: entry 12% entry 55%;
  }

  .contact [data-reveal],
  .contact .logo {
    animation: contact-content linear both;
    animation-timeline: view();
    animation-range: entry 20% entry 62%;
  }

  .contact .logo {
    animation-range: entry 27% entry 68%;
  }

  /* .contact [data-reveal] above ties this element's specificity, and wins on
     source order — this beats it explicitly to layer the drift back in. */
  .contact .title[data-reveal="fade-down"] {
    animation-name: contact-content, title-drift;
    animation-duration: 1s, 1s;
    animation-timing-function: linear, linear;
    animation-fill-mode: both, both;
    animation-timeline: view(), view();
    animation-range: entry 20% entry 62%, entry 0% exit 100%;
  }
}

@keyframes reveal-up {
  from {
    opacity: 0;
    transform: translateY(3rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes section-background-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes reveal-down {
  from {
    opacity: 0;
    transform: translateY(-3rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes title-drift {
  from {
    left: -4%;
  }
  50% {
    left: 0%;
  }
  to {
    left: 4%;
  }
}

@keyframes contact-enter {
  from {
    color: var(--ink);
    background-color: var(--paper);
  }
  to {
    color: var(--paper);
    background-color: var(--ink);
  }
}

@keyframes contact-content {
  from {
    opacity: 0;
    transform: translateY(2rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 700px) {
  .brand {
    top: 1.1rem;
    left: 1rem;
  }
  /* Hero: full-bleed portrait with the title straddling its lower edge */
  .hero-showcase {
    min-height: auto;
    padding-top: 5rem;
    padding-bottom: 4.5rem;
  }
  .home {
    --hero-size: auto;
    width: 100%;
    height: 64svh;
    min-height: 64svh;
    margin: 0;
    padding: 1.25rem;
  }
  /* the desktop clamp floor (7.8rem) wins on narrow screens and jams the edges */
  .title {
    font-size: clamp(3.4rem, 22vw, 7rem);
  }
  .hero-title {
    top: auto;
    /* matches .hero-showcase padding-bottom, so 0 lands on the image edge */
    bottom: 4.5rem;
    left: 1rem;
    max-width: none;
    font-size: clamp(3.4rem, 27vw, 7rem);
    transform: translateY(32%);
  }
  .hero-meta {
    top: 1.25rem;
    right: 1.25rem;
    bottom: auto;
  }
  .work-intro {
    display: block;
    min-height: 70svh;
  }
  .eyebrow,
  .work-copy {
    max-width: 14rem;
    margin-left: auto;
  }
  .work-intro .title {
    margin-top: 3rem;
  }
  .work-copy {
    margin-top: 2rem;
  }
  .project-index {
    display: block;
    padding-inline: 1rem;
  }
  /* Keep the desktop's asymmetric rhythm instead of identical stacked squares */
  .project-card {
    margin-bottom: 3.5rem;
  }
  .project-card--mouvements {
    height: min(106vw, 86svh);
  }
  .project-card--fleurs {
    height: min(74vw, 86svh);
    margin-left: 18%;
  }
  .project-card--femmes {
    height: min(74vw, 86svh);
    margin-right: 18%;
  }
  .project-card--amis {
    height: min(94vw, 86svh);
  }
  .project-card__label {
    right: 1rem;
    bottom: 1rem;
    left: 1rem;
    font-size: clamp(2.4rem, 11vw, 3.6rem);
  }
  .project-header {
    padding: 1.1rem 1rem;
    background: linear-gradient(180deg, rgb(255 255 255 / 92%) 55%, rgb(255 255 255 / 0%));
  }
  .site-header .project-nav {
    top: 1.1rem;
    right: 1rem;
  }
  .site-menu-trigger {
    top: 1.1rem;
    right: 1rem;
  }
  .project-nav {
    gap: 0.8rem;
  }
  /* Back moves into the header: fixed mid-left overlapped the full-width artworks */
  .project-back {
    position: static;
    top: auto;
    left: auto;
    align-self: center;
    transform: none;
  }
  .site-menu__links a {
    font-size: clamp(2.6rem, 13vw, 4rem);
  }
  .project-hero {
    padding-top: 8rem;
  }
  .project-meta {
    margin-top: 1.5rem;
  }
  .artwork-grid {
    display: block;
    padding-inline: 1rem;
  }
  .artwork,
  .artwork-video {
    margin-bottom: 3.5rem;
  }
  /* Biography: two 145px columns were unreadable on a phone */
  .biography-modal__dialog {
    height: min(100%, calc(100svh - 2rem));
    overflow-y: auto;
    padding: 4rem 1.25rem 2rem;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  .biography-modal__content {
    height: auto;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    gap: 2rem;
  }
  .biography-modal__title {
    font-size: clamp(3rem, 15vw, 5rem);
  }
  .biography_EN,
  .biography_PT {
    align-self: start;
    font-size: 0.82rem;
  }
  .artwork-lightbox__previous,
  .artwork-lightbox__next {
    padding-inline: 0.35rem;
  }
  .artwork-lightbox__caption {
    right: 2.6rem;
    left: 2.6rem;
  }
}

/* Touch targets: keep the visual size, widen the tappable area to ~44px */
@media (hover: none) {
  .site-menu-trigger,
  .project-back,
  .site-menu__close,
  .biography-modal__close,
  .artwork-lightbox__close {
    padding: 1rem;
    margin: -1rem;
  }
  .site-menu__links a {
    padding-block: 0.15rem;
  }
}

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

  html.page-transition-leaving body,
  html.page-transition-arrival body {
    animation: none;
  }
  .site-loader {
    display: none;
  }
  [data-reveal] {
    animation: none;
  }
  .project-card img,
  .artwork img {
    --scroll-image-scale: 1;
    --scroll-image-warp: 0;
  }
}

@media (hover: hover) and (pointer: fine) and (min-width: 768px) {
  body.has-custom-cursor,
  body.has-custom-cursor * {
    cursor: none !important;
  }

  .custom-cursor-halo {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 2147483647;
    display: grid;
    width: 56px;
    height: 56px;
    margin: -28px 0 0 -28px;
    place-items: center;
    border-radius: 50%;
    color: #000;
    font-family: var(--sans);
    font-size: 9px;
    letter-spacing: 0.08em;
    line-height: 1;
    opacity: 0;
    pointer-events: none;
    text-transform: uppercase;
    mix-blend-mode: difference;
    transition: opacity 0.18s ease;
    will-change: transform, opacity;
  }

  .custom-cursor-halo::before {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: var(--cursor-pigment, #fff);
    content: "";
    transform: scale(0.5);
    transition:
      transform 0.22s ease,
      background 0.3s ease;
  }

  .custom-cursor-halo__label {
    position: relative;
    z-index: 1;
    opacity: 0;
    transform: translateY(1px);
    transition: opacity 0.16s ease;
  }
  .custom-cursor-halo.is-visible {
    opacity: 1;
  }
  .custom-cursor-halo.is-active::before {
    transform: scale(1);
  }
  .custom-cursor-halo.is-active .custom-cursor-halo__label {
    opacity: 1;
  }
}
