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

:root {
  --bg: #120F0D;        /* page background (black) */
  --ink: #120F0D;       /* black */
  --light: #E63022;     /* red-orange: text on dark, light panels */
  --accent: #9CB6D4;    /* light blue, the one accent: hovers, active states, logo band */

  --display: "Switzer", "Helvetica Neue", Helvetica, Arial, sans-serif;   /* always weight 900 */
  --text: "Baskerville", "Libre Baskerville", "Baskerville Old Face", Georgia, serif;

  --pad: clamp(16px, 2.2vw, 32px);
  --ease: cubic-bezier(.7, 0, .2, 1);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--light);
  font-family: var(--text);
  font-size: 18px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

/* Paper grain over everything */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: .07;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

a { color: inherit; }
figure { margin: 0; }
svg { display: block; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 200; background: var(--ink); color: var(--light); padding: 8px 12px; }

/* Shared bits ------------------------------------------- */
/* Small italic number before a title: only the skill page uses it now (the home page dropped its numbers) */
.kicker {
  font: italic 400 16px/1 var(--text);
  letter-spacing: 0;
  text-transform: none;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--light);
}
.section-head h2 {
  display: flex;
  align-items: baseline;
  gap: .9em;
  margin: 0;
  font: 900 14px/1 var(--display);
  letter-spacing: .04em;
  text-transform: uppercase;
}

.only-touch { display: none; }
@media (hover: none), (pointer: coarse), (max-width: 760px) {
  .only-fine { display: none; }
  .only-touch { display: inline; }
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: .6em;
  padding: 1.15em 1.9em 1.05em;
  border: 0;
  background: var(--ink);
  color: var(--light);
  font: 900 clamp(14px, 1.15vw, 17px)/1 var(--display);
  letter-spacing: .02em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s, color .2s, transform .3s var(--ease);
}
.pill:hover { background: var(--accent); color: var(--ink); transform: translateY(-2px); }
.pill--paper { background: var(--light); color: var(--ink); }

/* =========================================================
   Header
   ========================================================= */
/* One row: name left, PORTFOLIO centred, links right. See-through at the very top
   of the opening; as soon as the page scrolls the bar turns ink (.is-solid). */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: clamp(16px, 1.8vw, 26px) var(--pad);
  border-bottom: 2px solid transparent;
  color: var(--light);
  font: 900 clamp(13px, 1vw, 15px)/1 var(--display);
  letter-spacing: .05em;
  text-transform: uppercase;
  transition: background-color .3s, border-color .3s, padding .3s;
}
.nav.is-solid { padding-block: 14px; background: var(--ink); border-bottom-color: var(--ink); }

.nav__logo,
.nav__title {
  font-size: clamp(16px, 1.5vw, 22px);
  letter-spacing: -.02em;
  white-space: nowrap;
}
.nav__logo { justify-self: start; color: inherit; text-decoration: none; }
.nav__title { justify-self: center; }
.nav__right { justify-self: end; }
/* The opening's title already says this: back once it has scrolled away or the phone menu opens */
.nav__logo,
.nav__title { transition: opacity .3s, visibility .3s; }
body:has(.opening) .nav:not(.is-past-opening):not(.is-open) .nav__logo,
body:has(.opening) .nav:not(.is-past-opening):not(.is-open) .nav__title { opacity: 0; visibility: hidden; }

.nav__links { display: flex; align-items: center; gap: clamp(14px, 1.8vw, 30px); }
.nav__links a { color: inherit; text-decoration: none; white-space: nowrap; }
.nav__links a:hover,
.nav__links a[aria-current="page"],
.nav__logo:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .25em; }

.nav__lang { display: flex; align-items: center; gap: .4em; }
.nav__lang button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  opacity: .5;
  cursor: pointer;
}
.nav__lang button[aria-pressed="true"] { opacity: 1; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .25em; }
.nav__lang button:hover { opacity: 1; }

/* Phone: links move into a full-screen red menu */
.nav__menu {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}
.nav__burger { position: relative; width: 16px; height: 8px; border-block: 2.5px solid currentColor; transition: transform .3s var(--ease); }
.nav.is-open .nav__burger { transform: rotate(90deg); }

