/* Fonts (self-hosted, latin subsets) */
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("assets/fonts/plus-jakarta-sans.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("assets/fonts/plus-jakarta-sans-italic.woff2") format("woff2");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Darker Grotesque";
  src: url("assets/fonts/darker-grotesque-800-wordmark.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}

/*
  Every size is designed on a 1920 x 1080 artboard. --u is one artboard pixel,
  scaled so the whole artboard always fits the viewport.
*/
:root {
  --u: min(100vw / 1920, 100vh / 1080);
  --stroke: max(10px, 20 * var(--u));
  --margin: calc(80 * var(--u)); /* 12-col grid: 80 margin, 20 gutter */
  --flap: 0.8s; /* one full wing beat (two poses) */

  /* Type scale: 20 x golden ratio^n, in artboard px */
  --fs-n1: 12.36;
  --fs-0: 20;
  --fs-1: 32.36;
  --fs-2: 52.36;
  --fs-3: 84.72;
  --fs-4: 137.08;
  --title-size: calc(var(--fs-4) * var(--u));

  /* Frame shadows: drop shadow on the wall, recess inside the stroke */
  --drop: 0 calc(4 * var(--u)) max(24px, 50 * var(--u)) rgba(0, 0, 0, 0.25);
  --recess: inset 0 calc(3 * var(--u)) max(16px, 34 * var(--u)) calc(12 * var(--u)) rgba(0, 0, 0, 0.15);
  --ink: #6a6968;
  --white: #fff;
  --sky: #d0c7ab;
  --wall: #f6f4f1;
  --sans: "Plus Jakarta Sans", system-ui, sans-serif;
}

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

html {
  background: var(--wall);
  -webkit-text-size-adjust: 100%;
  scrollbar-width: none; /* the frame is full-bleed; a scrollbar would break it */
}
html::-webkit-scrollbar { display: none; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-stopped { overflow: clip; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
img { display: block; }

/* Gallery wall: a 5x-amplified texture at 20% over a warm white reproduces the plaster */
.wall {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: #fffcf8;
}
.wall::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("assets/img/wall.webp") center / cover;
  opacity: 0.2;
}
.js:not(.is-ready) .wall::before { background-image: none; } /* load after the painting */

/* Screen-edge vignette over everything */
.vignette {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  box-shadow: inset 0 calc(3 * var(--u)) max(20px, 35 * var(--u)) rgba(0, 0, 0, 0.27);
}

/* ---------- Stage (pinned while the frame morphs) ---------- */
.stage {
  position: relative;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}

/* ---------- Frame ---------- */
.frame {
  --p: 1; /* stroke progress, animated by the loader */
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--sky);
  box-shadow: var(--drop);
}
.js .frame { --p: 0; }

.frame__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.frame__img--portrait { clip-path: inset(100% 0 0 0); }
.frame__img--sky { display: none; }
.js .frame__img--sky { display: block; }

/* Painting sits slightly recessed inside the stroke */
.frame__shade {
  position: absolute;
  inset: calc(var(--stroke) * var(--p));
  opacity: var(--p);
  pointer-events: none;
  box-shadow: var(--recess);
}

/* White inside stroke, drawn above the title so it clips it */
.frame__stroke {
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 0 calc(var(--stroke) * var(--p)) var(--white);
}

/* ---------- Loader bird (two-frame stop motion) ---------- */
.bird {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(40px, 60 * var(--u));
  aspect-ratio: 1;
  translate: -50% -50%;
  background: url("assets/img/bird.webp") 0 0 / 200% 100% no-repeat;
  animation: flap var(--flap) steps(1) infinite;
}
.js .bird { display: block; }

@keyframes flap {
  50% { background-position: 100% 0; }
}

/* ---------- Hero title ---------- */
.title {
  position: absolute;
  right: calc(var(--stroke) - 0.0244em);
  bottom: calc(var(--stroke) + 0.008em);
  margin: 0;
  font-size: var(--title-size);
  font-weight: 600;
  line-height: 0.75;
  letter-spacing: 0.018em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--white);
}
.title span { display: inline-block; }

/* ---------- Header: logo and nav share a baseline, on the grid margins ---------- */
.header {
  position: absolute;
  top: calc(var(--stroke) + 35 * var(--u));
  right: var(--margin);
  left: var(--margin);
  z-index: 2;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  color: var(--white);
}

.logo {
  font-size: max(20px, var(--fs-1) * var(--u));
  line-height: 1;
  white-space: nowrap;
}
.logo__framed { font-style: italic; font-weight: 600; }
.logo__by { margin-left: 0.22em; font-weight: 200; }
.logo__mark {
  margin-left: 0.13em;
  font-family: "Darker Grotesque", var(--sans);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.nav {
  display: flex;
  gap: calc(44 * var(--u));
  font-size: max(12.36px, var(--fs-0) * var(--u));
  line-height: 1;
}
.nav a { transition: opacity 0.3s; }
.nav a:hover { opacity: 0.7; }

.js.is-loading .header,
.js.is-loading .title { visibility: hidden; }

/* ---------- About ---------- */
.artboard {
  position: absolute;
  top: 50%;
  left: 50%;
  width: calc(1920 * var(--u));
  height: calc(1080 * var(--u));
  translate: -50% -50%;
}

/* Where the frame lands in the About state; main.js reads its box */
.slot {
  position: absolute;
  top: calc(140 * var(--u));
  left: calc(156 * var(--u));
  width: calc(800 * var(--u));
  aspect-ratio: 1;
}

.about {
  position: absolute;
  top: calc(359 * var(--u));
  left: calc(1108 * var(--u));
  width: calc(350 * var(--u));
}
.about > * { margin: 0; }

.about__name {
  font-size: max(20px, var(--fs-1) * var(--u));
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
}
.about__meta,
.about__work {
  font-size: max(12.36px, var(--fs-n1) * var(--u));
  font-style: italic;
  line-height: 1.28;
}
.about__meta { margin-top: calc(11.1 * var(--u)); font-weight: 400; }
.about__work { margin-top: calc(12 * var(--u)); font-weight: 700; }
.about__bio {
  margin-top: calc(32.2 * var(--u));
  font-size: max(12.36px, var(--fs-0) * var(--u));
  line-height: 1.25;
  text-align: justify;
  hyphens: manual;
}

/* ---------- Disclaimer: a dismissible banner in the hero, styled as a gallery wall label ---------- */
.label {
  margin: 0;
  padding: 12px 16px;
  background: var(--white);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.14);
  font-size: 12.36px;
  line-height: 1.5;
  color: var(--ink);
}
.label p { margin: 0; }
.label strong { font-weight: 700; color: #4a4948; }

.notice {
  position: fixed;
  bottom: calc(var(--stroke) + 30 * var(--u));
  left: var(--margin);
  z-index: 10;
  max-width: min(600px, 100vw - var(--stroke) - 1225 * var(--u)); /* clear of the title */
  pointer-events: none; /* only the card takes the pointer, and only while it shows */
}
.notice__card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-right: 12px;
  pointer-events: auto;
  transition: opacity 0.6s, translate 0.6s, visibility 0s;
}
.notice__close {
  flex: none;
  width: 24px;
  height: 24px;
  margin: -4px -4px 0 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 20px;
  line-height: 1;
  color: inherit;
  cursor: pointer;
}
.notice__close:hover { color: #222; }
/* Hidden cards also leave the tab order, once they have faded out */
.js:not(.intro-done) .notice__card,
.notice.is-dismissed .notice__card {
  visibility: hidden;
  opacity: 0;
  translate: 0 12px;
  pointer-events: none;
  transition: opacity 0.6s, translate 0.6s, visibility 0s 0.6s;
}

/* ---------- Works ---------- */
/* Starts with a stretch of empty wall after About, and stacks above the footer it reveals */
.works { position: relative; z-index: 1; padding-top: 70vh; }

.works__stage {
  --wu: var(--u); /* unit for the frame boxes below */
  position: relative;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}
/* Once pinned the stage carries its own copy of the wall (texture at 20% over #fffcf8), lined up with
   the fixed one, so the footer waiting underneath never shows through and the wall slides off it */
.works__stage.has-wall {
  background: linear-gradient(rgb(255 252 248 / 0.8), rgb(255 252 248 / 0.8)), url("assets/img/wall.webp") center / cover;
}

/* The paintings sit above the archive but let the pointer through to it once they have flown off */
.works .artboard { z-index: 2; pointer-events: none; }
.work { position: absolute; inset: 0; margin: 0; }

/* Each frame moves through three boxes, in artboard px: rest (--x --y --w --h), zoomed (--zx ...)
   and zoomed back out (--ox ...). main.js animates --z, then --o, from 0 to 1. */
.work__frame {
  --z: 0;
  --o: 0;
  --ox: var(--x);
  --oy: var(--y);
  --ow: var(--w);
  --oh: var(--h);
  position: absolute;
  top: calc((var(--y) + (var(--zy) - var(--y)) * var(--z) + (var(--oy) - var(--zy)) * var(--o)) * var(--wu));
  left: calc((var(--x) + (var(--zx) - var(--x)) * var(--z) + (var(--ox) - var(--zx)) * var(--o)) * var(--wu));
  width: calc((var(--w) + (var(--zw) - var(--w)) * var(--z) + (var(--ow) - var(--zw)) * var(--o)) * var(--wu));
  height: calc((var(--h) + (var(--zh) - var(--h)) * var(--z) + (var(--oh) - var(--zh)) * var(--o)) * var(--wu));
  outline-offset: 6px;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
}

/* A hung painting: white stroke, recessed canvas, drop shadow on the wall. Works and archive share it. */
.work__frame,
.tile {
  overflow: hidden;
  background: var(--sky);
  box-shadow: var(--drop);
}
.work__frame img,
.tile img { width: 100%; height: 100%; object-fit: cover; }
.work__frame::before,
.work__frame::after,
.tile::before,
.tile::after {
  content: "";
  position: absolute;
  pointer-events: none;
}
.work__frame::before,
.tile::before { inset: var(--stroke); box-shadow: var(--recess); }
.work__frame::after,
.tile::after { inset: 0; box-shadow: inset 0 0 0 var(--stroke) var(--white); }
.work__frame:focus { outline: none; }
.work__frame:focus-visible { outline: 2px solid var(--ink); }

.work--1 .work__frame { --x: 53; --y: 50; --w: 597; --h: 401; --zx: -187; --zy: -23; --zw: 887; --zh: 589; --ox: -100; }
.work--2 .work__frame { --x: 1400; --y: 300; --w: 400; --h: 400; --zx: 1400; --zy: 300; --zw: 569; --zh: 569; }
.work--3 .work__frame { --x: 200; --y: 650; --w: 500; --h: 352; --zx: 200; --zy: 727; --zw: 637; --zh: 448; }

/* Captions stay hidden until their painting is hovered, tapped or focused */
.work__caption {
  position: absolute;
  z-index: 1;
  width: calc(350 * var(--u));
  opacity: 0;
  translate: 0 calc(12 * var(--u));
  transition: opacity 0.5s, translate 0.5s;
  pointer-events: none;
}
.work__frame:hover + .work__caption,
.work__frame:focus + .work__caption {
  opacity: 1;
  translate: 0 0;
}
.work--1 .work__caption { top: calc(109.5 * var(--u)); left: calc(752 * var(--u)); }
.work--2 .work__caption { top: calc(437.5 * var(--u)); left: calc(1000 * var(--u)); text-align: right; }
.work--3 .work__caption { top: calc(797.5 * var(--u)); left: calc(907 * var(--u)); }

.work__caption > * { margin: 0; }
.work__title {
  font-size: max(20px, var(--fs-1) * var(--u));
  font-style: italic;
  font-weight: 500;
  line-height: 1;
}
.work__meta {
  margin-top: calc(6.1 * var(--u));
  font-size: max(12.36px, var(--fs-n1) * var(--u));
  font-style: italic;
  line-height: 1.28;
}
.work__desc {
  margin-top: calc(23.5 * var(--u));
  font-size: max(12.36px, var(--fs-0) * var(--u));
  line-height: 1.25;
  text-align: justify;
}

/* ---------- Archive: an endless conveyor of paintings along the wall ---------- */
.archive {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.archive.is-live { pointer-events: auto; }

/* main.js sizes each tile and moves it along the belt, in perspective */
.archive__wall {
  position: absolute;
  inset: 0;
  overflow: hidden;
  touch-action: pan-y; /* vertical swipes still scroll the page on touch screens */
  user-select: none;
  -webkit-user-select: none;
}
/* The tiles hang on this plane; main.js turns it in perspective. The plane shares their depth, so it
   stays out of hit testing or it would catch clicks meant for them. */
.archive__plane {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  pointer-events: none;
}
.archive.is-live .tile { pointer-events: auto; }
.archive.is-live .archive__wall { cursor: grab; }
.archive.is-dragging .archive__wall { cursor: grabbing; }

.tile {
  position: absolute;
  top: 0;
  left: 0;
  will-change: transform;
}
.tile img {
  pointer-events: none;
  -webkit-user-drag: none;
}
@media (hover: hover) and (pointer: fine) {
  .archive.is-live:not(.is-dragging) .tile { cursor: none; }
}

.archive__hint {
  position: absolute;
  bottom: calc(var(--stroke) + 30 * var(--u));
  left: var(--margin);
  margin: 0;
  font-size: 12.36px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0;
}

/* The list behind the wall, for keyboards and screen readers. A button shows itself when focused. */
.archive__index { margin: 0; padding: 0; list-style: none; }
.piece > *,
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.piece__open:focus-visible {
  bottom: calc(var(--stroke) + 70 * var(--u));
  left: var(--margin);
  width: auto;
  height: auto;
  padding: 10px 16px;
  clip-path: none;
  border: 0;
  background: var(--white);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.14);
  font: inherit;
  font-size: 12.36px;
  color: #111;
  outline: none;
}

/* ---------- "View project" cursor (mouse only) ---------- */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 16;
  display: grid;
  place-items: center;
  width: max(72px, 88 * var(--u));
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--white);
  font-size: 12.36px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: uppercase;
  color: #111;
  pointer-events: none;
  transform: scale(0);
}
@media (hover: none), (pointer: coarse) {
  .cursor { display: none; }
}

