/* Greystone Work and Project pages. Extends portfolio.css without changing shared site styles. */

.section-title em { color: var(--accent-deep); }
.project-gallery .section-title em,
.shade .section-title em { color: var(--work-accent-light); }

/* Cinematic portfolio entry */
.work-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  height: min(78svh, 760px);
  min-height: 520px;
  overflow: hidden;
  background: var(--night);
  color: var(--cream);
  isolation: isolate;
}
.work-hero video {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.work-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(12, 20, 30, 0.64) 0%, rgba(12, 20, 30, 0.18) 72%),
    linear-gradient(0deg, rgba(12, 20, 30, 0.66) 0%, transparent 52%),
    linear-gradient(180deg, rgba(12, 20, 30, 0.4) 0%, transparent 28%);
}
.work-hero__copy { padding: calc(var(--header) + var(--s-6)) 0 var(--s-7); }
.work-hero h1 {
  max-width: 10ch;
  font-size: var(--fs-hero);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.03em;
}
.work-hero h1 span { display: block; }
.work-hero h1 em { color: var(--accent-light); font-weight: 600; }

.work-index { padding: var(--section) 0; }
.filter-block {
  display: grid;
  grid-template-columns: auto minmax(13rem, 20rem);
  align-items: center;
  justify-content: end;
  gap: var(--s-3);
  margin-bottom: var(--section);
}
.filter-block label {
  color: var(--muted);
  font-size: var(--fs-small);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.filter-block select {
  width: 100%;
  height: var(--control);
  padding: 0 2.7rem 0 var(--s-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-field);
  appearance: none;
  background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%2317457c' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right var(--s-4) center / 0.75rem;
}
.filter-block select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(31, 90, 158, 0.14); }

/* One clear featured project, never duplicated in the grid */
.featured-project { margin-bottom: var(--section); }
.featured-project__label {
  display: block;
  margin-bottom: var(--s-4);
  color: var(--accent-deep);
  font-size: var(--fs-small);
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.featured-project__card {
  display: flex;
  align-items: flex-end;
  min-height: clamp(420px, 52vw, 650px);
  border-radius: var(--radius);
  text-decoration: none;
}
.featured-project__card::after,
.project-card::after {
  background: linear-gradient(0deg, rgba(12, 20, 30, 0.9) 0%, rgba(12, 20, 30, 0.4) 34%, transparent 70%);
  transition: background 0.35s ease;
}
.featured-project__body {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-5);
  width: 100%;
  padding: var(--pad-panel);
}
.featured-project__body h2 {
  margin-top: var(--s-1);
  color: var(--cream);
  font-size: clamp(2.4rem, 1.4rem + 3vw, 4.5rem);
  line-height: 0.95;
}
.project-location {
  color: rgba(248, 250, 252, 0.78);
  font-size: var(--fs-ui);
}
.featured-project__card:hover > img { transform: scale(1.03); }

.showcase__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-5);
  margin-bottom: var(--s-5);
}
.showcase__head .section-head { margin: 0; }
.showcase__count { flex: none; margin: 0 0 0.25rem; }

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-5);
  padding: 0;
}
.project-card {
  display: flex;
  align-items: flex-end;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-decoration: none;
}
.project-card__body {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: var(--pad-card);
  transform: translateY(2px);
  transition: transform 0.35s var(--ease);
}
.project-card h3 { color: var(--cream); }
.project-card:hover > img { transform: scale(1.03); }
.project-card:hover::after { background: linear-gradient(0deg, rgba(12, 20, 30, 0.94) 0%, rgba(12, 20, 30, 0.5) 40%, transparent 74%); }
.project-card:hover .project-card__body { transform: none; }
.project-card.is-new { animation: rise 0.65s var(--ease) both; }

.showcase__more { display: flex; justify-content: center; margin-top: var(--s-6); }
.empty {
  padding: var(--pad-panel);
  border: var(--edge);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--muted);
  text-align: center;
}

/* Project detail */
.project-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: min(78svh, 760px);
  overflow: hidden;
  background: var(--night);
  color: var(--cream);
  isolation: isolate;
}
.project-hero__fill,
.project-hero__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.project-hero__fill {
  z-index: -3;
  object-fit: cover;
  filter: blur(28px) brightness(0.62) saturate(0.9);
  transform: scale(1.08);
}
.project-hero__image {
  z-index: -2;
  object-fit: contain;
  object-position: center center;
}
.project-hero__name {
  position: absolute;
  z-index: 2;
  left: var(--gutter);
  bottom: 1.5cm;
  max-width: min(18ch, 70%);
  color: #fff;
  font-size: calc(clamp(1.65rem, 1.25rem + 1vw, 2.35rem) + 6pt);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.03em;
  text-shadow: 0 2px 18px rgba(8, 14, 22, 0.45);
}
.project-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(0deg, rgba(12, 20, 30, 0.88) 0%, rgba(12, 20, 30, 0.24) 55%, transparent 75%),
    linear-gradient(180deg, rgba(12, 20, 30, 0.44) 0%, transparent 28%);
}
.project-hero__copy { padding: calc(var(--header) + var(--s-6)) 0 var(--s-7); }
.project-hero__copy h1 {
  max-width: 15ch;
  font-size: var(--fs-hero);
  line-height: 0.96;
  letter-spacing: -0.03em;
}
.project-hero__meta { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); margin-bottom: var(--s-3); color: var(--accent-light); font-size: var(--fs-small); font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.project-hero__meta span + span::before { content: "·"; margin-right: var(--s-4); }

.project-intro { padding: var(--section) 0 0; }
.project-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.project-facts > div { padding: var(--s-5) var(--s-5) var(--s-5) 0; }
.project-facts > div + div { padding-left: var(--s-5); border-left: 1px solid var(--line); }
.project-facts dt { color: var(--muted); font-size: var(--fs-small); font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.project-facts dd { margin: var(--s-2) 0 0; font-family: var(--display); font-size: 1.25rem; line-height: 1.3; }
.project-about {
  display: grid;
  grid-template-columns: minmax(0, 0.65fr) minmax(0, 1.35fr);
  gap: var(--s-6);
  padding-top: var(--section);
}
.project-about p { max-width: 44rem; color: var(--muted); }

.project-gallery { padding: var(--section) 0 0; }
.project-gallery__viewport { overflow: hidden; cursor: grab; touch-action: pan-y; }
.project-gallery__viewport:active { cursor: grabbing; }
.project-gallery__track {
  display: flex;
  gap: var(--s-5);
  padding: 0;
  transition: transform 0.8s var(--ease);
  will-change: transform;
}
.project-gallery__slide {
  flex: 0 0 min(74vw, 900px);
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--night);
}
.project-gallery__slide img { width: 100%; height: 100%; object-fit: cover; }
.project-gallery__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  margin-top: var(--s-5);
}
.project-gallery__status { color: var(--muted); font-size: var(--fs-ui); }
.view-all { align-self: center; }

@media (max-width: 1024px) {
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-gallery__slide { flex-basis: 82vw; }
}
@media (max-width: 760px) {
  .work-hero { min-height: 480px; height: 66svh; }
  .filter-block { grid-template-columns: minmax(0, 1fr); justify-content: stretch; }
  .featured-project__body { align-items: flex-start; flex-direction: column; }
  .featured-project__card { min-height: 430px; }
  .showcase__head { align-items: flex-start; flex-direction: column; }
  .project-grid { grid-template-columns: minmax(0, 1fr); gap: var(--s-4); }
  .project-card { aspect-ratio: 4 / 3; }
  .project-hero { min-height: 620px; }
  .project-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-facts > div:nth-child(odd) { padding-left: 0; border-left: 0; }
  .project-facts > div:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .project-about { grid-template-columns: minmax(0, 1fr); }
  .project-gallery__slide { flex-basis: 88vw; }
}
@media (max-width: 560px) {
  .work-hero__copy { padding-bottom: var(--s-6); }
  .featured-project__card { min-height: 390px; }
  .project-hero { min-height: 560px; }
  .project-gallery__slide { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .project-card.is-new { animation: none; }
  .project-card > img, .featured-project__card > img, .project-gallery__track { transition: none; }
}

/* Portfolio experience v3 */
:root {
  --work-ink: #16202a;
  --work-night: #0e1823;
  --work-accent: #2f6db5;
  --work-accent-deep: #17457c;
  --work-accent-light: #a9c8ec;
  --work-paper: #f2f3f1;
  --work-white: #ffffff;
  --work-line: rgba(40, 52, 66, 0.14);
  --work-shadow: 0 18px 50px rgba(40, 52, 66, 0.12);
}

html { overflow-x: clip; }
body { overflow-x: clip; background: var(--work-paper); }

/* Shared motion controls */
.motion-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 2.65rem;
  padding: 0 1rem;
  border: 1px solid rgba(12, 20, 30, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--work-ink);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  backdrop-filter: blur(12px);
  transition: color 0.3s ease, background 0.3s ease, border-color 0.3s ease, transform 0.35s var(--ease);
}
.motion-toggle:hover {
  border-color: var(--work-ink);
  background: var(--work-ink);
  color: var(--cream);
  transform: translateY(-2px);
}
.motion-toggle__icon {
  position: relative;
  width: 0.72rem;
  height: 0.72rem;
  flex: none;
}
.motion-toggle__icon::before,
.motion-toggle__icon::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  border-radius: 2px;
  background: currentColor;
}
.motion-toggle__icon::before { left: 1px; }
.motion-toggle__icon::after { right: 1px; }
.motion-toggle.is-paused .motion-toggle__icon::before {
  inset: 0;
  width: auto;
  background: currentColor;
  clip-path: polygon(12% 0, 100% 50%, 12% 100%);
}
.motion-toggle.is-paused .motion-toggle__icon::after { display: none; }