/* =========================================================
   Hero
   ========================================================= */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Opening: 16:9 light that follows the cursor (opening.js). Its colours come from the
   reference image, not the site palette. The background is the still frame without WebGL. */
.opening {
  position: relative;
  container-type: inline-size;   /* the title is sized from this frame's width */
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background:
    radial-gradient(82% 62% at 50% 100%, #d14526 72%, transparent 100%),
    linear-gradient(to top, #bb352a, transparent 20%),
    linear-gradient(102deg, transparent 47%, #b56933 53%, transparent 58%),
    var(--ink);
}
.opening__light { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
/* Darkens behind the header so it reads when the band passes under it */
.opening::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: calc(var(--nav-h, 60px) * 1.6);
  background: linear-gradient(to bottom, rgb(18 15 13 / .8), transparent);
  pointer-events: none;
}
/* LUISE centred over BAPTISTELLA, at the same size. BAPTISTELLA's letters run from one edge of the
   frame to the other and stand on the bottom edge, so its black runs into the page. opening.js keeps
   light behind them. Read from rendered pixels, in em: BAPTISTELLA's letters are 6.0783 wide; .0167 is
   the baseline to the line box's bottom; the shifts centre the letters, not their spacing. */
.opening__title {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(-.0167em - 1px);
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  color: var(--ink);
  font: 900 calc(100vw / 6.0783)/.76 var(--display);
  font-size: calc(100cqw / 6.0783);
  letter-spacing: -.05em;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
}
.opening__title > span { transform: translateX(-.0497em); }
.opening__title > span:first-of-type { transform: translateX(-.032em); }
/* PORTFOLIO above the name, in Helvetica (the user's choice for this one word): centred on desktop,
   on the left on phones */
.opening__sub {
  margin-bottom: .45em;
  font: italic 300 max(15px, 2.2vw)/1 "Helvetica Neue", Helvetica, Arial, sans-serif;
  letter-spacing: -.02em;
  text-transform: uppercase;
}

/* Full-screen showreel, edge to edge. Not on the page for now: the opening took its place */
.hero { height: 100vh; height: 100svh; }
.reel { height: 100%; }
.reel__screen {
  position: relative;
  height: 100%;
  overflow: hidden;
  background: var(--ink);
  color: var(--light);
}
.reel__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* Placeholder until the showreel goes in: drifting stripes and a playhead */
.reel__stripes {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(115deg, transparent 0 46px, rgb(230 48 34 / .08) 46px 48px);
  animation: drift 20s linear infinite;
}
@keyframes drift { to { background-position: 530px 0; } }
.reel__playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  background: var(--accent);
  animation: scrub 9s var(--ease) infinite alternate;
}
@keyframes scrub { from { left: 6%; } to { left: 94%; } }
/* Darkens the top (header) and bottom (title) so white text reads over any frame */
.reel__screen::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgb(18 15 13 / .55) 0, transparent 18%, transparent 58%, rgb(18 15 13 / .75) 100%);
  pointer-events: none;
}
.reel__bottom {
  position: absolute;
  z-index: 1;
  inset: auto var(--pad) clamp(24px, 3vw, 48px);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
}
.reel__title {
  margin: 0;
  font: 900 clamp(44px, 9vw, 160px)/.8 var(--display);
  letter-spacing: -.05em;
  text-transform: uppercase;
}
.reel__title em {
  display: block;
  margin-top: .35em;
  font: italic 400 clamp(16px, 1.6vw, 26px)/1 var(--text);
  letter-spacing: 0;
  text-transform: none;
}

/* =========================================================
   Skills list + floating project preview
   ========================================================= */
.skills { padding: clamp(80px, 11vw, 170px) var(--pad) clamp(60px, 8vw, 120px); }

