* {
  box-sizing: border-box;
}

:root {
  --font-body: "polymath", sans-serif;
  --font-heading: "gravesend-sans", sans-serif;
  --font-heading-weight: 300;
  --font-size-title: clamp(20px, 6.2vw, 80px);
  --font-size-compact: clamp(16px, 5vw, 22px);
  --font-size-subtitle: clamp(26px, 3vw, 48px);
  --font-size-body: clamp(18px, 1.5vw, 24px);
  --font-size-navigation: 11px;
  --text-gutter: clamp(48px, 4.5vw, 80px);
  --section-inset: clamp(32px, 4vw, 64px);
  --section-text-inset: 10%;
  --header-height: 52px;
  --header-edge-gap: clamp(12px, 2vw, 24px);
  --header-top-gap: clamp(12px, 1.5vw, 20px);
  --project-heading-top: calc(var(--header-height) + var(--header-top-gap) + 40px);
  --logo-height: clamp(42px, 4.9vw, 56px);
  --logo-band-padding: clamp(32px, 4vw, 56px);
  --viewport-height: 100vh;
  --viewport-height: 100svh;
  --project-background-channel: 20;
  --project-text-channel: 255;
  --theme-ink-brightness: 1;
}

html {
  scroll-padding-top: calc(var(--header-height) + var(--header-top-gap));
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
  font-style: normal;
}

h1,
.text-title {
  font-size: var(--font-size-title);
}

h2,
h3,
.text-subtitle {
  font-size: var(--font-size-subtitle);
}

.text-body {
  font-size: var(--font-size-body);
}

.text-nowrap {
  white-space: nowrap;
}

html,
body {
  margin: 0;
  background: #141414;
  color: #fff;
}

body {
  font-family: var(--font-body);
  font-size: var(--font-size-body);
  font-weight: 400;
  font-style: normal;
  line-height: 1.5;
}

button,
input,
select,
textarea {
  font: inherit;
}

html.is-loading {
  overflow: hidden;
}

.page-loader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  background: transparent;
  color: #fff;
  mix-blend-mode: difference;
  opacity: 1;
  transition: opacity 220ms ease;
}

.page-loader[hidden] {
  display: none;
}

.page-loader.is-complete {
  opacity: 0;
}

.page-loader-value {
  position: absolute;
  left: 50%;
  top: var(--loader-center-y, 50%);
  transform: translate(-50%, -50%);
  font-family: var(--font-heading);
  font-size: var(--font-size-compact);
  font-weight: var(--font-heading-weight);
  font-style: normal;
  line-height: 1.1;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
}

.page-loader-message,
.page-loader-retry {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font: inherit;
  text-align: center;
}

.page-loader-message {
  top: calc(var(--loader-center-y, 50%) + 40px);
  width: min(80%, 380px);
}

.page-loader-retry {
  top: calc(var(--loader-center-y, 50%) + 110px);
  padding: 12px 24px;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}

.page-loader-message[hidden],
.page-loader-retry[hidden] {
  display: none;
}

.is-loading .site-header,
.is-loading .hero-copy,
.is-loading .hero-video,
.is-loading main > section:not(#section-1),
.is-loading .section-contact {
  visibility: hidden;
}

.is-intro-pending :is(.site-header, .hero-copy, .logo-marquee) {
  opacity: 0;
}

.is-intro-revealing :is(.site-header, .hero-copy, .logo-marquee) {
  transition: opacity 2000ms ease-in-out;
}

@media (prefers-reduced-motion: reduce) {
  .page-loader { transition: none; }
  .is-intro-revealing :is(.site-header, .hero-copy, .logo-marquee) { transition: none; }
}

.site-header,
.hero-copy h1 {
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
}

.site-header {
  position: fixed;
  top: var(--header-top-gap);
  left: var(--header-edge-gap);
  right: var(--header-edge-gap);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  margin-bottom: 0;
  padding: 0 var(--text-gutter);
  border-radius: 9999px;
  background: #141414;
  color: #fff;
  font-size: var(--font-size-navigation);
  letter-spacing: 0.04em;
}

.site-header a {
  color: inherit;
  text-decoration: none;
}

.site-header a,
.linkedin-label,
.footer-columns a {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.site-header a::after,
.linkedin-label::after,
.footer-columns a::after {
  content: "";
  position: absolute;
  inset: 0;
  top: calc(50% - 0.5em);
  bottom: auto;
  height: 1em;
  background: currentColor;
  mix-blend-mode: difference;
  transform: translateX(-101%);
  pointer-events: none;
}

@media (hover: hover) {
  .site-header a:hover::after,
  .linkedin-label:hover::after,
  .footer-columns a:hover::after {
    animation: header-block-pass 650ms cubic-bezier(0.65, 0, 0.35, 1) both;
  }
}

.site-header a:focus-visible::after,
.footer-columns a:focus-visible::after {
  animation: header-block-pass 650ms cubic-bezier(0.65, 0, 0.35, 1) both;
}

@keyframes header-block-pass {
  0% {
    transform: translateX(-101%);
  }

  50% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(101%);
  }
}

.site-header a:focus-visible,
.footer-columns a:focus-visible,
.menu-toggle:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 5px;
}

.site-name {
  white-space: nowrap;
}

.site-nav {
  display: contents;
}

.menu-toggle {
  display: none;
}

.projects-menu { display: contents; }
.projects-toggle { display: none; }
.projects-dropdown[hidden] { display: none; }

@media (min-width: 601px) {
  .site-header {
    align-items: flex-start;
    overflow: hidden;
    border-radius: calc(var(--header-height) / 2);
    transition: height 280ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  .site-header[data-projects-open] {
    height: calc(var(--header-height) + var(--projects-menu-height, 160px));
  }

  .site-header > .site-name,
  .site-nav > a,
  .site-nav > .linkedin-label {
    display: inline-flex;
    align-items: center;
    height: var(--header-height);
  }

  .projects-menu {
    position: relative;
    display: flex;
    align-items: center;
    height: var(--header-height);
  }

  .site-header[data-menu-ready] .projects-mobile-link { display: none; }

  .site-header[data-menu-ready] .projects-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    letter-spacing: inherit;
    cursor: pointer;
  }

  .projects-toggle svg {
    width: 10px;
    height: 10px;
    transition: transform 180ms ease;
  }

  .projects-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
  .projects-toggle:focus-visible { outline: 1px solid currentColor; outline-offset: 5px; }

  .projects-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    display: grid;
    gap: 16px;
    width: max-content;
    margin: 0;
    padding: 12px 0 24px;
    list-style: none;
    color: inherit;
  }

  .projects-dropdown a { display: block; white-space: nowrap; }
}

@media (prefers-reduced-motion: reduce) {
  .projects-toggle svg,
  .site-header { transition: none; }
}

.linkedin-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.linkedin-label > span {
  font-size: 16px;
  line-height: 1;
}

main > section {
  min-height: var(--viewport-height);
}

#section-1 {
  min-height: calc(var(--viewport-height) - clamp(88px, 12vh, 120px));
  min-height: calc(var(--viewport-height) - clamp(88px, 12svh, 120px));
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 32px 16px;
}


