@font-face {
  font-family: "Vercetti";
  src: url("assets/fonts/Vercetti-Regular.woff2") format("woff2"), url("assets/fonts/Vercetti-Regular.woff") format("woff");
  font-weight: 400; font-style: normal; font-display: swap;
}

:root {
  --font: "Vercetti", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --fg: #000;
  --muted: #6e6e6e;                               /* passes WCAG AA 4.5:1 on white and on the About panel */
  --line: #e6e6e6;
  --bg: #fff;
  --panel: #f3f3f3;
  --max: 1920px;                                   /* content stops growing here, side margins grow instead */
  --side: max(0px, calc((100vw - var(--max)) / 2));
  --u: min(1vw, calc(var(--max) / 100));           /* 1vw, capped at 1920px screens */
  --pad: 16px;
  --left: calc(34 * var(--u));                     /* text column */
  --media-w: calc(24 * var(--u));                  /* every image / video has this width */
  --gap: 8px;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --vh: 100vh;
  --space: .6em;                                   /* width of a space, used where a number sits next to a title */
}
@supports (height: 100dvh) { :root { --vh: 100dvh; } }  /* visible height on phones, without the browser bars */

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.4;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
body.locked { overflow: hidden; }
/* page fades in on load (class is set in <head>, removed by main.js once fonts are ready) */
/* fading the whole body would hide the header until the very end (its blend mode needs the page behind it),
   so the page and the header fade separately */
.page, .header { transition: opacity 1s ease; }
html.is-loading .page, html.is-loading .header { opacity: 0; }
/* Lenis smooth scroll */
html.lenis, html.lenis body { height: auto; }
html.lenis { scroll-behavior: auto; }
.lenis.lenis-stopped { overflow: clip; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; background: none; border: 0; cursor: pointer; }
img, video { display: block; }
[hidden] { display: none !important; }
.nowrap { white-space: nowrap; }
/* no single word left alone on the last line of a paragraph (browsers that support it) */
p, .hero, .about__bio p { text-wrap: pretty; }  /* hyphenated words like e-commerce never split over two lines */
ul { list-style: none; }

.page { max-width: var(--max); margin: 0 auto; }

.label, .header, .footer, .project__meta, .archive__row, .viewer__top, .viewer__bottom, .about__close, .link-arrow {
  text-transform: uppercase;
  letter-spacing: .02em;
}
.muted { color: var(--muted); }
a:hover, .link:hover { color: var(--muted); }

