/* ---------- Self-hosted fonts (no third-party requests) ---------- */
@font-face{font-family:'Playfair Display';font-style:normal;font-weight:400;font-display:swap;src:url('fonts/playfair-display-latin-400-normal.woff2') format('woff2');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:'Playfair Display';font-style:normal;font-weight:400;font-display:swap;src:url('fonts/playfair-display-latin-ext-400-normal.woff2') format('woff2');unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;}
@font-face{font-family:'Playfair Display';font-style:normal;font-weight:500;font-display:swap;src:url('fonts/playfair-display-latin-500-normal.woff2') format('woff2');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:'Playfair Display';font-style:normal;font-weight:500;font-display:swap;src:url('fonts/playfair-display-latin-ext-500-normal.woff2') format('woff2');unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;}
@font-face{font-family:'Playfair Display';font-style:italic;font-weight:400;font-display:swap;src:url('fonts/playfair-display-latin-400-italic.woff2') format('woff2');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:'Playfair Display';font-style:italic;font-weight:400;font-display:swap;src:url('fonts/playfair-display-latin-ext-400-italic.woff2') format('woff2');unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;}
@font-face{font-family:'Inter';font-style:normal;font-weight:400;font-display:swap;src:url('fonts/inter-latin-400-normal.woff2') format('woff2');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:'Inter';font-style:normal;font-weight:400;font-display:swap;src:url('fonts/inter-latin-ext-400-normal.woff2') format('woff2');unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;}
@font-face{font-family:'Inter';font-style:normal;font-weight:500;font-display:swap;src:url('fonts/inter-latin-500-normal.woff2') format('woff2');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:'Inter';font-style:normal;font-weight:500;font-display:swap;src:url('fonts/inter-latin-ext-500-normal.woff2') format('woff2');unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;}
@font-face{font-family:'Inter';font-style:normal;font-weight:600;font-display:swap;src:url('fonts/inter-latin-600-normal.woff2') format('woff2');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:'Inter';font-style:normal;font-weight:600;font-display:swap;src:url('fonts/inter-latin-ext-600-normal.woff2') format('woff2');unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;}

/* ============================================
   CAMILLA ANCILOTTO — Portfolio
   Minimal white · editorial · motion-driven
   ============================================ */

:root {
  --bg: #ffffff;
  --bg-soft: #fafafa;
  --ink: #0a0a0b;
  --ink-60: rgba(10, 10, 11, 0.6);
  --ink-40: rgba(10, 10, 11, 0.4);
  --line: #e7e7e9;
  --scrim: rgba(255, 255, 255, 0.92);
  --lightbox-bg: rgba(255, 255, 255, 0.96);
  --lightbox-shadow: rgba(0, 0, 0, 0.18);
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'Inter', -apple-system, Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 900ms;
}

html[data-theme="dark"] {
  --bg: #0a0a0b;
  --bg-soft: #131315;
  --ink: #f5f5f3;
  --ink-60: rgba(245, 245, 243, 0.66);
  --ink-40: rgba(245, 245, 243, 0.42);
  --line: #27272b;
  --scrim: rgba(10, 10, 11, 0.88);
  --lightbox-bg: rgba(5, 5, 6, 0.94);
  --lightbox-shadow: rgba(0, 0, 0, 0.6);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

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

/* ---------- Language switch ---------- */
body[data-lang="en"] .lang-it { display: none !important; }
body[data-lang="it"] .lang-en { display: none !important; }

/* ---------- Typography ---------- */
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.05; }

.display {
  font-size: clamp(3rem, 11vw, 9.5rem);
  letter-spacing: -0.02em;
}

.h-section {
  font-size: clamp(2.2rem, 5.5vw, 4.5rem);
  letter-spacing: -0.015em;
}

.h-work {
  font-size: clamp(1.8rem, 3.6vw, 3rem);
  font-style: italic;
}

.label {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-60);
}

.lede {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  line-height: 1.6;
  font-weight: 400;
}

.prose p {
  max-width: 62ch;
  margin-bottom: 1.4em;
  color: var(--ink-60);
  font-size: 1.02rem;
}

.prose p strong { color: var(--ink); font-weight: 500; }

/* ---------- Layout ---------- */
.container { width: min(1320px, 92vw); margin: 0 auto; }

section { padding: clamp(5rem, 12vh, 9rem) 0; }