.js .motion-reveal {
  opacity: 0;
  filter: blur(3px);
  transform: translateY(34px) scale(0.985);
  transition:
    opacity 0.8s ease var(--reveal-delay, 0ms),
    filter 0.8s ease var(--reveal-delay, 0ms),
    transform 1s var(--ease) var(--reveal-delay, 0ms);
}
.js .motion-reveal.is-visible {
  opacity: 1;
  filter: none;
  transform: none;
}
.js .project-grid__item.motion-reveal {
  transition:
    opacity 0.72s ease var(--reveal-delay, 0ms),
    filter 0.78s ease var(--reveal-delay, 0ms),
    transform 0.95s var(--ease) var(--reveal-delay, 0ms),
    clip-path 0.95s var(--ease) var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
.js .project-grid__item.reveal-from-left {
  transform: translate3d(-62px, 16px, 0) rotate(-1.4deg);
}
.js .project-grid__item.reveal-from-right {
  transform: translate3d(62px, 16px, 0) rotate(1.4deg);
}
.js .project-grid__item.reveal-rise {
  transform: translate3d(0, 54px, 0) scale(0.97);
}
.js .project-grid__item.reveal-scale {
  transform: translate3d(0, 22px, 0) scale(0.87) rotate(0.8deg);
}
.js .project-grid__item.reveal-wipe {
  transform: translate3d(0, 18px, 0);
}
.js .project-grid__item.reveal-wipe .project-card {
  clip-path: inset(0 100% 0 0 round var(--radius-media));
  transition:
    clip-path 0.95s var(--ease) var(--reveal-delay, 0ms),
    box-shadow 0.65s var(--ease),
    transform 0.5s ease;
}
.js .project-grid__item.motion-reveal.is-visible {
  opacity: 1;
  filter: none;
  transform: none;
  will-change: auto;
}
.js .project-grid__item.reveal-wipe.is-visible .project-card {
  clip-path: inset(-40px);
}

/* Portfolio opening */
.work-hero {
  height: min(82svh, 860px);
  min-height: 580px;
}
.work-hero video {
  transform: scale(1.04);
  animation: work-hero-drift 14s ease-out both;
}
.work-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle at 72% 36%, rgba(47, 109, 181, 0.18), transparent 34%);
  pointer-events: none;
}
.work-hero::after {
  background:
    linear-gradient(90deg, rgba(12, 20, 30, 0.74) 0%, rgba(12, 20, 30, 0.18) 72%),
    linear-gradient(0deg, rgba(12, 20, 30, 0.84) 0%, transparent 58%),
    linear-gradient(180deg, rgba(12, 20, 30, 0.5) 0%, transparent 30%);
}
.work-hero__copy { padding-bottom: clamp(3.5rem, 8vw, 6.5rem); }
.work-hero h1 {
  max-width: 14ch;
  overflow: hidden;
  font-size: clamp(2rem, 1.7rem + 1.5vw, 3.1rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.03em;
  animation: work-title-in 1.2s var(--ease) 0.15s both;
}
.work-hero h1 em {
  color: var(--work-accent-light);
  font-weight: 600;
}
.work-hero__line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: clamp(0.55rem, 1.2vw, 0.95rem);
  max-width: 38rem;
  margin-top: 1.05rem;
  color: rgba(248, 250, 252, 0.9);
  font-size: clamp(1rem, 0.9rem + 0.35vw, 1.25rem);
  font-weight: 750;
  line-height: 1.2;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  animation: work-line-in 0.75s var(--ease) 0.42s both;
}
.work-hero__line i {
  color: var(--work-accent-light);
  font-size: 1.15em;
  font-style: normal;
  font-weight: 500;
}
@keyframes work-hero-drift {
  from { transform: scale(1.1); }
  to { transform: scale(1.02); }
}
@keyframes work-title-in {
  from { opacity: 0; transform: translateY(70px); clip-path: inset(0 0 100%); }
  to { opacity: 1; transform: none; clip-path: inset(0); }
}
@keyframes work-line-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

.work-index {
  overflow-x: clip;
  padding: clamp(2.75rem, 5vw, 4.5rem) 0 var(--section);
}

