:root {
  color-scheme: dark light;
  --black: #090909;
  --ink: #121212;
  --paper: #f1f1ee;
  --white: #ffffff;
  --muted-dark: #a2a29e;
  --muted-light: #64645f;
  --line-dark: #333331;
  --line-light: #c8c8c3;
  --accent: #d8ff38;
  --gutter: 34px;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-synthesis: none;
  letter-spacing: 0;
}

* { box-sizing: border-box; letter-spacing: 0; }
html { scroll-behavior: smooth; }
#work, #cv, #about, #contact { scroll-margin-top: 90px; }
body { margin: 0; overflow-x: hidden; background: var(--black); color: var(--white); }
body.dialog-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; }
img, video { display: block; width: 100%; }

.site-header {
  position: fixed;
  z-index: 30;
  inset: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 14px var(--gutter);
  color: var(--white);
  transition: background 240ms ease, color 240ms ease, border-color 240ms ease;
}
.site-header.is-solid { background: rgba(9, 9, 9, .94); border-bottom: 1px solid var(--line-dark); backdrop-filter: blur(12px); }
.header-identity { display: flex; flex-direction: column; gap: 4px; line-height: 1; }
.header-identity strong { font-size: 17px; font-weight: 600; }
.header-identity span { font-size: 11px; color: #d0d0cc; }
.site-header nav { display: flex; gap: 28px; }
.site-header nav a { position: relative; padding: 8px 0; font-size: 12px; }
.site-header nav a::after { content: ""; position: absolute; inset: auto 0 3px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform 180ms ease; }
.site-header nav a:hover::after, .site-header nav a:focus-visible::after { transform: scaleX(1); transform-origin: left; }

.hero { position: relative; height: 100svh; min-height: 640px; overflow: hidden; background: #111; }
.hero-reel { position: absolute; inset: 0; height: 100%; object-fit: cover; }
.hero-shade { position: absolute; inset: 0; background: rgba(0, 0, 0, .28); pointer-events: none; }
.hero-copy { position: absolute; z-index: 2; left: var(--gutter); right: var(--gutter); bottom: 84px; }
.hero-copy h1 { margin: 0; max-width: 1300px; font-size: 118px; line-height: .88; font-weight: 600; }
.hero-copy p { margin: 22px 0 0; font-size: 24px; line-height: 1; }
.hero-meta { position: absolute; z-index: 2; right: var(--gutter); top: 112px; display: flex; gap: 22px; font-size: 11px; text-transform: uppercase; }
.hero-scroll { position: absolute; z-index: 2; left: var(--gutter); bottom: 24px; display: flex; align-items: center; gap: 12px; font-size: 11px; text-transform: uppercase; }
.reel-toggle { position: absolute; z-index: 3; right: var(--gutter); bottom: 22px; width: 34px; height: 34px; padding: 0; border: 1px solid rgba(255,255,255,.65); border-radius: 50%; background: rgba(0,0,0,.18); cursor: pointer; }
.pause-mark::before, .pause-mark::after { content: ""; position: absolute; top: 10px; width: 2px; height: 12px; background: white; }
.pause-mark::before { left: 13px; }
.pause-mark::after { right: 13px; }
.reel-toggle.is-paused .pause-mark::before { top: 9px; left: 13px; width: 0; height: 0; border-top: 7px solid transparent; border-bottom: 7px solid transparent; border-left: 10px solid white; background: transparent; }
.reel-toggle.is-paused .pause-mark::after { display: none; }

.work { background: var(--paper); color: var(--ink); padding: 96px var(--gutter) 150px; }
.work-intro { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .55fr); gap: 72px; align-items: end; padding-bottom: 96px; }
.work-intro h2 { margin: 0; max-width: 980px; font-size: 68px; line-height: .98; font-weight: 500; }
.work-intro p { margin: 0; max-width: 470px; color: var(--muted-light); font-size: 17px; line-height: 1.45; }

.project-flow { --project-row-gap: 62px; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 18px; row-gap: var(--project-row-gap); align-items: start; }
.span-8 { grid-column: span 8; }
.span-7 { grid-column: span 7; }
.span-6 { grid-column: span 6; }
.span-5 { grid-column: span 5; }
.span-4 { grid-column: span 4; }
.span-3 { grid-column: span 3; }
.project { min-width: 0; cursor: pointer; outline: none; }
.project-media { position: relative; overflow: hidden; background: #d7d7d2; }
.project-media img, .project-media video { height: 100%; object-fit: cover; transition: transform 650ms cubic-bezier(.2,.7,.2,1), opacity 220ms ease; }
.project-media video { position: absolute; inset: 0; opacity: 0; }
.project.is-playing .project-media video { opacity: 1; }
.project:hover .project-media img, .project:focus-visible .project-media img { transform: scale(1.018); }
.project:focus-visible .project-media { outline: 3px solid var(--ink); outline-offset: 4px; }
.project-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; padding-top: 12px; border-top: 1px solid var(--ink); }
.project-meta h3, .project-meta p { margin: 0; }
.project-meta h3 { font-size: 15px; font-weight: 600; }
.project-meta p { color: var(--muted-light); font-size: 10px; text-align: right; text-transform: uppercase; }
.shape-panoramic .project-media { aspect-ratio: 2.2 / 1; }
.shape-landscape .project-media { aspect-ratio: 4 / 3; }
.shape-wide .project-media { aspect-ratio: 16 / 9; }
.shape-square .project-media { aspect-ratio: 1 / 1; }
.shape-tall .project-media, .shape-portrait .project-media { aspect-ratio: 4 / 5; }
.crop-duro .project-media img, .crop-duro .project-media video { object-position: 54% center; }
.crop-omoda .project-media img, .crop-omoda .project-media video { object-position: 52% center; }
.crop-costa .project-media img, .crop-costa .project-media video { object-position: 50% center; }
.crop-rosalia .project-media img { object-position: 68% center; }

/* Each desktop row is a deliberate editorial composition, not a by-product of aspect ratios. */
@media (min-width: 761px) {
  .project-meta { min-height: 43px; }
  .project-flow { --ea-stack-gap: 20px; --ea-stack-media-height: clamp(235px, 18vw, 280px); }

  .project-flow > .project:nth-child(1) { grid-column: span 7; }
  .project-flow > .project:nth-child(2) { grid-column: span 5; }
  .project-flow > .project:nth-child(1) .project-media,
  .project-flow > .project:nth-child(2) .project-media { height: clamp(390px, 34vw, 520px); aspect-ratio: auto; }

  .project-flow > .project:nth-child(3) { grid-column: span 5; }
  .project-flow > .project:nth-child(4) { grid-column: span 7; }
  .project-flow > .project:nth-child(3) .project-media,
  .project-flow > .project:nth-child(4) .project-media { height: clamp(310px, 28vw, 420px); aspect-ratio: auto; }

  .project-flow > .project:nth-child(5) { grid-column: 1 / span 7; grid-row: 3 / span 2; }
  .project-flow > .project:nth-child(6) { grid-column: 8 / span 5; grid-row: 3; }
  .project-flow > .project:nth-child(7) { grid-column: 8 / span 5; grid-row: 4; }
  .project-flow > .project:nth-child(5) .project-media { height: calc(var(--ea-stack-media-height) + var(--ea-stack-media-height) + var(--ea-stack-gap) + 43px); aspect-ratio: auto; }
  .project-flow > .project:nth-child(6) .project-media,
  .project-flow > .project:nth-child(7) .project-media { height: var(--ea-stack-media-height); aspect-ratio: auto; }
  .project-flow > .project:nth-child(7) { margin-top: calc(var(--ea-stack-gap) - var(--project-row-gap)); }

  .project-flow > .project:nth-child(8) { grid-column: span 5; }
  .project-flow > .project:nth-child(9) { grid-column: span 7; }
  .project-flow > .project:nth-child(8) .project-media,
  .project-flow > .project:nth-child(9) .project-media { height: clamp(300px, 28vw, 410px); aspect-ratio: auto; }

  .project-flow > .project:nth-child(10) { grid-column: span 7; }
  .project-flow > .project:nth-child(11) { grid-column: span 5; }
  .project-flow > .project:nth-child(10) .project-media,
  .project-flow > .project:nth-child(11) .project-media { height: clamp(300px, 27vw, 395px); aspect-ratio: auto; }

  .project-flow > .project:nth-child(12) { grid-column: span 5; }
  .project-flow > .project:nth-child(13) { grid-column: span 7; }
  .project-flow > .project:nth-child(12) .project-media,
  .project-flow > .project:nth-child(13) .project-media { height: clamp(300px, 27vw, 395px); aspect-ratio: auto; }

  .project-flow > .project:nth-child(14) { grid-column: span 5; }
  .project-flow > .project:nth-child(15) { grid-column: span 3; }
  .project-flow > .project:nth-child(16) { grid-column: span 4; }
  .project-flow > .project:nth-child(14) .project-media,
  .project-flow > .project:nth-child(15) .project-media,
  .project-flow > .project:nth-child(16) .project-media { height: clamp(250px, 22vw, 330px); aspect-ratio: auto; }

  .project-flow > .project:nth-child(17) { grid-column: span 4; }
  .project-flow > .project:nth-child(18) { grid-column: span 5; }
  .project-flow > .project:nth-child(19) { grid-column: span 3; }
  .project-flow > .project:nth-child(17) .project-media,
  .project-flow > .project:nth-child(18) .project-media,
  .project-flow > .project:nth-child(19) .project-media { height: clamp(330px, 30vw, 440px); aspect-ratio: auto; }

  .project-flow > .project:nth-child(20),
  .project-flow > .project:nth-child(21) { grid-column: span 6; }
  .project-flow > .project:nth-child(20) .project-media,
  .project-flow > .project:nth-child(21) .project-media { height: clamp(280px, 25vw, 370px); aspect-ratio: auto; }

  .project-flow > .project:nth-child(22) { grid-column: span 5; }
  .project-flow > .project:nth-child(23) { grid-column: span 7; }
  .project-flow > .project:nth-child(22) .project-media,
  .project-flow > .project:nth-child(23) .project-media { height: clamp(300px, 27vw, 395px); aspect-ratio: auto; }

  .project-flow > .project:nth-child(24),
  .project-flow > .project:nth-child(25) { grid-column: span 6; }
  .project-flow > .project:nth-child(24) .project-media,
  .project-flow > .project:nth-child(25) .project-media { height: clamp(260px, 23vw, 340px); aspect-ratio: auto; }

  .project-flow > .project:nth-child(26),
  .project-flow > .project:nth-child(27),
  .project-flow > .project:nth-child(28) { grid-column: span 4; }
  .project-flow > .project:nth-child(26) .project-media,
  .project-flow > .project:nth-child(27) .project-media,
  .project-flow > .project:nth-child(28) .project-media { height: clamp(260px, 23vw, 340px); aspect-ratio: auto; }

  .project-flow > .project:nth-child(29),
  .project-flow > .project:nth-child(30) { grid-column: span 6; }
  .project-flow > .project:nth-child(29) .project-media,
  .project-flow > .project:nth-child(30) .project-media { height: clamp(280px, 25vw, 365px); aspect-ratio: auto; }

  .project-flow > .project:nth-child(31) { grid-column: span 4; }
  .project-flow > .project:nth-child(32) { grid-column: span 8; }
  .project-flow > .project:nth-child(31) .project-media,
  .project-flow > .project:nth-child(32) .project-media { height: clamp(300px, 27vw, 400px); aspect-ratio: auto; }
}

.credits-band { background: var(--black); color: var(--white); padding: 120px var(--gutter); }
.credits-heading { display: grid; grid-template-columns: .34fr .66fr; gap: 48px; align-items: start; padding-bottom: 80px; border-bottom: 1px solid var(--line-dark); }
.credits-heading > p, .section-label { margin: 0; color: var(--accent); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.credits-heading h2 { margin: 0; max-width: 860px; font-size: 68px; line-height: .98; font-weight: 500; }
.credits-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line-dark); }
.credits-grid > div { min-height: 260px; padding: 30px 24px 30px 0; border-right: 1px solid var(--line-dark); }
.credits-grid > div:not(:first-child) { padding-left: 24px; }
.credits-grid > div:last-child { border-right: 0; }
.credits-grid span { color: var(--muted-dark); font-size: 11px; text-transform: uppercase; }
.credits-grid p { margin: 50px 0 0; font-size: 19px; line-height: 1.45; }
.cv-link { display: flex; justify-content: space-between; padding: 24px 0 4px; font-size: 15px; }