/* ---------- Expanded view ---------- */
.viewer {
  --bg: 1;
  --ar: 1.333;
  --ph: min(1166.67 * var(--u) / var(--ar), 100svh - 240 * var(--u)); /* picture height, 8 columns wide at most */
  position: fixed;
  inset: 0;
  z-index: 15;
  overflow-x: hidden;
  background: rgb(0 0 0 / var(--bg));
  color: var(--white);
}
.viewer[hidden] { display: none; }

/* Where the picture lands; main.js reads its box */
.viewer__slot {
  position: absolute;
  top: calc((100svh - var(--ph)) / 2);
  left: var(--margin);
  width: calc(var(--ph) * var(--ar));
  height: var(--ph);
  visibility: hidden;
}

/* main.js sets its size and pose, from the painting's angle on the belt to flat */
.viewer__frame {
  --p: 1;
  position: absolute;
  top: 0;
  left: 0;
  margin: 0;
  overflow: hidden;
  background: #111;
  transform-origin: 0 0;
}
.viewer__img { width: 100%; height: 100%; object-fit: cover; }
.viewer__frame::before,
.viewer__frame::after {
  content: "";
  position: absolute;
  pointer-events: none;
}
.viewer__frame::before { inset: calc(var(--stroke) * var(--p)); opacity: var(--p); box-shadow: var(--recess); }
.viewer__frame::after { inset: 0; box-shadow: inset 0 0 0 calc(var(--stroke) * var(--p)) var(--white); }