.rule { border: 0; border-top: 1px solid var(--line); }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  padding: 1.4rem 0;
  transition: background 400ms var(--ease), box-shadow 400ms var(--ease), padding 400ms var(--ease);
}

.site-header.scrolled { padding: 0.9rem 0; }

/* blur lives on a pseudo-element so the fixed nav overlay
   is NOT trapped inside the header's containing block */
.site-header::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: transparent;
  transition: background 400ms var(--ease), box-shadow 400ms var(--ease);
  z-index: -1;
  pointer-events: none;
}

.site-header.scrolled::before {
  background: var(--scrim);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  font-family: var(--serif);
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand em { font-style: italic; }

.nav { display: flex; align-items: center; gap: 2.2rem; }

.nav a {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-60);
  position: relative;
  padding: 0.4rem 0;
  transition: color 250ms ease;
}

.nav a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 350ms var(--ease);
}

.nav a:hover, .nav a.active { color: var(--ink); }
.nav a:hover::after, .nav a.active::after { transform: scaleX(1); transform-origin: left; }

.lang-switch {
  display: flex;
  gap: 0.15rem;
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 0.2rem;
}

.lang-switch button {
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  border: 0;
  background: transparent;
  color: var(--ink-40);
  padding: 0.35rem 0.75rem;
  border-radius: 99px;
  cursor: pointer;
  transition: all 300ms ease;
}

.lang-switch button.on { background: var(--ink); color: var(--bg); }

/* Mobile nav */
.burger { display: none; background: none; border: 0; cursor: pointer; padding: 0.5rem; z-index: 3; }
.burger span { display: block; width: 26px; height: 1.5px; background: var(--ink); margin: 6px 0; transition: transform 350ms var(--ease), opacity 250ms; }
body.nav-open .burger span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
body.nav-open .burger span:nth-child(2) { opacity: 0; }
body.nav-open .burger span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

@media (max-width: 860px) {
  .burger { display: block; position: relative; z-index: 5; }
  .nav {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: var(--bg);
    flex-direction: column;
    justify-content: center;
    gap: 2.4rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 400ms var(--ease);
    z-index: 4;
  }
  .lang-switch { position: relative; z-index: 5; }
  .nav a { font-size: 1.1rem; letter-spacing: 0.28em; }
  body.nav-open .nav { opacity: 1; pointer-events: auto; }
  body.nav-open { overflow: hidden; }
}

/* ---------- Hero (home) ---------- */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 0 4rem;
  position: relative;
}

.hero .container { position: relative; z-index: 2; }

.hero-kicker { margin-bottom: 1.6rem; }

.hero-title .line { display: block; overflow: hidden; }

.hero-title .line > span {
  display: block;
  transform: translateY(110%);
  animation: riseUp 1.1s var(--ease) forwards;
}

.hero-title .line:nth-child(2) > span { animation-delay: 0.12s; }

.hero-sub {
  margin-top: 2.2rem;
  max-width: 42ch;
  color: var(--ink-60);
  opacity: 0;
  animation: fadeUp 1s var(--ease) 0.55s forwards;
}

.hero-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  margin-top: 3.5rem;
  opacity: 0;
  animation: fadeUp 1s var(--ease) 0.75s forwards;
}

.scroll-hint {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-40);
}

.scroll-hint svg { animation: nudge 2.2s ease-in-out infinite; }

@keyframes riseUp { to { transform: translateY(0); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }

/* Hero image panel — full-height right panel on desktop */
.hero-figure {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 50vw;
  overflow: hidden;
  z-index: 1;
}

.hero-figure img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.1);
  animation: heroZoom 2s var(--ease) forwards;
}

@keyframes heroZoom { to { transform: scale(1); } }

/* desktop: keep hero text in the left column, clear of the big image */
@media (min-width: 861px) {
  .hero > .container {
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0 0 0 clamp(1.5rem, 5.5vw, 7rem);
  }
  .hero-title { font-size: clamp(3rem, 6.2vw, 6.4rem); max-width: 42vw; }
  .hero-sub { max-width: 40vw; }
  .hero-meta { max-width: 42vw; }
}

@media (max-width: 860px) {
  .hero-figure { position: relative; top: auto; right: auto; bottom: auto; width: 100%; height: auto; aspect-ratio: 4 / 5; margin: 3rem 0 0; }
  .hero { justify-content: center; padding-top: 7rem; }
}