.skills__list {
  position: relative;
  z-index: 2;            /* text sits above the floating card */
  margin: 0;
  padding: 0;
  list-style: none;
}
.skill {
  display: grid;
  grid-template-columns: clamp(32px, 4vw, 64px) 1fr auto;
  align-items: center;
  gap: 16px;
  padding: .14em 0 .08em;
  border-bottom: 2px solid var(--light);
  color: var(--light);
  font-size: clamp(2.4rem, 6.4vw, 7rem);
  text-decoration: none;
  transition: color .25s;
}
.skill:focus-visible { outline-offset: -3px; }
.skill__num { font: italic 400 clamp(14px, 1.2vw, 18px)/1 var(--text); }
.skill__name {
  font-family: var(--display);
  font-weight: 900;
  line-height: .95;
  letter-spacing: -.045em;
  transition: transform .45s var(--ease);
}
.skill__proj {
  font: italic 400 clamp(14px, 1.2vw, 18px)/1.2 var(--text);
  text-align: right;
  clip-path: inset(0 0 100% 0);
  transform: translateY(.6em);
  transition: clip-path .4s var(--ease), transform .4s var(--ease);
}

.skills__list.has-active .skill { color: rgb(230 48 34 / .3); }
.skills__list .skill.is-active { color: var(--light); }
.skill.is-active .skill__name { color: var(--accent); transform: translateX(.12em); }
.skill.is-active .skill__proj { clip-path: inset(0 0 -10% 0); transform: none; }

.preview {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1;
  width: clamp(240px, 24vw, 380px);
  aspect-ratio: 4 / 5;
  pointer-events: none;
  visibility: hidden;
  transition: visibility 0s .6s;
}
.preview.is-on { visibility: visible; transition-delay: 0s; }
.preview > .preview__card {
  position: absolute;
  inset: 0;
  clip-path: inset(100% 0 0 0);
  transition: clip-path .55s var(--ease);
}
.preview__card.is-active { clip-path: inset(0 0 0 0); }

/* Touch: the card docks bottom-right instead of following a cursor */
.preview.is-docked {
  top: auto;
  left: auto;
  right: 16px;
  bottom: 16px;
  z-index: 30;
  width: min(44vw, 240px);
  transform: none !important;
}
.preview__media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: var(--ink); }
.preview__cap {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: 6px 8px 5px;
  background: var(--ink);
  color: var(--light);
  font: 900 12px/1 var(--display);
  letter-spacing: .05em;
  text-transform: uppercase;
}

/* =========================================================
   Selected work (bordered grid)
   ========================================================= */
.work { padding: 0 var(--pad) clamp(60px, 9vw, 140px); }

.work__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  margin-top: 28px;
  border: 2px solid var(--ink);
  background: var(--ink);
}
.tile {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--light);
  color: var(--ink);
  text-decoration: none;
}
.tile__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: .5em .45em .4em;
  border-bottom: 2px solid var(--ink);
  font: 900 clamp(17px, 1.9vw, 34px)/1 var(--display);
  letter-spacing: -.035em;
  text-transform: uppercase;
  transition: background-color .2s, color .2s;
}
.arrow { flex: none; width: .8em; height: .8em; fill: none; stroke: currentColor; stroke-width: 3.2; }
.tile__img { display: block; height: clamp(320px, 32vw, 520px); overflow: hidden; background: var(--ink); }
.tile__img img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.tile__meta {
  padding: .7em .8em;
  border-top: 2px solid var(--ink);
  font-size: 15px;
  font-style: italic;
}
.tile:hover .tile__head { background: var(--accent); color: var(--ink); }
.tile:hover .tile__img img { transform: scale(1.05); }

/* =========================================================
   About: black, edge to edge. The video sets the height.
   ========================================================= */
.about {
  margin-bottom: clamp(60px, 9vw, 140px);
  background: var(--ink);
  color: var(--light);
}
.about__main {
  display: grid;
  grid-template-columns: 1fr clamp(320px, 36vw, 560px);
}
.about__text {
  display: flex;
  flex-direction: column;
  padding: clamp(28px, 4vw, 64px) var(--pad);
}
.about__title {
  margin: .12em 0 auto;
  padding-bottom: .4em;
  font: 900 clamp(48px, 10vw, 168px)/.8 var(--display);
  letter-spacing: -.055em;
  text-transform: uppercase;
}
.about__edu { margin-bottom: clamp(24px, 3vw, 40px); }
.about__edu h3 {
  margin: 0;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--light);
  font: 900 13px/1 var(--display);
  letter-spacing: .06em;
  text-transform: uppercase;
}
.about__edu ul { margin: 0; padding: 0; list-style: none; }
.about__edu li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgb(230 48 34 / .22);
  font-size: clamp(16px, 1.3vw, 19px);
}
.about__edu li > span:last-child { font-style: italic; white-space: nowrap; }
.about__text .pill { align-self: flex-start; }

