:root {
  color-scheme: dark;
  --ink: #0a0a0a;
  --panel: #11110f;
  --paper: #eeeae2;
  --muted: #aaa69e;
  --line: rgba(238, 234, 226, 0.2);
  --accent: #c0ad91;
  --gutter: clamp(1.25rem, 4vw, 4.5rem);
  --display: "Helvetica Neue", "Nimbus Sans L", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

/* Preserve complete showcase compositions and their baked-in watermarks. */
.architecture-showcase .carousel-viewport,
.architecture-showcase .project-image {
  background: #0d0d0c;
}

.architecture-showcase .carousel-slide .project-image img {
  object-fit: contain;
  object-position: center;
}

.architecture-showcase .project-image:hover img,
.architecture-showcase .project-image:focus-visible img {
  transform: none;
}

.architecture-showcase .carousel-footer {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.architecture-showcase .carousel-caption { flex: 1; min-width: 0; }
.showcase-playback {
  order: 2;
  border: 0;
  padding: 0.75rem 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.8125rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  cursor: pointer;
}
.showcase-playback:focus-visible { outline: 1px solid var(--paper); outline-offset: 4px; }

html {
  scroll-behavior: smooth;
  background: var(--ink);
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--display);
  font-size: 1rem;
  line-height: 1.5;
  overflow-x: hidden;
}

body.menu-open,
body.lightbox-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  color: inherit;
  font: inherit;
}

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

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.7rem 1rem;
  background: var(--paper);
  color: var(--ink);
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: fixed;
  z-index: 20;
  inset: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 5.25rem;
  padding: 0 var(--gutter);
  border-bottom: 1px solid transparent;
  transition: background-color 240ms ease, border-color 240ms ease;
}

.site-header.is-scrolled {
  background: rgba(10, 10, 10, 0.88);
  border-bottom-color: var(--line);
  backdrop-filter: blur(14px);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.48rem;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.16em;
}

.wordmark i {
  width: 1.8rem;
  height: 1px;
  background: currentColor;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 3.25vw, 3.75rem);
}