/* ---------- Marquee ---------- */
.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 1.1rem 0;
  white-space: nowrap;
}

.marquee-track {
  display: inline-flex;
  gap: 3.5rem;
  animation: marquee 30s linear infinite;
}

.marquee span {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--ink-40);
}

@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Works index (home + artworks) ---------- */
.works-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(1.5rem, 3vw, 3rem);
}

.work-card { grid-column: span 6; cursor: pointer; }

@media (max-width: 720px) {
  .work-card { grid-column: span 12; }
}

.work-card .frame {
  overflow: hidden;
  background: var(--bg-soft);
  aspect-ratio: 4 / 3;
}

.work-card.tall .frame { aspect-ratio: 3 / 4; }

.work-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform 1.2s var(--ease);
}

.work-card:hover img { transform: scale(1.08); }

.work-card .meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 0 0;
}

.work-card .meta h3 {
  font-size: clamp(1.3rem, 2.2vw, 1.8rem);
  font-style: italic;
  transition: transform 500ms var(--ease);
}

.work-card:hover .meta h3 { transform: translateX(8px); }

.work-card .num {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--ink-40);
}

/* Offset rhythm on desktop */
@media (min-width: 721px) {
  .works-grid .work-card:nth-child(even) { transform: translateY(4.5rem); }
  .works-grid { padding-bottom: 4.5rem; }
}

/* ---------- Section headers ---------- */
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: clamp(2.5rem, 6vh, 4.5rem);
}

.section-head .label { display: block; margin-bottom: 1rem; }

/* ---------- Statement / quote ---------- */
.statement {
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.statement .lede { max-width: 34ch; margin: 0 auto; text-align: center; }
.statement .lede em { font-style: italic; }

/* ---------- Collection sections (artworks page) ---------- */
.collection { border-top: 1px solid var(--line); }

.collection-head {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: 2rem;
  margin-bottom: clamp(2rem, 5vh, 3.5rem);
}

.collection-head .num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--ink-40);
}

.collection-desc { max-width: 58ch; color: var(--ink-60); margin-bottom: 2.5rem; }

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(0.8rem, 1.6vw, 1.6rem);
}

.gallery figure {
  overflow: hidden;
  background: var(--bg-soft);
  aspect-ratio: 1 / 1;
  cursor: zoom-in;
  position: relative;
}

.gallery img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.1s var(--ease);
}

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

@media (max-width: 640px) {
  .gallery { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--lightbox-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 350ms ease;
}

.lightbox.open { opacity: 1; pointer-events: auto; }

.lightbox img {
  max-width: 88vw;
  max-height: 84vh;
  object-fit: contain;
  box-shadow: 0 30px 80px var(--lightbox-shadow);
  transform: scale(0.96);
  transition: transform 450ms var(--ease);
}

.lightbox.open img { transform: scale(1); }

.lightbox-close {
  position: absolute;
  top: 1.5rem; right: 1.8rem;
  background: none; border: 0;
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ink-60);
  cursor: pointer;
  padding: 0.6rem;
}

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

/* ---------- Biography ---------- */
.bio-hero { padding-top: clamp(9rem, 20vh, 13rem); padding-bottom: clamp(3rem, 7vh, 5rem); }

.bio-grid {
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}

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

.bio-figure { position: sticky; top: 7rem; overflow: hidden; }

.bio-figure img { width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; }

.bio-caption {
  margin-top: 0.9rem;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-40);
}

/* Milestones */
.milestones { list-style: none; }

.milestones li {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 2rem;
  padding: 1.6rem 0;
  border-top: 1px solid var(--line);
}

.milestones .year {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.35rem;
}

.milestones p { color: var(--ink-60); font-size: 0.98rem; }
.milestones p strong { color: var(--ink); font-weight: 500; }

/* Exhibitions two-column */
.exh-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
}

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

.exh-list { list-style: none; }

.exh-list li {
  display: grid;
  grid-template-columns: 3.4rem 1fr;
  gap: 1.2rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
  color: var(--ink-60);
  transition: color 250ms, padding-left 350ms var(--ease);
}

.exh-list li:hover { color: var(--ink); padding-left: 0.5rem; }

.exh-list .year { font-weight: 600; font-size: 0.8rem; letter-spacing: 0.05em; color: var(--ink); align-self: baseline; padding-top: 0.15rem; }