/* 4:5 portrait video; stretches with the row and crops if the text is taller */
.about__media {
  position: relative;
  aspect-ratio: 4 / 5;
  align-self: stretch;
  overflow: hidden;
  background: var(--light);
}
.about__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* Tools: two rows of tags, the first drifts left, the second right */
.tools { padding: clamp(28px, 3.4vw, 52px) 0 clamp(32px, 4vw, 64px); border-top: 2px solid var(--light); }
.tools__label {
  margin: 0 var(--pad) clamp(14px, 1.6vw, 22px);
  font: 900 13px/1 var(--display);
  letter-spacing: .06em;
  text-transform: uppercase;
}
.tools__row + .tools__row { margin-top: clamp(8px, .9vw, 14px); }
.tools__row li { padding-right: clamp(8px, .9vw, 14px); }
.tag {
  display: block;
  padding: .1em .2em .02em;
  font: italic 900 clamp(40px, 6.6vw, 112px)/.92 var(--display);
  letter-spacing: -.045em;
  text-transform: uppercase;
  white-space: nowrap;
}
.tag--1 { background: var(--accent); color: var(--ink); }
.tag--2 { background: var(--light); color: var(--bg); }
.tag--3 { background: var(--bg); color: var(--light); }
.tag--4 { background: var(--light); color: var(--ink); }
.tag--5 { background: var(--bg); color: var(--accent); }

/* =========================================================
   Worked with: logo carousel
   ========================================================= */
.clients {
  display: flex;
  align-items: stretch;
  border-block: 2px solid var(--ink);
  background: var(--accent);
  color: var(--light);
}
.clients__tab {
  flex: none;
  display: flex;
  align-items: center;
  padding: 0 clamp(14px, 1.6vw, 24px);
  border-right: 2px solid var(--ink);
  background: var(--bg);
  color: var(--light);
  font: 900 12px/1 var(--display);
  letter-spacing: .07em;
  text-transform: uppercase;
}
.marquee { overflow: hidden; }
.clients .marquee { flex: 1; min-width: 0; height: clamp(96px, 9vw, 140px); }
.marquee.is-static { overflow-x: auto; }
.marquee__track {
  display: flex;
  align-items: center;
  width: max-content;
  height: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  will-change: transform;
}
/* Logos are white artwork. Each one sets --s (in index.html) so they read at the same visual size */
.logo {
  --h: clamp(36px, 3.8vw, 58px);
  display: flex;
  align-items: center;
  padding: 0 clamp(32px, 4vw, 72px);
}
.logo img { display: block; width: auto; height: calc(var(--h) * var(--s, 1)); filter: brightness(0); }  /* white artwork shown black on the light band */

/* =========================================================
   No brief: all black, posters follow the cursor
   ========================================================= */