.site-nav a,
.menu-button {
  position: relative;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.site-nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -0.4rem;
  left: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 180ms ease;
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.menu-button {
  display: none;
  align-items: center;
  gap: 0.65rem;
  padding: 0;
  border: 0;
  background: transparent;
}

.menu-button i {
  width: 1.4rem;
  height: 1px;
  background: currentColor;
}

.hero {
  position: relative;
  min-height: 100svh;
  background: #161616;
  overflow: hidden;
}

.hero-image,
.hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-image {
  object-fit: cover;
  object-position: 50% 58%;
  animation: hero-in 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hero-shade {
  background: linear-gradient(90deg, rgba(5, 5, 5, 0.67) 0%, rgba(5, 5, 5, 0.22) 57%, rgba(5, 5, 5, 0.1) 100%);
}

.hero-copy {
  position: absolute;
  z-index: 2;
  left: var(--gutter);
  bottom: clamp(7.5rem, 14vh, 10rem);
  width: min(61rem, calc(100% - 2 * var(--gutter)));
}

.eyebrow,
.section-index {
  margin: 0;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero h1,
.section-heading h2,
.intro h2,
.footer-lead {
  margin: 0;
  font-weight: 300;
  letter-spacing: -0.055em;
  line-height: 0.88;
}

.hero h1 {
  margin-top: 1.35rem;
  font-size: clamp(4rem, 10.5vw, 10.5rem);
  text-wrap: balance;
}

.hero-disciplines {
  margin: 2rem 0 0;
  color: rgba(238, 234, 226, 0.82);
  font-size: clamp(0.82rem, 1.1vw, 1rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-disciplines span {
  margin: 0 0.6rem;
  color: var(--accent);
}

.scroll-cue {
  position: absolute;
  z-index: 2;
  right: var(--gutter);
  bottom: 2.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.scroll-cue i {
  display: block;
  width: 3.2rem;
  height: 1px;
  background: currentColor;
}

.intro {
  display: grid;
  grid-template-columns: minmax(9rem, 0.7fr) 2.25fr minmax(15rem, 0.85fr);
  gap: clamp(2rem, 4vw, 5rem);
  align-items: start;
  padding: clamp(7rem, 13vw, 13rem) var(--gutter);
  border-bottom: 1px solid var(--line);
}

.intro h2 {
  max-width: 12ch;
  font-size: clamp(3rem, 6.3vw, 7rem);
}

.intro-copy {
  margin: 0;
  max-width: 25rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.25rem);
  line-height: 1.55;
}

.portfolio-section {
  padding: clamp(7rem, 12vw, 12rem) var(--gutter);
  background: var(--paper);
  color: var(--ink);
}

.portfolio-section--dark {
  background: var(--panel);
  color: var(--paper);
}

.portfolio-section--selected {
  background: #d8d4cc;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(9rem, 0.7fr) 2.25fr minmax(15rem, 0.85fr);
  gap: clamp(2rem, 4vw, 5rem);
  align-items: end;
  margin-bottom: clamp(4rem, 8vw, 8rem);
}

.section-heading .section-index {
  color: #786f63;
}

.portfolio-section--dark .section-index {
  color: var(--accent);
}

.section-heading h2 {
  font-size: clamp(3.4rem, 7.4vw, 8.4rem);
}

.section-heading > p:last-child {
  margin: 0;
  max-width: 23rem;
  color: #5e5a54;
  font-size: clamp(1rem, 1.25vw, 1.15rem);
}

.portfolio-section--dark .section-heading > p:last-child {
  color: var(--muted);
}

.image-pair {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(17rem, 0.78fr);
  gap: clamp(1rem, 2.2vw, 2.4rem);
  align-items: end;
}

.project {
  margin: 0;
}

.project-image {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: #242424;
  cursor: zoom-in;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 700ms cubic-bezier(0.2, 0.75, 0.2, 1), filter 300ms ease;
}

.project-image:hover img,
.project-image:focus-visible img {
  transform: scale(1.018);
  filter: brightness(0.91);
}

.project-image:focus-visible,
.lightbox-close:focus-visible,
.menu-button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.project--wide .project-image {
  aspect-ratio: 16 / 9;
}

.project--portrait .project-image {
  aspect-ratio: 4 / 5;
}

.project figcaption {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.9rem;
  padding-top: 0.85rem;
  border-top: 1px solid currentColor;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.exhibition-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.38fr) minmax(18rem, 0.62fr);
  gap: clamp(1rem, 2.2vw, 2.4rem);
  align-items: end;
}

.exhibition-grid .project--feature .project-image {
  aspect-ratio: 15 / 9;
}

.exhibition-grid .project:not(.project--feature) .project-image {
  aspect-ratio: 4 / 3;
}

.selected-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1rem, 2.2vw, 2.4rem);
}

.selected-grid .project-image {
  aspect-ratio: 3 / 2;
}

.site-footer {
  min-height: 72vh;
  display: grid;
  grid-template-columns: 1.6fr 0.72fr auto;
  gap: 3rem;
  align-items: end;
  padding: clamp(6rem, 10vw, 10rem) var(--gutter) 3rem;
}

.footer-lead {
  margin-top: 2rem;
  font-size: clamp(3.8rem, 8vw, 9rem);
}

.footer-meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-meta p {
  margin: 0 0 0.25rem;
}

.footer-meta a {
  display: inline-block;
  margin-top: 1.25rem;
  color: var(--paper);
  border-bottom: 1px solid var(--paper);
}

.back-to-top {
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.back-to-top span {
  margin-left: 0.75rem;
}

.lightbox {
  width: 100vw;
  max-width: none;
  height: 100vh;
  max-height: none;
  margin: 0;
  padding: 4.5rem clamp(1rem, 3vw, 3rem) 2rem;
  border: 0;
  background: rgba(7, 7, 7, 0.96);
  color: var(--paper);
}

.lightbox::backdrop {
  background: rgba(0, 0, 0, 0.82);
}

.lightbox img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 1.25rem;
  right: clamp(1rem, 3vw, 3rem);
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 700ms ease, transform 700ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes hero-in {
  from { opacity: 0; transform: scale(1.025); }
  to { opacity: 1; transform: scale(1); }
}

@media (max-width: 900px) {
  .intro,
  .section-heading {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .intro-copy,
  .section-heading > p:last-child {
    max-width: 31rem;
  }

  .image-pair,
  .exhibition-grid {
    grid-template-columns: 1fr;
  }

  .project--portrait {
    width: 72%;
    margin-left: auto;
  }

  .exhibition-grid .project:not(.project--feature) {
    width: 72%;
  }

  .site-footer {
    grid-template-columns: 1fr 1fr;
  }

  .back-to-top {
    grid-column: 2;
  }
}

@media (max-width: 640px) {
  .site-header {
    min-height: 4.5rem;
  }

  .menu-button {
    display: flex;
    z-index: 2;
  }

  .site-nav {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 1.5rem;
    padding: var(--gutter);
    background: var(--ink);
    visibility: hidden;
    opacity: 0;
    transition: opacity 180ms ease, visibility 180ms ease;
  }

  .site-nav.is-open {
    visibility: visible;
    opacity: 1;
  }

  .site-nav a {
    font-size: clamp(2.5rem, 13vw, 4.5rem);
    font-weight: 300;
    letter-spacing: -0.04em;
    text-transform: none;
  }

  .hero {
    min-height: 92svh;
  }

  .hero-image {
    object-position: 59% 50%;
  }

  .hero-shade {
    background: linear-gradient(0deg, rgba(5, 5, 5, 0.74) 0%, rgba(5, 5, 5, 0.1) 72%);
  }

  .hero-copy {
    bottom: 6rem;
  }

  .hero h1 {
    font-size: clamp(3.5rem, 17vw, 5.25rem);
  }

  .hero-disciplines {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.6rem;
    max-width: 20rem;
    line-height: 1.35;
  }

  .hero-disciplines span {
    margin: 0;
  }

  .scroll-cue {
    right: auto;
    left: var(--gutter);
    bottom: 1.75rem;
  }

  .intro,
  .portfolio-section {
    padding-top: 6rem;
    padding-bottom: 6rem;
  }

  .section-heading {
    margin-bottom: 3.25rem;
  }

  .intro h2,
  .section-heading h2 {
    font-size: clamp(3.2rem, 15vw, 5.25rem);
  }

  .project--portrait,
  .exhibition-grid .project:not(.project--feature) {
    width: 88%;
    margin-left: auto;
  }

  .selected-grid {
    grid-template-columns: 1fr;
  }

  .site-footer {
    min-height: 75svh;
    grid-template-columns: 1fr;
    align-content: end;
  }

  .footer-meta,
  .back-to-top {
    grid-column: 1;
  }

  .footer-meta {
    margin-top: 2.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}

/* Editorial refinement */
:root {
  --grid-gap: clamp(1rem, 2.2vw, 2rem);
  --section-y: clamp(5rem, 7.5vw, 7.5rem);
}

.hero-image {
  transform: scaleX(-1);
  animation-name: hero-flipped-in;
}

@keyframes hero-flipped-in {
  from { opacity: 0; transform: scaleX(-1) scale(1.025); }
  to { opacity: 1; transform: scaleX(-1) scale(1); }
}

.intro,
.section-heading {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--grid-gap);
}

.intro {
  align-items: end;
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
}

.intro .section-index,
.section-heading .section-index {
  grid-column: 1 / 3;
}

.intro h2,
.section-heading h2 {
  grid-column: 3 / 10;
}

.intro-copy,
.section-heading > p:last-child {
  grid-column: 10 / 13;
}

.intro h2 {
  font-size: clamp(3.25rem, 5.7vw, 6.4rem);
}

.portfolio-section,
.portfolio-section--dark,
.portfolio-section--selected {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
  background: #0d0d0c;
  color: var(--paper);
  border-top: 1px solid var(--line);
}

.portfolio-section--alternate {
  background: #141412;
}

.section-heading {
  align-items: end;
  margin-bottom: clamp(2.75rem, 4.5vw, 4.5rem);
}

.section-heading .section-index,
.portfolio-section--dark .section-index {
  color: var(--accent);
}

.section-heading h2 {
  font-size: clamp(3.4rem, 6.6vw, 7.2rem);
}

.section-heading > p:last-child,
.portfolio-section--dark .section-heading > p:last-child {
  max-width: 21rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.15vw, 1.1rem);
}

.carousel {
  width: 100%;
}

.carousel-viewport {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  background: #20201e;
}

.carousel-viewport::-webkit-scrollbar {
  display: none;
}

.carousel-viewport:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.carousel-slide {
  width: 100%;
  height: 100%;
  margin: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.carousel-slide .project-image {
  height: 100%;
}

.carousel-slide .project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel--technical .carousel-slide .project-image img {
  object-position: center;
}

.carousel-footer {
  min-height: 4.5rem;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
}

.carousel-caption {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  margin: 0;
  padding-right: clamp(1rem, 2vw, 2rem);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.carousel-caption span:last-child {
  color: var(--muted);
  white-space: nowrap;
}

.carousel-controls {
  display: grid;
  grid-template-columns: 3.25rem 3.25rem;
  align-self: stretch;
}

.carousel-controls button {
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-left: 1px solid var(--line);
  background: transparent;
  color: var(--paper);
  font-size: 1.15rem;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, opacity 160ms ease;
}

.carousel-controls button:hover,
.carousel-controls button:focus-visible {
  background: var(--paper);
  color: var(--ink);
}

.carousel-controls button:focus-visible {
  position: relative;
  z-index: 1;
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.carousel-controls button:disabled {
  opacity: 0.28;
  cursor: default;
}

.carousel-controls button:disabled:hover {
  background: transparent;
  color: var(--paper);
}

.site-footer {
  min-height: 0;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--grid-gap);
  padding-top: clamp(5rem, 8vw, 8rem);
  padding-bottom: 2.5rem;
  border-top: 1px solid var(--line);
}

.site-footer > div:first-child {
  grid-column: 1 / 9;
}

.footer-lead {
  font-size: clamp(3.8rem, 6.7vw, 7.4rem);
}

.footer-meta {
  grid-column: 9 / 12;
}

.back-to-top {
  grid-column: 12 / 13;
  justify-self: end;
}

@media (max-width: 900px) {
  .intro,
  .section-heading {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }

  .intro .section-index,
  .section-heading .section-index {
    grid-column: 1 / 3;
  }

  .intro h2,
  .section-heading h2 {
    grid-column: 3 / 9;
  }

  .intro-copy,
  .section-heading > p:last-child {
    grid-column: 3 / 8;
    margin-top: 0.25rem;
  }

  .site-footer > div:first-child {
    grid-column: 1 / 9;
  }

  .footer-meta {
    grid-column: 1 / 7;
  }

  .back-to-top {
    grid-column: 10 / 13;
  }
}

@media (max-width: 640px) {
  :root {
    --section-y: 4.75rem;
  }

  .hero-image {
    object-position: 50% 50%;
  }

  .intro,
  .section-heading {
    display: grid;
    grid-template-columns: 1fr;
    row-gap: 1.4rem;
  }

  .intro .section-index,
  .section-heading .section-index,
  .intro h2,
  .section-heading h2,
  .intro-copy,
  .section-heading > p:last-child {
    grid-column: 1;
  }

  .section-heading {
    margin-bottom: 2.75rem;
  }

  .carousel-viewport {
    aspect-ratio: 4 / 3;
  }

  .carousel-slide .project-image img {
    object-position: center;
  }

  .carousel-footer {
    min-height: 4rem;
  }

  .carousel-caption {
    display: block;
    min-width: 0;
    padding-right: 0.75rem;
  }

  .carousel-caption span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .carousel-caption span:last-child {
    margin-top: 0.25rem;
    font-size: 0.75rem;
  }

  .carousel-controls {
    grid-template-columns: 3.5rem 3.5rem;
  }

  .site-footer {
    grid-template-columns: 1fr;
    row-gap: 2.5rem;
  }

  .site-footer > div:first-child,
  .footer-meta,
  .back-to-top {
    grid-column: 1;
  }

  .footer-meta {
    margin-top: 0;
  }

  .back-to-top {
    justify-self: start;
  }
}

/* Final editorial polish */

:root {
  --section-y: clamp(3.9rem, 5.25vw, 5.75rem);
}

#work,
#profile,
#contact {
  scroll-margin-top: 5rem;
}

.intro,
.portfolio-section,
.site-footer {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.intro > :not(.section-watermark),
.portfolio-section > *,
.site-footer > * {
  position: relative;
  z-index: 1;
}

.intro::before,
.portfolio-section--alternate::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(192, 173, 145, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(192, 173, 145, 0.032) 1px, transparent 1px);
  background-size: clamp(3.25rem, 5vw, 5rem) clamp(3.25rem, 5vw, 5rem);
  mask-image: linear-gradient(90deg, transparent 8%, #000 58%, #000 100%);
}

.portfolio-section--alternate::after {
  content: "";
  position: absolute;
  z-index: 0;
  top: clamp(2.5rem, 4vw, 4.5rem);
  right: var(--gutter);
  width: clamp(7rem, 12vw, 11rem);
  aspect-ratio: 1;
  border-top: 1px solid rgba(192, 173, 145, 0.14);
  border-right: 1px solid rgba(192, 173, 145, 0.14);
  background:
    linear-gradient(90deg, transparent calc(50% - 0.5px), rgba(192, 173, 145, 0.07) 50%, transparent calc(50% + 0.5px)),
    linear-gradient(transparent calc(50% - 0.5px), rgba(192, 173, 145, 0.07) 50%, transparent calc(50% + 0.5px));
  pointer-events: none;
}

.section-watermark {
  position: absolute;
  z-index: 0;
  top: 50%;
  right: clamp(-2rem, 2vw, 2rem);
  width: min(29vw, 27rem);
  height: auto;
  opacity: 0.045;
  filter: grayscale(1);
  transform: translateY(-50%);
  pointer-events: none;
  user-select: none;
}

.intro {
  min-height: 0;
}

.intro h2 {
  font-size: clamp(3.1rem, 5.15vw, 5.8rem);
}

.intro-copy {
  max-width: 20rem;
}

.section-heading {
  margin-bottom: clamp(2rem, 2.8vw, 3rem);
}

.section-heading h2 {
  max-width: 11ch;
  font-size: clamp(3.3rem, 5.9vw, 6.45rem);
}

.section-heading > p:last-child {
  align-self: end;
  margin-bottom: 0.22rem;
}

.carousel {
  position: relative;
  z-index: 1;
}

.carousel-viewport {
  position: relative;
  z-index: 1;
  cursor: grab;
}

.carousel-viewport:active {
  cursor: grabbing;
}

.carousel-controls {
  position: absolute;
  z-index: 3;
  top: 0;
  left: 0;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  width: 100%;
  aspect-ratio: 16 / 9;
  pointer-events: none;
}

.carousel-controls button {
  display: grid;
  align-items: center;
  width: clamp(5.5rem, 15vw, 13rem);
  height: 100%;
  padding: 0 clamp(1rem, 2vw, 2rem);
  border: 0;
  background: transparent;
  color: var(--paper);
  opacity: 0.92;
  cursor: pointer;
  pointer-events: auto;
  transition: opacity 180ms ease;
}

.carousel-controls button:first-child {
  justify-items: start;
}

.carousel-controls button:last-child {
  justify-items: end;
}

.carousel-controls button span {
  display: grid;
  place-items: center;
  width: clamp(2.8rem, 3.8vw, 3.5rem);
  aspect-ratio: 1;
  border: 1px solid rgba(238, 234, 226, 0.42);
  border-radius: 50%;
  background: rgba(10, 10, 10, 0.42);
  box-shadow: 0 0.35rem 1.5rem rgba(0, 0, 0, 0.18);
  font-size: 1.12rem;
  backdrop-filter: blur(10px);
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.carousel-controls button:hover,
.carousel-controls button:focus-visible {
  background: linear-gradient(90deg, rgba(5, 5, 5, 0.16), transparent);
  color: var(--paper);
}

.carousel-controls button:last-child:hover,
.carousel-controls button:last-child:focus-visible {
  background: linear-gradient(270deg, rgba(5, 5, 5, 0.16), transparent);
}

.carousel-controls button:hover span,
.carousel-controls button:focus-visible span {
  border-color: rgba(238, 234, 226, 0.76);
  background: rgba(10, 10, 10, 0.64);
  transform: scale(1.04);
}

.carousel-controls button:focus-visible {
  outline: 0;
}

.carousel-controls button:focus-visible span {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.carousel-controls button:disabled {
  opacity: 0;
  cursor: default;
  pointer-events: none;
}

.carousel-controls button:disabled:hover {
  background: transparent;
}

.carousel-footer {
  grid-template-columns: 1fr;
  min-height: 3.8rem;
}

.carousel-caption {
  width: 100%;
  padding-right: 0;
}

.site-footer {
  padding-top: clamp(4.25rem, 6vw, 6.5rem);
  padding-bottom: 2.25rem;
}

.site-footer::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 0;
  right: var(--gutter);
  left: var(--gutter);
  height: 1px;
  background: linear-gradient(90deg, var(--accent) 0 5.5rem, transparent 5.5rem);
  opacity: 0.7;
}

.site-footer > div:first-child {
  grid-column: 1 / 8;
}

.footer-lead {
  max-width: 9ch;
  font-size: clamp(3.6rem, 5.8vw, 6.35rem);
}

.footer-mark {
  grid-column: 8 / 9;
  align-self: end;
  width: clamp(3.4rem, 4.5vw, 4.75rem);
  height: auto;
  margin-bottom: 0.2rem;
  opacity: 0.56;
  filter: grayscale(1);
}

.footer-meta {
  align-self: end;
}

@media (max-width: 900px) {
  .section-heading {
    row-gap: 1rem;
  }

  .intro-copy,
  .section-heading > p:last-child {
    margin-top: 0;
  }

  .site-footer > div:first-child {
    grid-column: 1 / 8;
  }

  .footer-mark {
    grid-column: 8 / 9;
  }

  .footer-meta {
    grid-column: 1 / 7;
  }
}

@media (max-width: 640px) {
  :root {
    --section-y: 3.9rem;
  }

  .intro,
  .section-heading {
    row-gap: 1.05rem;
  }

  .intro h2,
  .section-heading h2 {
    font-size: clamp(3rem, 14vw, 4.6rem);
  }

  .section-heading {
    margin-bottom: 2rem;
  }

  .section-heading > p:last-child {
    max-width: 28rem;
  }

  .section-watermark {
    right: -16vw;
    width: min(66vw, 20rem);
    opacity: 0.04;
  }

  .portfolio-section--alternate::after {
    top: 2rem;
    right: 1.25rem;
    width: 6.5rem;
  }

  .carousel-controls {
    aspect-ratio: 4 / 3;
  }

  .carousel-controls button {
    width: 5.25rem;
    padding: 0 0.8rem;
  }

  .carousel-controls button span {
    width: 2.75rem;
    font-size: 1rem;
  }

  .carousel-footer {
    min-height: 3.6rem;
  }

  .site-footer {
    row-gap: 2rem;
    padding-top: 4.25rem;
  }

  .site-footer > div:first-child,
  .footer-mark,
  .footer-meta,
  .back-to-top {
    grid-column: 1;
  }

  .footer-mark {
    width: 3.25rem;
    margin-top: -0.4rem;
    margin-bottom: 0;
  }
}

/* Personal identity and client presentation */

:root {
  --section-y: clamp(3.35rem, 4.35vw, 4.85rem);
}

.site-header {
  min-height: 6.25rem;
  transition: min-height 220ms ease, background-color 240ms ease, border-color 240ms ease;
}

.site-header.is-scrolled {
  min-height: 4.9rem;
}

.wordmark {
  gap: 0.9rem;
  letter-spacing: 0;
}

.wordmark img {
  width: 3.35rem;
  height: auto;
  opacity: 0.96;
  filter: grayscale(1);
  transition: width 220ms ease, opacity 180ms ease;
}

.site-header.is-scrolled .wordmark img {
  width: 2.65rem;
}

.wordmark-copy {
  display: grid;
  gap: 0.18rem;
  line-height: 1.15;
}

.wordmark-copy strong {
  font-size: clamp(0.96rem, 1.1vw, 1.1rem);
  font-weight: 500;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.wordmark-copy > span {
  color: rgba(238, 234, 226, 0.72);
  font-size: clamp(0.68rem, 0.75vw, 0.76rem);
  font-weight: 500;
  letter-spacing: 0.115em;
  text-transform: uppercase;
}

.hero-copy {
  bottom: clamp(6.75rem, 12vh, 8.75rem);
}

.eyebrow {
  font-size: 0.8rem;
}

.intro,
.portfolio-section {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
}

.section-heading {
  margin-bottom: clamp(1.6rem, 2.15vw, 2.35rem);
}

.intro-copy,
.section-heading > p:last-child,
.portfolio-section--dark .section-heading > p:last-child {
  max-width: 24rem;
  color: rgba(238, 234, 226, 0.72);
  font-size: clamp(1.02rem, 1.25vw, 1.18rem);
  line-height: 1.48;
}

.portfolio-section:not(.portfolio-section--alternate)::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(192, 173, 145, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(192, 173, 145, 0.026) 1px, transparent 1px);
  background-size: clamp(3.5rem, 5vw, 5.25rem) clamp(3.5rem, 5vw, 5.25rem);
  mask-image: linear-gradient(90deg, transparent 0 62%, #000 92%, transparent 100%);
}

.carousel-footer {
  min-height: 3.55rem;
}

.carousel-controls button:disabled {
  opacity: 0.92;
  cursor: pointer;
  pointer-events: auto;
}

.clients-section {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(3.35rem, 4.35vw, 4.85rem) 0 clamp(3.75rem, 5vw, 5.5rem);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #11110f;
}

.clients-section::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(42rem, 46vw);
  pointer-events: none;
  background-image:
    linear-gradient(rgba(192, 173, 145, 0.038) 1px, transparent 1px),
    linear-gradient(90deg, rgba(192, 173, 145, 0.038) 1px, transparent 1px);
  background-size: 4.5rem 4.5rem;
  mask-image: linear-gradient(90deg, transparent, #000);
}

.clients-heading {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--grid-gap);
  align-items: end;
  margin: 0 0 clamp(2.2rem, 3vw, 3.1rem);
  padding: 0 var(--gutter);
}

.clients-heading .section-index {
  grid-column: 1 / 3;
}

.clients-heading h2 {
  grid-column: 3 / 10;
  max-width: 36rem;
  margin: 0;
  color: rgba(238, 234, 226, 0.83);
  font-size: clamp(1.18rem, 1.65vw, 1.55rem);
  font-weight: 400;
  letter-spacing: -0.018em;
  line-height: 1.35;
}

.client-marquee {
  position: relative;
  z-index: 1;
  width: 100%;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}

.client-track {
  display: flex;
  width: max-content;
  animation: client-marquee 38s linear infinite;
  will-change: transform;
}

.client-logo-group {
  --client-gap: clamp(3.75rem, 6.5vw, 7.5rem);
  display: flex;
  align-items: center;
  gap: var(--client-gap);
  margin: 0;
  padding: 0 var(--client-gap) 0 0;
  list-style: none;
}

.client-logo-group li {
  display: grid;
  flex: 0 0 clamp(8.5rem, 11.5vw, 11.75rem);
  place-items: center;
  height: 3.8rem;
}

.client-logo-group img {
  width: 100%;
  max-height: 3.45rem;
  object-fit: contain;
  opacity: 0.72;
  filter: grayscale(1);
  transition: opacity 180ms ease;
}

.client-logo-group li:hover img {
  opacity: 0.9;
}

@keyframes client-marquee {
  to {
    transform: translate3d(-50%, 0, 0);
  }
}

.site-footer {
  padding-top: clamp(3.75rem, 5vw, 5.5rem);
}

@media (max-width: 900px) {
  .clients-heading {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }

  .clients-heading .section-index {
    grid-column: 1 / 3;
  }

  .clients-heading h2 {
    grid-column: 3 / 9;
  }
}

@media (max-width: 640px) {
  :root {
    --section-y: 3.3rem;
  }

  .site-header,
  .site-header.is-scrolled {
    min-height: 5.6rem;
  }

  .wordmark {
    gap: 0.65rem;
  }

  .wordmark img,
  .site-header.is-scrolled .wordmark img {
    width: 2.8rem;
  }

  .wordmark-copy {
    max-width: 10.75rem;
  }

  .wordmark-copy strong {
    font-size: 0.79rem;
  }

  .wordmark-copy > span {
    font-size: 0.58rem;
    letter-spacing: 0.075em;
    line-height: 1.3;
  }

  .hero-copy {
    bottom: 7rem;
  }

  .section-heading {
    margin-bottom: 1.55rem;
  }

  .intro-copy,
  .section-heading > p:last-child,
  .portfolio-section--dark .section-heading > p:last-child {
    font-size: 1rem;
  }

  .clients-section {
    padding-top: 3.3rem;
    padding-bottom: 4rem;
  }

  .clients-heading {
    grid-template-columns: 1fr;
    row-gap: 1rem;
    margin-bottom: 2.4rem;
  }

  .clients-heading .section-index,
  .clients-heading h2 {
    grid-column: 1;
  }

  .clients-heading h2 {
    max-width: 25rem;
    font-size: 1.08rem;
  }

  .client-logo-group {
    --client-gap: 3rem;
  }

  .client-logo-group li {
    flex-basis: 8.5rem;
    height: 3.25rem;
  }

  .client-logo-group img {
    max-height: 3rem;
  }

  .client-track {
    animation-duration: 32s;
  }
}

@media (prefers-reduced-motion: reduce) {
  .client-marquee {
    overflow-x: auto;
    mask-image: none;
    scrollbar-width: none;
  }

  .client-marquee::-webkit-scrollbar {
    display: none;
  }

  .client-track {
    animation: none !important;
    transform: none;
  }

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

/* Continuous portfolio flow */

:root {
  --section-y: clamp(3rem, 3.9vw, 4.25rem);
}

body,
main,
.work,
.intro,
.portfolio-section,
.portfolio-section--alternate,
.clients-section,
.site-footer {
  background-color: #0d0d0c;
}

.intro {
  padding-top: clamp(3.4rem, 4.6vw, 5rem);
  padding-bottom: clamp(3.4rem, 4.6vw, 5rem);
  border-bottom: 0;
}

.portfolio-section,
.portfolio-section--dark,
.portfolio-section--selected {
  padding-top: var(--section-y);
  padding-bottom: clamp(2.2rem, 3vw, 3.25rem);
  border-top: 0;
}

.intro h2,
.section-heading h2 {
  grid-column: 1 / 9;
}

.intro-copy,
.section-heading > p:last-child {
  grid-column: 9 / 13;
}

.section-heading {
  margin-bottom: clamp(1.35rem, 1.85vw, 1.9rem);
}

.intro::before,
.portfolio-section::before,
.clients-section::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  width: auto;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(192, 173, 145, 0.027) 1px, transparent 1px),
    linear-gradient(90deg, rgba(192, 173, 145, 0.027) 1px, transparent 1px);
  background-size: clamp(3.5rem, 5vw, 5.25rem) clamp(3.5rem, 5vw, 5.25rem);
}

.intro::before,
.portfolio-section:nth-child(odd)::before {
  mask-image: linear-gradient(90deg, transparent 0 54%, #000 88%, transparent 100%);
}

.portfolio-section:nth-child(even)::before,
.clients-section::before {
  mask-image: linear-gradient(90deg, transparent 0, #000 14%, transparent 48%);
}

.clients-section {
  padding-top: clamp(3.2rem, 4vw, 4.4rem);
  padding-bottom: clamp(3.6rem, 4.8vw, 5.2rem);
  border-top: 0;
  border-bottom: 0;
}

.section-kicker {
  margin: 0;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.clients-heading .section-kicker {
  grid-column: 1 / 3;
}

.clients-heading h2 {
  grid-column: 3 / 9;
}

.client-track,
.client-marquee:hover .client-track,
.client-marquee:focus-within .client-track {
  animation-play-state: running;
}

.site-footer {
  min-height: 0;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--grid-gap);
  row-gap: clamp(2.5rem, 4vw, 4.25rem);
  align-items: start;
  padding-top: clamp(3.8rem, 5vw, 5.5rem);
  padding-bottom: 2.5rem;
  border-top: 0;
}

.site-footer::before {
  opacity: 0.45;
}

.site-footer::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0 0 0 52%;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(192, 173, 145, 0.024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(192, 173, 145, 0.024) 1px, transparent 1px);
  background-size: 5rem 5rem;
  mask-image: linear-gradient(90deg, transparent, #000);
}

.site-footer > .footer-invitation.footer-invitation {
  grid-column: 1 / 7;
  align-self: start;
}

.footer-lead {
  max-width: 10ch;
  margin-top: 1.4rem;
  font-size: clamp(3.25rem, 5.1vw, 5.55rem);
}

.site-footer > .footer-signature {
  grid-column: 8 / 13;
  display: grid;
  grid-template-columns: minmax(7.5rem, 10.5rem) minmax(0, 1fr);
  gap: clamp(1.5rem, 2.5vw, 2.75rem);
  align-items: center;
  align-self: end;
}

.footer-mark {
  grid-column: 1;
  width: 100%;
  max-width: 10.5rem;
  margin: 0;
  opacity: 0.82;
}

.footer-meta {
  grid-column: 2;
  align-self: center;
  color: rgba(238, 234, 226, 0.72);
  font-size: 1rem;
  line-height: 1.4;
}

.footer-meta .footer-name {
  margin: 0 0 0.35rem;
  color: var(--paper);
  font-size: clamp(1.4rem, 2vw, 1.85rem);
  font-weight: 400;
  letter-spacing: -0.025em;
}

.footer-meta .footer-role {
  margin: 0;
  font-size: clamp(0.98rem, 1.15vw, 1.1rem);
}

.footer-meta .footer-link {
  margin-top: 1.35rem;
  color: var(--paper);
  font-size: clamp(1.15rem, 1.5vw, 1.35rem);
  letter-spacing: 0.015em;
}

.back-to-top {
  grid-column: 8 / 13;
  justify-self: start;
  align-self: end;
}

@media (max-width: 900px) {
  .intro h2,
  .section-heading h2 {
    grid-column: 1 / 6;
  }

  .intro-copy,
  .section-heading > p:last-child {
    grid-column: 6 / 9;
  }

  .clients-heading .section-kicker {
    grid-column: 1 / 3;
  }

  .clients-heading h2 {
    grid-column: 3 / 9;
  }

  .site-footer > .footer-invitation.footer-invitation {
    grid-column: 1 / 7;
  }

  .site-footer > .footer-signature {
    grid-column: 7 / 13;
    grid-template-columns: minmax(6.5rem, 8rem) minmax(0, 1fr);
    gap: 1.35rem;
  }

  .back-to-top {
    grid-column: 7 / 13;
  }
}

@media (max-width: 700px) {
  .site-footer > .footer-invitation.footer-invitation,
  .site-footer > .footer-signature,
  .back-to-top {
    grid-column: 1 / 13;
  }

  .site-footer > .footer-signature {
    width: min(100%, 30rem);
    grid-template-columns: minmax(7rem, 8.5rem) minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  :root {
    --section-y: 3rem;
  }

  .intro {
    padding-top: 3.25rem;
    padding-bottom: 3.25rem;
  }

  .intro h2,
  .section-heading h2,
  .intro-copy,
  .section-heading > p:last-child {
    grid-column: 1;
  }

  .section-heading {
    margin-bottom: 1.35rem;
  }

  .clients-heading .section-kicker,
  .clients-heading h2 {
    grid-column: 1;
  }

  .site-footer {
    row-gap: 2.5rem;
    padding-top: 3.75rem;
  }

  .footer-lead {
    font-size: clamp(3rem, 13vw, 4.35rem);
  }

  .site-footer > .footer-signature {
    grid-template-columns: 7rem minmax(0, 1fr);
    gap: 1.25rem;
  }

  .footer-meta .footer-name {
    font-size: 1.4rem;
  }

  .footer-meta .footer-link {
    font-size: 1.15rem;
  }
}

@media (max-width: 400px) {
  .site-footer > .footer-signature {
    grid-template-columns: 5.75rem minmax(0, 1fr);
  }

  .footer-meta .footer-name {
    font-size: 1.25rem;
  }

  .footer-meta .footer-role {
    font-size: 0.92rem;
  }
}

/* Direct hero-to-work hierarchy */

.work {
  position: relative;
  isolation: isolate;
}

.section-heading,
.clients-heading {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: calc(var(--grid-gap) * 0.8);
  row-gap: 0;
  align-items: end;
  margin-bottom: clamp(1.25rem, 1.7vw, 1.75rem);
}

.clients-heading {
  padding: 0 var(--gutter);
}

.section-heading h2,
.clients-heading h2 {
  grid-column: 1 / 7;
  max-width: 11ch;
  font-size: clamp(3.3rem, 5.9vw, 6.45rem);
  font-weight: 300;
  letter-spacing: -0.055em;
  line-height: 0.88;
}

.section-heading > p:last-child,
.clients-heading > p:last-child,
.portfolio-section--dark .section-heading > p:last-child {
  grid-column: 7 / 11;
  align-self: end;
  max-width: 25rem;
  margin: 0 0 0.2rem;
  color: rgba(238, 234, 226, 0.96);
  font-size: clamp(1.416rem, 1.7936vw, 1.6756rem);
  font-weight: 500;
  line-height: 1.48;
}

.clients-section {
  padding-top: var(--section-y);
}

@media (max-width: 900px) {
  .section-heading,
  .clients-heading {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }

  .section-heading h2,
  .clients-heading h2 {
    grid-column: 1 / 6;
  }

  .section-heading > p:last-child,
  .clients-heading > p:last-child {
    grid-column: 6 / 9;
    font-size: clamp(1.3216rem, 2.301vw, 1.5104rem);
  }
}

@media (max-width: 640px) {
  .section-heading,
  .clients-heading {
    grid-template-columns: 1fr;
    row-gap: 1rem;
    margin-bottom: 1.3rem;
  }

  .section-heading h2,
  .clients-heading h2,
  .section-heading > p:last-child,
  .clients-heading > p:last-child {
    grid-column: 1;
  }

  .section-heading h2,
  .clients-heading h2 {
    max-width: 11ch;
    font-size: clamp(3rem, 14vw, 4.6rem);
  }

  .section-heading > p:last-child,
  .clients-heading > p:last-child,
  .portfolio-section--dark .section-heading > p:last-child {
    max-width: 28rem;
    margin: 0;
    font-size: 1.298rem;
    line-height: 1.5;
  }
}

.footer-meta .footer-email {
  display: inline-block;
  margin-top: 0.65rem;
  color: var(--paper);
  font-size: clamp(1.05rem, 1.35vw, 1.22rem);
  border-bottom: 1px solid currentColor;
}

/* Restrained section spacing and centred client hierarchy. */
.portfolio-section {
  padding-bottom: clamp(1.936rem, 2.64vw, 2.86rem);
}

.portfolio-section + .portfolio-section,
.clients-section {
  padding-top: calc(var(--section-y) * 0.88);
}

.clients-heading {
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  row-gap: 1.25rem;
  text-align: center;
  margin-bottom: clamp(2.2rem, 3vw, 3.1rem);
}

.clients-heading h2,
.clients-heading > p:last-child {
  grid-column: 1;
}

.clients-heading > p:last-child {
  max-width: 36rem;
  margin: 0;
}

/* Pair each description with the actual title width, not a distant grid line. */
@media (min-width: 901px) {
  .portfolio-section > .section-heading {
    grid-template-columns: max-content minmax(0, 30rem);
    column-gap: clamp(2rem, 3vw, 3rem);
    align-items: center;
  }

  .portfolio-section > .section-heading h2 {
    grid-column: 1;
    max-width: none;
  }

  .portfolio-section > .section-heading > p:last-child {
    grid-column: 2;
    align-self: center;
    max-width: 30rem;
    margin: 0;
    font-size: clamp(1.77rem, 2.242vw, 2.0945rem);
    line-height: 1.4;
    transform: translateY(0.6rem);
  }
}

/* Finish the clients-to-contact spacing pass without changing the footer. */
.clients-section {
  padding-bottom: clamp(3.168rem, 4.224vw, 4.576rem);
}

/* Category links inherit the title metrics; indicators stay out of layout. */
.category-link {
  display: block;
  color: inherit;
}

.category-link-end {
  position: relative;
}

.category-link-arrow {
  position: absolute;
  left: calc(100% + 0.22em);
  top: 50%;
  transform: translateY(-45%);
  font-size: 0.35em;
  line-height: 1;
  letter-spacing: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 150ms ease;
}

.category-link:focus-visible {
  outline: 1px solid rgba(238, 234, 226, 0.7);
  outline-offset: 6px;
}

.category-link:focus-visible .category-link-arrow {
  opacity: 1;
}

@media (hover: hover) {
  .category-link:hover .category-link-arrow { opacity: 1; }
}

/* A compact contact row with the existing identity and controls. */
@media (min-width: 701px) {
  .site-footer > .footer-invitation.footer-invitation {
    grid-column: 1 / 3;
    grid-row: 1;
    align-self: center;
  }

  .site-footer > .footer-signature {
    grid-column: 3 / 10;
    grid-row: 1;
    width: 100%;
    max-width: 40rem;
    align-self: center;
    justify-self: center;
  }

  .site-footer > .back-to-top {
    grid-column: 10 / 13;
    grid-row: 1;
    align-self: center;
    justify-self: end;
  }
}

/* A wider identity pairing, with contact details kept in reading order. */
.site-footer .footer-mark {
  max-width: 12rem;
}

.site-footer .footer-meta .footer-email,
.site-footer .footer-meta .footer-link {
  display: block;
  width: fit-content;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.site-footer .footer-meta .footer-email {
  margin-top: 1rem;
  font-size: clamp(0.9rem, 1.15vw, 1.1rem);
}

.site-footer .footer-meta .footer-link {
  margin-top: 0.65rem;
}

@media (min-width: 901px) {
  .site-footer > .footer-signature {
    grid-template-columns: clamp(9rem, 12vw, 12rem) minmax(0, 1fr);
    gap: clamp(2rem, 4vw, 3.5rem);
  }
}

@media (max-width: 900px) {
  .site-footer > .footer-signature {
    grid-template-columns: clamp(6.5rem, 18vw, 9rem) minmax(0, 1fr);
    gap: clamp(1.25rem, 3vw, 2rem);
  }
}

/* Homepage-only passive showcases; project galleries retain their own rules. */
.hero-image.static-wrenbury { transform: none; animation: none; object-fit: contain; object-position: center; }
.work [data-showcase] { width: min(100%, 80vw); margin-inline: auto; }
.work [data-showcase-viewport] {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  grid-auto-flow: row;
  aspect-ratio: auto;
  height: min(54vw, 68svh);
  overflow: hidden;
  background: #0d0d0c;
  touch-action: pan-y;
  cursor: default;
}
.work [data-showcase] .carousel-slide {
  grid-area: 1 / 1;
  min-width: 0;
  min-height: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 800ms ease;
}
.work [data-showcase] .carousel-slide.is-active { opacity: 1; }
.work [data-showcase] .project-image { display: flex; align-items: center; justify-content: center; background: #0d0d0c; cursor: default; }
.work [data-showcase] .project-image img { width: 100%; height: 100%; object-fit: contain; object-position: center; transform: none; filter: none; }
.work [data-showcase] .carousel-footer { display: flex; align-items: center; gap: 1.5rem; }
.work [data-showcase] .carousel-caption { flex: 1; min-width: 0; }
@media (max-width: 900px) {
  .work [data-showcase] { width: 100%; }
  .work [data-showcase-viewport] { height: min(65vw, 68svh); }
}
.hero-image, .work .carousel img, .project-tile img, .project-gallery img, .lightbox img {
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  user-select: none;
}

/* Larger homepage Architecture and Exhibition stages, with full compositions. */
.work .portfolio-section:is([aria-labelledby="architecture-title"], [aria-labelledby="exhibition-title"]) [data-showcase] {
  width: 92vw;
  max-width: 92vw;
  margin-inline: calc((100% - 92vw) / 2);
}
.work .portfolio-section[aria-labelledby="architecture-title"] [data-showcase-viewport] {
  height: min(62.477612vw, 80svh);
}
.work .portfolio-section[aria-labelledby="exhibition-title"] [data-showcase-viewport] {
  height: min(51.75vw, 80svh);
}
.work .portfolio-section:is([aria-labelledby="architecture-title"], [aria-labelledby="exhibition-title"]) [data-showcase] .project-image img {
  object-fit: contain;
  object-position: center;
  transform: none;
}

/* Shared footer: preserve the approved homepage alignment on every page. */
.site-footer > .footer-invitation.footer-invitation {
  grid-column: 1 / 10;
  grid-row: 1;
  justify-self: start;
}
.site-footer > .footer-signature {
  grid-column: 1 / 10;
  grid-row: 2;
  justify-self: start;
  align-self: start;
  text-align: left;
  margin: 0;
}
.site-footer > .back-to-top {
  grid-column: 10 / 13;
  grid-row: 1;
  justify-self: end;
}
@media (max-width: 700px) {
  .site-footer > .footer-invitation.footer-invitation { grid-column: 1 / 7; }
  .site-footer > .back-to-top { grid-column: 7 / 13; }
  .site-footer > .footer-signature { grid-column: 1 / 13; }
}

/* Give the shared identity/navigation more room at the screen edges. */
.site-header {
  padding-inline: clamp(1.5rem, 6vw, 7rem);
}
@media (max-width: 640px) {
  .site-header { padding-inline: 1.5rem; }
  .site-nav { padding-inline: 1.5rem; }
}