/* ---------- Contacts ---------- */
.contact-hero { padding-top: clamp(9rem, 20vh, 13rem); min-height: 70svh; }

.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(3rem, 7vw, 7rem);
  margin-top: clamp(3rem, 8vh, 5rem);
}

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

.contact-item { padding: 1.6rem 0; border-top: 1px solid var(--line); }

.contact-item .label { display: block; margin-bottom: 0.5rem; }

.contact-item a.big {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2.6vw, 2rem);
  font-style: italic;
  transition: opacity 250ms;
}

.contact-item a.big:hover { opacity: 0.55; }

.socials { display: flex; gap: 1.6rem; margin-top: 0.4rem; flex-wrap: wrap; }

.socials a {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-60);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color 250ms, border-color 250ms;
}

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

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 3.5rem 0 2.5rem;
  margin-top: 4rem;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  margin-bottom: 3rem;
}

.footer-name { font-family: var(--serif); font-size: clamp(1.8rem, 4vw, 3rem); font-style: italic; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--ink-40);
}

.footer-bottom a:hover { color: var(--ink); }

.footer-credit { flex-basis: 100%; margin-top: 0.5rem; font-size: 0.62rem; letter-spacing: 0.12em; color: var(--ink-40); }
.footer-credit a { color: inherit; }
.footer-credit a:hover { color: var(--ink); }

/* ---------- CTA band ---------- */
.cta-band { text-align: center; }

.cta-band .h-section { margin: 1rem 0 2.2rem; }

.btn-line {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  font-family: var(--sans);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--ink);
  padding: 1.05rem 2.4rem;
  border-radius: 99px;
  transition: background 350ms var(--ease), color 350ms var(--ease);
}

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

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
  transition-delay: var(--d, 0ms);
}

.reveal.in { opacity: 1; transform: none; }

.reveal-img { overflow: hidden; }

.reveal-img img {
  transform: scale(1.12);
  transition: transform 1.4s var(--ease);
}

.reveal-img.in img { transform: scale(1.02); }

/* ---------- Page transition ---------- */
.page-fade { animation: pageIn 700ms var(--ease); }
@keyframes pageIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  .marquee-track { animation: none; }
}

/* ---------- Cycle pages ---------- */
.crumb { display: inline-block; color: var(--ink-40); transition: color 250ms; }
.crumb:hover { color: var(--ink); }

.work-block { padding: clamp(2.5rem, 7vh, 4.5rem) 0; border-top: 1px solid var(--line); }

.wb-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem 2rem;
  margin-bottom: 1.6rem;
}

.wb-title { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: clamp(1.5rem, 2.8vw, 2.3rem); }

.wb-sub { font-size: 0.6em; color: var(--ink-60); font-style: normal; letter-spacing: 0.04em; }

.wb-cap { color: var(--ink-40); }

.cycle-nav { display: flex; justify-content: space-between; gap: 2rem; }

.cycle-nav a { display: flex; flex-direction: column; gap: 0.5rem; }

.cycle-nav .cn-title {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.3rem, 2.6vw, 2rem);
  transition: opacity 250ms;
}

.cycle-nav a:hover .cn-title { opacity: 0.55; }

.cycle-nav-band { padding: clamp(2.5rem, 6vh, 4rem) 0; }

/* Cycle index cards */
.cycle-index .work-card .meta { flex-direction: column; align-items: flex-start; gap: 0.2rem; }
.cycle-index .count { font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-40); }

/* ---------- Responsive refinements ---------- */
@media (max-width: 860px) {
  /* hero: text first, image after */
  .hero { justify-content: flex-end; padding-top: 6.5rem; padding-bottom: 3rem; }
  .hero .container { order: 1; }
  .hero-figure { order: 2; width: auto; margin: 2.8rem 4vw 0; aspect-ratio: 4 / 5; }
  .hero-meta { margin-top: 2.2rem; flex-direction: column; align-items: flex-start; gap: 1rem; }

  /* header: tighter */
  .header-inner { gap: 1rem; }
  .brand { font-size: 1.02rem; }
  .lang-switch button { padding: 0.3rem 0.6rem; }

  /* type scale: slightly smaller display on small screens */
  .display { font-size: clamp(2.6rem, 13vw, 4.2rem); }

  /* cycle nav stacked */
  .cycle-nav { flex-direction: column; gap: 2rem; }
  .cycle-nav a[style] { text-align: left !important; }

  /* work block head stacked */
  .wb-head { flex-direction: column; align-items: flex-start; gap: 0.35rem; }
}