.nobrief {
  position: relative;
  isolation: isolate;          /* the title's blend mode only mixes with the posters */
  display: grid;
  place-items: center;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: var(--ink);
  color: var(--light);
  cursor: crosshair;
  touch-action: manipulation;
}
.nobrief__stage { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.nobrief__poster {
  position: absolute;
  display: block;
  width: clamp(150px, 17vw, 280px);
  height: auto;
  will-change: transform;
}
.nobrief__text {
  position: relative;
  z-index: 2;
  padding: 0 var(--pad);
  text-align: center;
  mix-blend-mode: difference;  /* stays readable on top of any poster */
  pointer-events: none;
}
.nobrief__title {
  margin: 0;
  font: 900 clamp(48px, 9vw, 160px)/.86 var(--display);
  letter-spacing: -.05em;
}

/* =========================================================
   Contact + footer
   ========================================================= */
.contact {
  padding: clamp(32px, 4vw, 56px) var(--pad) clamp(48px, 6vw, 88px);
  background: var(--bg);
}
.contact__cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(18px, 2vw, 28px);
  margin-top: clamp(36px, 5vw, 64px);
}
/* Small black rectangle, tilted a little to the right; straightens on hover */
.contact__card {
  display: inline-block;
  padding: .22em .42em .26em;
  background: var(--ink);
  color: var(--light);
  font: 900 clamp(30px, 4.4vw, 68px)/1 var(--display);
  letter-spacing: -.045em;
  text-decoration: none;
  transform: rotate(4deg);
  transition: transform .5s var(--ease);
}
.contact__card:hover { transform: rotate(1deg) scale(1.03); }
.contact__mail {
  color: var(--light);
  font: italic 400 clamp(16px, 1.6vw, 22px)/1.2 var(--text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .2em;
  overflow-wrap: anywhere;
}
.contact__mail:hover { color: var(--accent); }

.footer {
  display: flex;
  border-top: 2px solid var(--light);
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px 24px;
  padding: 14px var(--pad);
  background: var(--bg);
  font: 900 12px/1 var(--display);
  letter-spacing: .05em;
  text-transform: uppercase;
}
.footer a { text-decoration: none; }
.footer a:hover { color: var(--accent); }
.footer__social { display: flex; flex-wrap: wrap; gap: 8px 18px; }

/* =========================================================
   Project view (full-screen dialog)
   ========================================================= */
html.has-dialog { overflow: hidden; }
.project {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  overflow-y: auto;
  background: var(--ink);
  color: var(--light);
  overscroll-behavior: contain;
}
.project[open] { animation: project-in .6s var(--ease); }
@keyframes project-in { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0); } }
.project::backdrop { background: var(--ink); }

.project__bar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px var(--pad);
  border-bottom: 2px solid var(--light);
  background: var(--ink);
  font: 900 13px/1 var(--display);
  letter-spacing: .06em;
  text-transform: uppercase;
}
.project__close {
  padding: 10px 14px 9px;
  border: 0;
  background: var(--light);
  color: var(--ink);
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}
.project__close:hover { background: var(--accent); color: var(--ink); }

/* A project's opening video: the first thing on its page, whole, fitting the screen under the bar */
.project__hero video {
  display: block;
  width: 100%;
  max-height: calc(100vh - 62px);
  max-height: calc(100svh - 62px);
  object-fit: contain;
  background: var(--ink);
}