@media (min-width: 601px) {
  #section-1 {
    min-height: calc(var(--viewport-height) - var(--logo-height) - var(--logo-band-padding) * 2);
  }
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero-video-viewport {
  background: #000000;
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-video-scene {
  position: absolute;
  inset: 0;
  transform: scale(var(--hero-scale, 1));
  transform-origin: center;
  will-change: transform;
}

.hero-video {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
}

.hero-play-button {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 16px 28px;
  border: 1px solid #fff;
  border-radius: 999px;
  background: #131313;
  color: #fff;
  font: inherit;
  cursor: pointer;
}

.hero-play-button[hidden] { display: none; }

.hero-copy {
  position: absolute;
  inset: auto var(--text-gutter) var(--text-gutter);
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  mix-blend-mode: difference;
}

.hero-copy h1 {
  margin: 0;
  font-size: var(--font-size-title);
  line-height: 1.1;
  letter-spacing: 0.01em;
}

@media (min-width: 601px) {
  :root {
    --font-size-title: clamp(20px, 5.3vw, 68px);
  }
}

.hero-copy-right {
  text-align: right;
}

.hero-prefix {
  display: block;
  white-space: nowrap;
}

.hero-discipline {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: clamp(8px, 1.5vw, 24px);
  min-width: 0;
}

.hero-skill-stack {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  min-width: 0;
  min-height: 1lh;
  /* Keep wider incoming labels whole throughout their horizontal slide. */
  overflow: visible;
  clip-path: inset(0 -100vw);
  transition: width 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-skill-marker {
  --marker-size: 0.72em;
  flex: 0 0 var(--marker-size);
  width: var(--marker-size);
  height: var(--marker-size);
  background: currentColor;
  transform-origin: center;
}

@supports (height: 1cap) {
  .hero-skill-marker {
    --marker-size: 1cap;
  }
}

.hero-skill-marker.is-turning {
  animation: skill-marker-turn 520ms cubic-bezier(0.65, 0, 0.35, 1);
}

@keyframes skill-marker-turn {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(180deg);
  }
}

.hero-skill {
  position: absolute;
  inset: 0 0 0 auto;
  grid-area: 1 / 1;
  display: grid;
  width: max-content;
  justify-self: end;
  align-content: center;
  align-self: center;
  min-width: 0;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-1em);
  transition: transform 520ms cubic-bezier(0.22, 1, 0.36, 1), opacity 520ms ease;
}

.hero-skill.is-active {
  position: relative;
  inset: auto;
  opacity: 1;
  transform: translateX(0);
}

.hero-skill.is-leaving {
  opacity: 0;
  transform: translateX(0.25em);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 767px) {
  :root {
    --header-height: 48px;
    --font-size-navigation: 9px;
    --text-gutter: 24px;
  }

  .linkedin-label {
    gap: 4px;
  }

  .linkedin-label > span {
    font-size: 14px;
  }

}

@media (max-width: 600px) {
  :root {
    --header-height: 44px;
    --font-size-navigation: calc(var(--font-size-compact) * 0.63);
  }

  .site-header {
    font-size: var(--font-size-navigation);
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: var(--header-height);
    column-gap: 8px;
    height: auto;
    min-height: var(--header-height);
  }

  .site-name {
    display: none;
  }

  .site-nav {
    position: static;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 8px 0 20px;
  }

  .projects-menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
  }

  .projects-mobile-link { opacity: 0.5; }

  .projects-dropdown {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
    text-align: center;
  }

  .projects-dropdown a { display: block; }

  .site-header[data-menu-open] {
    max-height: calc(100svh - var(--header-top-gap) * 2);
    overflow-y: auto;
    border-radius: calc(var(--header-height) / 2);
  }

  .site-header[data-menu-ready] .site-nav {
    display: none;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 180ms ease, transform 180ms ease, visibility 180ms;
  }

  .site-header[data-menu-open] .site-nav {
    display: flex;
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
  }

  .site-header[data-menu-ready] .menu-toggle {
    position: relative;
    grid-column: 1;
    grid-row: 1;
    justify-self: center;
    display: block;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
  }

  .menu-toggle span {
    position: absolute;
    top: 50%;
    left: 13px;
    width: 18px;
    height: 1px;
    background: currentColor;
    transform: translateY(-3px);
    transition: transform 180ms ease;
  }

  .menu-toggle span + span {
    transform: translateY(3px);
  }

  .menu-toggle[aria-expanded="true"] span {
    transform: rotate(45deg);
  }

  .menu-toggle[aria-expanded="true"] span + span {
    transform: rotate(-45deg);
  }

}

.logo-marquee {
  --logo-width: clamp(92px, 9.8vw, 126px);
  --logo-gap: clamp(40px, 6vw, 88px);
  width: 100%;
  overflow: hidden;
  padding-block: var(--logo-band-padding);
}

.logo-marquee:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: -1px;
}

.logo-marquee-track {
  display: flex;
  width: max-content;
  animation: logo-marquee-scroll 56s linear infinite;
}

.logo-marquee-group {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-around;
  gap: var(--logo-gap);
  min-width: 100vw;
  padding-inline: calc(var(--logo-gap) / 2);
}

.client-logo {
  display: block;
  flex: 0 0 auto;
  width: min(var(--logo-width), calc(var(--logo-height) * var(--logo-ratio)));
  height: min(var(--logo-height), calc(var(--logo-width) / var(--logo-ratio)));
  filter: brightness(var(--theme-ink-brightness));
}

.logo-marquee:hover .logo-marquee-track,
.logo-marquee:focus-within .logo-marquee-track {
  animation-play-state: paused;
}

@keyframes logo-marquee-scroll {
  to {
    transform: translateX(-50%);
  }
}

.section-squares {
  --section-band-height: 0px;
  --section-available-height: calc(var(--viewport-height) - var(--section-band-height));
  min-height: var(--viewport-height);
  overflow-x: clip;
}

#section-2 {
  --section-band-height: calc(var(--logo-height) + var(--logo-band-padding) * 2);
}

#section-2,
#section-3,
#section-4,
#section-5,
#section-6,
#section-7,
#section-8,
#section-9,
#section-10 {
  --divider-color: rgb(var(--project-text-channel) var(--project-text-channel) var(--project-text-channel) / 30%);
  --portrait-surface: rgb(var(--project-background-channel) var(--project-background-channel) var(--project-background-channel));
  background: rgb(var(--project-background-channel) var(--project-background-channel) var(--project-background-channel));
  color: rgb(var(--project-text-channel) var(--project-text-channel) var(--project-text-channel));
}

.section-copy {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

/* Squares fit inside a full-screen section; content stays centered. */
.section-text,
.section-visual {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  min-width: 0;
  min-height: 0;
}

.section-text {
  padding: 24px var(--section-text-inset);
}

.section-text-content {
  width: 100%;
  min-width: 0;
}

.about-linkedin,
.contact-cta {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  min-height: 40px;
  padding: 10px 18px;
  border: 1px solid currentColor;
  border-radius: 999px;
  color: inherit;
  font-family: var(--font-heading);
  font-size: var(--font-size-navigation);
  font-weight: var(--font-heading-weight);
  line-height: 1.4;
  text-decoration: none;
  text-transform: uppercase;
}

.about-linkedin {
  margin-top: 32px;
}

.about-linkedin-icon {
  display: block;
  flex: 0 0 auto;
  width: 1em;
  height: 1em;
}

.about-linkedin:focus-visible,
.contact-cta:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

.section-heading {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: clamp(8px, 1.5vw, 24px);
  margin: 0;
  font-size: var(--font-size-title);
  line-height: 1.1;
  letter-spacing: 0.01em;
  text-align: right;
  text-box: trim-both cap alphabetic;
}

.section-heading-word {
  display: block;
  text-box: trim-both cap alphabetic;
}

.section-heading-two-line {
  display: grid;
  justify-items: end;
  gap: 0.45em;
}

.section-heading-lead {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.5vw, 24px);
}