/* "Link →" */
.link-arrow { color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
.link-arrow svg { width: 10px; height: 6px; fill: currentColor; }
.link-arrow:hover { color: var(--fg); }

/* Header: no background, inverts over dark content only where it overlaps */
.header {
  position: fixed; top: 0; left: var(--side); right: var(--side); z-index: 10;
  display: flex; justify-content: space-between;
  padding: 20px var(--pad);
  color: #fff;
  mix-blend-mode: difference;
}
.header a:hover, .header .link:hover { color: inherit; opacity: .6; }
.header__nav { display: flex; }
.header__nav > * { margin-left: 70px; }
.header__nav .is-active { opacity: .6; }
.header__name.is-idle { pointer-events: none; }

/* Hero */
.hero {
  font-size: 24px; font-weight: 400; line-height: 1.3; letter-spacing: -.005em;
  max-width: 490px;
  padding: 54px var(--pad) 0;
  margin-bottom: 200px;
}

/* Project: text and media scroll together */
.project {
  display: flex; align-items: flex-start; gap: var(--gap);
  margin-bottom: calc(13 * var(--u));
  overflow-x: auto; overscroll-behavior-x: contain;
  scrollbar-width: none;
  padding-right: var(--pad);
  cursor: grab;
  user-select: none; -webkit-user-select: none;
}
.project::-webkit-scrollbar { display: none; }
.project.is-dragging { cursor: grabbing; }
.project.is-dragging .strip__item { pointer-events: none; }
.project__info {
  flex: 0 0 calc(var(--left) - var(--gap));
  padding-left: var(--pad);
}
.project__text { max-width: 340px; margin-top: 110px; }
.project__text p { margin-bottom: 16px; }

.project__media { display: contents; }   /* desktop: media are direct items of the scrolling row */
.about__name, .about__photo--inline { display: none; }

.strip__item {
  flex: 0 0 var(--media-w); position: relative;
  background: #ececec;
  cursor: zoom-in;
}
.strip__item img { width: 100%; height: auto; -webkit-user-drag: none; }
.strip__item video, .viewer__frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* Archive */
.archive { padding: 0 var(--pad); margin-bottom: 120px; scroll-margin-top: 60px; }
.archive__row a {
  display: grid;
  grid-template-columns: calc(8.6 * var(--u)) calc(var(--left) - 8.6 * var(--u) - var(--pad)) 1fr 1fr auto;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.archive__row .link-arrow { min-width: 4.5em; text-align: right; } /* keeps columns aligned on rows without a link */
.archive__row:last-child a { border-bottom: 1px solid var(--line); }
/* hovered row: all the grey text turns black */
@media (hover: hover) {
  .archive__row a:hover { color: var(--fg); }
  .archive__row a:hover .muted, .archive__row a:hover .link-arrow { color: var(--fg); }
}
.archive__pic { display: none; }  /* phones only: small picture instead of the hover one */

.hover-thumb {
  position: fixed; left: 0; top: 0; z-index: 5; pointer-events: none;
  width: 200px; opacity: 0; transition: opacity .2s;
}
.hover-thumb.is-visible { opacity: 1; }
.hover-thumb img { width: 100%; height: auto; }

/* Footer */
.footer {
  display: flex; justify-content: space-between;
  padding: 0 var(--pad) 20px;
}
.footer__links a { margin-left: 18px; }

/* About */
.about {
  --ease-open: cubic-bezier(.16, 1, .3, 1);     /* fast start, long soft landing */
  --ease-close: cubic-bezier(.65, 0, .35, 1);   /* slides back out the same way, gently */
  position: fixed; inset: 0; z-index: 20; visibility: hidden; transition: visibility 0s .9s;
}
.about.is-open { visibility: visible; transition: none; }
.about__backdrop {
  position: absolute; inset: 0;
  background: rgba(255, 255, 255, .35);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .8s ease .1s;
  display: flex; align-items: center;
  padding-right: calc(100vw - var(--left));
}
.about__photo {
  width: 258px; aspect-ratio: 258 / 299; margin: 0 auto;
  background: #222; overflow: hidden;
  opacity: 0; transform: translateY(48px);
  transition: opacity .35s ease, transform .45s ease;
}
.about__photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); }
.about__panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: calc(100vw - var(--left));
  background: var(--panel);
  padding: 20px 20px 28px;
  display: flex; flex-direction: column; justify-content: space-between;
  overflow-y: auto;
  transform: translateX(100%); transition: transform .9s var(--ease-close);
}
.about.is-open .about__backdrop { opacity: 1; transition: opacity .7s ease; }
.about.is-open .about__photo {
  opacity: 1; transform: none;
  transition: opacity .9s ease .45s, transform 1.1s var(--ease-open) .45s;
}
.about.is-open .about__panel { transform: none; transition: transform 1.1s var(--ease-open); }
.about__close { position: absolute; top: 20px; right: var(--pad); }
.about__content { max-width: 580px; }
.about__bio { font-size: 16px; line-height: 1.32; }
.about__bio p + p { margin-top: 21px; }
.about__block { margin-top: 38px; }
.about__block h2 { font-size: inherit; font-weight: 400; margin-bottom: 8px; }
.about__exp > div { margin-bottom: 12px; }
.about__exp dd { text-transform: uppercase; letter-spacing: .02em; }
.about__email { text-decoration: underline; text-underline-offset: 3px; margin-top: 40px; align-self: flex-start; }