.project__body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(20px, 3vw, 48px) clamp(24px, 4vw, 72px);
  padding: clamp(28px, 4vw, 64px) var(--pad) clamp(40px, 6vw, 96px);
}
.project__title {
  grid-column: 1 / -1;
  margin: 0;
  font: 900 clamp(52px, 11vw, 200px)/.82 var(--display);
  letter-spacing: -.055em;
  text-transform: uppercase;
}
.project__meta { margin: 0; align-self: start; }
.project__meta div {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgb(230 48 34 / .22);
}
.project__meta div:first-child { border-top: 2px solid var(--light); }
.project__meta dt, .project__deliv h3 {
  margin: 0;
  font: 900 13px/1.3 var(--display);
  letter-spacing: .06em;
  text-transform: uppercase;
}
.project__meta dd { margin: 0; font-size: 17px; font-style: italic; }
.project__text { grid-row: span 2; font-size: clamp(18px, 1.5vw, 23px); line-height: 1.45; }
.project__text p { margin: 0 0 1em; }
.project__deliv h3 { padding-bottom: 10px; border-bottom: 2px solid var(--light); }
.project__deliv ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; padding: 0; list-style: none; }
.project__deliv li {
  padding: 6px 9px 5px;
  background: var(--light);
  color: var(--ink);
  font: 900 12px/1 var(--display);
  letter-spacing: .04em;
  text-transform: uppercase;
}
/* Gallery: centered column at half the page width (full width on phones) */
.project__media { grid-column: 1 / -1; justify-self: center; display: grid; gap: clamp(12px, 1.6vw, 24px); width: 50%; }
.project__media img, .project__media video { display: block; width: 100%; height: auto; background: #000; }
.project__next {
  grid-column: 1 / -1;
  justify-self: start;
  padding: 0;
  border: 0;
  background: none;
  color: var(--light);
  font: 900 clamp(28px, 4vw, 64px)/1 var(--display);
  letter-spacing: -.04em;
  text-transform: uppercase;
  text-align: left;
  cursor: pointer;
}
.project__next span { display: block; margin-bottom: .3em; font: italic 400 16px/1 var(--text); letter-spacing: 0; text-transform: none; }
.project__next:hover { color: var(--accent); }
.project__meta div[hidden] { display: none; }

/* A project's posts: one row, full width, moved with the arrows, a swipe or the keyboard */
.project__media--wide { width: 100%; min-width: 0; grid-template-columns: minmax(0, 1fr); }
.posts { min-width: 0; }
.posts__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  margin-bottom: clamp(14px, 1.6vw, 22px);
  border-bottom: 2px solid var(--light);
}
.posts__title { margin: 0; font: 900 13px/1.3 var(--display); letter-spacing: .06em; text-transform: uppercase; }
.posts__title span { font: italic 400 15px/1 var(--text); letter-spacing: 0; text-transform: none; }
.posts__nav { display: flex; gap: 8px; min-height: 52px; }
.posts__nav[hidden] { display: none; }
.posts__head:has(.posts__nav[hidden]) { min-height: 52px; }   /* same height with or without arrows */
.posts__btn {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 2px solid var(--light);
  background: none;
  color: var(--light);
  font-size: 22px;
  cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s;
}
.posts__btn:hover:not(:disabled), .posts__btn:focus-visible { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.posts__btn:active:not(:disabled) { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.posts__btn:disabled { opacity: .3; cursor: default; }
.posts__track {
  position: relative;                    /* posts' offsetLeft is measured from the row */
  display: flex;
  gap: clamp(12px, 1.4vw, 20px);
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.posts__track::-webkit-scrollbar { display: none; }
.posts__item { flex: none; scroll-snap-align: start; }
.project__media .posts__item img { display: block; width: auto; height: min(62vh, 560px); background: #000; }
.project__media .posts__item video { display: block; width: auto; height: min(70vh, 640px); aspect-ratio: 9 / 16; background: #000; }

/* =========================================================
   Sub-pages: skill pages (skill.html?s=…) and About (about.html)
   ========================================================= */
.page #main { padding-top: var(--nav-h, 56px); }   /* clears the fixed header */
.about--page { margin-bottom: 0; }

/* Contact page: title and address on one side, the form on the other */
.contactpage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  padding: clamp(28px, 4vw, 64px) var(--pad) clamp(64px, 8vw, 120px);
}
.contactpage__title {
  margin: 0 0 .28em;
  font: 900 clamp(48px, 10vw, 168px)/.8 var(--display);
  letter-spacing: -.055em;
  text-transform: uppercase;
}
.form { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 2.4vw, 36px) clamp(18px, 2vw, 32px); }
.form[hidden] { display: none; }
.field { min-width: 0; }
.field--wide, .form__failed { grid-column: 1 / -1; }
.field label {
  display: block;
  margin-bottom: 8px;
  font: 900 13px/1.3 var(--display);
  letter-spacing: .06em;
  text-transform: uppercase;
}
.field label em { margin-left: .3em; font: italic 400 14px/1 var(--text); letter-spacing: 0; text-transform: none; }
.field__hint { margin: 0 0 12px; font: italic 400 16px/1.3 var(--text); }
.field input, .field textarea {
  display: block;
  width: 100%;
  padding: 8px 0;
  border: 0;
  border-bottom: 2px solid var(--light);
  border-radius: 0;
  background: none;
  color: var(--light);
  font: 400 clamp(17px, 1.4vw, 20px)/1.4 var(--text);
}
.field textarea { padding: 12px 14px; border: 2px solid var(--light); resize: vertical; }
.field input:focus, .field textarea:focus, .field [aria-invalid="true"] { border-color: var(--accent); }
/* Browsers paint autofilled fields light: keep them on black */
.field input:-webkit-autofill {
  -webkit-text-fill-color: var(--light);
  box-shadow: 0 0 0 100px var(--ink) inset;
  caret-color: var(--light);
}
.field__error { margin: 8px 0 0; color: var(--accent); font: italic 400 16px/1.3 var(--text); }
.form__failed { margin: 0; font: italic 400 clamp(17px, 1.4vw, 20px)/1.4 var(--text); }
.form__failed span { color: var(--accent); }
/* Answers "wanna talk more?": the same tilted rectangle, in the opposite colours */
.form__send {
  grid-column: 1 / -1;
  justify-self: start;
  margin-top: 4px;
  padding: .22em .42em .26em;
  border: 0;
  background: var(--light);
  color: var(--ink);
  font: 900 clamp(30px, 4.4vw, 68px)/1 var(--display);
  letter-spacing: -.045em;
  cursor: pointer;
  transform: rotate(4deg);
  transition: transform .5s var(--ease), background-color .2s;
}
.form__send:hover, .form__send:focus-visible, .form__send:active { background: var(--accent); transform: rotate(1deg) scale(1.03); }
.form__send:disabled { background: var(--light); cursor: progress; opacity: .6; transform: rotate(4deg); }
.form__done:focus { outline: none; }
.form__doneTitle { margin: 0 0 .3em; font: 900 clamp(36px, 5vw, 84px)/.95 var(--display); letter-spacing: -.05em; }
.form__doneText { margin: 0; font: italic 400 clamp(18px, 1.6vw, 24px)/1.3 var(--text); }

.skillpage { padding: clamp(28px, 4vw, 64px) var(--pad) clamp(60px, 8vw, 120px); }
.skillpage__back {
  display: inline-block;
  margin-bottom: clamp(28px, 4vw, 56px);
  color: var(--light);
  font: 900 13px/1 var(--display);
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
}
.skillpage__back:hover { color: var(--accent); }
.skillpage__num { margin: 0; }
.skillpage__title {
  margin: .12em 0 .25em;
  font: 900 clamp(56px, 11vw, 200px)/.84 var(--display);
  letter-spacing: -.055em;
  text-transform: uppercase;
}
.skillpage__intro { max-width: 34ch; margin: 0; font-size: clamp(20px, 2vw, 30px); line-height: 1.3; }
.skillpage__count {
  margin: clamp(32px, 4vw, 56px) 0 0;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--light);
  font: 900 13px/1 var(--display);
  letter-spacing: .06em;
  text-transform: uppercase;
}

/* One row per project, image and text alternating sides */
.sproject {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  align-items: center;
  gap: clamp(24px, 4vw, 72px);
  padding: clamp(32px, 5vw, 80px) 0;
  border-bottom: 2px solid var(--light);
}
.sproject:nth-child(even) .sproject__media { order: 2; }
.sproject__media { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--ink); }
.sproject__media img, .sproject__media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease);
}
.sproject__media:hover img, .sproject__media:hover video { transform: scale(1.04); }
.sproject__num { font: italic 400 16px/1 var(--text); }
.sproject__title {
  margin: .25em 0 .2em;
  font: 900 clamp(40px, 6vw, 104px)/.86 var(--display);
  letter-spacing: -.05em;
  text-transform: uppercase;
}
.sproject__meta { margin: 0 0 1.2em; font-size: 17px; font-style: italic; }
.sproject__text { max-width: 46ch; margin: 0 0 1.6em; font-size: clamp(17px, 1.4vw, 21px); line-height: 1.45; }