@media (max-width: 1024px) {
  .section-heading-two-line {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(8px, 1.5vw, 24px);
  }
  .section-heading-lead { display: contents; }
  .section-heading-final-line { order: 1; }
  .section-heading-two-line .section-heading-marker { order: 2; }
}

.section-heading[data-heading-ready] .section-heading-word {
  opacity: 0;
  transform: translateX(-1em);
}

.section-heading[data-heading-ready] .section-heading-marker {
  opacity: 0;
  transform: rotate(0deg);
}

.section-heading[data-heading-ready].is-revealed .section-heading-word {
  opacity: 1;
  transform: translateX(0);
  transition: transform 520ms cubic-bezier(0.22, 1, 0.36, 1), opacity 520ms ease;
}

.section-heading[data-heading-ready].is-revealed .section-heading-marker {
  opacity: 1;
  transform: rotate(180deg);
  transition: transform 520ms cubic-bezier(0.65, 0, 0.35, 1), opacity 520ms ease;
}

.section-divider {
  position: relative;
  height: 1px;
  margin: clamp(24px, 3vw, 40px) 0;
  pointer-events: none;
}

.section-divider::after {
  content: "";
  position: absolute;
  z-index: 1;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--divider-color, rgb(255 255 255 / 30%));
}

.section-visual {
  container-type: inline-size;
}

#section-2 .section-visual,
#section-3 .section-visual,
#section-4 .section-visual,
#section-5 .section-visual,
#section-7 .section-visual,
#section-8 .section-visual,
#section-9 .section-visual {
  position: relative;
  z-index: 2;
}

.project-image,
.project-image img {
  display: block;
  width: 100%;
}

.project-image img {
  height: auto;
}

.project-gallery {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  isolation: isolate;
  touch-action: pan-y pinch-zoom;
  outline: none;
}

.section-project[data-gallery-pinned] {
  height: calc(var(--viewport-height) + var(--gallery-scroll-distance, 0px));
}

.section-project[data-gallery-pinned] > .section-copy {
  position: sticky;
  top: 0;
  height: var(--viewport-height);
  min-height: var(--viewport-height);
  overflow: clip;
}

.project-gallery:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: -5px;
}

.project-gallery-slide {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--gallery-slide-size, 100%);
  aspect-ratio: 1;
  margin: 0;
  overflow: hidden;
  transform: translate(-50%, -50%);
  will-change: transform;
}

.project-gallery-slide img,
.project-gallery-slide video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #242424;
}

.project-gallery-slide:not(:first-of-type) {
  visibility: hidden;
}

.project-gallery[data-landscape-gallery] .project-gallery-slide {
  left: 0;
  height: var(--gallery-slide-size);
}

.project-gallery-slide[data-landscape-slide] video {
  position: absolute;
  top: 0;
  right: 0;
  width: var(--gallery-landscape-width);
}

.image-comparison {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
  background: #242424;
}

.image-comparison img {
  position: absolute;
  inset: 0;
  user-select: none;
  pointer-events: none;
}

.comparison-after-viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  clip-path: inset(0 0 0 var(--comparison-position, 50%));
}

@media (min-width: 1025px) and (prefers-reduced-motion: no-preference) {
  .project-gallery-slide img {
    transform: scale(var(--gallery-image-scale, 1));
    transform-origin: center;
    will-change: transform;
  }
}

.comparison-label {
  position: absolute;
  z-index: 1;
  top: 12px;
  padding: 5px 9px;
  border: 1px solid rgb(255 255 255 / 70%);
  border-radius: 999px;
  background: rgb(20 20 20 / 85%);
  font: 300 10px/1.4 var(--font-heading);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  pointer-events: none;
}

.comparison-label-before { left: 12px; }
.comparison-label-after { right: 12px; }

.image-comparison[data-scroll-comparison] {
  pointer-events: none;
}

[data-scroll-comparison] .comparison-label-before {
  opacity: var(--comparison-before-opacity, 1);
}

[data-scroll-comparison] .comparison-label-after {
  opacity: var(--comparison-after-opacity, 0);
}

[data-scroll-comparison] .comparison-divider {
  opacity: var(--comparison-divider-opacity, 0);
}

.comparison-divider {
  position: absolute;
  z-index: 2;
  inset: 0 auto 0 var(--comparison-position, 50%);
  width: 2px;
  background: #fff;
  transform: translateX(-50%);
  pointer-events: none;
}

.comparison-grip {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid #fff;
  border-radius: 50%;
  background: #141414;
  transform: translate(-50%, -50%);
}

