:root {
  --black: #000;
  --panel: #111;
  --white: #fff;
  --grey: #777;
  --pink: #ec0b8f;
  --pink-dim: #7a0a4d;
  --body: "Poppins", "Helvetica Neue", Arial, sans-serif;
  --sans: Arial, "Helvetica Neue", Helvetica, sans-serif;
  --serif: "Times New Roman", Tinos, Times, serif;
  --gutter: clamp(20px, 6vw, 120px);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: var(--body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }
a:hover { color: var(--pink); }

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

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--pink);
  color: var(--white);
  padding: 8px 14px;
  z-index: 60;
}
.skip:focus { left: 8px; }

/* ---------- menu ---------- */
html.menu-open { overflow: hidden; }

.menu-btn {
  position: fixed;
  top: 36px;
  left: 60px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 18px 0 0;
  background: rgba(0, 0, 0, 0.5); /* softly blurred, so the label stays readable when text scrolls underneath */
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 0;
  color: var(--white);
  font-family: var(--body);
  font-size: 13px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.3s ease;
}
html.menu-open .menu-btn { background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }

.burger {
  position: relative;
  width: 52px;
  height: 52px;
  border: 1px solid #2a2a2a;
  background: var(--black);
  transition: border-color 0.3s ease;
}
.burger i {
  position: absolute;
  left: 13px;
  width: 24px;
  height: 2px;
  background: var(--pink);
  transition: transform 0.4s cubic-bezier(0.7, 0, 0.2, 1), top 0.4s cubic-bezier(0.7, 0, 0.2, 1), opacity 0.2s ease;
}
.burger i:nth-child(1) { top: 17px; }
.burger i:nth-child(2) { top: 24px; }
.burger i:nth-child(3) { top: 31px; }
.menu-btn:hover .burger { border-color: var(--pink); }
html.menu-open .burger i:nth-child(1) { top: 24px; transform: rotate(45deg); }
html.menu-open .burger i:nth-child(2) { opacity: 0; }
html.menu-open .burger i:nth-child(3) { top: 24px; transform: rotate(-45deg); }

/* The overlay grows out of the button (--ox/--oy are set by script.js). */
.menu {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 130px var(--gutter) 40px;
  background: var(--black);
  overflow-y: auto;
  visibility: hidden;
  clip-path: circle(0 at var(--ox, 86px) var(--oy, 62px));
  transition: clip-path 0.65s cubic-bezier(0.7, 0, 0.2, 1), visibility 0s linear 0.65s;
}
html.menu-open .menu {
  visibility: visible;
  clip-path: circle(150vmax at var(--ox, 86px) var(--oy, 62px));
  transition: clip-path 0.85s cubic-bezier(0.7, 0, 0.2, 1), visibility 0s;
}
/* a faint ghost of the hero photo behind the links */
.menu::before {
  content: "";
  position: fixed;
  inset: 0;
  background: url("assets/hero.jpg") 60% 10vh / cover no-repeat;
  opacity: 0.16;
  pointer-events: none;
}

.menu-list { position: relative; list-style: none; margin: auto 0; padding: 0; }
.menu-list li {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
html.menu-open .menu-list li {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: calc(0.3s + var(--i, 0) * 0.07s);
}
.menu-list a {
  display: inline-flex;
  align-items: baseline;
  gap: clamp(16px, 3vw, 44px);
  padding: 4px 0;
  text-decoration: none;
  color: var(--white);
  transition: opacity 0.3s ease, color 0.3s ease;
}
.mi-label {
  position: relative;
  font-family: var(--serif);
  /* fluid: follows the window width, but never taller than the window lets six links fit */
  font-size: clamp(1.5rem, min(6vw, calc((100vh - 300px) / 6.6)), 4.6rem);
  line-height: 1.08;
}
.mi-label::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0.04em;
  width: 100%;
  height: 2px;
  background: var(--pink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s cubic-bezier(0.7, 0, 0.2, 1);
}
.mi-note {
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--grey);
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity 0.3s ease, transform 0.4s ease;
}
.menu-list a:hover .mi-label::after,
.menu-list a:focus-visible .mi-label::after { transform: scaleX(1); }
.menu-list a:hover .mi-note,
.menu-list a:focus-visible .mi-note,
.menu-list a[aria-current] .mi-note { opacity: 1; transform: none; }
.menu-list:hover a:not(:hover) { opacity: 0.35; }
.menu-list:has(a:focus-visible) a:not(:focus-visible) { opacity: 0.35; }
.menu-list a[aria-current] .mi-label { color: var(--pink); }
.menu-list a:focus-visible { outline-offset: 6px; }

.menu-foot {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px 40px;
  padding-top: 24px;
  border-top: 1px solid #1f1f1f;
  font-size: 0.85rem;
  color: var(--grey);
  opacity: 0;
  transition: opacity 0.3s ease;
}
html.menu-open .menu-foot { opacity: 1; transition: opacity 0.6s ease 0.7s; }
.menu-foot p { margin: 0; }
.menu-social { display: flex; flex-wrap: wrap; gap: 8px 30px; list-style: none; margin: 0; padding: 0; }
.menu-social a { color: var(--white); text-decoration: none; letter-spacing: 0.12em; }
.menu-social a:hover { color: var(--pink); }