.skillpage__others { margin-top: clamp(56px, 7vw, 110px); }
.skillpage__others h2 {
  margin: 0;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--light);
  font: 900 13px/1 var(--display);
  letter-spacing: .06em;
  text-transform: uppercase;
}
.skillpage__others ul { margin: 0; padding: 0; list-style: none; }
.skillpage__others a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: .16em 0 .1em;
  border-bottom: 2px solid var(--light);
  color: var(--light);
  font: 900 clamp(2rem, 5vw, 5rem)/.95 var(--display);
  letter-spacing: -.045em;
  text-decoration: none;
  transition: color .2s;
}
.skillpage__others a:hover { color: var(--accent); }
.skillpage__others .arrow { width: .5em; height: .5em; }

/* =========================================================
   Phone
   ========================================================= */
@media (max-width: 760px) {
  .nav { gap: 10px; }
  .nav__logo, .nav__title { font-size: 14px; }

  .contactpage, .form { grid-template-columns: 1fr; }
  .nav__menu { display: inline-flex; }
  .nav__links { display: none; }
  .nav.is-open .nav__links {
    position: fixed;
    inset: 0;
    z-index: -1;               /* under the bar's own text, over the page */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 6px;
    padding: 80px var(--pad) 40px;
    background: var(--bg);
    font-size: clamp(34px, 11vw, 56px);
    letter-spacing: -.035em;
  }
  .nav.is-open .nav__lang { margin-top: 28px; font-size: 18px; letter-spacing: .05em; }

  .reel__bottom { flex-direction: column; align-items: flex-start; }

  /* Phones (the user's mockup): the opening takes 82% of the screen, so the red line where "What I do"
     starts shows below it; the light is the desktop one. PORTFOLIO, then LUISE and BAPTIS on the left
     margin, TELLA on the right edge, standing on the bottom of the light. Measured bearings: L and B
     start .05em into their boxes, TELLA's A sticks out .05em on the right. */
  .opening { aspect-ratio: auto; height: 82vh; height: 82svh; }
  .opening__title { align-items: stretch; padding-left: var(--pad); font-size: 22cqw; line-height: .82; }
  .opening__title > span, .opening__title > span:first-of-type { transform: translateX(-.05em); }
  .opening__title > span.opening__last { display: flex; flex-direction: column; transform: none; }
  .opening__last > span:first-child { transform: translateX(-.05em); }
  .opening__last > span:last-child { align-self: flex-end; transform: translateX(-.05em); }
  .opening__sub { align-self: flex-start; margin-bottom: .62em; font-size: 5cqw; }
  .skills { padding-top: 20px; }

  /* Each skill on one line, all four the same size: the size is the smaller of the old one and the
     one that fits the language's longest name, plus the .12em nudge of the active line, beside the
     number. --fit = that name's width in em, measured in WebKit (+.18em of room). */
  .skill {
    --fit: 6.56;                                    /* Social Content */
    grid-template-columns: 26px 1fr;
    gap: 8px;
    font-size: min(clamp(2rem, 11vw, 3.4rem), calc((100vw - 2 * var(--pad) - 34px) / var(--fit)));
  }
  :lang(fr) .skill { --fit: 8.6; }                  /* Direction artistique */
  :lang(pt) .skill { --fit: 9.13; }                 /* Identidade de marca */
  .skill__name { white-space: nowrap; }
  .skill__proj { display: none; }

  .work__grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin-inline: calc(var(--pad) * -1);
    border-inline: 0;
  }
  .tile { flex: 0 0 78vw; scroll-snap-align: start; }
  .tile__img { height: 96vw; }

  .about__main { grid-template-columns: 1fr; }
  .about__title { margin-bottom: .2em; }
  /* In one column, WebKit (Safari) shrinks the stretched 4:5 frame to nothing, since its only child is
     positioned: the video vanished on phones. Here the video sits in the flow and sets the height. */
  .about__media { aspect-ratio: auto; align-self: start; }
  .about__video { position: static; display: block; height: auto; aspect-ratio: 4 / 5; }

  .sproject { grid-template-columns: 1fr; }
  .sproject:nth-child(even) .sproject__media { order: 0; }
  .project__body { grid-template-columns: 1fr; }
  .project__media { width: 100%; }
  .posts__btn { width: 44px; height: 44px; font-size: 18px; }
  .posts__item { width: 78%; }            /* the next post peeks in: there's more to swipe */
  .project__media .posts__item img, .project__media .posts__item video { width: 100%; height: auto; }
  .project__text { grid-row: auto; }
  .project__meta div { grid-template-columns: 6.5rem 1fr; }

  .clients { flex-direction: column; }
  .clients .marquee { flex: none; height: 96px; }
  .clients__tab { padding: 10px var(--pad); border-right: 0; border-bottom: 2px solid var(--ink); }

}

/* =========================================================
   Reduced motion
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reel__stripes, .reel__playhead { animation: none; }
  .skill__name, .tile__img img, .sproject__media img, .sproject__media video { transition: none; }
  .project[open] { animation: none; }
  .contact__card, .form__send, .posts__btn { transition: none; }
  .nav__logo, .nav__title { transition: none; }
}