.comparison-grip svg {
  display: block;
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.comparison-control {
  position: absolute;
  z-index: 3;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  touch-action: pan-y pinch-zoom;
}

.image-comparison:has(.comparison-control:focus-visible) {
  outline: 2px solid #fff;
  outline-offset: -4px;
}

.image-comparison:has(.comparison-control:focus-visible) .comparison-grip {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.project-gallery[data-gallery-ready] .project-gallery-slide {
  visibility: visible;
}

@media (min-width: 1025px) {
  .project-gallery-slide {
    left: 0;
  }

  .section-project .section-visual:has(.project-gallery) {
    height: var(--viewport-height);
  }
}

.section-intro {
  width: 100%;
  margin: 0;
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
  font-size: var(--font-size-navigation);
  line-height: 1.4;
  letter-spacing: 0.01em;
}

.section-intro + .section-intro {
  margin-top: 24px;
}

.project-skill-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
  font-size: 10px;
  line-height: 1.4;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.project-skill-labels li {
  padding: 4px 10px;
  border: 1px solid currentColor;
  border-radius: 999px;
  white-space: nowrap;
}

.section-portrait {
  position: relative;
  width: min(360px, calc((100cqw - 64px) * 576 / 775));
  margin: 0;
  justify-self: center;
}

.portrait-transform > img:not(.portrait-control) {
  display: block;
  width: 100%;
  height: auto;
}

/* Transform one flattened group, preserving the independent 3D orbit inside. */
.portrait-transform {
  position: relative;
  background: var(--portrait-surface, #141414);
  transform-origin: 50% 50%;
  animation: portrait-edit 12s cubic-bezier(0.45, 0, 0.2, 1) infinite paused;
}

.portrait-control {
  position: absolute;
  left: calc(100% + 10px);
  z-index: 3;
  display: block;
  width: clamp(12px, 1.2vw, 16px);
  height: auto;
  opacity: 0;
  filter: brightness(var(--theme-ink-brightness)) drop-shadow(0 1px 2px var(--portrait-surface, #141414));
  pointer-events: none;
  user-select: none;
}

.portrait-control-scale {
  top: calc(100% + 10px);
  animation: portrait-scale-cursor 12s ease-in-out infinite paused;
}

.portrait-control-rotation {
  top: -10px;
  transform: translateY(-100%);
  animation: portrait-rotation-cursor 12s ease-in-out infinite paused;
}

.section-portrait[data-transform-playing] .portrait-transform,
.section-portrait[data-transform-playing] .portrait-control {
  animation-play-state: running;
}

@keyframes portrait-edit {
  0%, 10%, 90%, 100% { transform: scale(1) rotate(0deg); }
  28%, 38%, 68%, 76% { transform: scale(0.82) rotate(0deg); }
  50%, 57% { transform: scale(0.82) rotate(-8deg); }
}

@keyframes portrait-scale-cursor {
  0%, 5%, 32%, 70%, 94%, 100% { opacity: 0; }
  10%, 28%, 76%, 90% { opacity: 1; }
}

@keyframes portrait-rotation-cursor {
  0%, 32%, 72%, 100% { opacity: 0; }
  38%, 68% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .portrait-transform { animation: none; }
  .portrait-control { display: none; animation: none; }
}

/* Flatten the entire 3D scene above the decorative frame. */
.portrait-scene {
  position: absolute;
  inset: 0;
  z-index: 2;
  perspective: 1000px;
  perspective-origin: 50% 30%;
  transform-style: preserve-3d;
  pointer-events: none;
}

.portrait-mask {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  transform: translateZ(0);
  /* Keep the edge handles visible; the base portrait fills this small inset. */
  clip-path: inset(6px);
}

.portrait-orbit {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  visibility: hidden;
  pointer-events: none;
}

.portrait-orbit[data-orbit-ready] {
  visibility: visible;
}

.orbit-icon {
  position: absolute;
  top: 30%;
  left: 50%;
  display: block;
  width: 11%;
  max-width: 40px;
  height: auto;
  background: #141414;
  border-radius: 22%;
  user-select: none;
}

.portrait-frame {
  position: absolute;
  inset: 0;
  z-index: 1;
  border: 1px dashed currentColor;
  opacity: 0.6;
  pointer-events: none;
}

.portrait-frame > span {
  position: absolute;
  left: var(--handle-x);
  top: var(--handle-y);
  width: 7px;
  height: 7px;
  background: currentColor;
  transform: translate(-50%, -50%);
}

.intro-measure-word {
  display: inline-block;
  white-space: nowrap;
}

.intro-line,
.intro-line-text {
  display: block;
}

.intro-line {
  /* Keep the reveal mask clear of the font's cap-height overshoot. */
  overflow: visible;
  clip-path: inset(-0.2em -1px);
}

.section-intro .intro-line:first-child {
  text-box: trim-start cap alphabetic;
}

.intro-line-text {
  white-space: nowrap;
  opacity: 0;
  transform: translateY(0.7em);
  transition: none;
}

@media (min-width: 601px) {
  .site-header {
    padding-inline: max(24px, calc(var(--header-text-gutter, calc(var(--section-inset) + var(--text-gutter))) - var(--header-edge-gap)));
  }

  .section-squares .section-copy {
    --square-height-limit: max(0px, calc(var(--section-available-height) - var(--section-inset) * 2));
    width: min(100%, calc(var(--square-height-limit) * 2 + var(--section-inset) * 2));
    min-height: var(--section-available-height);
    margin-inline: auto;
    padding: var(--section-inset);
    align-content: center;
  }

  .section-intro {
    text-align: left;
  }

  .intro-lines {
    display: block;
    width: 100%;
    max-width: 100%;
    margin-inline: auto;
  }
}

@media (min-width: 1025px) {
  /* Equal columns share the gallery's height limit. Extra width becomes
     matching outer gutters, including behind the full-screen airplane layer. */
  .section-squares .section-copy {
    --desktop-column-size: min(50vw, calc(var(--viewport-height) * 0.78), max(0px, calc(var(--viewport-height) - (var(--header-height) + var(--header-top-gap) + 12px) * 2)));
    width: 100%;
    grid-template-columns: minmax(0, 1fr) repeat(2, minmax(0, var(--desktop-column-size))) minmax(0, 1fr);
    margin-inline: 0;
    padding: 0;
    min-height: var(--section-available-height);
  }

  .section-squares .section-text,
  .section-squares .section-visual {
    aspect-ratio: auto;
    height: var(--section-available-height);
    grid-row: 1;
  }

  /* Center copy in the full visible half, including its outer gutter.
     Keep its reading width tied to the shared media size. */
  .section-squares .section-text { grid-column: 1 / 3; }
  .section-squares .section-text-content {
    width: min(100%, calc(var(--desktop-column-size) * 0.8));
  }
  .section-squares .section-visual { grid-column: 3; }

  .section-project .section-visual {
    grid-column: 2;
  }

  .section-project .section-text {
    grid-column: 3 / -1;
    height: var(--viewport-height);
  }

  .section-project .project-image,
  .section-project .project-image img {
    height: var(--desktop-column-size);
  }

  .section-project .project-image img {
    object-fit: contain;
  }

  #section-2 .section-portrait {
    width: min(360px, calc((100cqw - 64px) * 576 / 775), calc((var(--section-available-height) - var(--section-inset) * 2) * 576 / 775));
  }
}

.section-intro.is-revealed .intro-line-text {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 650ms ease, transform 650ms cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: calc(var(--paragraph-delay, 0ms) + var(--line-index) * 110ms);
}

@media (max-width: 600px) {
  .section-copy {
    --mobile-zone-height: calc(var(--section-available-height) / 2);
    grid-template-columns: minmax(0, 1fr);
  }

  .section-text,
  .section-visual {
    aspect-ratio: auto;
    min-height: var(--mobile-zone-height);
  }

  .section-visual {
    height: var(--mobile-zone-height);
  }

  .section-portrait {
    align-self: start;
    top: -24px;
    width: min(360px, calc(100cqw - 64px), calc((var(--mobile-zone-height) - 64px) * 576 / 775));
  }

  .project-image,
  .project-image img {
    height: 100%;
  }

  .project-image img {
    object-fit: cover;
  }

  .section-intro {
    width: 100%;
    text-align: left;
  }

  .section-divider {
    margin-block: clamp(20px, 4.75svh, 40px);
  }

}

/* Both content sections stack on tablets and phones, independently of the header. */
@media (max-width: 1024px) {
  .project-gallery-slide {
    top: auto;
    bottom: 0;
  }

  .project-gallery-slide[data-landscape-slide] video {
    object-fit: cover;
  }

  .section-project .project-image,
  .section-project .project-image img {
    height: 100%;
    object-fit: cover;
  }

  #section-2,
  #section-3,
  #section-4,
  #section-5,
  #section-7,
  #section-8,
  #section-9 {
    --font-size-navigation: calc(var(--font-size-compact) * 0.63);
  }

  #section-2 .section-copy,
  .section-project .section-copy {
    --mobile-zone-height: calc(var(--section-available-height) / 2);
    width: 100%;
    min-height: var(--section-available-height);
    padding: 0;
    grid-template-columns: minmax(0, 1fr);
  }

  #section-2 .section-text,
  #section-3 .section-text,
  #section-4 .section-text,
  #section-5 .section-text,
  #section-7 .section-text,
  #section-8 .section-text,
  #section-9 .section-text,
  #section-2 .section-visual,
  #section-3 .section-visual,
  #section-4 .section-visual,
  #section-5 .section-visual,
  #section-7 .section-visual,
  #section-8 .section-visual,
  #section-9 .section-visual {
    aspect-ratio: auto;
    min-height: var(--mobile-zone-height);
  }

  #section-2 .section-visual,
  #section-3 .section-visual,
  #section-4 .section-visual,
  #section-5 .section-visual,
  #section-7 .section-visual,
  #section-8 .section-visual,
  #section-9 .section-visual {
    height: var(--mobile-zone-height);
  }

  #section-2 .section-portrait {
    align-self: start;
    top: 0;
    width: min(360px, calc(100cqw - 64px), calc((var(--mobile-zone-height) - 64px) * 576 / 775));
  }

  #section-2 .section-copy {
    --mobile-zone-height: calc((var(--section-available-height) - 40px) / 2);
    row-gap: 40px;
  }

  #section-2 .section-divider,
  #section-3 .section-divider,
  #section-4 .section-divider,
  #section-5 .section-divider,
  #section-7 .section-divider,
  #section-8 .section-divider,
  #section-9 .section-divider {
    margin-block: clamp(20px, 4.75svh, 40px);
  }
}