/* Viewer */
/* The white page fades in while the clicked image zooms from its place in the strip */
.viewer {
  position: fixed; inset: 0; z-index: 30;
  background: rgba(255, 255, 255, 0);
  display: grid; grid-template-rows: auto 1fr auto;
  visibility: hidden; transition: background-color .45s ease, visibility 0s .45s;
}
.viewer.is-open { background: var(--bg); visibility: visible; transition: background-color .45s ease; }
.viewer__top, .viewer__bottom, .viewer__stage { opacity: 0; transition: opacity .35s ease; }
.viewer.is-open .viewer__top, .viewer.is-open .viewer__bottom { opacity: 1; transition: opacity .5s ease .25s; }
.viewer.is-open .viewer__stage { opacity: 1; transition: none; }
/* closing: the image zooms back into its thumbnail while the white page fades away */
.viewer.is-closing { visibility: visible; transition: background-color .7s ease; }
.viewer.is-closing .viewer__stage { opacity: 1; transition: none; }
.viewer.is-closing .viewer__top, .viewer.is-closing .viewer__bottom { opacity: 0; transition: opacity .25s ease; }
.viewer__frame { transform-origin: 0 0; }
.viewer__frame.is-zooming { transition: transform .8s cubic-bezier(.16, 1, .3, 1); }
.viewer__frame.is-zooming-out { transition: transform .7s cubic-bezier(.65, 0, .35, 1); }
.viewer__top, .viewer__bottom { position: relative; z-index: 2; padding: 20px var(--pad); }
.viewer__top { display: flex; justify-content: space-between; }
.viewer__bottom { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.viewer__count { text-align: center; }
.viewer__link { justify-self: end; color: var(--fg); }
.viewer__link:hover { color: var(--muted); }
.viewer__status { justify-self: end; }
.viewer__link[hidden] { display: none; }
.viewer__stage { display: flex; align-items: center; justify-content: center; padding: 0 var(--pad); min-height: 0; }
.viewer__frame { position: relative; }
.viewer__frame img {
  max-width: min(calc(100vw - 2 * var(--pad)), 1400px);
  max-height: calc(var(--vh) - 240px);              /* image always fits the screen height */
  width: auto; height: auto;
}
.viewer__frame.is-big img { max-height: min(calc((var(--vh) - 240px) * 1.15), calc(var(--vh) - 130px)); } /* "big" in content.js */
.viewer__hit { position: absolute; top: 0; bottom: 0; width: 50%; z-index: 1; cursor: none; }
.viewer__hit--prev { left: 0; }
.viewer__hit--next { right: 0; }

/* Arrow cursor in the viewer: inverts over the image */
.cursor {
  position: fixed; left: 0; top: 0; z-index: 40; pointer-events: none;
  width: 0; height: 0;
  mix-blend-mode: difference;
  opacity: 0; transition: opacity .15s;
}
.cursor.is-visible { opacity: 1; }
.cursor svg { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); fill: #fff; display: none; }
.cursor__prev, .cursor__next { width: 17.85px; height: 10.2px; }   /* 85% of the 21×12 arrow */
.cursor__plus { width: 20px; height: 20px; }
.cursor[data-icon="prev"] .cursor__prev,
.cursor[data-icon="next"] .cursor__next,
.cursor[data-icon="plus"] .cursor__plus { display: block; }
@media (hover: hover) {
  .strip__item { cursor: none; }
}

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

@media (hover: none) {
  .viewer__hit { cursor: auto; }
  .cursor { display: none; }
}

/* Mobile */
@media (max-width: 800px) {
  :root { --left: 100vw; --media-w: calc(100vw - 48px); }
  .desktop-only { display: none; }
  .header__nav > * { margin-left: 0; }
  .hero { font-size: 24px; line-height: 1.4; padding-top: 52px; margin-bottom: 90px; }

  .project { display: block; overflow: visible; padding-right: 0; margin-bottom: 80px; cursor: auto; }
  .project__info { padding: 0 var(--pad); }
  .project__text { margin-top: 40px; }
  .project__text p { margin-bottom: 18px; }
  .project__media {
    display: flex; align-items: flex-start; gap: var(--gap);
    margin-top: 16px; padding: 0 var(--pad);
    overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none;
    scroll-padding-left: var(--pad);
  }
  .project__media::-webkit-scrollbar { display: none; }
  /* like the main projects: "6 Title" on one line, client and services under it from the left edge */
  .archive__row a { grid-template-columns: auto 1fr auto; row-gap: 0; }
  .archive__row a > span:first-child { margin-right: var(--space); }
  .archive__row .archive__industry, .archive__row .archive__role { grid-column: 1 / 3; }
  .archive__row .link-arrow { display: none; }
  .archive__pic { display: block; grid-column: 3; grid-row: 1 / span 3; align-self: center; width: 72px; aspect-ratio: 4 / 3; object-fit: cover; }
  .hover-thumb { display: none; }
  .about__backdrop { display: none; }
  .about__panel { width: 100vw; padding: 60px var(--pad) 28px; }
  .about__name { display: block; position: absolute; top: 20px; left: var(--pad); text-transform: uppercase; letter-spacing: .02em; }
  .about__photo--inline { display: block; width: 160px; margin: 72px auto 0; }
  .about__email { margin-top: 72px; }

  .viewer__bottom { grid-template-columns: 1fr auto 1fr; row-gap: 2px; }
  .viewer__title { grid-column: 1 / -1; }
  .viewer__count { grid-column: 2; grid-row: 2; }                 /* centred at the bottom */
  .viewer__link, .viewer__status { grid-column: 3; grid-row: 2; }
  .viewer__frame img { max-height: calc(var(--vh) - 200px); }
  /* phones: the popup simply fades in and out, no zoom from the thumbnail */
  .viewer { background: var(--bg); opacity: 0; transition: opacity .25s ease, visibility 0s .25s; }
  .viewer.is-open { opacity: 1; transition: opacity .25s ease; }
  .viewer .viewer__top, .viewer .viewer__bottom, .viewer .viewer__stage { opacity: 1; transition: none; }
  .viewer__frame.is-big img { max-height: min(calc((var(--vh) - 200px) * 1.15), calc(var(--vh) - 180px)); max-width: calc(100vw - 2 * var(--pad)); }
}