/* Bottom-left of the picture, its baseline clipped by the frame like the hero title */
.viewer__title {
  position: absolute;
  bottom: calc(var(--stroke) + 0.008em);
  left: var(--stroke);
  font-size: max(32.36px, var(--fs-3) * var(--u));
  font-weight: 600;
  line-height: 0.75;
  letter-spacing: 0.018em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Columns 10-12, bottom-aligned with the picture */
.viewer__text {
  position: absolute;
  bottom: calc((100svh - var(--ph)) / 2);
  left: calc(1415 * var(--u));
  width: calc(425 * var(--u));
}
.viewer__meta {
  margin: 0;
  font-size: max(12.36px, var(--fs-n1) * var(--u));
  font-style: italic;
  line-height: 1.28;
  color: rgba(255, 255, 255, 0.7);
}
.viewer__desc p {
  margin: calc(20 * var(--u)) 0 0;
  font-size: max(12.36px, var(--fs-0) * var(--u));
  line-height: 1.25;
  text-align: justify;
}
.viewer__close {
  position: absolute;
  top: calc(66 * var(--u));
  right: var(--margin);
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: max(12.36px, var(--fs-0) * var(--u));
  line-height: 1;
  color: inherit;
  cursor: pointer;
}
.viewer__close:hover { opacity: 0.7; }

/* ---------- Contact ---------- */
.contact {
  position: relative;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: #000;
  color: var(--white);
}
.contact .artboard > * { position: absolute; margin: 0; }

.contact__logo,
.contact__heading { top: calc(103 * var(--u)); }
.contact__logo,
.contact__links,
.contact__email,
.contact__reel { left: var(--margin); }
.contact__heading,
.contact__name,
.contact__place,
.contact__bio { right: var(--margin); text-align: right; }

.contact__heading,
.contact__links,
.contact__email,
.contact__place {
  font-size: max(20px, var(--fs-1) * var(--u));
  font-weight: 400;
  line-height: 1;
}
.contact__links { top: calc(280 * var(--u)); padding: 0; list-style: none; line-height: 1.5; }
.contact__links a { transition: opacity 0.3s; }
.contact__links a:hover { opacity: 0.7; }
.contact__email {
  top: calc(784 * var(--u));
  text-decoration: underline;
  text-decoration-thickness: 0.05em;
  text-underline-offset: 0.14em;
}
.contact__reel {
  top: calc(850 * var(--u));
  font-size: max(32.36px, var(--fs-2) * var(--u));
  font-weight: 600;
  line-height: 0.94;
}
.contact__name {
  top: calc(468 * var(--u));
  font-size: calc(var(--fs-4) * var(--u));
  font-weight: 500;
  line-height: 0.94;
  letter-spacing: 0.018em;
  text-transform: uppercase;
}
/* Each line rises out of its own mask as the footer is revealed */
.contact__name .line { display: block; overflow: hidden; }
.contact__name .line > span { display: block; }
.contact__place { top: calc(794 * var(--u)); }
.contact__bio {
  top: calc(870 * var(--u));
  width: calc(276.67 * var(--u)); /* two columns */
  font-size: max(12.36px, var(--fs-0) * var(--u));
  line-height: 1.25;
  color: rgba(255, 255, 255, 0.6);
}

/* ---------- Portrait screens ---------- */
@media (max-aspect-ratio: 1/1) {
  :root {
    --s: min(84vw, 40svh);
    --title-size: calc(var(--fs-2) * 1px);
  }

  /* About: frame on top, text below */
  .artboard { inset: 0; width: auto; height: auto; translate: none; }
  .slot {
    top: max(8svh, 56px);
    left: calc((100vw - var(--s)) / 2);
    width: var(--s);
  }
  .about {
    top: calc(max(8svh, 56px) + var(--s) + 24px);
    right: 24px;
    left: 24px;
    width: auto;
  }
  .about__name { font-size: 32.36px; }
  .about__meta, .about__work { font-size: 12.36px; }
  .about__meta { margin-top: 8px; }
  .about__work { margin-top: 4px; }
  .about__bio { margin-top: 16px; font-size: 20px; hyphens: auto; }

  .header {
    top: calc(var(--stroke) + 18px);
    right: auto;
    left: calc(var(--stroke) + 18px);
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .logo { font-size: 20px; }
  .nav { gap: 18px; font-size: 12.36px; }

  /* Full width, lifted above the hero title */
  .notice {
    right: calc(var(--stroke) + 12px);
    bottom: calc(var(--stroke) + var(--title-size) * 0.8 + 12px);
    left: calc(var(--stroke) + 12px);
    max-width: none;
  }

  /* Works: same idea on a centred 390 x 844 artboard */
  .works__stage { --wu: min(100vw / 390, 100svh / 844); }
  .works .artboard {
    top: 50%;
    left: 50%;
    width: calc(390 * var(--wu));
    height: calc(844 * var(--wu));
    translate: -50% -50%;
  }
  .work--1 .work__frame { --x: 24; --y: 64; --w: 230; --h: 154; --zx: -60; --zy: -24; --zw: 340; --zh: 228; --ox: -40; }
  .work--2 .work__frame { --x: 206; --y: 300; --w: 160; --h: 160; --zx: 196; --zy: 288; --zw: 230; --zh: 230; }
  .work--3 .work__frame { --x: 40; --y: 560; --w: 220; --h: 155; --zx: 24; --zy: 640; --zw: 320; --zh: 225; }

  /* Expanded view: picture on top, text below */
  .viewer { --ph: min((100vw - 48px) / var(--ar), 52svh); overflow-y: auto; }
  .viewer__slot { top: 72px; left: calc((100vw - var(--ph) * var(--ar)) / 2); }
  .viewer__text {
    top: calc(72px + var(--ph) + 28px);
    right: 24px;
    bottom: auto;
    left: 24px;
    width: auto;
    padding-bottom: 40px;
  }
  .viewer__title { font-size: 32.36px; }
  .viewer__desc p { margin-top: 12px; font-size: 20px; text-align: left; }
  .viewer__close { top: calc(var(--stroke) + 18px); right: 24px; font-size: 20px; }
}
@media (max-aspect-ratio: 1/1) and (max-width: 443px) {
  :root { --title-size: calc(var(--fs-1) * 1px); }
}
@media (max-aspect-ratio: 1/1) and (min-width: 700px) {
  :root { --title-size: calc(var(--fs-3) * 1px); }
}

/* ---------- Short landscape screens (phones on their side) ---------- */
@media (min-aspect-ratio: 1/1) and (max-height: 560px) {
  .about { top: calc(140 * var(--u)); width: calc(50vw - 148 * var(--u) - 24px); }
  .about__name { font-size: 20px; }
  .about__meta, .about__work { font-size: 12.36px; }
  .about__bio { margin-top: 10px; font-size: 12.36px; line-height: 1.4; }

  .viewer__text {
    right: 24px;
    left: calc(var(--margin) + var(--ph) * var(--ar) + 32px);
    width: auto;
  }
  .viewer__desc p { margin-top: 8px; line-height: 1.4; }
}

/* ---------- Small screens: captions become a wall label, the footer stacks ---------- */
@media (max-aspect-ratio: 1/1), (max-height: 560px) {
  .work .work__caption {
    top: auto;
    right: 12px;
    bottom: 12px;
    left: 12px;
    width: auto;
    padding: 14px 16px;
    background: var(--white);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.14);
    text-align: left;
  }
  .work__title { font-size: 20px; }
  .work__meta { margin-top: 4px; }
  .work__desc { margin-top: 8px; font-size: 12.36px; line-height: 1.5; text-align: left; }

  .contact { height: auto; min-height: 100vh; min-height: 100svh; }
  .contact .artboard {
    position: static;
    display: grid;
    grid-template-columns: 1fr auto;
    align-content: start;
    width: auto;
    height: auto;
    padding: calc(var(--stroke) + 18px) 24px 40px;
    translate: none;
  }
  .contact .artboard > * { position: static; grid-column: 1 / -1; text-align: left; }
  .contact .contact__logo { grid-column: 1; }
  .contact .contact__heading { grid-column: 2; font-size: 20px; text-align: right; }
  .contact .contact__links { margin-top: 48px; font-size: 32.36px; }
  .contact .contact__name { margin-top: 56px; font-size: 52.36px; }
  .contact .contact__place { margin-top: 24px; font-size: 20px; }
  .contact .contact__bio { width: auto; max-width: 32em; margin-top: 10px; font-size: 12.36px; line-height: 1.5; }
  .contact .contact__email { margin-top: 48px; font-size: 20px; }
  .contact .contact__reel { margin-top: 20px; font-size: 32.36px; }
}
@media (max-aspect-ratio: 1/1) and (min-width: 700px) {
  .contact .contact__name { font-size: 84.72px; }
}

@media (prefers-reduced-motion: reduce) {
  .bird { animation: none; }
  .notice__card,
  .work__caption { transition: none; }
}