/* ---------- eyebrow label ---------- */
.eyebrow {
  display: flex;
  align-items: center;
  margin: 0;
  font-size: 15px;
  line-height: 22px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  flex: none;
  width: 48px;
  height: 2px;
  margin: 0 18px 0 0;
  /* 2px box with a 1px pink line keeps the line crisp when it is centred on one or two text lines */
  background: linear-gradient(to bottom, var(--pink) 50%, transparent 50%);
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  background-color: var(--black);
  background-image: url("assets/hero.jpg");
  background-repeat: no-repeat;
  /* The whole photo stays in frame: monitor on the left, reaching hand, then the face. */
  background-position: center 10vh;
  background-size: 100% auto;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  /* One even veil, so the screen and the hand stay visible but quiet behind the text. */
  background:
    linear-gradient(to bottom, #000 0, rgba(0, 0, 0, 0) 22vh),
    rgba(0, 0, 0, 0.58);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(260px, 0.75fr) minmax(0, 1.4fr);
  column-gap: clamp(32px, 5vw, 90px);
  align-items: start;
  max-width: 1500px;
  margin: 0 auto;
  padding: clamp(120px, 21.6vh, 300px) var(--gutter) 100px;
  /* whole pixels keep the 1px pink rules sharp instead of blurred to grey */
  padding-top: round(clamp(120px, 21.6vh, 300px), 1px);
}

.counter { container-type: inline-size; }
.counter .eyebrow { font-size: 15px; }
/* Fixed 22px lines (the emoji would otherwise make the second line taller) keep the pink rule centred and crisp. */
.counter .sub { display: block; height: 22px; line-height: 22px; }

/* Without JS (or with reduced motion) both countdowns are shown, one under the other. */
.panel + .panel { margin-top: 56px; }

/* With JS the panels take turns in the same spot. */
.counter.rotating { display: grid; }
.counter.rotating .panel {
  grid-area: 1 / 1;
  margin-top: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0s linear 0.5s;
}
.counter.rotating .panel.active {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.5s ease, visibility 0s;
}

/* --fs is the size of the big number. The number of digits (--digits, set by script.js)
   shrinks it so "10303 days" always fits the left column instead of running under the name. */
.days {
  --fs: clamp(4rem, 9vw, 10.5rem);
  --fs: min(10.5rem, calc(96cqw / (0.52 * var(--digits, 2) + 0.48)));
  display: flex;
  align-items: flex-end;
  gap: calc(var(--fs) * 0.1);
  margin: 14px 0 0;
  white-space: nowrap;
}
.days-num {
  font-family: var(--sans);
  font-weight: 400;
  font-size: var(--fs);
  line-height: 1;
  letter-spacing: -0.045em;
}
.days-tag {
  margin-bottom: calc(var(--fs) * 0.18);
  padding: 0.38em 0.6em 0.42em;
  background: var(--pink);
  color: var(--white);
  font-family: var(--body);
  font-size: max(1rem, calc(var(--fs) * 0.105));
  line-height: 1.15;
}

.hms {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 34px;
  margin: 22px 0 0 18px;
  font-family: var(--sans);
}
.hms span { display: inline-flex; align-items: baseline; gap: 8px; }
.hms b { font-weight: 400; font-size: clamp(1.6rem, 2.4vw, 2.3rem); font-variant-numeric: tabular-nums; }
.hms i { font-family: var(--body); font-style: normal; font-size: clamp(1.1rem, 1.5vw, 1.5rem); color: var(--grey); }

.intro .eyebrow { margin-bottom: 18px; }
.intro h1,
.intro .lead { padding-left: 66px; }

.intro h1 {
  margin: 0 0 clamp(40px, 8vh, 90px);
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3rem, 5.4vw, 5.2rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.lead {
  max-width: 720px;
  margin: 0;
  font-size: clamp(1rem, 1.25vw, 1.2rem);
  line-height: 2;
}

/* ---------- about ---------- */
.about {
  background: var(--panel);
  padding: clamp(80px, 10vw, 150px) var(--gutter) 90px;
}
.about-inner { max-width: 640px; margin: 0 auto 0 clamp(0px, 4vw, 80px); }

.rule { display: block; width: 64px; height: 1px; background: var(--pink); margin-bottom: 38px; }

.about h1,
.about h2 {
  margin: 0 0 44px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.6rem, 5vw, 4.2rem);
  line-height: 1.1;
}
.about h3 {
  margin: 56px 0 22px;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.3;
}
.about h2 + h3 { margin-top: 0; }
.about p {
  margin: 0 0 1.4em;
  font-size: 0.92rem;
  line-height: 1.6;
}

.moon { margin: 36px 0 24px; }
.moon img { width: min(100%, 560px); margin: 0 auto; }

.links { list-style: none; margin: 0 0 56px; padding: 0; }
.links li { margin: 0 0 14px; }
.links a {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: underline;
}

.logo-wall {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 22px 20px;
  max-width: 640px;
  margin: 28px auto 0;
  padding: 0;
}
.logo-wall img { max-width: 100%; height: auto; opacity: 0.85; transition: opacity 0.2s ease; }
.logo-wall a { display: block; padding: 4px; }
.logo-wall a:hover img,
.logo-wall a:focus-visible img { opacity: 1; }

/* ---------- footer ---------- */
.foot {
  background: var(--panel);
  border-top: 1px solid #1a1a1a;
  padding: 34px var(--gutter) 40px;
  text-align: center;
  color: var(--pink);
  font-size: 1.05rem;
}
.foot p { margin: 0; }

/* ---------- small screens ---------- */
@media (max-width: 860px) {
  .hero { background-position: 72% 8vh; background-size: auto 78vh; }
  .menu-btn { top: 20px; left: 20px; }
  .hero-inner { grid-template-columns: 1fr; row-gap: 56px; padding-top: 140px; }
  .intro h1, .intro .lead { padding-left: 0; }
  .eyebrow { font-size: 13px; letter-spacing: 0.26em; }
  .about-inner { margin-left: 0; }
}

@media (max-width: 480px) {
  .menu-label { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ---------- sections ---------- */
.section { padding: clamp(80px, 10vw, 150px) var(--gutter); background: var(--black); }
.section--panel { background: var(--panel); }
.section-inner { max-width: 1180px; margin: 0 auto 0 clamp(0px, 4vw, 80px); }
.section h2 {
  margin: 0 0 24px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.6rem, 5vw, 4.2rem);
  line-height: 1.1;
}
.section-lead { max-width: 560px; margin: 0; font-size: 0.92rem; line-height: 1.6; color: #cfcfcf; }

.btn {
  display: inline-block;
  padding: 15px 28px;
  background: var(--pink);
  color: var(--white);
  font-family: var(--body);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.25s ease, color 0.25s ease;
}
.btn:hover { background: var(--white); color: var(--black); }
.btn.is-disabled { background: #1f1f1f; color: #777; cursor: not-allowed; }
.btn.is-disabled:hover { background: #1f1f1f; color: #777; }

/* projects */
.project {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 76px);
  align-items: center;
  margin-top: 56px;
}
.project + .project { margin-top: 100px; }
.gallery-main { margin: 0; }
.gallery-main img,
.ph { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: linear-gradient(135deg, #1c1c1c, #090909); border: 1px solid #222; }
.ph { position: relative; }
.ph::after, .cover--none::after { content: ""; position: absolute; left: 24px; bottom: 24px; width: 14px; height: 14px; background: var(--pink); }
.thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.thumbs button { width: 84px; aspect-ratio: 16 / 10; padding: 0; border: 1px solid #333; background: #111; cursor: pointer; opacity: 0.6; transition: opacity 0.2s ease, border-color 0.2s ease; }
.thumbs button img { width: 100%; height: 100%; object-fit: cover; }
.thumbs button:hover, .thumbs button[aria-current] { opacity: 1; border-color: var(--pink); }
.project-body h3 { margin: 0 0 16px; font-family: var(--serif); font-weight: 400; font-size: clamp(1.9rem, 3vw, 2.6rem); line-height: 1.15; }
.project-body p { margin: 0 0 20px; font-size: 0.92rem; line-height: 1.7; }
.badge { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 0.78rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--pink); }
.badge .dot { width: 9px; height: 9px; background: var(--pink); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 28px; padding: 0; }
.tags li { padding: 4px 12px; border: 1px solid #333; font-size: 0.78rem; letter-spacing: 0.08em; color: #bdbdbd; }

/* articles */
.articles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 32px; list-style: none; margin: 56px 0 0; padding: 0; }
.card { position: relative; display: flex; flex-direction: column; background: var(--black); border: 1px solid #242424; transition: border-color 0.25s ease; }
.card:hover, .card:focus-within { border-color: var(--pink); }
.cover { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: linear-gradient(135deg, #1c1c1c, #090909); }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.card-body { display: flex; flex: 1; flex-direction: column; padding: 26px 28px 30px; }
.meta { margin: 0 0 12px; font-size: 0.78rem; letter-spacing: 0.12em; color: var(--grey); }
.card h3 { margin: 0 0 14px; font-family: var(--serif); font-weight: 400; font-size: 1.55rem; line-height: 1.25; }
.card h3 a { color: inherit; text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; }
.card-text { margin: 0 0 18px; font-size: 0.88rem; line-height: 1.65; color: #cfcfcf; }
.card-more { margin: auto 0 0; padding-top: 14px; font-size: 0.78rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--pink); }
.more { margin: 36px 0 0; }
.more a { font-size: 0.85rem; letter-spacing: 0.12em; }

/* contact */
.contact h3 { margin: 0 0 24px; font-family: var(--sans); font-weight: 700; font-size: 1.15rem; }
.contact .links { margin: 0; }

/* article pages */
.page-article { background: var(--panel); }
.article { max-width: 760px; margin: 0 auto; padding: clamp(116px, 9vw, 128px) var(--gutter) 90px; }
.back { display: inline-block; margin-bottom: 44px; font-size: 0.8rem; letter-spacing: 0.22em; text-transform: uppercase; text-decoration: none; }
.back::before { content: "←"; margin-right: 12px; color: var(--pink); }
.article .eyebrow { margin-bottom: 22px; }
.article h1 { margin: 0 0 20px; font-family: var(--serif); font-weight: 400; font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.12; }
.article .meta { margin-bottom: 36px; }
.article-cover { margin: 0 0 36px; }
.article-cover img { width: 100%; }
.article p { font-size: 1rem; line-height: 1.8; }
.article-cta { margin-top: 56px; padding-top: 32px; border-top: 1px solid #242424; }
.article-cta p { margin: 0 0 22px; font-size: 0.92rem; color: #cfcfcf; }

@media (max-width: 860px) {
  .menu { padding-top: 110px; }
  .mi-note { display: none; }
  .project { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .menu { clip-path: none; opacity: 0; transition: opacity 0.2s ease, visibility 0s linear 0.2s; }
  html.menu-open .menu { opacity: 1; transition: opacity 0.2s ease, visibility 0s; }
  .menu-list li, html.menu-open .menu-list li { transform: none; transition: opacity 0.2s ease; transition-delay: 0s; }
  .menu-foot, html.menu-open .menu-foot { transition: opacity 0.2s ease; }
  .burger i, .mi-label::after, .mi-note { transition: none; }
}

.article-cta .also { margin-top: 14px; font-size: .9rem; color: var(--grey); }
.article-cta .also a { color: var(--pink); }

.card-text { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.article-cover img { max-height: 80vh; width: auto; max-width: 100%; display: block; }

/* v3: softer cards, direct source link, show-more, nicer article text */
.card { border-radius: 14px; overflow: hidden; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: auto; padding-top: 16px; border-top: 1px solid #1f1f1f; }
.card-preview { font-size: 0.74rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--grey); }
.card-src { position: relative; z-index: 2; font-size: 0.74rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--pink); text-decoration: none; }
.card-src:hover, .card-src:focus-visible { color: var(--white); }
.card-text { margin-bottom: 22px; }
.btn--ghost { background: transparent; border: 1px solid #444; color: var(--white); padding: 14px 26px; }
.btn--ghost:hover { background: var(--white); color: var(--black); border-color: var(--white); }
.actions { display: flex; flex-wrap: wrap; gap: 14px; }
.more-articles { display: none; margin: 40px 0 0; }
.js .more-articles { display: block; }
.js .articles-grid:not(.open) .card.extra { display: none; }
.article-cover img { border-radius: 14px; }
.gallery-main img, .ph { border-radius: 14px; }

.article-body { max-width: 640px; }
.article .standfirst { margin: 0 0 40px; font-family: var(--serif); font-size: clamp(1.25rem, 2.4vw, 1.55rem); line-height: 1.5; color: var(--white); }
.article h2 { margin: 44px 0 18px; font-family: var(--serif); font-weight: 400; font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.2; }
.article-body p { margin: 0 0 22px; font-size: 1.02rem; line-height: 1.85; color: #d9d9d9; }
.article-body.teaser { -webkit-mask-image: linear-gradient(#000 78%, transparent); mask-image: linear-gradient(#000 78%, transparent); padding-bottom: 28px; }
.article-cta { margin-top: 8px; }

/* v4 */
.card-text { -webkit-line-clamp: 2; }
.gallery-main img { aspect-ratio: auto; height: auto; border: 0; border-radius: 0; background: none; }

/* v5: find me + footer logos */
.social-links { display: flex; flex-wrap: wrap; gap: 14px; list-style: none; margin: 36px 0 0; padding: 0; }
.social-links a { display: inline-flex; align-items: center; gap: 12px; padding: 14px 24px; border: 1px solid #333; border-radius: 12px; color: var(--white); font-size: 0.82rem; letter-spacing: 0.18em; text-transform: uppercase; text-decoration: none; transition: border-color 0.2s ease, color 0.2s ease; }
.social-links .ic { width: 20px; height: 20px; flex: none; }
.social-links a:hover, .social-links a:focus-visible { border-color: var(--pink); color: var(--pink); }
.foot { padding-top: 56px; }
.foot-label { margin: 0 0 8px; font-size: 0.74rem; letter-spacing: 0.26em; text-transform: uppercase; color: var(--grey); }
.foot-logos { max-width: 900px; margin: 0 auto 44px; padding-bottom: 44px; border-bottom: 1px solid #1a1a1a; }
.foot .logo-wall { max-width: 900px; gap: 20px 32px; margin-top: 18px; }
.foot .logo-wall img { opacity: 0.6; }
.foot .logo-wall a:hover img, .foot .logo-wall a:focus-visible img { opacity: 1; }

/* v6: one slim row of logos */
.foot-logos { max-width: 1100px; }
.foot .logo-wall { max-width: none; flex-wrap: nowrap; gap: 14px clamp(18px, 3vw, 36px); }
.foot .logo-wall li { flex: none; }
.foot .logo-wall a { padding: 2px; }
.foot .logo-wall img { height: 22px; width: auto; max-width: none; }
@media (max-width: 860px) {
  .foot .logo-wall { flex-wrap: wrap; gap: 18px 28px; }
  .foot .logo-wall img { height: 20px; }
}

/* v7: per-logo height, and an auto-scrolling strip when the row does not fit */
.foot .logo-wall img { height: var(--h, 22px); }
.logo-track { display: flex; justify-content: center; }
.logo-track .logo-wall[aria-hidden="true"] { display: none; }
.foot .logo-wall { margin-top: 18px; }
@keyframes logo-scroll { to { transform: translateX(-50%); } }
@media (max-width: 1100px) {
  .foot .logo-wall { flex-wrap: wrap; justify-content: center; }
}
@media (max-width: 1100px) and (prefers-reduced-motion: no-preference) {
  .logo-marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
  .logo-track { justify-content: flex-start; width: max-content; animation: logo-scroll 34s linear infinite; }
  .foot .logo-track .logo-wall,
  .foot .logo-track .logo-wall[aria-hidden="true"] { display: flex; flex: none; flex-wrap: nowrap; justify-content: flex-start; margin: 18px 0 0; padding-right: 32px; gap: 14px 32px; }
  .logo-marquee:hover .logo-track, .logo-marquee:focus-within .logo-track { animation-play-state: paused; }
}

/* v8: project groups */
.project-group { margin-top: 72px; }
.project-group + .project-group { margin-top: 110px; }
.group-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding-bottom: 14px; border-bottom: 1px solid #242424; font-family: var(--body); font-weight: 400; }
.group-title span { font-size: 0.8rem; letter-spacing: 0.26em; text-transform: uppercase; color: var(--pink); }
.group-title small { font-size: 0.85rem; color: var(--grey); }
.project-group .project { margin-top: 44px; }
.project-body h4 { margin: 0 0 16px; font-family: var(--serif); font-weight: 400; font-size: clamp(1.9rem, 3vw, 2.6rem); line-height: 1.15; }
.gallery-main { border-radius: 14px; overflow: hidden; }
.gallery-main.fit-cover img { aspect-ratio: 16 / 10; object-fit: cover; object-position: 50% 40%; }
.article-cover img { width: 100%; height: auto; object-fit: contain; object-position: left top; }

/* v9: video modal */
html.modal-open { overflow: hidden; }
.video-modal { width: min(1000px, 94vw); max-width: none; max-height: 96vh; padding: 0; border: 1px solid #2a2a2a; border-radius: 14px; background: #0b0b0b; color: var(--white); overflow: hidden; }
.video-modal::backdrop { background: rgba(0, 0, 0, 0.84); backdrop-filter: blur(4px); }
.video-modal[open] { animation: vm-in 0.25s ease; }
@keyframes vm-in { from { opacity: 0; transform: translateY(12px) scale(0.985); } to { opacity: 1; transform: none; } }
.vm-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 14px 14px 22px; }
.vm-title { margin: 0; font-family: var(--serif); font-size: 1.2rem; line-height: 1.3; }
.vm-close { flex: none; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid #333; border-radius: 10px; background: transparent; color: var(--white); cursor: pointer; transition: border-color 0.2s ease, color 0.2s ease; }
.vm-close:hover, .vm-close:focus-visible { border-color: var(--pink); color: var(--pink); }
.vm-frame { position: relative; aspect-ratio: 16 / 9; background: #000; }
.vm-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vm-note { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; padding: 24px; text-align: center; font-size: 0.92rem; line-height: 1.6; color: #cfcfcf; }
.vm-foot { margin: 0; padding: 14px 22px 18px; text-align: right; }
.vm-yt { font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--pink); text-decoration: none; }
.vm-yt:hover, .vm-yt:focus-visible { color: var(--white); }
@media (prefers-reduced-motion: reduce) { .video-modal[open] { animation: none; } }
[hidden] { display: none !important; }

/* v10: project cards (groups with two or more projects) */
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; margin-top: 44px; }
.project-card { display: flex; flex-direction: column; border: 1px solid #242424; border-radius: 14px; overflow: hidden; background: var(--black); transition: border-color 0.25s ease; }
.project-card:hover, .project-card:focus-within { border-color: #3a3a3a; }
.project-card .gallery-main { border-radius: 0; }
.project-card .gallery-main img, .project-card .ph { border-radius: 0; }
.project-card-body { display: flex; flex: 1; flex-direction: column; padding: 26px 28px 30px; }
.project-card .badge { margin-bottom: 12px; }
.project-card-body h4 { margin: 0 0 12px; font-family: var(--serif); font-weight: 400; font-size: clamp(1.5rem, 2.2vw, 1.9rem); line-height: 1.2; }
.pc-text { margin: 0 0 18px; font-size: 0.9rem; line-height: 1.65; color: #cfcfcf; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.project-card .tags { margin-bottom: 24px; }
.project-card .actions { margin-top: auto; }
@media (max-width: 860px) { .project-grid { grid-template-columns: 1fr; } }

/* v11: pages, page transitions, gallery modal */
.page-top { padding-top: clamp(116px, 9vw, 128px); min-height: 70vh; }
.about { padding-top: clamp(116px, 9vw, 128px); }
.section h1.page-title { margin: 0 0 24px; font-family: var(--serif); font-weight: 400; font-size: clamp(2.6rem, 5vw, 4.2rem); line-height: 1.1; }
.project-body .actions { display: flex; flex-wrap: wrap; gap: 12px; }
.page-top .project { margin-top: 56px; }
.page-top .project + .project { margin-top: 90px; }
button.btn { border: 0; border-radius: 0; font-family: var(--body); font-size: 0.78rem; letter-spacing: 0.22em; line-height: normal; cursor: pointer; }

html { background: var(--black); }
.menu-btn { view-transition-name: menu-btn; }
::view-transition-group(menu-btn) { animation: none; }
::view-transition-old(menu-btn) { display: none; }
::view-transition-new(menu-btn) { animation: none; }
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-group(root) { animation-duration: 0.8s; animation-timing-function: cubic-bezier(0.7, 0, 0.2, 1); }
  ::view-transition-image-pair(root) { isolation: auto; }
  ::view-transition-old(root), ::view-transition-new(root) { mix-blend-mode: normal; animation-duration: 0.8s; animation-timing-function: cubic-bezier(0.7, 0, 0.2, 1); animation-fill-mode: both; }
  ::view-transition-old(root) { animation-name: vt-out-left; }
  ::view-transition-new(root) { animation-name: vt-in-right; }
  html[data-dir="back"]::view-transition-old(root) { animation-name: vt-out-right; }
  html[data-dir="back"]::view-transition-new(root) { animation-name: vt-in-left; }
}
@keyframes vt-out-left { from { transform: none; } to { transform: translateX(-100%); } }
@keyframes vt-in-right { from { transform: translateX(100%); } to { transform: none; } }
@keyframes vt-out-right { from { transform: none; } to { transform: translateX(100%); } }
@keyframes vt-in-left { from { transform: translateX(-100%); } to { transform: none; } }
html.leaving .menu { transition: none; visibility: hidden; }
html.leaving .menu-btn .burger i { transition: none; }

.gallery-modal { width: min(1100px, 96vw); max-width: none; max-height: 96vh; padding: 0; border: 1px solid #2a2a2a; border-radius: 14px; background: #0b0b0b; color: var(--white); overflow: hidden; }
.gallery-modal::backdrop { background: rgba(0, 0, 0, 0.88); backdrop-filter: blur(4px); }
.gallery-modal[open] { animation: vm-in 0.25s ease; }
.gm-count { margin: 0 8px 0 auto; font-size: 0.78rem; letter-spacing: 0.18em; color: var(--grey); white-space: nowrap; }
.gm-stage { position: relative; display: grid; place-items: center; background: #000; padding: 0 56px; touch-action: pan-y; }
.gm-img { width: 100%; max-height: calc(96vh - 170px); object-fit: contain; user-select: none; -webkit-user-drag: none; }
.gm-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid #333; border-radius: 50%; background: rgba(0, 0, 0, 0.6); color: var(--white); cursor: pointer; transition: border-color 0.2s ease, color 0.2s ease; }
.gm-nav:hover, .gm-nav:focus-visible { border-color: var(--pink); color: var(--pink); }
.gm-prev { left: 8px; }
.gm-next { right: 8px; }
.gm-nav:disabled { opacity: 0.25; cursor: default; }
.gm-foot { min-height: 20px; }
.gm-link { font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--pink); text-decoration: none; }
.gm-link:hover, .gm-link:focus-visible { color: var(--white); }
@media (max-width: 600px) { .gm-stage { padding: 0; } .gm-nav { top: auto; bottom: 8px; transform: none; } }
@media (prefers-reduced-motion: reduce) { .gallery-modal[open] { animation: none; } }
.ph--word { display: grid; place-items: center; aspect-ratio: 16 / 10; border-radius: 14px; background: linear-gradient(135deg, #1a0010, #0b0b0b 60%); border: 1px solid #242424; }
.ph--word span { font-family: var(--serif); font-size: clamp(1.8rem, 4vw, 3rem); color: var(--pink); }
.ph--word::after, .ph--word::before { content: none; }

@media (max-height: 500px) { .menu { padding-top: 84px; } .menu-list a { padding: 0; } }

.gm-full { margin-left: 4px; margin-right: 8px; }
.gm-count--fs { display: none; position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); margin: 0; padding: 4px 12px; border-radius: 999px; background: rgba(0, 0, 0, 0.6); }
.gm-stage:fullscreen { padding: 0 64px; background: #000; }
.gm-stage:fullscreen .gm-img { max-height: 100vh; height: 100vh; }
.gm-stage:fullscreen .gm-count--fs { display: block; }
@media (max-width: 600px) { .gm-stage:fullscreen { padding: 0; } }

.gm-about { border-top: 1px solid #1f1f1f; padding: 0 22px; }
.gm-about summary { cursor: pointer; padding: 14px 0; font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--pink); }
.gm-about summary:hover, .gm-about summary:focus-visible { color: var(--white); }
.gm-about-body { max-height: 30vh; overflow-y: auto; padding: 0 0 16px; max-width: 720px; }
.gm-about-body p { margin: 0 0 14px; font-size: 0.92rem; line-height: 1.7; color: #d6d6d6; }
.gm-img { background: #000; }
.gallery-modal:has(.gm-about[open]) .gm-img { max-height: calc(96vh - 170px - 30vh - 50px); }

/* v12: breadcrumb, project page */
.crumbs { margin: 0 0 30px; }
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; margin: 0; padding: 0; list-style: none; font-size: 0.74rem; letter-spacing: 0.18em; text-transform: uppercase; }
.crumbs li { display: inline-flex; align-items: center; max-width: 100%; color: var(--grey); }
.crumbs li + li::before { content: "/"; margin: 0 12px; color: #444; }
.crumbs a { color: var(--grey); text-decoration: none; }
.crumbs a:hover, .crumbs a:focus-visible { color: var(--pink); }
.crumbs [aria-current] span { color: var(--white); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46ch; }
.article .crumbs { margin-bottom: 38px; }
.pc-text { -webkit-line-clamp: 4; }
.gp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 56px 0 0; padding: 0; list-style: none; }
.gp-thumb { display: block; width: 100%; padding: 0; border: 1px solid #242424; border-radius: 12px; overflow: hidden; background: #000; cursor: zoom-in; transition: border-color 0.2s ease, transform 0.3s ease; }
.gp-thumb:hover, .gp-thumb:focus-visible { border-color: var(--pink); }
.gp-thumb img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.project-page { max-width: 980px; }
.project-page .article-body { max-width: 760px; }
@media (max-width: 700px) { .gp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.back-link { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px; font-size: 0.74rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--white); text-decoration: none; }
.back-link svg { transition: transform 0.25s ease; }
.back-link:hover, .back-link:focus-visible { color: var(--pink); }
.back-link:hover svg, .back-link:focus-visible svg { transform: translateX(-4px); }
.crumbs { margin-top: 0; }

/* v13: About page centred */
.about-inner { margin: 0 auto; }
.contact .section-inner { max-width: 640px; margin: 0 auto; }

.gp-video { margin: 64px 0 0; }
.gp-video h2 { margin: 0 0 22px; font-family: var(--serif); font-weight: 400; font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.2; }
.gp-video-frame { width: min(504px, 100%); background: #0b0b0b; border: 1px solid #242424; border-radius: 14px; overflow: hidden; }
.gp-video-frame iframe { display: block; width: 100%; height: 896px; max-height: 90vh; border: 0; }
.gp-video-link { margin: 18px 0 0; font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase; }
.gp-video-link a { color: var(--pink); text-decoration: none; }
.gp-video-link a:hover, .gp-video-link a:focus-visible { color: var(--white); }

/* v14: tighter About page ending (the logo wall that used to sit here moved to the footer) */
.about { padding-bottom: 24px; }
.contact.section { padding-top: 32px; padding-bottom: clamp(64px, 7vw, 96px); min-height: 0; }
.about .moon { margin-bottom: 0; }

/* v15: video file in a modal */
.film-open { position: relative; display: block; width: min(300px, 100%); padding: 0; border: 1px solid #242424; border-radius: 14px; overflow: hidden; background: #000; cursor: pointer; transition: border-color 0.2s ease; }
.film-open:hover, .film-open:focus-visible { border-color: var(--pink); }
.film-open img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; }
.film-play { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 68px; height: 68px; border-radius: 50%; background: var(--pink); color: var(--white); transform: translate(-50%, -50%); transition: transform 0.25s ease; }
.film-play svg { margin-left: 3px; }
.film-open:hover .film-play, .film-open:focus-visible .film-play { transform: translate(-50%, -50%) scale(1.1); }
.film-modal { width: min(560px, 96vw); max-width: none; max-height: 96vh; padding: 0; border: 1px solid #2a2a2a; border-radius: 14px; background: #0b0b0b; color: var(--white); overflow: hidden; }
.film-modal::backdrop { background: rgba(0, 0, 0, 0.88); backdrop-filter: blur(4px); }
.film-modal[open] { animation: vm-in 0.25s ease; }
.film-stage { display: grid; place-items: center; background: #000; }
.film-stage video { display: block; width: auto; max-width: 100%; height: auto; max-height: calc(96vh - 76px); background: #000; }
@media (prefers-reduced-motion: reduce) { .film-modal[open] { animation: none; } }

/* v16: Material icons on buttons, mobile menu size, tighter tops */
.mi { flex: none; width: 1.3em; height: 1.3em; fill: currentColor; vertical-align: middle; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
.btn .mi { width: 1.45em; height: 1.45em; margin: -0.2em 0; }
.card-src, .gm-link, .vm-yt, .gp-video-link a { display: inline-flex; align-items: center; gap: 8px; }
.card-src .mi, .gm-link .mi, .vm-yt .mi, .gp-video-link .mi { width: 1.3em; height: 1.3em; }
.back-link .mi { width: 1.5em; height: 1.5em; margin-left: -0.3em; }
.vm-close .mi { width: 24px; height: 24px; }
.gm-nav .mi { width: 28px; height: 28px; }
.film-play .mi { width: 38px; height: 38px; margin: 0; }
.film-play svg { margin-left: 0; }
.pc-lead { margin: 0 0 8px; font-family: var(--serif); font-size: 1.05rem; line-height: 1.35; color: var(--white); }

.page-top { padding-top: clamp(88px, 8vw, 108px); }
.about { padding-top: clamp(88px, 8vw, 108px); }
.article { padding-top: clamp(88px, 8vw, 108px); }
.rule { margin-bottom: 26px; }
.crumbs { margin-bottom: 22px; }
.article .crumbs { margin-bottom: 26px; }
.back-link { margin-bottom: 12px; }
.section h1.page-title { margin-bottom: 18px; }

@media (max-width: 600px) {
  .mi-label { font-size: clamp(2.1rem, min(11vw, calc((100vh - 280px) / 6.6)), 3rem); }
  .menu-list a { padding: 6px 0; }
}
.btn { padding: 14px 22px; letter-spacing: 0.2em; gap: 9px; }
.pc-text { -webkit-line-clamp: 5; }

/* v17: Home, "Read more" */
.hero-cta { margin: 34px 0 0; }
@media (max-width: 700px) {
  /* on a phone the button spans the full width, like an app button */
  .hero-cta .btn { display: flex; width: 100%; min-height: 56px; padding: 16px 22px; font-size: 0.82rem; }
}

/* v18: Back link on phones, breadcrumb on larger screens (never both) */
@media (min-width: 761px) { .back-link { display: none; } }
@media (max-width: 760px) {
  .crumbs { display: none; }
  .back-link { margin-bottom: 24px; }
  .article .back-link { margin-bottom: 28px; }
}
@media (min-width: 761px) {
  .page-top, .about, .article { padding-top: clamp(108px, 8vw, 116px); }
}

/* v19: Read more lines up with the text column; one button system on phones */
.hero-cta { padding-left: 66px; }
@media (max-width: 860px) { .hero-cta { padding-left: 0; } }
@media (max-width: 700px) {
  .actions { display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
  .actions .btn, .article-cta .btn, .more-articles .btn, .hero-cta .btn { display: flex; width: 100%; min-height: 54px; padding: 15px 22px; justify-content: center; text-align: center; }
  .more-articles { display: block; }
  .project-card .actions { margin-top: 8px; }
  .project-body .actions { margin-top: 6px; }
}

/* v20: modal titles in body font, centered video block */
.vm-title { font-family: var(--body); font-weight: 500; font-size: 1.05rem; letter-spacing: 0.01em; }
.gp-video { display: flex; flex-direction: column; align-items: center; text-align: center; }
.gp-video h2 { margin-bottom: 22px; }
.gp-video .film-open { margin: 0 auto; }
.gp-video-link { display: flex; justify-content: center; }

/* v21: whole card is clickable */
.is-clickable { cursor: pointer; }
.is-clickable .gallery-main img, .is-clickable .ph { transition: transform 0.5s ease, filter 0.3s ease; }
.is-clickable:hover .gallery-main img { filter: brightness(1.08); }
.is-clickable .gallery-main { overflow: hidden; }

/* v22: subtle zoom on card image */
.is-clickable .gallery-main img, .is-clickable .ph { transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.3s ease; }
.is-clickable:hover .gallery-main img, .is-clickable:focus-within .gallery-main img { transform: scale(1.04); }
@media (prefers-reduced-motion: reduce) { .is-clickable .gallery-main img { transition: none; transform: none !important; } }

/* v23: loaders, skeletons, 404 */
@keyframes skel { 0% { background-position: 120% 0; } 100% { background-position: -120% 0; } }
.cover, .gallery-main, .film-open, .gp-thumb, .ph { background: linear-gradient(100deg, #121212 30%, #1d1d1d 50%, #121212 70%); background-size: 240% 100%; animation: skel 1.6s linear infinite; }
.ph, .cover--none { animation: none; }
.cover img, .gallery-main img, .film-open img, .gp-thumb img { position: relative; z-index: 1; background: #0b0b0b; }
@media (prefers-reduced-motion: reduce) { .cover, .gallery-main, .film-open, .gp-thumb { animation: none; } }

/* counter skeleton until the first tick */
.counter:not(.ready) .days-num, .counter:not(.ready) .hms b { color: transparent; border-radius: 6px; background: linear-gradient(100deg, #151515 30%, #262626 50%, #151515 70%); background-size: 240% 100%; animation: skel 1.4s linear infinite; }
.counter:not(.ready) .days-num { display: inline-block; min-width: 1.6ch; }
.counter:not(.ready) .hms b { display: inline-block; min-width: 1.5ch; }

/* sound-wave loader behind iframes, videos and slides */
.wave-loader { position: absolute; inset: 0; z-index: 0; display: flex; align-items: center; justify-content: center; gap: 5px; pointer-events: none; opacity: 0; transition: opacity 0.2s ease; }
.wave-loader i { display: block; width: 4px; height: 12px; border-radius: 2px; background: var(--pink); animation: wave 1s ease-in-out infinite; animation-delay: calc(var(--n) * 90ms); transform-origin: center; }
@keyframes wave { 0%, 100% { transform: scaleY(0.4); } 50% { transform: scaleY(4.2); } }
.is-loading > .wave-loader { opacity: 1; transition-delay: 0.35s; }
.film-stage { position: relative; }
.film-stage.is-loading { min-height: 220px; }
.vm-frame iframe, .film-stage video, .gm-img { position: relative; z-index: 1; }
.vm-frame iframe { position: absolute; }
@media (prefers-reduced-motion: reduce) { .wave-loader i { animation: none; transform: scaleY(2); } }

/* 404 */
.page-404 { background: #000; }
.nf { position: relative; min-height: 100vh; min-height: 100svh; display: grid; align-items: end; overflow: hidden; }
.nf-media { position: absolute; inset: 0; margin: 0; }
.nf-media img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 30%; transform-origin: 60% 35%; animation: nf-drift 18s ease-in-out infinite alternate; }
.nf-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.94) 6%, rgba(0,0,0,0.55) 38%, rgba(0,0,0,0.12) 70%); }
@keyframes nf-drift { from { transform: scale(1); } to { transform: scale(1.09) translate(-1.2%, -1%); } }
.nf-body { position: relative; z-index: 1; width: min(720px, 100%); padding: 0 max(24px, 6vw) clamp(40px, 9vh, 90px); }
.nf-body .eyebrow { margin: 0 0 14px; }
.nf-body h1 { margin: 0 0 16px; font-family: var(--serif); font-weight: 400; font-size: clamp(2.3rem, 6vw, 4.4rem); line-height: 1.08; text-wrap: balance; }
.nf-text { margin: 0 0 30px; max-width: 46ch; font-size: 1rem; line-height: 1.7; color: #d6d6d6; }
.nf-cta { margin: 0; }
@media (max-width: 700px) { .nf-media img { object-position: 64% 20%; } .nf-cta .btn { width: 100%; justify-content: center; min-height: 54px; } }
@media (prefers-reduced-motion: reduce) { .nf-media img { animation: none; } }
.nf-media::after { background: linear-gradient(to top, rgba(0,0,0,0.94) 6%, rgba(0,0,0,0.5) 40%, rgba(0,0,0,0.1) 72%), linear-gradient(to right, rgba(0,0,0,0.55), rgba(0,0,0,0) 60%); }

/* 404 clip: vertical short beside the text, still image as poster until it plays */
.nf { grid-template-columns: 1fr; }
.nf-media img { animation: none; filter: blur(14px) brightness(0.55); transform: scale(1.08); }
.nf-clip { position: relative; z-index: 1; justify-self: center; align-self: start; margin-top: clamp(24px, 6vh, 56px); height: min(52svh, 520px); aspect-ratio: 9 / 16; border-radius: 16px; overflow: hidden; background: #000; border: 1px solid #2a2a2a; box-shadow: 0 20px 60px rgba(0,0,0,0.6); }
.nf-clip img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 20%; }
.nf-clip iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; opacity: 0; transition: opacity 0.5s ease 0.8s; pointer-events: none; }
.nf-clip iframe.on { opacity: 1; }
.nf { align-items: start; }
.nf-body { align-self: end; padding-top: 28px; }
@media (min-width: 861px) {
  .nf { grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: clamp(32px, 6vw, 96px); padding: 0 max(24px, 6vw); }
  .nf-body { grid-column: 1; grid-row: 1; padding: 0; align-self: center; }
  .nf-clip { grid-column: 2; grid-row: 1; align-self: center; margin: 0; height: min(82svh, 760px); }
  .nf-media::after { background: rgba(0,0,0,0.55); }
}

/* error clip is a square now */
.nf-clip { aspect-ratio: 1 / 1; height: auto; width: min(86vw, 420px); }
.nf-clip img, .nf-clip video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 861px) { .nf-clip { height: auto; width: min(38vw, 520px); } }
.nf-cta { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 700px) { .nf-cta { flex-direction: column; } .nf-cta .btn { width: 100%; justify-content: center; min-height: 54px; } }

/* v24: phones, modals fill the screen and are easy to close */
.film-full { margin-left: auto; margin-right: -4px; }
.film-full + .vm-close { margin-left: 0; }
@media (max-width: 700px) {
  .film-modal, .gallery-modal, .video-modal { width: 100vw; max-width: 100vw; height: 100vh; height: 100dvh; max-height: 100dvh; border: 0; border-radius: 0; margin: 0; }
  .film-modal[open], .gallery-modal[open], .video-modal[open] { display: flex; flex-direction: column; }
  .vm-bar { padding: max(10px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left)); gap: 10px; }
  .vm-close { width: 48px; height: 48px; border-radius: 12px; }
  .vm-close .mi { width: 26px; height: 26px; }
  .film-stage { flex: 1; min-height: 0; }
  .film-stage video { max-height: calc(100dvh - 90px); max-width: 100%; }
  .gm-stage { flex: 1; min-height: 0; }
  .gm-img { max-height: calc(100dvh - 190px); }
  .vm-frame { margin: auto 0; }
  .vm-foot { padding-bottom: max(14px, env(safe-area-inset-bottom)); }
}

/* v25: long project board that scrolls like a page */
.gp-link { margin: 28px 0 0; }
.gp-scroll { position: relative; left: 50%; width: min(1000px, calc(100vw - 2 * var(--gutter))); margin: 56px 0 0; transform: translateX(-50%); background: #fff; border-radius: 14px; overflow: hidden; }
.gp-scroll img { display: block; width: 100%; height: auto; }
@media (max-width: 700px) { .gp-scroll { margin-top: 36px; border-radius: 10px; } }

/* v26: magazine reader */
.mag-issues { margin: 56px 0 0; }
.mag-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; margin: 0; padding: 0; list-style: none; }
.mag h3 { margin: 6px 0 16px; font-family: var(--serif); font-weight: 400; font-size: clamp(1.4rem, 2.6vw, 1.8rem); line-height: 1.2; }
.mag-meta { margin: 18px 0 0; font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--pink); }
.mag-cover { display: block; width: 100%; padding: 0; border: 1px solid #242424; border-radius: 10px; overflow: hidden; background: #fff; cursor: pointer; box-shadow: 0 18px 40px rgba(0,0,0,0.5); transition: border-color 0.2s ease, transform 0.35s ease; }
.mag-cover:hover, .mag-cover:focus-visible { border-color: var(--pink); transform: translateY(-4px); }
.mag-cover img { display: block; width: 100%; height: auto; }
.mag .actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 700px) { .mag-list { grid-template-columns: 1fr; gap: 44px; } }

.reader { width: min(1500px, 98vw); max-width: none; max-height: 98vh; padding: 0; border: 1px solid #2a2a2a; border-radius: 14px; background: #0b0b0b; color: var(--white); overflow: hidden; }
.reader::backdrop { background: rgba(0, 0, 0, 0.9); backdrop-filter: blur(4px); }
.reader[open] { animation: vm-in 0.25s ease; display: flex; flex-direction: column; }
.rd-full { margin-left: 4px; margin-right: 8px; }
.rd-stage { --rh: min(calc(98vh - 150px), calc((98vw - 220px) / 1.4094)); position: relative; display: grid; place-items: center; padding: 8px 90px 22px; background: #0b0b0b; touch-action: pan-y; overflow: hidden; }
.rd-book { position: relative; height: var(--rh); width: calc(var(--rh) * 1.4094); perspective: 3000px; cursor: pointer; transition: transform 0.8s cubic-bezier(0.45, 0.05, 0.25, 1); }
.rd-book.rd-closed-front { transform: translateX(-25%); }
.rd-book.rd-closed-back { transform: translateX(25%); }
.rd-pg { position: absolute; top: 0; bottom: 0; width: 50%; background: #fff; box-shadow: 0 18px 44px rgba(0,0,0,0.55); }
.rd-left { left: 0; border-radius: 7px 0 0 7px; }
.rd-right { left: 50%; border-radius: 0 7px 7px 0; }
.rd-pg::after { content: ""; position: absolute; top: 0; bottom: 0; width: 9%; pointer-events: none; }
.rd-left::after { right: 0; background: linear-gradient(to left, rgba(0,0,0,0.2), transparent); }
.rd-right::after { left: 0; background: linear-gradient(to right, rgba(0,0,0,0.2), transparent); }
.rd-pg img, .rd-face img { display: block; width: 100%; height: 100%; object-fit: contain; box-sizing: border-box; padding: 3.2% 3.6%; user-select: none; -webkit-user-drag: none; }
.rd-shade { position: absolute; top: 0; bottom: 0; left: 50%; width: 50%; z-index: 1; opacity: 0; pointer-events: none; border-radius: 0 7px 7px 0; background: linear-gradient(to right, rgba(0,0,0,0.5), rgba(0,0,0,0.1) 45%, transparent 80%); }
.rd-leaf { position: absolute; top: 0; bottom: 0; left: 50%; width: 50%; z-index: 2; visibility: hidden; transform-origin: left center; transform-style: preserve-3d; will-change: transform; pointer-events: none; }
.rd-face { position: absolute; inset: 0; background: #fff; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.rd-front { border-radius: 0 7px 7px 0; }
.rd-back { transform: rotateY(180deg); border-radius: 7px 0 0 7px; box-shadow: inset -8px 0 14px rgba(0,0,0,0.16); }
.rd-count { margin-left: auto; }
.rd-prev, .rd-next { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; }
.rd-prev { left: 14px; } .rd-next { right: 14px; }

/* one page at a time */
.rd-book.rd-one { width: calc(var(--rh) * 0.7047); transform: none; }
.rd-one .rd-left { display: none; }
.rd-one .rd-right, .rd-one .rd-shade, .rd-one .rd-leaf { left: 0; width: 100%; }
.rd-one .rd-pg, .rd-one .rd-face { border-radius: 7px; }
.rd-one .rd-pg::after { display: none; }
.rd-one .rd-shade { border-radius: 7px; }
.rd-one .rd-back { background: linear-gradient(to left, #dedbd3, #f3f1ea 35%, #ebe8e0); }
.rd-one .rd-back img { display: none; }
@media (max-width: 899px) {
  .reader { width: 100vw; max-width: 100vw; height: 100vh; height: 100dvh; max-height: 100dvh; border: 0; border-radius: 0; margin: 0; }
  .rd-stage { --rh: min(calc(100dvh - 160px), calc((100vw - 24px) / 0.7047)); flex: 1; padding: 6px 12px 12px; align-content: center; }
  .rd-prev, .rd-next { top: auto; bottom: 14px; transform: none; width: 48px; height: 48px; }
  .rd-prev { left: 14px; } .rd-next { right: 14px; }
}
@media (prefers-reduced-motion: reduce) { .reader[open] { animation: none; } }

/* pages whose picture runs to the paper edge: no margin, the picture fills the page */
.rd-bleed img { padding: 0 !important; object-fit: cover !important; }
.rd-pg.rd-bleed, .rd-face.rd-bleed { background: #000; }

/* dark screenshots on the black page: a hairline edge so the picture reads as a screen */
.gallery-main.has-edge { position: relative; }
.gallery-main.has-edge::after { content: ""; position: absolute; inset: 0; border-radius: 14px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18); pointer-events: none; }

/* a video inside a long case-study picture: sits on the same pale ground as the pictures */
.gp-scroll video { display: block; width: 100%; height: auto; background: #f8f9fb; }

/* the tutorial video starts by itself when it scrolls into view (script.js adds .is-auto), so it looks like part of the picture */
.gp-scroll video.gp-inline-video { aspect-ratio: 4 / 3; object-fit: cover; }
.gp-scroll video.is-auto { cursor: pointer; -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 9%, #000 91%, transparent 100%); mask-image: linear-gradient(to bottom, transparent 0, #000 9%, #000 91%, transparent 100%); }
.gp-scroll video.is-auto:focus-visible { outline: 2px solid var(--pink); outline-offset: -4px; }

/* The Tutorial case study: live text and separate pictures, laid out from the PSD (1400 px canvas) */
@font-face { font-family: "Roboto"; font-weight: 300; font-style: normal; font-display: swap; src: url("assets/fonts/roboto-latin-300-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Roboto"; font-weight: 500; font-style: normal; font-display: swap; src: url("assets/fonts/roboto-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
.tut { --u: calc(100cqw / 1400); --tut-blue: #59bae3; --tut-grey: #75787a; container-type: inline-size; position: relative; left: 50%; width: min(1000px, calc(100vw - 2 * var(--gutter))); margin: 56px 0 0; transform: translateX(-50%); background: #fff; border-radius: 14px; overflow: hidden; font-family: "Roboto", system-ui, sans-serif; color: var(--tut-grey); }
.tut img, .tut video { display: block; width: 100%; height: auto; }
.tut-sec { position: relative; }
.tut-context { height: calc(var(--u) * 1023); }
.tut-process { height: calc(var(--u) * 2527); }
.tut-feedback { height: calc(var(--u) * 1580); }
.tut-sec h2, .tut-sec h3 { position: absolute; margin: 0; font-family: "Roboto", system-ui, sans-serif; font-weight: 500; font-size: calc(var(--u) * 60); line-height: 1; letter-spacing: -0.04em; color: var(--tut-blue); white-space: nowrap; }
.tut-sec h3 { font-size: calc(var(--u) * 60); }
.tut-sec .tut-lead, .tut-sec .tut-text { position: absolute; margin: 0; max-width: none; font-weight: 300; font-size: calc(var(--u) * 36); line-height: 1.17; letter-spacing: -0.04em; color: var(--tut-grey); }
.tut-text p { margin: 0 0 1.17em; max-width: none; font: inherit; letter-spacing: inherit; color: inherit; }
.tut-text p:last-child { margin-bottom: 0; }
.tut-indent { display: contents; }
.tut-phone, .tut-store, .tut-made { position: absolute; }
.tut-phones { position: absolute; inset: 0; pointer-events: none; }
.tut-video { aspect-ratio: 4 / 3; object-fit: cover; background: #f8f9fb; }
.tut-video.is-auto { cursor: pointer; -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 9%, #000 91%, transparent 100%); mask-image: linear-gradient(to bottom, transparent 0, #000 9%, #000 91%, transparent 100%); }
.tut-video.is-auto:focus-visible { outline: 2px solid var(--pink); outline-offset: -4px; }

/* phones: one column, readable sizes */
@media (max-width: 760px) {
  .tut { --u: 1px; border-radius: 10px; margin-top: 36px; container-type: normal; }
  .tut-sec, .tut-context, .tut-process, .tut-feedback { height: auto; padding: 36px 20px 8px; }
  .tut-sec h2, .tut-sec h3 { position: static; font-size: 30px; white-space: normal; margin: 0 0 10px; }
  .tut-sec h3 { margin-top: 30px; }
  .tut-sec .tut-lead, .tut-sec .tut-text { position: static; width: auto !important; font-size: 17px; line-height: 1.45; letter-spacing: -0.01em; margin: 0 0 6px; }
  .tut-text p { margin-bottom: 1em; }
  .tut-text p, .tut-sec .tut-lead { font-size: 17px; }
  .tut-sec h2, .tut-sec h3, .tut-lead, .tut-text, .tut-phone, .tut-store, .tut-made { left: auto !important; top: auto !important; }
  .tut-visual { margin-top: 40px !important; }
  .tut-phones { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 20px 12px; margin-top: 18px; }
  .tut-phone { position: static; width: 100% !important; }
  .tut-final { margin-top: 36px !important; }
  .tut-store, .tut-made { position: static; width: 100% !important; margin-top: 18px; }
  .tut-feedback { padding-bottom: 28px; }
}

/* Some screens: live lead text between the pictures, and two looping wireframes side by side */
.gp-scroll .ss-lead { padding: 28px 5.5% 8px; background: #fff; color: #000; }
.gp-scroll .ss-lead p { margin: 0; font-size: clamp(0.8rem, 1.7vw, 1.05rem); line-height: 1.4; color: #000; max-width: none; }
.gp-scroll .ss-lead h2 { margin: 12px 0 0 21%; font-family: var(--sans, "Poppins", sans-serif); font-weight: 800; font-size: clamp(2rem, 6.2vw, 3.9rem); line-height: 1; letter-spacing: -0.03em; color: #000; }
.gp-scroll .ss-gifs { display: grid; grid-template-columns: 1fr 1fr; background: #fff; }
.gp-scroll .ss-gifs img { width: 100%; height: auto; }
@media (max-width: 700px) { .gp-scroll .ss-lead { padding-top: 20px; } .gp-scroll .ss-gifs { grid-template-columns: 1fr; } }

/* Microinteractions: tiles that open in the video player */
.mi-grid { list-style: none; margin: 48px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px 28px; }
.mi-grid li { margin: 0; }
.mi-tile { width: 100%; aspect-ratio: 4 / 3; }
.mi-tile img { height: 100%; aspect-ratio: auto; object-fit: cover; }
.mi-cap { margin: 14px 0 0; font-size: 0.9rem; line-height: 1.5; color: #bdbdbd; max-width: none; }
.mi-cap strong { display: block; margin-bottom: 2px; font-weight: 500; color: var(--white); font-size: 1rem; }
@media (max-width: 700px) { .mi-grid { grid-template-columns: 1fr; gap: 32px; } }

/* gallery modal: clips next to slides */
.gm-video { width: 100%; max-height: calc(96vh - 170px); background: #000; }
.gm-img[hidden], .gm-video[hidden] { display: none; }
.gm-stage:fullscreen .gm-video { max-height: 100vh; height: 100vh; }

.gp-scroll .ss-made { display: block; width: min(862px, 88%); height: auto; margin: 0 auto; padding: 28px 0 36px; background: #fff; }
.gp-scroll .ss-made, .gp-scroll { background: #fff; }

/* Switch to the Dynamic version, in the footer of the Classic pages */
.foot .foot-links { margin: 0 0 18px; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; }
.foot-links a { color: var(--muted, #8d8a90); text-decoration: none; }
.foot-links a:hover, .foot-links a:focus-visible { color: #fff; }

/* Page shown inside the Dynamic viewer (?embed=1): only the page itself */
.embed .menu-btn, .embed .menu, .embed .crumbs, .embed .back-link, .embed .foot, .embed .loader { display: none !important; }

/* Light version: the About me page shows the burger as an X ("Close") */
.menu-btn.is-close .burger i:nth-child(1) { top: 24px; transform: rotate(45deg); }
.menu-btn.is-close .burger i:nth-child(2) { opacity: 0; }
.menu-btn.is-close .burger i:nth-child(3) { top: 24px; transform: rotate(-45deg); }