@media (min-width: 861px) and (max-width: 1150px) {
  /* narrower desktop: slightly smaller hero image + tighter text column */
  .hero-figure { width: 46vw; }
  .hero-title { font-size: clamp(2.8rem, 6vw, 5rem); max-width: 46vw; }
  .hero-sub, .hero-meta { max-width: 46vw; }
}

/* larger tap targets on touch */
@media (pointer: coarse) {
  .nav a, .lang-switch button { padding-top: 0.55rem; padding-bottom: 0.55rem; }
}


/* lang switch as links (i18n pages) */
.lang-switch a {
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--ink-40);
  padding: 0.35rem 0.75rem;
  border-radius: 99px;
  transition: all 300ms ease;
}
.lang-switch a.on { background: var(--ink); color: var(--bg); }


/* ---------- Mobile robustness ---------- */
a, button { touch-action: manipulation; }
.nav a { padding: 0.6rem 1rem; }

/* sticky figure only on two-column layouts (desktop) */
@media (max-width: 860px) {
  .bio-figure { position: static; }
}

/* ---------- Justified body text ---------- */
.prose p,
.collection-desc {
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}

/* ---------- Wider mobile gutters ---------- */
@media (max-width: 860px) {
  .container { width: auto; margin-left: 1.5rem; margin-right: 1.5rem; }
  .hero-figure { margin-left: 1.5rem; margin-right: 1.5rem; }
}


/* ---------- Safari fallbacks ---------- */
/* aspect-ratio not supported (Safari < 15): give frames explicit heights */
@supports not (aspect-ratio: 1 / 1) {
  .hero-figure { height: min(45.4vw, 640px); }
  .work-card .frame { height: 0; padding-bottom: 75%; position: relative; }
  .work-card .frame img { position: absolute; top: 0; left: 0; }
  .gallery figure { height: 0; padding-bottom: 100%; position: relative; }
  .gallery figure img { position: absolute; top: 0; left: 0; height: 100%; }
  .bio-figure img { height: auto; }
}

/* contacts photo keeps its natural landscape ratio */
.contact-grid .bio-figure img { aspect-ratio: auto; height: auto; }

/* keep hero meta clear of the enlarged hero image on desktop */
@media (min-width: 861px) {
  .hero-meta { max-width: 44vw; }
}

/* ---------- Theme toggle ---------- */
body { transition: background 400ms var(--ease), color 400ms var(--ease); }

.theme-toggle {
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--ink-60);
  padding: 0.4rem;
  display: inline-flex;
  align-items: center;
  border-radius: 99px;
  transition: color 250ms ease;
  touch-action: manipulation;
}
.theme-toggle:hover { color: var(--ink); }
.theme-toggle svg { width: 18px; height: 18px; display: block; }
.theme-toggle .icon-sun { display: none; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
html[data-theme="dark"] .theme-toggle .icon-sun { display: block; }

@media (max-width: 860px) {
  .theme-toggle { position: relative; z-index: 5; }
}

/* ---------- Artsy link on works ---------- */
.wb-artsy {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.5rem;
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-60);
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  transition: color 250ms, border-color 250ms;
}
.wb-artsy:hover { color: var(--ink); border-color: var(--ink); }

/* ---------- Video works ---------- */
.gallery figure.video { cursor: default; }
.gallery figure.video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
@media (prefers-reduced-motion: reduce) {
  .gallery figure.video video { /* JS adds controls & stops autoplay */ }
}

/* ---------- Contact form ---------- */
.contact-form { margin-top: 1.5rem; max-width: 460px; }
.contact-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.contact-form .field { margin-bottom: 1.4rem; }
.contact-form label {
  display: block;
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-60);
  margin-bottom: 0.5rem;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  padding: 0.55rem 0;
  transition: border-color 250ms ease;
}
.contact-form input:focus,
.contact-form textarea:focus { outline: none; border-color: var(--ink); }
.contact-form textarea { resize: vertical; min-height: 120px; line-height: 1.5; }
.contact-form button { margin-top: 0.7rem; background: transparent; }
.contact-form button[disabled] { opacity: 0.5; cursor: default; }
.form-status { margin-top: 1.1rem; font-size: 0.88rem; color: var(--ink-60); min-height: 1.2em; }