.section-contact {
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: var(--viewport-height);
  scroll-margin-top: calc(-1 * (var(--header-height) + var(--header-top-gap)));
}

.contact-hero {
  display: flex;
  flex-direction: column;
  padding-inline: var(--section-text-inset);
  /* Match the empty space left below the preceding project's visible content. */
  padding-block-end: var(--previous-project-space, 0px);
}

.contact-hero::before,
.contact-hero::after {
  content: "";
  flex: 1 1 0;
  min-height: calc(var(--header-height) + var(--header-top-gap) + 6px);
}

.contact-intro {
  display: grid;
  justify-items: center;
  gap: clamp(24px, 4svh, 40px);
}

.section-contact .section-heading {
  row-gap: 0.45em;
  flex-wrap: wrap;
  justify-content: center;
  text-align: center;
}

.section-contact .section-heading-lead {
  display: flex;
}

.contact-cta {
  min-height: 44px;
  background: transparent;
  cursor: pointer;
  font-size: max(12px, var(--font-size-navigation));
}

html.contact-modal-open { overflow: hidden; }

.contact-dialog {
  box-sizing: border-box;
  width: min(720px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100svh - 32px);
  margin: auto;
  padding: clamp(28px, 4vw, 48px);
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 0;
  border-radius: 0;
  background: #141414;
  color: #fdfdfd;
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
  color-scheme: dark;
}

.contact-dialog::backdrop { background: rgb(0 0 0 / 72%); backdrop-filter: blur(8px); }
.contact-dialog[open] { display: flex; flex-direction: column; animation: contact-enter 280ms cubic-bezier(0.22, 1, 0.36, 1) both; }
.contact-dialog-content { flex: none; width: 100%; min-width: 0; margin-block: auto; }
@keyframes contact-enter { from { opacity: 0; } to { opacity: 1; } }