/* Featured project reel */
.featured-showcase { margin-bottom: clamp(3rem, 5.5vw, 5rem); }
.featured-showcase__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-5);
  margin-bottom: clamp(1.1rem, 2vw, 1.65rem);
}
.featured-showcase__title em {
  color: var(--work-accent-deep);
}
.featured-showcase__all {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(12, 20, 30, 0.45);
  color: var(--work-ink);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color 0.3s ease, border-color 0.3s ease;
}
.featured-showcase__all span {
  color: var(--work-accent-deep);
  font-size: 1rem;
  transition: transform 0.35s var(--ease);
}
.featured-showcase__all:hover,
.featured-showcase__all:focus-visible {
  border-color: var(--work-accent-deep);
  color: var(--work-accent-deep);
}
.featured-showcase__all:hover span,
.featured-showcase__all:focus-visible span { transform: translateY(3px); }
/* The reel breaks out of the content column and runs edge to edge */
.featured-showcase__stage {
  --featured-inset: clamp(1rem, 3vw, 2.5rem);
  position: relative;
  margin-inline: calc(50% - 50vw);
}
.featured-showcase__viewport {
  overflow: hidden;
  padding: 0.8rem 0 1.4rem var(--featured-inset);
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
}
.featured-showcase__viewport:active { cursor: grabbing; }
.featured-showcase__prev,
.featured-showcase__next {
  position: absolute;
  z-index: 3;
  top: 50%;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid rgba(15, 25, 36, 0.08);
  border-radius: 50%;
  background: #fff;
  color: var(--work-ink);
  box-shadow: 0 8px 24px rgba(15, 25, 36, 0.18);
  transform: translateY(-50%);
  transition: background 0.3s ease, color 0.3s ease, transform 0.35s var(--ease);
}
.featured-showcase__prev { left: var(--featured-inset); }
.featured-showcase__next { right: var(--featured-inset); }
.featured-showcase__prev svg,
.featured-showcase__next svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.featured-showcase__prev:hover,
.featured-showcase__prev:focus-visible,
.featured-showcase__next:hover,
.featured-showcase__next:focus-visible {
  background: var(--work-accent);
  color: #fff;
}
.featured-showcase__prev:hover,
.featured-showcase__prev:focus-visible { transform: translateY(-50%) translateX(-2px); }
.featured-showcase__next:hover,
.featured-showcase__next:focus-visible { transform: translateY(-50%) translateX(2px); }
.featured-showcase > .featured-showcase__all-grid { display: none; }
.featured-showcase.is-all .featured-showcase__stage { display: none; }
.featured-showcase.is-all > .featured-showcase__all-grid { display: grid; }
.featured-showcase__viewport:focus-visible {
  outline-offset: 0.35rem;
}
.featured-showcase__track {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 1.8vw, 1.5rem);
  width: max-content;
  padding: 0;
  transform: translate3d(0, 0, 0);
  transition: transform 0.7s cubic-bezier(0.2, 0.74, 0.25, 1);
  will-change: transform;
}
.featured-showcase.is-dragging .featured-showcase__track { transition: none; }
.featured-showcase:not(.is-ready) .featured-showcase__track { opacity: 0; }
.featured-showcase__item {
  position: relative;
  flex: 0 0 calc(var(--featured-reel-width, 100vw) * 0.76);
  width: calc(var(--featured-reel-width, 100vw) * 0.76);
  opacity: 0;
  filter: saturate(0.72) brightness(0.68);
  pointer-events: none;
  transition: opacity 0.5s ease, filter 0.6s ease;
  will-change: opacity;
}
.featured-showcase__item.is-prev {
  opacity: 0.24;
}
.featured-showcase__item.is-next {
  z-index: 1;
  opacity: 0.82;
  filter: saturate(0.82) brightness(0.78);
  pointer-events: auto;
}
.featured-showcase__item.is-active {
  z-index: 2;
  opacity: 1;
  filter: none;
  pointer-events: auto;
}
.featured-card {
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  position: relative;
  display: block;
  width: 44.12%;
  height: clamp(440px, 38vw, 590px);
  overflow: hidden;
  border-radius: var(--radius-media);
  background: var(--work-night);
  color: var(--cream);
  box-shadow: var(--work-shadow);
  text-decoration: none;
  transform: perspective(1300px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
  transform-style: preserve-3d;
  transition: width 0.7s cubic-bezier(0.2, 0.74, 0.25, 1), height 0.7s var(--ease), box-shadow 0.45s var(--ease), transform 0.35s ease;
}
.featured-showcase__item.is-active .featured-card { width: 100%; }
.featured-showcase__item.is-next .featured-card { height: clamp(400px, 34vw, 530px); }
.featured-showcase__item.is-next .featured-card__body { padding: clamp(1.25rem, 2vw, 1.75rem); }
.featured-showcase__item.is-next .featured-card h3 {
  max-width: 10ch;
  font-size: clamp(1.8rem, 1.25rem + 1.8vw, 2.75rem);
}
.featured-card__media,
.featured-card__media img,
.featured-card__overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.featured-card__media { overflow: hidden; }
.featured-card__media img {
  object-fit: cover;
  transform: scale(1.01);
  transition: transform 1.25s var(--ease), filter 0.6s ease;
}
.featured-card__overlay {
  background:
    radial-gradient(circle at var(--spot-x, 75%) var(--spot-y, 25%), rgba(255, 255, 255, 0.12), transparent 28%),
    linear-gradient(0deg, rgba(12, 20, 30, 0.94) 0%, rgba(12, 20, 30, 0.6) 34%, rgba(12, 20, 30, 0.16) 68%, rgba(12, 20, 30, 0.03) 100%);
  transition: background 0.45s ease;
}
.featured-card__body {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: clamp(1.5rem, 2.6vw, 2.5rem);
  transform: translateZ(34px);
}
/* Only the card in focus shows its name; it rises in each time a new project arrives */
.featured-card__body > * {
  transition: opacity 0.55s ease, transform 0.8s var(--ease);
}
.featured-card__body > :nth-child(1) { transition-delay: 0.3s; }
.featured-card__body > :nth-child(2) { transition-delay: 0.42s; }
.featured-showcase__item:not(.is-active) .featured-card__body > * {
  opacity: 0;
  transform: translateY(26px);
  transition-duration: 0.2s;
  transition-delay: 0s;
}
.featured-card__type {
  margin-top: auto;
  color: rgba(248, 250, 252, 0.76);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.featured-card h3 {
  max-width: 14ch;
  margin-top: 1.1rem;
  color: #ffffff;
  font-size: clamp(2.55rem, 1.7rem + 2.35vw, 4.15rem);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.03em;
  text-shadow: 0 3px 22px rgba(12, 20, 30, 0.3);
}
.featured-card__location {
  margin-top: 0.7rem;
  color: rgba(248, 250, 252, 0.88);
  font-size: 0.95rem;
  font-weight: 600;
}
.featured-card__location::before {
  content: "";
  display: inline-block;
  width: 0.38rem;
  height: 0.38rem;
  margin: 0 0.55rem 0.12rem 0;
  border-radius: 50%;
  background: var(--work-accent-light);
}
.featured-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 1.5rem;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.featured-card__link i {
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 50%;
  font-style: normal;
  transition: color 0.35s ease, background 0.35s ease, transform 0.45s var(--ease);
}
.featured-card:hover,
.featured-card:focus-visible {
  box-shadow: 0 28px 70px rgba(40, 52, 66, 0.22);
}
.featured-card:hover .featured-card__media img,
.featured-card:focus-visible .featured-card__media img { transform: scale(1.065); }
.featured-card:hover .featured-card__link i,
.featured-card:focus-visible .featured-card__link i {
  background: var(--work-accent);
  border-color: var(--work-accent);
  transform: translate(3px, -3px);
}
/* Hover: same highlight as the project cards, revealing "View project" */
.featured-card__overlay::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--work-accent), var(--work-accent-light));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.8s var(--ease);
}
.featured-card__body > .featured-card__link {
  height: 0;
  margin-top: 0;
  overflow: hidden;
  color: var(--work-accent-light);
  font-size: 0.8rem;
  opacity: 0;
  transform: translateY(8px);
  transition: height 0.6s var(--ease), margin 0.6s var(--ease), opacity 0.45s ease, transform 0.7s var(--ease);
  transition-delay: 0s;
}
.featured-card__body > .featured-card__link i {
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
  background: none;
  font-size: 1.05rem;
}
.featured-showcase__item.is-active .featured-card:hover,
.featured-showcase__item.is-active .featured-card:focus-visible {
  box-shadow: 0 30px 70px rgba(12, 20, 30, 0.28);
}
.featured-showcase__item.is-active .featured-card:hover .featured-card__overlay,
.featured-showcase__item.is-active .featured-card:focus-visible .featured-card__overlay {
  background:
    radial-gradient(circle at var(--spot-x, 75%) var(--spot-y, 25%), rgba(255, 255, 255, 0.16), transparent 30%),
    linear-gradient(0deg, rgba(12, 20, 30, 0.96) 0%, rgba(12, 20, 30, 0.66) 38%, rgba(12, 20, 30, 0.2) 72%, rgba(12, 20, 30, 0.05) 100%);
}
.featured-showcase__item.is-active .featured-card:hover .featured-card__overlay::after,
.featured-showcase__item.is-active .featured-card:focus-visible .featured-card__overlay::after { transform: scaleX(1); }
.featured-showcase__item.is-active .featured-card:hover .featured-card__link,
.featured-showcase__item.is-active .featured-card:focus-visible .featured-card__link {
  height: 1.4rem;
  margin-top: 0.9rem;
  opacity: 1;
  transform: none;
}
.featured-showcase__item.is-active .featured-card:hover .featured-card__link i,
.featured-showcase__item.is-active .featured-card:focus-visible .featured-card__link i {
  background: none;
  transform: translate(2px, -2px);
}

/* Filterable project archive */
.project-browser {
  padding-top: clamp(2rem, 3.5vw, 3.25rem);
  border-top: 1px solid var(--work-line);
  scroll-margin-top: 6rem;
}
.showcase__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-6);
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
.showcase__head .section-title em { color: var(--work-accent-deep); }
.filter-block {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  justify-content: flex-end;
  gap: 0.8rem;
  margin: 0;
}
.filter-block label {
  color: #4f5a66;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}
.filter-block select {
  width: 13.5rem;
  border-color: rgba(40, 52, 66, 0.22);
  background-color: var(--work-white);
  color: var(--work-ink);
  font-weight: 700;
  box-shadow: 0 8px 25px rgba(40, 52, 66, 0.06);
}
.showcase__count {
  margin: 0 0 1.4rem;
  color: #56616d;
  font-size: 0.82rem;
  font-weight: 700;
}
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
  padding: 0;
}
.project-grid__item { min-width: 0; }
.project-grid__item:last-child:nth-child(3n + 1) { grid-column: 2; }
.project-card {
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  --card-lift: 0px;
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius-media);
  background: var(--work-night);
  box-shadow: 0 10px 28px rgba(40, 52, 66, 0.1);
  color: var(--cream);
  text-decoration: none;
  transform: perspective(1100px) translateY(var(--card-lift)) rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
  transform-style: preserve-3d;
  transition: box-shadow 0.65s var(--ease), transform 0.5s ease;
}
.project-card__media,
.project-card__media img,
.project-card__overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.project-card__media { overflow: hidden; }
.project-card__media img {
  object-fit: cover;
  opacity: 0;
  transform: scale(1.015);
  transition: opacity 0.46s ease, transform 1.35s var(--ease), filter 0.65s ease;
}
.project-card__media img.is-active { opacity: 1; }
.project-card__overlay {
  background:
    radial-gradient(circle at var(--spot-x, 70%) var(--spot-y, 25%), rgba(255, 255, 255, 0.14), transparent 26%),
    linear-gradient(0deg, rgba(12, 20, 30, 0.92) 0%, rgba(12, 20, 30, 0.43) 46%, rgba(12, 20, 30, 0.04) 76%);
  transition: opacity 0.6s ease;
}
.project-card__overlay::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--work-accent), var(--work-accent-light));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.8s var(--ease);
}
.project-card__body {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: auto;
  padding: clamp(1.1rem, 2.2vw, 1.65rem);
  transform: translateZ(25px);
  transition: transform 0.72s var(--ease);
}
.project-card h3 {
  max-width: 16ch;
  margin-top: auto;
  color: #ffffff;
  font-size: clamp(1.65rem, 1.25rem + 1vw, 2.35rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.03em;
  text-shadow: 0 2px 15px rgba(12, 20, 30, 0.3);
}
.project-card .project-location {
  margin-top: 0.45rem;
  color: rgba(248, 250, 252, 0.78);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.4;
}
.project-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  height: 0;
  margin-top: 0;
  overflow: hidden;
  color: var(--work-accent-light);
  font-size: 0.75rem;
  font-weight: 800;
  opacity: 0;
  transform: translateY(8px);
  transition: height 0.6s var(--ease), margin 0.6s var(--ease), opacity 0.45s ease, transform 0.7s var(--ease);
}
.project-card__link i { font-size: 1rem; font-style: normal; }
.project-browser .project-card h3 { font-size: calc(clamp(1.65rem, 1.25rem + 1vw, 2.35rem) - 2pt); }
.project-browser .project-card .project-location { font-size: calc(0.78rem - 2pt); }
.project-browser .project-card__link { font-size: calc(0.75rem - 2pt); }
.project-browser .project-card__link i { font-size: calc(1rem - 2pt); }
.project-card:hover,
.project-card:focus-visible {
  --card-lift: -7px;
  box-shadow: 0 24px 52px rgba(40, 52, 66, 0.2);
}
.project-card:hover .project-card__overlay::after,
.project-card:focus-visible .project-card__overlay::after { transform: scaleX(1); }
.project-card:hover .project-card__media img,
.project-card:focus-visible .project-card__media img { transform: scale(1.075); }
.project-card:hover .project-card__body,
.project-card:focus-visible .project-card__body { transform: translateZ(25px) translateY(-2px); }
.project-card:hover .project-card__link,
.project-card:focus-visible .project-card__link {
  height: 1.2rem;
  margin-top: 0.75rem;
  opacity: 1;
  transform: none;
}
.showcase__more { margin-top: clamp(2.5rem, 5vw, 4rem); }
.showcase__more .ghost {
  min-width: 11rem;
  border-color: var(--work-ink);
  color: var(--work-ink);
}
.showcase__more .ghost:hover {
  background: var(--work-ink);
  color: var(--cream);
}