.about { display: grid; grid-template-columns: .28fr .72fr; gap: 54px; background: #ffffff; color: var(--ink); padding: 128px var(--gutter); }
.about .section-label { color: #445500; }
.about-copy h2 { margin: 0; max-width: 970px; font-size: 72px; line-height: .98; font-weight: 500; }
.about-copy > p { max-width: 700px; margin: 48px 0 0; color: var(--muted-light); font-size: 20px; line-height: 1.5; }
.about-facts { grid-column: 2; display: grid; grid-template-columns: repeat(3, 1fr); margin: 90px 0 0; border-top: 1px solid var(--line-light); }
.about-facts > div { padding: 20px 20px 0 0; border-right: 1px solid var(--line-light); }
.about-facts > div:not(:first-child) { padding-left: 20px; }
.about-facts > div:last-child { border-right: 0; }
.about-facts dt { color: var(--muted-light); font-size: 11px; text-transform: uppercase; }
.about-facts dd { margin: 28px 0 0; font-size: 17px; }

.contact { min-height: 72vh; display: flex; flex-direction: column; justify-content: space-between; padding: 72px var(--gutter) 28px; background: var(--accent); color: #0c0c0c; }
.contact > p { margin: 0; font-size: 14px; }
.contact > a { align-self: flex-start; font-size: 118px; line-height: .9; font-weight: 600; }
.contact > .contact-address { font-size: clamp(16px, 2.4vw, 28px); overflow-wrap: anywhere; }
.contact-bottom { display: flex; justify-content: space-between; padding-top: 22px; border-top: 1px solid rgba(0,0,0,.5); font-size: 11px; text-transform: uppercase; }

.project-dialog { width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 0; border: 0; background: var(--paper); color: var(--ink); }
.project-dialog::backdrop { background: rgba(0,0,0,.7); }
.dialog-close { position: fixed; z-index: 2; top: 20px; right: 24px; width: 42px; height: 42px; padding: 0 0 4px; border: 1px solid var(--ink); border-radius: 50%; background: var(--paper); color: var(--ink); font-size: 30px; line-height: 1; cursor: pointer; }
.dialog-layout { min-height: 100%; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(360px, .7fr); }
.dialog-visual { position: relative; min-height: 100vh; background: #161616; }
.dialog-visual img { height: 100%; min-height: 100vh; object-fit: cover; }
.dialog-play { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 66px; height: 66px; padding: 0; border: 1px solid rgba(255,255,255,.82); border-radius: 50%; background: rgba(0,0,0,.3); color: white; cursor: pointer; transform: translate(-50%, -50%); transition: transform 180ms ease, background 180ms ease; }
.dialog-play:hover, .dialog-play:focus-visible { background: rgba(0,0,0,.68); transform: translate(-50%, -50%) scale(1.08); }
.dialog-play span { margin-left: 3px; font-size: 19px; line-height: 1; }
.dialog-play[hidden] { display: none; }
.dialog-gallery { position: absolute; inset: min(calc(100dvh - 108px), calc(100% - 108px)) 24px auto; height: 84px; display: flex; gap: 8px; padding: 6px; overflow-x: auto; background: rgba(0,0,0,.55); scrollbar-width: thin; }
.dialog-gallery[hidden] { display: none; }
.dialog-gallery button { flex: 1 0 64px; max-width: 130px; min-height: 48px; aspect-ratio: 2 / 1; padding: 0; overflow: hidden; border: 2px solid transparent; background: #161616; cursor: pointer; }
.dialog-gallery button[aria-pressed="true"] { border-color: white; }
.dialog-gallery button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dialog-gallery img { width: 100%; height: 100%; min-height: 0; object-fit: cover; }
.dialog-copy { align-self: end; padding: 100px 58px 60px; }
.dialog-copy > p:first-child { margin: 0 0 24px; color: var(--muted-light); font-size: 11px; text-transform: uppercase; }
.dialog-copy h2 { margin: 0; font-size: 64px; line-height: .94; font-weight: 500; overflow-wrap: anywhere; }
.dialog-summary { margin: 34px 0 24px; color: var(--muted-light); font-size: 17px; line-height: 1.5; }
.dialog-films { display: flex; flex-wrap: wrap; gap: 14px 22px; margin: 0 0 32px; }
.dialog-films[hidden] { display: none; }
.dialog-film-link { padding: 8px 0; font-size: 15px; line-height: 1.4; text-decoration: underline; text-underline-offset: 5px; }
.dialog-film-link:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.dialog-scope { margin: 0 0 44px; color: var(--ink); font-size: 11px; font-weight: 600; line-height: 1.4; }
.dialog-copy dl { margin: 0; border-top: 1px solid var(--line-light); }
.dialog-copy dl div { display: grid; grid-template-columns: 100px 1fr; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--line-light); }
.dialog-copy dt { color: var(--muted-light); font-size: 10px; text-transform: uppercase; }
.dialog-copy dd { margin: 0; font-size: 12px; line-height: 1.4; }
.dialog-player { position: fixed; z-index: 6; inset: 0; display: grid; place-items: center; padding: 80px; background: rgba(0,0,0,.97); }
.dialog-player[hidden] { display: none; }
.dialog-player-close { position: fixed; z-index: 1; top: 20px; right: 24px; width: 42px; height: 42px; padding: 0 0 4px; border: 1px solid rgba(255,255,255,.72); border-radius: 50%; background: rgba(0,0,0,.35); color: white; font-size: 30px; line-height: 1; cursor: pointer; }
.dialog-player-content { width: min(1480px, 100%); display: grid; justify-items: center; gap: 18px; }
.dialog-player-bar { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 12px 24px; width: 100%; color: white; }
.dialog-player-bar p { flex: 1 1 240px; margin: 0; font-size: 15px; line-height: 1.4; }
.dialog-player-bar a { flex: 0 0 auto; padding: 6px 0; font-size: 14px; text-decoration: underline; text-underline-offset: 4px; }
.dialog-player-bar a:focus-visible { outline: 2px solid white; outline-offset: 4px; }
.dialog-player-frame { width: min(100%, calc((100dvh - 260px) * 16 / 9)); aspect-ratio: 16 / 9; background: #050505; }
.dialog-player-frame iframe { width: 100%; height: 100%; border: 0; }
.dialog-player-status { margin: 0; color: white; font-size: 14px; line-height: 1.5; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-reel { display: none; }
  .hero { background: url("media/selected/cupra/car-crowd-official.jpg") center / cover no-repeat; }
  .project video { display: none; }
  .project-media img { transition: none; }
  .reel-toggle { display: none; }
}

@media (max-width: 1050px) {
  :root { --gutter: 24px; }
  .hero-copy h1, .contact > a { font-size: 82px; }
  .work-intro h2, .credits-heading h2, .about-copy h2 { font-size: 54px; }
  .project-flow { --project-row-gap: 44px; }
  .credits-grid { grid-template-columns: repeat(2, 1fr); }
  .credits-grid > div:nth-child(2) { border-right: 0; }
  .credits-grid > div:nth-child(-n+2) { border-bottom: 1px solid var(--line-dark); }
  .dialog-layout { grid-template-columns: 1fr 420px; }
  .dialog-copy h2 { font-size: 52px; }
}

@media (max-width: 760px) {
  :root { --gutter: 18px; }
  .site-header { min-height: 66px; }
  .header-identity span { display: none; }
  .site-header nav { gap: 14px; }
  .site-header nav a { font-size: 11px; }
  .hero { min-height: 620px; }
  .hero-copy { bottom: 94px; }
  .hero-copy h1 { max-width: 420px; font-size: 58px; line-height: .9; }
  .hero-copy p { margin-top: 16px; font-size: 18px; }
  .hero-meta { top: 90px; left: var(--gutter); right: auto; }
  .hero-meta span:last-child { display: none; }
  .work { padding-top: 72px; padding-bottom: 96px; }
  .work-intro { grid-template-columns: 1fr; gap: 28px; padding-bottom: 70px; }
  .work-intro h2, .credits-heading h2, .about-copy h2 { font-size: 42px; }
  .work-intro p { font-size: 15px; }
  .project-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 10px; row-gap: 34px; }
  .span-8, .span-7, .span-6, .span-5, .span-4 { grid-column: span 2; }
  .span-3 { grid-column: span 1; }
  .project.compact-mobile { grid-column: span 1; }
  .project:nth-child(6), .project:nth-child(7), .project:nth-child(10), .project:nth-child(11), .project:nth-child(12) { grid-column: span 1; }
  .shape-panoramic .project-media, .shape-wide .project-media { aspect-ratio: 4 / 3; }
  .project-meta { flex-direction: column; align-items: flex-start; gap: 5px; padding-top: 9px; }
  .project-meta h3 { font-size: 13px; }
  .project-meta p { font-size: 9px; text-align: left; }
  .credits-band { padding-top: 84px; padding-bottom: 84px; }
  .credits-heading { grid-template-columns: 1fr; gap: 32px; padding-bottom: 60px; }
  .credits-grid { grid-template-columns: 1fr; }
  .credits-grid > div { min-height: 0; padding: 24px 0 36px !important; border-right: 0; border-bottom: 1px solid var(--line-dark); }
  .credits-grid p { margin-top: 28px; font-size: 17px; }
  .about { grid-template-columns: 1fr; gap: 36px; padding-top: 88px; padding-bottom: 88px; }
  .about-copy > p { margin-top: 36px; font-size: 17px; }
  .about-facts { grid-column: 1; grid-template-columns: 1fr; margin-top: 32px; }
  .about-facts > div { padding: 18px 0 24px !important; border-right: 0; border-bottom: 1px solid var(--line-light); }
  .about-facts dd { margin-top: 14px; }
  .contact { min-height: 68vh; }
  .contact > a { font-size: 58px; }
  .contact-bottom { gap: 18px; }
  .dialog-layout { grid-template-columns: 1fr; }
  .dialog-visual, .dialog-visual img { min-height: 52vh; height: 52vh; }
  .dialog-gallery { inset: auto 16px 16px; height: 64px; }
  .dialog-gallery img { min-height: 0; height: 100%; }
  .dialog-copy { padding: 48px 20px 60px; }
  .dialog-copy h2 { font-size: 46px; }
  .dialog-summary { margin-bottom: 46px; }
  .dialog-player { padding: 64px 18px; }
  .dialog-player-frame { width: min(100%, calc((100dvh - 220px) * 16 / 9)); }
  .dialog-player-close { top: 14px; right: 16px; }
}

@media (max-height: 600px) {
  .dialog-player { padding: 56px 18px 18px; }
  .dialog-player-frame { width: min(100%, calc((100dvh - 170px) * 16 / 9)); }
}

@media (max-width: 430px) {
  .site-header nav a:nth-child(2), .site-header nav a:nth-child(3) { display: none; }
  .hero-copy h1, .contact > a { font-size: 52px; }
  .hero-reel { object-position: 58% center; }
  .work-intro h2, .credits-heading h2, .about-copy h2 { font-size: 38px; }
  .project:nth-child(10) .project-meta p, .project:nth-child(11) .project-meta p, .project:nth-child(12) .project-meta p { display: none; }
}