.contact-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.contact-close svg { width: 100%; height: 100%; }
.contact-close:hover { background: rgb(255 255 255 / 10%); }
.contact-dialog-title {
  display: flex;
  align-items: center;
  gap: 0.25em;
  margin: 0 32px 36px 0;
  font-size: clamp(28px, 5vw, 48px);
  font-weight: inherit;
  line-height: 1.1;
}
.contact-title-word { display: block; }
.contact-title-marker { width: 0.65em; height: 0.65em; flex: none; background: currentColor; transform: rotate(180deg); }
.contact-form { display: grid; gap: 28px; }
.contact-options { min-width: 0; margin: 0; padding: 0; border: 0; }
.contact-options legend, .contact-field { font-size: 12px; line-height: 1.5; text-transform: uppercase; letter-spacing: 0.03em; }
.contact-options legend { padding: 0; margin-bottom: 12px; }
.contact-accordion { position: relative; border-bottom: 1px solid rgb(255 255 255 / 45%); }
.contact-accordion[open] { z-index: 5; }
.contact-accordion summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 44px;
  padding: 8px 0;
  list-style: none;
  color: rgb(255 255 255 / 60%);
  font-size: 13px;
  line-height: 1.5;
  text-transform: uppercase;
  cursor: pointer;
}
.contact-accordion summary::-webkit-details-marker { display: none; }
.contact-accordion summary::marker { content: ''; }
.contact-accordion summary svg { width: 16px; height: 16px; flex: none; transition: transform 180ms ease; }
.contact-accordion[open] summary svg { transform: rotate(180deg); }
.contact-accordion[data-selected] summary { color: #fdfdfd; }
.contact-accordion[open] { background: #fdfdfd; border-color: #fdfdfd; }
.contact-accordion[open] summary { padding-inline: 12px; color: #303030; }
.contact-choices {
  position: absolute;
  z-index: 1;
  top: 100%;
  left: 0;
  right: 0;
  display: grid;
  gap: 0;
  max-height: var(--choice-max-height, min(280px, 40dvh));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 4px 0;
  background: #141414;
  border-top: 1px solid rgb(48 48 48 / 25%);
}
.contact-accordion[data-open-up] .contact-choices { top: auto; bottom: 100%; border-top: 0; border-bottom: 1px solid rgb(48 48 48 / 25%); }
.contact-accordion[open] .contact-choices { background: #fdfdfd; color: #303030; }
.contact-choices label { position: relative; }
.contact-choices input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.contact-choices span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 0;
  font-size: 12px;
  line-height: 1.5;
  text-transform: uppercase;
  transition: color 160ms ease, background 160ms ease;
}
.contact-accordion[data-choice-reveal-ready][open] .contact-choices label {
  opacity: 0;
  transform: translateY(8px);
}
.contact-choices input:checked + span { background: rgb(48 48 48 / 10%); color: #303030; }
.contact-choices input:hover:not(:checked) + span { background: rgb(48 48 48 / 6%); }
.contact-name-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.contact-field { display: grid; gap: 8px; min-width: 0; }
.contact-field input {
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid rgb(255 255 255 / 45%);
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: 300 16px/1.5 var(--font-heading);
  text-transform: none;
}
.contact-form-actions { display: grid; justify-items: start; gap: 12px; }
.contact-submit {
  display: inline-flex;
  align-items: center;
  gap: 24px;
  min-height: 46px;
  padding: 12px 22px;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 13px;
  text-transform: uppercase;
  cursor: pointer;
}
.contact-submit:hover { background: #fdfdfd; color: #141414; }
.contact-submit:disabled { opacity: 0.5; cursor: wait; }
.contact-form-status { margin: 0; font-size: 12px; line-height: 1.6; }
.contact-form-status a { color: inherit; text-underline-offset: 3px; }
.contact-form-status:empty { display: none; }
.contact-dialog :is(button, input, summary):focus-visible { outline: 1px solid #fdfdfd; outline-offset: 4px; }
.contact-choices input:focus-visible + span { outline: 1px solid #fdfdfd; outline-offset: -1px; }
.contact-accordion[open] summary:focus-visible,
.contact-accordion[open] .contact-choices input:focus-visible + span { outline-color: #303030; }
.has-custom-cursor .contact-dialog, .has-custom-cursor .contact-dialog * { cursor: auto !important; }
.has-custom-cursor .contact-dialog :is(button, label, summary, input[type="radio"]) { cursor: pointer !important; }
.has-custom-cursor .contact-dialog input:not([type="radio"]) { cursor: text !important; }
@media (max-width: 480px) {
  .contact-dialog-title { margin-bottom: 28px; }
  .contact-form { gap: 24px; }
  .contact-name-fields { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .contact-choices span { font-size: 12px; }
}
@media (max-width: 600px) {
  .contact-dialog {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100svh;
    height: 100dvh;
    max-height: 100svh;
    max-height: 100dvh;
    margin: 0;
    padding: max(68px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(68px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
  }
  .contact-close { top: max(14px, env(safe-area-inset-top)); right: max(14px, env(safe-area-inset-right)); }
}
@media (prefers-reduced-motion: reduce) {
  .contact-dialog[open] { animation: none; }
  .contact-choices span { transition: none; }
  .contact-accordion summary svg { transition: none; }
  .contact-accordion[data-choice-reveal-ready][open] .contact-choices label { opacity: 1; transform: none; }
}

.contact-cta:hover {
  background: var(--portrait-surface);
  box-shadow: inset 0 0 0 1px currentColor;
}

.footer-content {
  position: relative;
  --footer-top-space: clamp(24px, 4svh, 48px);
  margin-top: calc(-1 * var(--footer-top-space));
  background: #fdfdfd;
  color: #303030;
  --footer-line-gap: clamp(4px, 1.2svh, 8px);
  padding: var(--footer-top-space) var(--section-text-inset) clamp(12px, 2.5svh, 28px);
  font-family: var(--font-heading);
  font-size: max(12px, var(--font-size-navigation));
  font-weight: var(--font-heading-weight);
}

/* A scroll-driven white wash rises through the footer, below the CTA. */
.footer-wash-ready .footer-content {
  isolation: isolate;
  background: var(--portrait-surface, #fdfdfd);
}

.footer-wash-ready .footer-content::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 50%;
  bottom: 0;
  z-index: -1;
  background: linear-gradient(to bottom,
    rgb(253 253 253 / 0) calc(var(--footer-wash-front) - var(--footer-feather)),
    rgb(253 253 253 / 0.01) calc(var(--footer-wash-front) - var(--footer-feather) * 0.875),
    rgb(253 253 253 / 0.04) calc(var(--footer-wash-front) - var(--footer-feather) * 0.75),
    rgb(253 253 253 / 0.1) calc(var(--footer-wash-front) - var(--footer-feather) * 0.625),
    rgb(253 253 253 / 0.2) calc(var(--footer-wash-front) - var(--footer-feather) * 0.5),
    rgb(253 253 253 / 0.36) calc(var(--footer-wash-front) - var(--footer-feather) * 0.375),
    rgb(253 253 253 / 0.57) calc(var(--footer-wash-front) - var(--footer-feather) * 0.25),
    rgb(253 253 253 / 0.78) calc(var(--footer-wash-front) - var(--footer-feather) * 0.125),
    #fdfdfd var(--footer-wash-front));
  pointer-events: none;
}

.footer-wash-ready .footer-columns,
.footer-wash-ready .footer-note {
  color: #cdcdcd;
  mix-blend-mode: difference;
}

/* Keep the muted signature readable over the softer lower glow. */
.footer-wash-ready .footer-note {
  color: rgb(var(--project-text-channel) var(--project-text-channel) var(--project-text-channel));
  mix-blend-mode: normal;
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, auto));
  justify-content: space-between;
  align-items: start;
  gap: clamp(10px, 2svh, 20px) 20px;
}

.footer-columns a {
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  color: inherit;
  text-decoration: none;
}

.footer-columns h3,
.footer-columns p,
.footer-columns a,
.footer-columns time {
  margin: 0;
  font-size: inherit;
}

.footer-columns nav .footer-label {
  margin-bottom: var(--footer-line-gap);
}

.footer-label,
.footer-columns a {
  text-transform: uppercase;
}

.footer-project-links {
  display: grid;
  gap: var(--footer-line-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-contact {
  display: grid;
  gap: clamp(8px, 1.8svh, 20px);
  justify-items: start;
}

.footer-columns .footer-linkedin {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
}

.footer-linkedin svg {
  flex: none;
  width: 0.85em;
  height: 0.85em;
}

.footer-time {
  display: grid;
  gap: var(--footer-line-gap);
}

#dubai-local-time {
  font-variant-numeric: tabular-nums;
}

.footer-note {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  column-gap: 0.25em;
  margin: clamp(36px, 7svh, 80px) 0 0;
  line-height: 1.1;
  text-align: right;
  opacity: 0.5;
}

@media (min-width: 1025px) {
  .footer-note {
    flex-direction: column;
    align-items: flex-end;
  }
}

@media (min-width: 560px) and (max-height: 480px) and (orientation: landscape) {
  .section-contact {
    --font-size-title: clamp(20px, 4vw, 30px);
  }

  .contact-intro { gap: 8px; }

  .footer-content { padding-bottom: 8px; }
  .footer-note { margin-top: 24px; }
}

@media (max-width: 800px) {
  .footer-columns {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    row-gap: clamp(8px, 1.6svh, 16px);
    text-align: center;
  }

  .footer-contact { justify-items: center; }

  .footer-columns > :is(nav, .footer-about, .footer-time) {
    margin-block-start: 1em;
  }

  .footer-note { margin-block-start: clamp(48px, 8svh, 80px); }
}

@media (min-width: 801px) and (max-height: 420px) and (orientation: landscape) {
  .footer-project-links {
    grid-template-columns: repeat(2, auto);
    column-gap: 8px;
  }
}

.custom-cursor {
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  .custom-cursor {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: block;
    overflow: hidden;
    pointer-events: none;
    mix-blend-mode: difference;
    visibility: hidden;
  }

  .custom-cursor::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    transform: translate3d(var(--cursor-x, -100px), var(--cursor-y, -100px), 0) translate(-50%, -50%);
  }

  html.has-custom-cursor,
  .has-custom-cursor * {
    cursor: none !important;
  }

  .has-custom-cursor .custom-cursor {
    visibility: visible;
  }
}

@media (prefers-reduced-motion: reduce) {
  .section-heading[data-heading-ready] .section-heading-word,
  .section-heading[data-heading-ready] .section-heading-marker,
  .section-heading[data-heading-ready].is-revealed .section-heading-word,
  .section-heading[data-heading-ready].is-revealed .section-heading-marker {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .intro-line-text,
  .section-intro.is-revealed .intro-line-text {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .logo-marquee {
    overflow-x: auto;
  }

  .logo-marquee-track {
    animation: none;
  }

  .logo-marquee-group[aria-hidden="true"] {
    display: none;
  }

  .site-header[data-menu-ready] .site-nav,
  .menu-toggle span {
    transition: none;
  }

  .hero-skill-marker.is-turning {
    animation: none;
  }

  .hero-skill,
  .hero-skill-stack {
    transition: none;
  }

  .site-header a::after,
  .linkedin-label::after,
  .footer-columns a::after {
    animation: none;
  }

  .site-header a:is(:hover, :focus-visible)::after,
  .linkedin-label:hover::after,
  .footer-columns a:is(:hover, :focus-visible)::after {
    transform: translateX(0);
  }

  .hero-video-scene {
    transform: none;
    will-change: auto;
  }
}

/* Alternate the same two central columns. */
@media (min-width: 1025px) {
  .section-project-reversed .section-text { grid-column: 1 / 3; }
  .section-project-reversed .section-visual {
    grid-column: 3;
    height: var(--viewport-height);
  }
  .section-project-reversed .project-gallery-slide,
  .section-project-reversed .project-gallery[data-landscape-gallery] .project-gallery-slide {
    left: auto;
    right: 0;
  }
}

/* Empty gallery cards retain the real slides' dimensions and scroll behavior. */
.project-gallery-placeholder {
  width: 100%;
  height: 100%;
  background: color-mix(in srgb, currentColor 4%, rgb(var(--project-background-channel) var(--project-background-channel) var(--project-background-channel)));
}

/* Awaiting the next project's gallery assets. */
.project-placeholder {
  width: min(100cqw, calc(var(--viewport-height) * 0.78));
  aspect-ratio: 1;
  justify-self: start;
  background: color-mix(in srgb, currentColor 4%, rgb(var(--project-background-channel) var(--project-background-channel) var(--project-background-channel)));
}

@media (min-width: 1025px) {
  .section-project .section-visual:has(.project-placeholder) {
    height: var(--viewport-height);
  }
}

@media (max-width: 1024px) {
  .project-placeholder {
    width: min(100cqw, var(--mobile-zone-height));
    align-self: end;
    justify-self: center;
  }
}

/* One viewport stays pinned while native scrolling turns the shared circle. */
.section-video {
  --video-arc-radius: calc(var(--viewport-height) * 0.8);
  --video-arc-center-y: calc(var(--viewport-height) * 1.038);
  position: relative;
  min-height: var(--viewport-height);
  isolation: isolate;
}

.section-video[data-arc-ready] {
  height: calc(var(--video-stage-height, var(--viewport-height)) + var(--video-scroll-distance, 0px));
}

.video-stage {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: stretch;
  grid-template-rows: minmax(0, 1fr) auto;
  row-gap: clamp(12px, 2svh, 20px);
  height: var(--viewport-height);
  min-height: 0;
  padding-top: calc(var(--viewport-height) * 0.405);
  padding-bottom: 0;
  overflow: clip;
}

[data-arc-ready] .video-stage {
  position: sticky;
  top: 0;
}

.video-arc {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 50%;
  width: calc(var(--viewport-height) * 2.4);
  height: var(--viewport-height);
  transform: translateX(-50%);
  pointer-events: none;
}

.video-arc-slots {
  position: relative;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.video-arc-slot {
  position: absolute;
  left: 50%;
  top: var(--video-arc-center-y);
  width: calc(var(--viewport-height) * 0.15525);
  aspect-ratio: 9 / 16;
  border: 0;
  border-radius: 0;
  background: rgb(var(--project-background-channel) var(--project-background-channel) var(--project-background-channel));
  box-shadow: none;
  transform: translate(-50%, -50%) rotate(var(--slot-angle)) translateY(calc(-1 * var(--video-arc-radius)));
  overflow: hidden;
}

.video-arc-slot video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.video-arc-slot[data-video-centered] { pointer-events: auto; }

.video-section-copy {
  position: relative;
  z-index: 1;
  width: min(70%, calc(var(--viewport-height) * 0.72), 960px);
  align-self: center;
  container-type: inline-size;
  text-align: center;
}

.video-section-copy .section-heading {
  display: grid;
  justify-content: center;
  justify-items: center;
  align-items: center;
  gap: 0.45em;
  text-align: center;
}

.video-section-copy .section-heading-lead {
  display: flex;
  align-items: center;
}

@container (min-width: 720px) {
  .video-section-copy .section-heading { display: flex; }
  .video-section-copy .section-heading-lead { display: contents; }
  .video-section-copy .section-heading-final-line { order: 1; }
  .video-section-copy .section-heading-marker { order: 2; }
}

/* Same 0.45em spacing as the other two-line titles. */
.video-section-copy .section-heading-final-line { order: 1; }
.video-section-copy .section-intro { text-align: center; }
.video-section-copy .project-skill-labels { justify-content: center; }

@media (max-width: 1024px) {
  #section-6 { --font-size-navigation: calc(var(--font-size-compact) * 0.63); }
  .video-section-copy { width: 80%; }
  .video-section-copy .section-heading {
    display: grid;
    justify-items: center;
    gap: 0.45em;
  }
}

/* Keep the client strip inside the pinned viewport, below the copy. */
.content-logo-marquee {
  --logo-height: clamp(24px, 4svh, 36px);
  --logo-band-padding: clamp(12px, 2svh, 20px);
  align-self: end;
}

.video-section-copy .section-intro {
  font-size: calc(var(--font-size-navigation) * var(--copy-scale, 1));
}
.video-section-copy .project-skill-labels {
  font-size: max(8px, calc(10px * var(--copy-scale, 1)));
}
.video-section-copy[data-copy-compact] .section-divider { margin-block: clamp(8px, 1.4svh, 14px); }
.video-section-copy[data-copy-compact] .section-intro + .section-intro { margin-top: 12px; }
.video-section-copy[data-copy-compact] .project-skill-labels { margin-top: 20px; gap: 6px; }
.video-section-copy[data-copy-tight] .section-divider { margin-block: 8px; }
.video-section-copy[data-copy-tight] .section-intro + .section-intro { margin-top: 8px; }
.video-section-copy[data-copy-tight] .project-skill-labels { margin-top: 12px; gap: 4px; }

/* Neutral media blocks until the next project's images arrive. */
.project-gallery-placeholder {
  background: color-mix(in srgb, currentColor 5%, rgb(var(--project-background-channel) var(--project-background-channel) var(--project-background-channel)));
}

/* Fit only phone copy to the fixed viewport; heading sizes remain shared. */
@media (max-width: 600px) {
  .section-project > .section-copy {
    height: var(--viewport-height);
    grid-template-rows: repeat(2, minmax(0, 1fr));
  }

  :is(#section-2, #section-3, #section-4, #section-5, #section-7, #section-8, #section-9) .section-text {
    height: var(--mobile-zone-height);
    min-height: 0;
  }

  .section-project .section-text {
    padding-top: calc(var(--header-height) + var(--header-top-gap) + 12px);
    padding-bottom: 12px;
  }

  .video-stage { height: var(--viewport-height); }

  .section-text-content .section-intro,
  .section-text-content .about-linkedin {
    font-size: calc(var(--font-size-navigation) * var(--copy-scale, 1));
  }

  .section-text-content .project-skill-labels {
    font-size: max(8px, calc(10px * var(--copy-scale, 1)));
  }

  :is(#section-2, #section-3, #section-4, #section-5, #section-6, #section-7, #section-8, #section-9) [data-copy-compact] .section-divider { margin-block: clamp(10px, 2.4svh, 20px); }
  [data-copy-compact] .section-intro + .section-intro { margin-top: 12px; }
  [data-copy-compact] .project-skill-labels { margin-top: 20px; gap: 6px; }
  [data-copy-compact] .project-skill-labels li { padding: 3px 8px; }
  [data-copy-compact] .about-linkedin { margin-top: 20px; min-height: 36px; padding: 8px 14px; }

  :is(#section-2, #section-3, #section-4, #section-5, #section-6, #section-7, #section-8, #section-9) [data-copy-tight] .section-divider { margin-block: 10px; }
  [data-copy-tight] .section-intro { line-height: 1.3; }
  [data-copy-tight] .section-intro + .section-intro { margin-top: 8px; }
  [data-copy-tight] .project-skill-labels { margin-top: 12px; gap: 4px; }
  [data-copy-tight] .project-skill-labels li { padding: 2px 6px; }
  [data-copy-tight] .about-linkedin { margin-top: 12px; }
}

/* A single campaign film replaces the section 7 carousel. */
#section-7.section-campaign > .section-copy {
  position: relative;
  width: 100%;
  height: var(--viewport-height);
  min-height: var(--viewport-height);
  margin: 0;
  padding: 0;
  overflow: clip;
  isolation: isolate;
}

#section-7[data-window-scroll] {
  height: calc(var(--viewport-height) + var(--campaign-scroll-distance, 0px));
}

#section-7[data-window-scroll] > .section-copy {
  position: sticky;
  top: 0;
}

#section-7 .campaign-video-target {
  width: min(100%, calc(var(--viewport-height) * 0.78));
  aspect-ratio: 1;
  justify-self: end;
}

.campaign-film-frame {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 3;
  overflow: hidden;
  background: #252f46;
  transform-origin: 0 0;
  will-change: transform;
}

.campaign-film {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.campaign-window-layer {
  position: absolute;
  z-index: 5;
  inset: 0;
  pointer-events: none;
}

.campaign-window-poster,
.campaign-window-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.campaign-window-canvas { opacity: 0; }
.campaign-window-layer[data-frame-ready] .campaign-window-canvas { opacity: 1; }
.campaign-window-layer[data-frame-ready] .campaign-window-poster { visibility: hidden; }
.campaign-window-layer[hidden] { display: none; }

.campaign-window-source {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

#section-7[data-window-scroll] .section-text {
  --campaign-copy-ink: calc(255 * var(--campaign-overlay-white, 1) + var(--project-text-channel) * (1 - var(--campaign-overlay-white, 1)));
  position: relative;
  z-index: 6;
  color: rgb(var(--campaign-copy-ink, 255) var(--campaign-copy-ink, 255) var(--campaign-copy-ink, 255));
  --divider-color: rgb(var(--campaign-copy-ink, 255) var(--campaign-copy-ink, 255) var(--campaign-copy-ink, 255) / 30%);
}

@media (max-width: 1024px) {
  #section-7.section-campaign > .section-copy { grid-template-rows: repeat(2, minmax(0, 1fr)); }
  #section-7 .campaign-video-target {
    width: min(100%, var(--mobile-zone-height));
    align-self: end;
    justify-self: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  #section-7[data-window-scroll] { height: var(--viewport-height); }
  #section-7[data-window-scroll] > .section-copy { position: relative; }
}

/* The airplane introduces its own light section without whitening section 6. */
#section-7.section-campaign,
#section-8,
#section-9 {
  overflow-anchor: none;
  --project-background-channel: 253;
  --project-text-channel: 48;
  --theme-ink-brightness: 0.188235;
}

/* Section 6 inherits the shared section 5 → 6 palette transition. Section 7
   keeps its local light palette and never changes this shared palette. */

/* Partner marks inherit the exact same animated ink as the campaign copy. */
.campaign-partners {
  display: flex;
  align-items: center;
  min-height: var(--partner-size, clamp(32px, 6svh, 52px));
  gap: clamp(16px, 2vw, 24px);
  color: inherit;
}

.campaign-partners {
  margin-bottom: clamp(16px, 2.5svh, 24px);
}

:is(#section-7, #section-9) .section-text-content[data-partner-spacing] .section-divider {
  margin-bottom: var(--partner-divider-gap);
}

.section-text-content[data-partner-spacing] .project-skill-labels {
  margin-top: var(--partner-labels-gap);
}

.campaign-partner-logo {
  display: block;
  flex: 0 0 auto;
  height: calc(var(--partner-size, clamp(32px, 6svh, 52px)) * var(--partner-scale, 1));
  width: calc(var(--partner-size, clamp(32px, 6svh, 52px)) * var(--partner-ratio) * var(--partner-scale, 1));
}
.campaign-partner-cross {
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
  font-size: 20px;
  line-height: 1;
}

.event-partners {
  --partner-scale: 0.8;
  /* Keep the marks black on the light palette and readable on entry. */
  filter: contrast(180%);
}

.event-partner-slash {
  flex: 0 0 1px;
  height: 20px;
  background: currentColor;
  transform: rotate(23deg);
}

/* One responsive rhythm for split project sections (excluding Organic Social). Density is chosen once
   for the whole group, never independently for each paragraph length. */
:is(#section-3, #section-4, #section-5, #section-7, #section-8, #section-9) [data-copy-grid] {
  --project-divider-gap: clamp(24px, 3vw, 40px);
  --project-paragraph-gap: 24px;
  --project-labels-gap: 40px;
}
:is(#section-3, #section-4, #section-5, #section-7, #section-8, #section-9) [data-grid-density="compact"] {
  --project-divider-gap: 20px;
  --project-paragraph-gap: 12px;
  --project-labels-gap: 24px;
}
:is(#section-3, #section-4, #section-5, #section-7, #section-8, #section-9) [data-grid-density="tight"] {
  --project-divider-gap: 10px;
  --project-paragraph-gap: 8px;
  --project-labels-gap: 16px;
}
:is(#section-3, #section-4, #section-5, #section-7, #section-8, #section-9) [data-copy-grid] .section-divider {
  margin-block: var(--project-divider-gap);
}
:is(#section-3, #section-4, #section-5, #section-7, #section-8, #section-9) [data-copy-grid] .section-intro {
  font-size: calc(var(--font-size-navigation) * var(--copy-scale, 1));
  line-height: 1.4;
}
:is(#section-3, #section-4, #section-5, #section-7, #section-8, #section-9) [data-copy-grid] .section-intro + .section-intro {
  margin-top: var(--project-paragraph-gap);
}
:is(#section-3, #section-4, #section-5, #section-7, #section-8, #section-9) [data-copy-grid] .project-skill-labels {
  margin-top: var(--project-labels-gap);
  font-size: max(8px, calc(10px * var(--copy-scale, 1)));
  gap: 8px;
}
:is(#section-3, #section-4, #section-5, #section-7, #section-8, #section-9) [data-copy-grid] .project-skill-labels li {
  padding: 4px 10px;
}
:is(#section-7, #section-9) [data-copy-grid] .campaign-partners {
  margin-bottom: var(--project-divider-gap);
}

@media (max-width: 1024px) {
  :root {
    --project-copy-zone-height: calc(var(--viewport-height) / 2);
    --project-media-zone-height: calc(var(--viewport-height) - var(--project-copy-zone-height));
  }
  :is(#section-3, #section-4, #section-5, #section-7, #section-8, #section-9) > .section-copy {
    --mobile-zone-height: var(--project-media-zone-height);
    height: var(--viewport-height);
    grid-template-rows: var(--project-copy-zone-height) minmax(0, 1fr);
    align-content: stretch;
  }
  :is(#section-3, #section-4, #section-5, #section-7, #section-8, #section-9) .section-text {
    height: var(--project-copy-zone-height);
    min-height: 0;
    padding-top: var(--project-heading-top);
    padding-bottom: 40px;
    align-content: start;
    align-items: start;
  }
  :is(#section-3, #section-4, #section-5, #section-7, #section-8, #section-9) .section-visual {
    height: var(--project-media-zone-height);
    min-height: 0;
  }
  #section-7.section-campaign > .section-copy {
    grid-template-rows: var(--project-copy-zone-height) minmax(0, 1fr);
  }
  #section-2 .section-intro,
  #section-2 .about-linkedin {
    font-size: calc(var(--font-size-navigation) * var(--copy-scale, 1));
  }
}

@media (max-width: 1024px) {
  /* Keep About's breathing room even when the shared copy grid must fit. */
  :is(#section-3, #section-4, #section-5, #section-7, #section-8, #section-9) [data-copy-grid] {
    --project-divider-gap: var(--mobile-divider-gap, clamp(20px, 4.75svh, 40px));
  }
  #section-6 .video-section-copy .section-divider {
    margin-block: var(--mobile-divider-gap, clamp(20px, 4.75svh, 40px));
  }
}

@media (max-width: 1024px) and (prefers-reduced-motion: no-preference) {
  /* Safari's collapsing browser chrome changes the visible screen height. */
  #section-7.section-campaign > .section-copy {
    height: 100dvh;
    min-height: 100dvh;
  }
  #section-7[data-window-scroll] {
    height: calc(100dvh + var(--campaign-scroll-distance, 0px));
  }
}

@media (max-width: 600px) {
  :root {
    --project-copy-zone-height: max(0px, calc(100dvh - 100vw));
    --project-media-zone-height: max(0px, calc(100dvh - var(--project-copy-zone-height)));
  }
  :is(#section-3, #section-4, #section-5, #section-7, #section-8, #section-9) {
    --viewport-height: 100dvh;
  }
  :is(#section-3, #section-4, #section-5, #section-7, #section-8, #section-9) .section-text {
    padding-bottom: 12px;
  }
  #section-7 .campaign-video-target {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    align-self: end;
  }
  .project-gallery-slide {
    max-height: 100%;
  }
  .project-gallery-slide img,
  .project-gallery-slide video {
    object-fit: cover;
  }
}