/* Project hero */
.project-hero {
  min-height: min(84svh, 880px);
  background: var(--work-night);
}
.project-hero__image {
  transform: scale(1.06);
  animation: project-image-in 2.2s var(--ease) both;
}
.project-hero::after {
  background:
    linear-gradient(90deg, rgba(12, 20, 30, 0.68) 0%, rgba(12, 20, 30, 0.12) 64%),
    linear-gradient(0deg, rgba(12, 20, 30, 0.93) 0%, rgba(12, 20, 30, 0.28) 58%, transparent 78%),
    linear-gradient(180deg, rgba(12, 20, 30, 0.5) 0%, transparent 30%);
}
.project-hero__copy {
  padding-bottom: clamp(3rem, 7vw, 6rem);
}
.project-hero__copy h1 {
  max-width: 13ch;
  color: #ffffff;
  font-size: clamp(4.25rem, 3rem + 6vw, 8rem);
  font-weight: 700;
  line-height: 0.86;
  letter-spacing: -0.03em;
  text-wrap: balance;
  animation: project-copy-in 1s var(--ease) 0.36s both;
}
.project-hero__location {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 1.3rem;
  color: rgba(248, 250, 252, 0.9);
  font-size: clamp(1rem, 0.9rem + 0.35vw, 1.2rem);
  font-weight: 650;
  animation: project-copy-in 0.9s var(--ease) 0.5s both;
}
.project-hero__location::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border: 2px solid var(--work-accent-light);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
}
@keyframes project-image-in {
  from { opacity: 0.4; transform: scale(1.13); }
  to { opacity: 1; transform: scale(1.02); }
}
@keyframes project-copy-in {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: none; }
}

/* Project title and automatic 3D image orbit form the visual hero */
.project-gallery {
  position: relative;
  padding: calc(var(--header) + clamp(1.8rem, 4vw, 3.75rem)) 0 clamp(2rem, 4vw, 3.25rem);
  overflow: hidden;
  background: var(--work-night);
  color: var(--cream);
}
.project-gallery__intro {
  position: relative;
  z-index: 3;
  margin-bottom: clamp(1.5rem, 3vw, 2.4rem);
}
.project-gallery__intro h1 {
  max-width: 14ch;
  color: #ffffff;
  font-family: var(--display);
  font-size: clamp(3.4rem, 2.4rem + 4.5vw, 7rem);
  font-weight: 700;
  line-height: 0.88;
  letter-spacing: -0.03em;
  text-wrap: balance;
  animation: project-copy-in 0.9s var(--ease) 0.15s both;
}
.project-gallery__intro .project-hero__location {
  margin-top: 1rem;
}
.project-gallery__viewport {
  position: relative;
  height: clamp(390px, 47vw, 590px);
  overflow: hidden;
  border-radius: var(--radius-media);
  background:
    radial-gradient(circle at 50% 42%, rgba(47, 109, 181, 0.2), transparent 28%),
    linear-gradient(145deg, #111b26, #0b121a);
  cursor: default;
  perspective: 1250px;
  perspective-origin: 50% 44%;
  touch-action: pan-y;
  isolation: isolate;
}
.project-gallery__viewport::before {
  content: "";
  position: absolute;
  z-index: 0;
  left: 50%;
  bottom: 4%;
  width: min(76%, 860px);
  aspect-ratio: 3.5 / 1;
  border: 1px solid rgba(169, 200, 236, 0.14);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(47, 109, 181, 0.11), transparent 68%);
  box-shadow: 0 0 70px rgba(47, 109, 181, 0.08);
  transform: translateX(-50%) rotateX(66deg);
  pointer-events: none;
}
.project-gallery__viewport::after {
  content: "";
  position: absolute;
  z-index: 20;
  inset: 0;
  border: 1px solid rgba(248, 250, 252, 0.1);
  border-radius: inherit;
  pointer-events: none;
}
.project-gallery__track {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  transform-style: preserve-3d;
}
.project-gallery:not(.is-ready) .project-gallery__track { opacity: 0; }
.project-gallery__slide {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(58vw, 640px);
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--radius-media);
  background: #0b121a;
  box-shadow: 0 28px 75px rgba(0, 0, 0, 0.34);
  opacity: var(--sphere-opacity, 0);
  backface-visibility: hidden;
  transform:
    translate(-50%, -50%)
    translate3d(var(--sphere-x, 0), 0, var(--sphere-z, 0))
    rotateY(var(--sphere-rotation, 0deg))
    scale(var(--sphere-scale, 0.7));
  transform-origin: 50% 50%;
  transform-style: preserve-3d;
  transition: transform 0.72s var(--ease), opacity 0.48s ease, box-shadow 0.55s ease;
  will-change: transform, opacity;
}
.project-gallery__slide::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: inherit;
  pointer-events: none;
}
.project-gallery__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.035);
  transition: transform 1.1s var(--ease), filter 0.55s ease;
}
.project-gallery__slide:not(.is-active) img {
  filter: saturate(0.72) brightness(0.72);
  transform: scale(1.08);
}
.project-gallery__slide.is-active {
  box-shadow: 0 34px 95px rgba(0, 0, 0, 0.5);
}
.project-gallery__slide.is-active img {
  filter: none;
  transform: scale(1.015);
}
.project-gallery__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  margin-top: 1rem;
}
.project-gallery__status {
  display: flex;
  align-items: center;
  gap: 0.42rem;
  margin: 0;
  color: rgba(248, 250, 252, 0.58);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}
.project-gallery__status [data-gallery-current] {
  color: var(--work-accent-light);
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 700;
}
.gallery-grid-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 2.8rem;
  padding: 0 1rem;
  border: 1px solid rgba(248, 250, 252, 0.26);
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.07);
  color: var(--cream);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
  transition: color 0.3s ease, background 0.3s ease, border-color 0.3s ease, transform 0.35s var(--ease);
}
.gallery-grid-toggle svg {
  width: 0.95rem;
  height: 0.95rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.35;
  transition: transform 0.4s var(--ease);
}
.gallery-grid-toggle:hover,
.gallery-grid-toggle:focus-visible,
.gallery-grid-toggle.is-open {
  border-color: var(--work-accent-light);
  background: var(--work-accent-light);
  color: var(--work-night);
  transform: translateY(-2px);
}
.gallery-grid-toggle.is-open svg { transform: rotate(45deg); }