/* ---------- Very small phones (≤400px): tighten header so it never overflows ---------- */
@media (max-width: 400px) {
  .container { margin-left: 1.2rem; margin-right: 1.2rem; }
  .hero-figure { margin-left: 1.2rem; margin-right: 1.2rem; }
  .header-inner { gap: 0.4rem; }
  .brand { font-size: 0.88rem; letter-spacing: 0; }
  .lang-switch { padding: 0.15rem; }
  .lang-switch button { padding: 0.28rem 0.45rem; font-size: 0.62rem; letter-spacing: 0.06em; }
  .theme-toggle { padding: 0.3rem; }
  .theme-toggle svg { width: 16px; height: 16px; }
  .burger { padding: 0.4rem 0.35rem; }
}

/* ---------- Home: header over hero imagery — legibility in both themes ---------- */
.page-home .site-header:not(.scrolled)::after {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 220%;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
  z-index: -1;
  pointer-events: none;
}
.page-home .site-header:not(.scrolled) .brand { color: #fff; }
.page-home .site-header:not(.scrolled) .nav a { color: rgba(255, 255, 255, 0.72); }
.page-home .site-header:not(.scrolled) .nav a.active,
.page-home .site-header:not(.scrolled) .nav a:hover { color: #fff; }
.page-home .site-header:not(.scrolled) .nav a::after { background: #fff; }
.page-home .site-header:not(.scrolled) .burger span { background: #fff; }
.page-home .site-header:not(.scrolled) .lang-switch { border-color: rgba(255, 255, 255, 0.4); }
.page-home .site-header:not(.scrolled) .lang-switch button { color: rgba(255, 255, 255, 0.7); }
.page-home .site-header:not(.scrolled) .lang-switch button.on { background: #fff; color: #111; }
.page-home .site-header:not(.scrolled) .theme-toggle { color: rgba(255, 255, 255, 0.82); }

/* ---------- Single-image works: give them full presence ---------- */
.gallery.single { grid-template-columns: 1fr; }
.gallery.single figure:not(.video) { aspect-ratio: auto; cursor: zoom-in; }
.gallery.single figure:not(.video) img { height: auto; }
@media (min-width: 641px) {
  .gallery.single { grid-template-columns: minmax(0, 640px); }
  /* Feature works (large, powerful landscape pieces) get full presence */
  .gallery.single.feature { grid-template-columns: minmax(0, 1240px); justify-content: center; }
  /* Two works side by side (e.g. static image + rotating video) */
  .gallery.pair { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 1200px; margin-inline: auto; align-items: center; gap: clamp(1rem, 2.5vw, 2rem); }
}
@media (max-width: 640px) {
  .gallery.pair { grid-template-columns: 1fr; }
}
/* Pair figures show the full artwork (portrait, no square crop) */
.gallery.pair figure { aspect-ratio: auto; background: transparent; cursor: zoom-in; }
.gallery.pair figure.video { cursor: default; }
.gallery.pair figure img,
.gallery.pair figure.video video { width: 100%; height: auto; object-fit: contain; }

/* ---------- Mobile: language switch lives INSIDE the hamburger menu ---------- */
@media (max-width: 860px) {
  .header-inner > .lang-switch { display: none; }
  body.nav-open .lang-switch {
    display: flex;
    position: fixed;
    left: 50%;
    bottom: 12vh;
    transform: translateX(-50%);
    z-index: 6;
    border-color: var(--line) !important;
    padding: 0.3rem;
    gap: 0.4rem;
  }
  body.nav-open .lang-switch a {
    font-size: 0.95rem !important;
    letter-spacing: 0.12em !important;
    padding: 0.6rem 1.35rem !important;
    color: var(--ink-60) !important;
  }
  body.nav-open .lang-switch a.on { background: var(--ink) !important; color: var(--bg) !important; }
}

/* ---------- Mobile: keep menu links legible when overlay is open (fixes home/light) ---------- */
@media (max-width: 860px) {
  body.nav-open .nav a { color: var(--ink-60) !important; }
  body.nav-open .nav a.active,
  body.nav-open .nav a:hover { color: var(--ink) !important; }
  body.nav-open .nav a::after { background: var(--ink) !important; }
}