/* Project facts and concise overview */
.project-intro {
  padding: clamp(2rem, 4vw, 3.5rem) 0 clamp(4.5rem, 8vw, 6.5rem);
}
.project-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  border: 0;
}
.project-facts > div,
.project-facts > div + div {
  position: relative;
  min-height: 170px;
  padding: 1.5rem;
  overflow: hidden;
  border: 1px solid var(--work-line);
  border-radius: var(--radius-media);
  background: var(--work-white);
  box-shadow: 0 8px 25px rgba(40, 52, 66, 0.05);
  transition: border-color 0.35s ease, box-shadow 0.45s var(--ease), transform 0.45s var(--ease);
}
.project-fact::before {
  content: "";
  position: absolute;
  top: 0;
  left: 1.5rem;
  width: 3.25rem;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: var(--work-accent);
  transition: width 0.5s var(--ease);
}
.project-fact:hover {
  border-color: rgba(47, 109, 181, 0.34);
  box-shadow: 0 18px 42px rgba(40, 52, 66, 0.1);
  transform: translateY(-5px);
}
.project-fact:hover::before { width: calc(100% - 3rem); }
.project-facts dt {
  color: #5b6672;
  font-size: 0.69rem;
  font-weight: 800;
  letter-spacing: 0.13em;
}
.project-facts dd {
  margin-top: auto;
  padding-top: 2.5rem;
  color: var(--work-ink);
  font-family: var(--display);
  font-size: clamp(1.45rem, 1.1rem + 0.7vw, 1.9rem);
  font-weight: 560;
  line-height: 1.18;
  letter-spacing: -0.025em;
}
.project-about {
  display: block;
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
  padding: clamp(2rem, 4vw, 3.25rem);
  border-radius: var(--radius-media);
  background:
    radial-gradient(circle at 90% 12%, rgba(47, 109, 181, 0.22), transparent 32%),
    var(--work-night);
  color: var(--cream);
  box-shadow: var(--work-shadow);
}
.project-about .eyebrow {
  grid-column: 1;
  margin: 0 0 0.75rem;
  color: var(--work-accent-light);
}
.project-about__title {
  grid-column: 1;
  color: #ffffff;
  font-size: clamp(2.4rem, 1.7rem + 2vw, 4rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.03em;
}
.project-about p {
  max-width: 56rem;
  margin: 0;
  color: rgba(248, 250, 252, 0.78);
  font-family: var(--display);
  font-size: clamp(1.25rem, 1rem + 0.7vw, 1.65rem);
  line-height: 1.48;
}

/* Full image grid, revealed only through the All images control */
.project-image-index {
  padding: clamp(1.2rem, 3vw, 2rem) 0 clamp(4rem, 8vw, 6.5rem);
  background: var(--work-paper);
}
.project-image-index:not([hidden]) { animation: image-grid-in 0.55s var(--ease) both; }
@keyframes image-grid-in {
  from { opacity: 0; transform: translateY(-18px); }
  to { opacity: 1; transform: none; }
}
.project-image-index__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.85rem, 1.8vw, 1.35rem);
  padding: 0;
}
.project-image-index__item {
  position: relative;
  aspect-ratio: 4 / 3;
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius-media);
  background: var(--work-night);
  box-shadow: 0 10px 28px rgba(40, 52, 66, 0.1);
}
.project-image-index__item:only-child { grid-column: span 2; }
.project-image-index__item::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(12, 20, 30, 0.1);
  border-radius: inherit;
  pointer-events: none;
}
.project-image-index__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.01);
  transition: transform 0.9s var(--ease);
}
.project-image-index__item:hover img { transform: scale(1.055); }

/* Featured-only collection */
.featured-collection-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: min(70svh, 760px);
  padding: calc(var(--header) + clamp(3rem, 8vw, 7rem)) 0 clamp(3.5rem, 7vw, 6rem);
  overflow: hidden;
  background: var(--work-night);
  color: var(--cream);
  isolation: isolate;
}
.featured-collection-hero > img {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 55%;
  transform: scale(1.03);
}
.featured-collection-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(12, 20, 30, 0.84) 0%, rgba(12, 20, 30, 0.44) 48%, rgba(12, 20, 30, 0.12) 78%),
    linear-gradient(0deg, rgba(12, 20, 30, 0.92) 0%, rgba(12, 20, 30, 0.2) 62%, transparent 82%),
    linear-gradient(180deg, rgba(12, 20, 30, 0.52) 0%, transparent 28%);
}
.featured-collection-hero__copy { position: relative; z-index: 1; }
.featured-collection-hero h1 {
  max-width: 10ch;
  margin-top: 0;
  color: #ffffff;
  font-size: clamp(4rem, 2.5rem + 6vw, 8.2rem);
  font-weight: 700;
  line-height: 0.84;
  letter-spacing: -0.03em;
}
.featured-collection-hero h1 em {
  color: var(--work-accent-light);
  font-weight: 600;
}
.featured-collection {
  padding: clamp(4rem, 8vw, 7rem) 0 clamp(5rem, 10vw, 8rem);
}
.featured-collection__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-6);
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
}
.featured-collection__head h2 {
  max-width: 12ch;
  font-size: clamp(2.8rem, 2rem + 3.5vw, 5.6rem);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.03em;
}
.featured-collection__head h2 em {
  color: var(--work-accent-deep);
  font-weight: 600;
}
.featured-collection__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
  padding: 0;
}
.featured-collection__item { grid-column: span 5; min-width: 0; }
.featured-collection__item:nth-child(4n + 1),
.featured-collection__item:nth-child(4n + 4) { grid-column: span 7; }
.featured-collection__card {
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  position: relative;
  display: block;
  height: clamp(440px, 43vw, 570px);
  overflow: hidden;
  border-radius: var(--radius-media);
  background: var(--work-night);
  color: var(--cream);
  box-shadow: var(--work-shadow);
  text-decoration: none;
  transform: perspective(1300px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
  transform-style: preserve-3d;
  transition: box-shadow 0.55s var(--ease), transform 0.35s ease;
}
.featured-collection__media,
.featured-collection__media img,
.featured-collection__overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.featured-collection__media { overflow: hidden; }
.featured-collection__media img {
  object-fit: cover;
  transform: scale(1.015);
  transition: transform 1.2s var(--ease), filter 0.55s ease;
}
.featured-collection__overlay {
  background: linear-gradient(0deg, rgba(12, 20, 30, 0.95) 0%, rgba(12, 20, 30, 0.58) 36%, rgba(12, 20, 30, 0.1) 72%);
}
.featured-collection__body {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: clamp(1.4rem, 2.7vw, 2.4rem);
  transform: translateZ(30px);
}
.featured-collection__body h2 {
  max-width: 15ch;
  margin-top: 1rem;
  color: #ffffff;
  font-size: clamp(2.35rem, 1.6rem + 2.15vw, 3.8rem);
  font-weight: 700;
  line-height: 0.94;
  letter-spacing: -0.03em;
}
.featured-collection__card:hover,
.featured-collection__card:focus-visible {
  box-shadow: 0 28px 70px rgba(40, 52, 66, 0.24);
}
.featured-collection__card:hover .featured-collection__media img,
.featured-collection__card:focus-visible .featured-collection__media img {
  transform: scale(1.065);
}
.featured-collection__card:hover .featured-card__link i,
.featured-collection__card:focus-visible .featured-card__link i {
  border-color: var(--work-accent);
  background: var(--work-accent);
  transform: translate(3px, -3px);
}

/* Related work */
.related { padding: clamp(5rem, 10vw, 8rem) 0; }
.project-more {
  padding: 2.5cm 0 clamp(5rem, 9vw, 7.5rem);
}
.related__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-5);
  margin-bottom: clamp(1.8rem, 4vw, 3rem);
}
.related__head .section-title em { color: var(--accent-deep); }
.related .project-grid__item { grid-column: auto; }
.related .project-card { aspect-ratio: 4 / 3; }

@media (max-width: 1050px) {
  .project-gallery__slide {
    width: min(64vw, 560px);
  }
  .project-image-index__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .related .project-grid__item { grid-column: auto; }
  .project-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .featured-collection__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .featured-collection__item,
  .featured-collection__item:nth-child(4n + 1),
  .featured-collection__item:nth-child(4n + 4) { grid-column: auto; }
  .featured-collection__card { height: 460px; }
}

@media (max-width: 760px) {
  .js .project-grid__item.reveal-from-left {
    transform: translate3d(-30px, 10px, 0);
  }
  .js .project-grid__item.reveal-from-right {
    transform: translate3d(30px, 10px, 0);
  }
  .work-hero {
    height: 70svh;
    min-height: 520px;
  }
  .work-hero h1 { font-size: clamp(1.95rem, 7.8vw, 2.55rem); }
  .featured-showcase__head,
  .showcase__head {
    align-items: flex-start;
    flex-direction: column;
  }
  .featured-showcase__item {
    flex-basis: 84vw;
    width: 84vw;
  }
  .featured-card { height: min(108vw, 510px); }
  .featured-card__overlay {
    background:
      linear-gradient(0deg, rgba(12, 20, 30, 0.93) 0%, rgba(12, 20, 30, 0.42) 65%, rgba(12, 20, 30, 0.08) 100%);
  }
  .featured-card__body { padding: 1.5rem; }
  .featured-card h3 { font-size: clamp(2.5rem, 11vw, 3.9rem); }
  .featured-collection-hero {
    min-height: 610px;
    padding-bottom: 3.5rem;
  }
  .featured-collection-hero h1 { font-size: clamp(3.8rem, 17vw, 6rem); }
  .featured-collection__head {
    align-items: flex-start;
    flex-direction: column;
  }
  .featured-collection__grid { grid-template-columns: minmax(0, 1fr); }
  .featured-collection__card { height: min(112vw, 500px); }
  .filter-block {
    width: 100%;
    justify-content: space-between;
  }
  .filter-block select { flex: 1; max-width: 18rem; }
  .project-grid { grid-template-columns: minmax(0, 1fr); }
  .project-grid__item:last-child:nth-child(3n + 1) { grid-column: auto; }
  .project-card,
  .related .project-card { aspect-ratio: 4 / 3; }
  .project-card__link {
    height: 1.2rem;
    margin-top: 0.7rem;
    opacity: 1;
    transform: none;
  }
  .project-hero { min-height: 680px; }
  .project-hero__copy h1 { font-size: clamp(3.8rem, 16vw, 6.2rem); }
  .project-gallery__intro h1 { font-size: clamp(3rem, 13vw, 5.2rem); }
  .project-gallery__viewport { height: clamp(340px, 70vw, 500px); }
  .project-gallery__slide {
    width: min(74vw, 520px);
  }
  .project-about {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
  }
  .project-about .eyebrow,
  .project-about__title,
  .project-about p {
    grid-column: 1;
    grid-row: auto;
  }
  .related__head { align-items: flex-start; }
}

@media (max-width: 520px) {
  .motion-toggle {
    width: 2.65rem;
    padding: 0;
    justify-content: center;
  }
  .motion-toggle [data-motion-label] {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .featured-showcase__head {
    flex-direction: row;
    align-items: flex-end;
  }
  .featured-showcase__all { font-size: 0.69rem; }
  .featured-card { min-height: 400px; }
  .featured-card__type { font-size: 0.68rem; }
  .filter-block {
    align-items: flex-start;
    flex-direction: column;
  }
  .filter-block select { width: 100%; max-width: none; }
  .project-card { aspect-ratio: 1 / 1; }
  .project-facts { grid-template-columns: minmax(0, 1fr); }
  .project-facts > div,
  .project-facts > div + div { min-height: 145px; }
  .project-about { padding: 1.6rem; }
  .project-gallery {
    padding-top: calc(var(--header) + 1.5rem);
  }
  .project-gallery__intro h1 { font-size: clamp(2.8rem, 14vw, 4.2rem); }
  .project-gallery__viewport { height: 315px; }
  .project-gallery__slide {
    width: 78vw;
    aspect-ratio: 4 / 3;
  }
  .project-image-index__grid { grid-template-columns: minmax(0, 1fr); }
  .project-image-index__item:only-child { grid-column: auto; }
}

/* Full-bleed cinematic project orbit */
.project-gallery {
  display: grid;
  align-items: center;
  min-height: min(88svh, 900px);
  padding: var(--header) 0 1.5rem;
}
.project-gallery .wrap {
  position: relative;
  width: calc(100% - 2 * clamp(1rem, 3vw, 3.5rem));
  max-width: none;
  height: clamp(500px, 61.5vw, 880px);
  min-height: 500px;
}
.project-gallery__intro {
  position: absolute;
  z-index: 12;
  top: clamp(2rem, 7vw, 5.5rem);
  left: clamp(1.1rem, 3.5vw, 4rem);
  width: min(23vw, 21rem);
  margin: 0;
  pointer-events: none;
  text-shadow: 0 3px 22px rgba(12, 20, 30, 0.55);
}
.project-gallery__intro::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -2rem -2.5rem -2.5rem;
  background: radial-gradient(ellipse at 25% 30%, rgba(12, 20, 30, 0.86), rgba(12, 20, 30, 0.46) 48%, transparent 74%);
  pointer-events: none;
}
.project-gallery__intro h1 {
  max-width: 8ch;
  font-size: clamp(3rem, 2.1rem + 3.6vw, 5.6rem);
  line-height: 0.9;
}
.project-gallery__intro .project-hero__location {
  gap: 0.48rem;
  margin-top: 0.8rem;
  font-size: clamp(0.88rem, 0.8rem + 0.26vw, 1.05rem);
}
.project-gallery__intro .project-hero__location::before {
  width: 0.42rem;
  height: 0.42rem;
  border-width: 1.5px;
}
.project-gallery__viewport {
  position: absolute;
  inset: 0;
  height: auto;
  min-height: 0;
  overflow: hidden;
  border-radius: var(--radius-media);
  background:
    radial-gradient(circle at 66% 48%, rgba(23, 69, 124, 0.22), transparent 36%),
    linear-gradient(145deg, #111b26, #0b121a 72%);
  perspective: 1550px;
  perspective-origin: 60% 48%;
}
.project-gallery__viewport::before {
  left: 61%;
  bottom: 7%;
  width: min(78%, 1040px);
  opacity: 0.72;
}
.project-gallery__track { overflow: visible; }
.project-gallery__slide {
  top: 50%;
  left: 60%;
  width: min(69vw, 1040px);
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-media);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.3);
  transition: transform 0.78s cubic-bezier(0.22, 0.72, 0.22, 1), opacity 0s linear, box-shadow 0.5s ease;
}
.project-gallery__slide.is-hidden {
  opacity: 0 !important;
  transition: transform 0.78s cubic-bezier(0.22, 0.72, 0.22, 1), opacity 0s linear, box-shadow 0.5s ease;
}
.project-gallery__slide img {
  object-position: center;
  transition: transform 0.8s var(--ease), filter 0.45s ease;
}
.project-gallery__slide[data-depth="1"] img {
  filter: saturate(0.78) brightness(0.74);
}
.project-gallery__slide[data-depth="2"] img {
  filter: saturate(0.62) brightness(0.58) blur(1.2px);
}
.project-gallery__slide.is-active {
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.54);
}
.project-gallery__slide.is-portrait img {
  object-fit: contain;
  background: #0b121a;
}

@media (max-width: 760px) {
  .project-gallery {
    display: block;
    min-height: 0;
    padding: var(--header) 0 1rem;
  }
  .project-gallery .wrap {
    width: calc(100% - 2rem);
    height: min(84svh, 700px);
    min-height: 530px;
  }
  .project-gallery__intro {
    top: 1.75rem;
    left: 1.4rem;
    width: min(60vw, 15rem);
  }
  .project-gallery__intro::before { inset: -1.25rem -1.4rem -1.75rem; }
  .project-gallery__intro h1 { font-size: clamp(2.65rem, 11vw, 4.3rem); }
  .project-gallery__intro .project-hero__location { margin-top: 0.65rem; }
  .project-gallery__viewport { border-radius: var(--radius-media); perspective-origin: 52% 52%; }
  .project-gallery__slide {
    left: 48%;
    width: 88vw;
    max-width: 430px;
    aspect-ratio: 4 / 3;
    border-radius: var(--radius-media);
  }
}

@media (max-width: 420px) {
  .project-gallery .wrap { width: calc(100% - 1.25rem); }
  .project-gallery__intro { left: 1.1rem; }
  .project-gallery__slide { width: 89vw; }
}

/* Quieter project details, with a stronger editorial hierarchy */
.project-intro {
  background: var(--work-white);
}
.project-facts {
  gap: 0.8rem;
}
.project-facts > .project-fact,
.project-facts > .project-fact + .project-fact {
  min-height: 152px;
  padding: 1.3rem 1.35rem 1.2rem;
  border-color: rgba(40, 52, 66, 0.12);
  border-radius: var(--radius-media);
  background: var(--work-white);
}
.project-fact::before {
  left: 1.35rem;
  width: 2.4rem;
  height: 2px;
  background: var(--work-accent);
}
.project-facts dt {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: #606b77;
  font-size: 0.64rem;
}
.project-facts dt::before {
  content: "";
  width: 0.32rem;
  height: 0.32rem;
  border-radius: 50%;
  background: var(--work-accent);
}
.project-facts dd {
  padding-top: 1.65rem;
  color: var(--work-ink);
  font-size: clamp(1.3rem, 1.05rem + 0.55vw, 1.7rem);
}
@media (min-width: 1051px) {
  .project-facts[data-fact-count="3"] {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .project-facts[data-fact-count="2"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 68%;
  }
}

/* Project detail: one cinematic banner followed by a controllable image orbit. */
.project-featured-hero {
  min-height: min(73svh, 780px);
  background: var(--work-night);
}
/* Banner takes the photograph's own proportions: full width, nothing cropped, no side bars */
.project-featured-hero.project-hero {
  display: block;
  min-height: 0;
  margin-top: calc(var(--header) + 3px);
}
.project-featured-hero .project-hero__fill { display: none; }
.project-featured-hero .project-hero__image {
  position: relative;
  inset: auto;
  z-index: -2;
  width: 100%;
  height: auto;
  margin-top: -1.5cm;
  margin-bottom: -3.5cm;
  object-fit: initial;
  transform: none;
  animation: none;
}
.project-detail--featured:not(.is-featured) .project-featured-hero .project-hero__image {
  margin-bottom: -3cm;
}
/* Everfast’s seating sits at the bottom of the photo, so its extra crop comes off the ceiling */
[data-slug="everfast-freight-forwarders"] .project-featured-hero .project-hero__image {
  margin-top: -3cm;
  margin-bottom: -1.5cm;
}
.project-featured-hero.is-named::after {
  background: linear-gradient(0deg, rgba(8, 14, 22, 0.78) 0%, rgba(8, 14, 22, 0.16) 34%, transparent 58%);
}
/* Featured banners stay clear so the brand on the photograph can be read */
.project-featured-hero.is-featured::after { background: none; }
/* Featured banners fill the screen under the header, so About starts on scroll */
.project-featured-hero.is-featured {
  height: calc(100svh - var(--header) - 3px);
  min-height: calc(100svh - var(--header) - 3px);
}
.project-featured-hero.is-featured .project-hero__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: cover;
  object-position: center center;
}
/* About the project, then compact flip cards with the key facts */
.project-detail--featured:not(.is-featured) .project-intro {
  padding-top: calc(max(0.75rem, calc(clamp(2.5rem, 5vw, 4rem) - 1cm)) + 0.5cm);
}
.project-intro {
  padding-top: clamp(2.5rem, 5vw, 4rem);
  padding-bottom: 0;
}
.project-about-block {
  max-width: 68rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
.project-about-block .section-title {
  margin-bottom: 1.15rem;
}
.project-about-card {
  padding: clamp(1.35rem, 2.4vw, 2rem) clamp(1.4rem, 2.6vw, 2.25rem);
  border-top: 3px solid var(--work-accent);
  border-radius: var(--radius-media);
  background:
    linear-gradient(180deg, rgba(47, 109, 181, 0.07), rgba(47, 109, 181, 0.025) 42%, #ffffff),
    var(--work-white);
  box-shadow: 0 10px 30px rgba(40, 52, 66, 0.06);
}
.project-about-card p {
  max-width: 80ch;
  margin: 0;
  color: #2c3640;
  font-size: clamp(0.9rem, 0.86rem + 0.15vw, 1rem);
  line-height: 1.7;
}
.project-about-card p + p { margin-top: 0.85rem; }
.js .project-about-card p,
.js .project-about-block {
  opacity: 1;
  filter: none;
  transform: none;
}
.project-detail--featured .project-facts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 220px));
  gap: 0.85rem;
  max-width: none;
}
.project-detail--featured .project-facts > .project-fact {
  position: relative;
  min-height: 118px;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: var(--radius-media);
  background: none;
  box-shadow: none;
  perspective: 900px;
  cursor: pointer;
  outline: none;
}
.project-detail--featured .project-fact::before { content: none; }
.project-detail--featured .project-fact:hover { transform: none; box-shadow: none; }
.project-detail--featured .project-facts .project-fact__front,
.project-detail--featured .project-facts .project-fact__back {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(40, 52, 66, 0.12);
  border-radius: inherit;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transition: transform 0.7s cubic-bezier(0.2, 0.74, 0.25, 1);
}
.project-detail--featured .project-facts .project-fact__front {
  justify-content: center;
  gap: 0.65rem;
  background: var(--work-white);
  box-shadow: 0 8px 22px rgba(40, 52, 66, 0.06);
}
.project-detail--featured .project-facts .project-fact__back {
  justify-content: center;
  gap: 0.65rem;
  border-color: transparent;
  background: var(--work-night);
  transform: rotateY(180deg);
}
.project-fact__label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: #5c6772;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.project-fact__label svg {
  flex: none;
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: var(--work-accent);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.project-fact__back .project-fact__label { color: var(--work-accent-light); }
.project-fact__back .project-fact__label svg { stroke: var(--work-accent-light); }
.project-fact__value {
  color: var(--work-ink);
  font-family: var(--display);
  font-size: clamp(1.02rem, 0.94rem + 0.22vw, 1.16rem);
  font-weight: 650;
  line-height: 1.25;
}
.project-fact__back .project-fact__value { color: #ffffff; }
.project-fact:hover .project-fact__front,
.project-fact:focus-visible .project-fact__front { transform: rotateY(-180deg); }
.project-fact:hover .project-fact__back,
.project-fact:focus-visible .project-fact__back { transform: rotateY(0deg); }
.project-fact:focus-visible .project-fact__back { outline: 2px solid var(--work-accent-light); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  .project-detail--featured .project-facts .project-fact__front,
  .project-detail--featured .project-facts .project-fact__back,
  .project-about-card p { transition: none; }
  .project-about-card p { opacity: 1; transform: none; }
}
.project-detail--featured .project-intro {
  padding-bottom: clamp(1.5rem, 3vw, 2.5rem);
}
/* Laptop: the write-up and cards share one width, with equal space on both sides */
@media (min-width: 1100px) {
  .project-detail--featured .project-intro > .wrap {
    width: calc(100% - 2 * clamp(2rem, 3vw, 3.25rem));
    max-width: 1480px;
  }
  .project-about-block,
  .project-about-card p { max-width: none; }
  .project-detail--featured .project-facts,
  .project-detail--featured .project-facts[data-fact-count="3"],
  .project-detail--featured .project-facts[data-fact-count="2"] {
    grid-template-columns: repeat(var(--fact-cols, 4), minmax(0, 1fr));
    max-width: none;
  }
  .project-detail--featured .project-facts[data-fact-count="3"] { --fact-cols: 3; }
  .project-detail--featured .project-facts[data-fact-count="2"] { --fact-cols: 2; }
}
.project-gallery__section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: clamp(2rem, 6vw, 7rem);
  margin-bottom: clamp(1.75rem, 3.5vw, 3rem);
}
.project-gallery__section-head[hidden],
.project-gallery__prev[hidden],
.project-gallery__next[hidden] {
  display: none;
}
.project-gallery__section-head .eyebrow {
  margin-bottom: 0.55rem;
  color: var(--work-accent-light);
}
.project-gallery__section-head .section-title {
  color: #ffffff;
}
.project-gallery__section-head > p {
  max-width: 31rem;
  margin: 0 0 0.45rem;
  color: rgba(248, 250, 252, 0.62);
  line-height: 1.65;
}
.project-gallery--after-details {
  display: block;
  min-height: 0;
  padding: 0.5cm 0 clamp(4.5rem, 8vw, 7rem);
}
.project-gallery--after-details .wrap {
  width: calc(100% - 2 * clamp(0.65rem, 2vw, 2rem));
  height: auto;
  min-height: 0;
}
/* Main image fills the frame from the previous-image peek to the right edge */
.project-gallery--after-details {
  --slide-w: min(78vw, 1240px);
  --slide-gap: clamp(0.75rem, 1.4vw, 1.4rem);
  padding-bottom: calc(2cm - var(--slide-gap));
}
.project-gallery--after-details .project-gallery__viewport {
  position: relative;
  inset: auto;
  height: calc(var(--slide-w) / 1.6 + 2 * var(--slide-gap) - 2cm);
  cursor: default;
  perspective-origin: 62% 50%;
}
.project-gallery--after-details .project-gallery__viewport:focus-visible {
  outline: 2px solid var(--work-accent-light);
  outline-offset: 5px;
}
.project-gallery--after-details .project-gallery__viewport::before {
  left: 50%;
}
.project-gallery--after-details .project-gallery__slide {
  left: calc(100% - var(--slide-w) / 2 - var(--slide-gap));
  width: var(--slide-w);
  aspect-ratio: 16 / 10;
}
.project-gallery--after-details .project-gallery__prev,
.project-gallery--after-details .project-gallery__next {
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid rgba(15, 25, 36, 0.08);
  border-radius: 50%;
  background: #fff;
  color: var(--work-ink);
  font-size: 1.05rem;
  box-shadow: 0 8px 24px rgba(15, 25, 36, 0.18);
  backdrop-filter: none;
}
.project-gallery--after-details .project-gallery__prev:hover,
.project-gallery--after-details .project-gallery__prev:focus-visible,
.project-gallery--after-details .project-gallery__next:hover,
.project-gallery--after-details .project-gallery__next:focus-visible {
  border-color: transparent;
  background: var(--work-accent);
  color: #fff;
  transform: translateY(-50%) scale(1.04);
}
.project-gallery--after-details .project-gallery__prev {
  left: calc(100% - var(--slide-w) - var(--slide-gap) - 1.75rem);
}
.project-gallery--after-details .project-gallery__next {
  right: calc(var(--slide-gap) + clamp(0.9rem, 1.6vw, 1.5rem));
}
.project-gallery--after-details .project-gallery__slide[role="button"] {
  cursor: pointer;
}
.project-gallery--after-details .project-gallery__slide.is-active {
  cursor: zoom-in;
}
.project-gallery--after-details .project-gallery__slide[data-depth="1"]:hover img,
.project-gallery--after-details .project-gallery__slide[data-depth="1"]:focus-visible img {
  filter: saturate(0.92) brightness(0.9);
}
.project-gallery__prev,
.project-gallery__next {
  position: absolute;
  z-index: 35;
  top: 50%;
  display: grid;
  place-items: center;
  width: clamp(2.3rem, 3vw, 2.8rem);
  height: clamp(2.3rem, 3vw, 2.8rem);
  border: 1px solid rgba(248, 250, 252, 0.55);
  border-radius: 50%;
  background: rgba(12, 20, 30, 0.64);
  color: #ffffff;
  font-size: clamp(0.9rem, 1.15vw, 1.05rem);
  backdrop-filter: blur(12px);
  transform: translateY(-50%);
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease, transform 0.35s var(--ease);
}
.project-gallery__next { right: clamp(1rem, 2.5vw, 1.8rem); }
.project-gallery__prev:hover,
.project-gallery__prev:focus-visible,
.project-gallery__next:hover,
.project-gallery__next:focus-visible {
  border-color: var(--work-accent-light);
  background: var(--work-accent);
  color: #fff;
  transform: translateY(-50%) scale(1.06);
}
.project-gallery__prev:disabled,
.project-gallery__next:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}
.project-lightbox {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: clamp(1rem, 3vw, 2.5rem);
  overflow: hidden;
  border: 0;
  background: rgba(12, 20, 30, 0.96);
  color: #ffffff;
}
.project-lightbox[open] {
  display: grid;
  place-items: center;
}
.project-lightbox::backdrop {
  background: rgba(12, 20, 30, 0.84);
  backdrop-filter: blur(12px);
}
.project-lightbox figure {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  margin: 0;
}
.project-lightbox img {
  display: block;
  max-width: min(92vw, 1440px);
  max-height: 86dvh;
  border-radius: var(--radius-media);
  object-fit: contain;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.48);
}
.project-lightbox figcaption {
  position: absolute;
  bottom: clamp(1.2rem, 3vw, 2rem);
  left: 50%;
  color: rgba(248, 250, 252, 0.72);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transform: translateX(-50%);
}
.project-lightbox__close {
  position: absolute;
  z-index: 2;
  top: clamp(1rem, 2.5vw, 1.75rem);
  right: clamp(1rem, 2.5vw, 1.75rem);
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  border: 1px solid rgba(248, 250, 252, 0.5);
  border-radius: 50%;
  background: rgba(248, 250, 252, 0.08);
  color: #ffffff;
  font-size: 1.75rem;
  line-height: 1;
  backdrop-filter: blur(10px);
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}
.project-lightbox__close:hover,
.project-lightbox__close:focus-visible {
  border-color: var(--work-accent-light);
  background: var(--work-accent);
  transform: rotate(90deg);
}
body:has(.project-lightbox[open]) {
  overflow: hidden;
}

/* Related work enters as one right-to-left sequence. */
.js .related .project-grid__item.reveal-from-right:not(.is-visible) {
  transform: translate3d(74px, 8px, 0);
}

/* A compact, image-free close that keeps the next action unmistakable. */
.project-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: clamp(1.25rem, 4vw, 3.5rem);
  min-height: 0;
  margin-bottom: clamp(3.5rem, 7vw, 6rem);
  padding: clamp(1.25rem, 2.3vw, 1.8rem) clamp(1.5rem, 4vw, 3rem);
  border: 1px solid rgba(169, 200, 236, 0.22);
  border-radius: var(--radius-media);
  background:
    radial-gradient(circle at 85% 50%, rgba(47, 109, 181, 0.3), transparent 30%),
    linear-gradient(110deg, #0e1823, #16202a);
  text-align: left;
}
.project-cta::after {
  background:
    linear-gradient(90deg, rgba(12, 20, 30, 0.15), transparent 54%),
    linear-gradient(0deg, rgba(12, 20, 30, 0.24), transparent 65%);
}
.project-cta__copy,
.project-cta > .pill {
  position: relative;
  z-index: 1;
}
.project-cta__copy { max-width: 38rem; }
.project-cta .eyebrow {
  margin-bottom: 0.5rem;
  color: var(--work-accent-light);
  font-size: 0.66rem;
}
.project-cta .section-title {
  max-width: none;
  color: #ffffff;
  font-size: calc(clamp(1.85rem, 1.4rem + 1.35vw, 2.8rem) - 2pt);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.03em;
  white-space: nowrap;
}
.project-cta .section-title em { color: #a9c8ec; }
.project-cta p {
  max-width: 29rem;
  margin-top: 0.75rem;
  color: rgba(248, 250, 252, 0.72);
  font-size: 0.9rem;
}
.project-cta .pill {
  flex: none;
  margin: 0;
  padding-inline: 1.35rem;
  background: var(--work-accent);
  border-color: var(--work-accent);
  color: #ffffff;
}
.project-cta .pill:hover {
  background: var(--work-accent-light);
  border-color: var(--work-accent-light);
  color: var(--work-night);
}

@media (max-width: 760px) {
  .project-featured-hero {
    min-height: min(76svh, 700px);
  }
  .project-detail--featured .project-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-gallery__section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 1rem;
  }
  .project-gallery__section-head > p {
    max-width: 30rem;
    font-size: 0.9rem;
  }
  .project-gallery--after-details {
    padding-top: 0.5cm;
  }
  .project-gallery--after-details .wrap {
    width: calc(100% - 1rem);
    height: auto;
    min-height: 0;
  }
  .project-gallery--after-details {
    --slide-w: calc(84vw - 0.85rem);
    --slide-gap: 0.6rem;
  }
  .project-gallery--after-details .project-gallery__viewport {
    height: calc(var(--slide-w) * 0.75 + 2 * var(--slide-gap) - 2cm);
  }
  .project-gallery--after-details .project-gallery__slide {
    max-width: none;
    aspect-ratio: 4 / 3;
  }
  .project-gallery--after-details .project-gallery__prev,
  .project-gallery--after-details .project-gallery__next {
    width: 2.35rem;
    height: 2.35rem;
  }
  .project-gallery--after-details .project-gallery__prev { left: calc(100% - var(--slide-w) - var(--slide-gap) - 0.85rem); }
  .project-gallery--after-details .project-gallery__next { right: calc(var(--slide-gap) + 0.6rem); }
  .project-facts > .project-fact,
  .project-facts > .project-fact + .project-fact { min-height: 138px; }
  .js .related .project-grid__item.reveal-from-right:not(.is-visible) {
    transform: translate3d(38px, 8px, 0);
  }
  .project-cta {
    align-items: flex-start;
    flex-direction: column;
    gap: 1.4rem;
  }
  .project-cta .section-title {
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  .work-hero video,
  .work-hero h1,
  .work-hero__line,
  .project-hero__image,
  .project-hero__copy h1,
  .project-gallery__intro h1,
  .project-hero__location { animation: none !important; }
  .js .motion-reveal,
  .js .motion-reveal.is-visible {
    opacity: 1;
    filter: none;
    clip-path: none;
    transform: none;
    transition: none;
  }
  .featured-card,
  .featured-collection__card,
  .project-card,
  .featured-card__media img,
  .featured-collection__media img,
  .project-card__media img,
  .project-gallery__slide img { transform: none !important; transition: none !important; }
  .project-gallery__slide { transition: none !important; }
  .project-image-index:not([hidden]) { animation: none; }
  .featured-showcase__track,
  .project-gallery__track { transition: none !important; }
  .js .project-grid__item.reveal-wipe .project-card { clip-path: none; }
  .featured-showcase.is-user-playing .featured-showcase__track,
  .project-gallery.is-user-playing .project-gallery__track {
    transition: transform 0.85s ease !important;
  }
}

/* Featured projects: smaller name, larger location */
.featured-card h3{font-size:clamp(2.15rem,1.45rem + 1.95vw,3.5rem)}
.featured-collection__body h2{font-size:clamp(2rem,1.3rem + 1.9vw,3.3rem)}
.featured-card__location{font-size:1.15rem}
@media (max-width:760px){
  .featured-card h3{font-size:clamp(2.1rem,9.3vw,3.3rem)}
  .featured-collection__body h2{font-size:clamp(1.9rem,7.6vw,2.6rem)}
  .featured-card__location{font-size:1.05rem}
}

@media (max-width: 760px) {
  .project-browser .project-card .project-location { font-size: 12px; }
  .project-browser .project-card__link { font-size: 11.5px; }
  .project-browser .project-card__link i { font-size: 13px; }
  .featured-showcase__all { font-size: 11.5px; }
  .project-fact__label { font-size: 11px; }
}

.project-browser .project-card .project-location { font-size: 12px; }
@media (max-width: 760px) {
  .project-browser .project-card .project-location { font-size: 14px; }
}
