.signature-projects {
  --project-ink: #08163c;
  --project-paper: #f5f4ef;
  --project-soft: #b9c6e0;
  --project-rule: #ffffff2c;
  background: var(--project-ink);
  color: var(--project-paper);
  padding-block: clamp(4.75rem, 8.3vw, 7.5rem);
}

.project-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.2rem 2rem;
  padding-block-end: clamp(1.65rem, 3.25vw, 2.9rem);
  border-bottom: 1px solid var(--project-rule);
}

.project-intro h2 { margin: 0; }
.project-intro .text-link { color: var(--project-paper); }
.signature-projects :focus-visible { outline-color: var(--orange); }

.project-chapters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.7rem);
  padding: 0;
  margin: clamp(1.5rem, 3vw, 2.5rem) 0 0;
  list-style: none;
}

.project-chapter { position: relative; min-width: 0; }

.project-photo {
  aspect-ratio: 1.45;
  width: 100%;
  margin: 0;
  overflow: clip;
  border-radius: var(--media-radius, 16px);
  background: #1b2c51;
}

.project-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.project-copy {
  min-width: 0;
  padding-block: clamp(1.15rem, 2.1vw, 1.65rem);
  border-bottom: 1px solid var(--project-rule);
}

.project-copy h3 {
  margin: .5rem 0 .63rem;
  line-height: 1.03;
  letter-spacing: -.033em;
  font-size: clamp(1.4rem, 2.65vw, 2.32rem);
}

.project-copy a {
  color: inherit;
  text-decoration: none;
  display: inline-block;
  min-height: 44px;
  align-content: center;
}

.signature-projects:not([data-project-mode]) .project-copy a::after {
  position: absolute;
  inset: 0;
  content: "";
}

.project-copy a .arrow {
  display: inline-block;
  margin-inline-start: .13em;
  color: var(--orange);
  vertical-align: .035em;
  font-size: .62em;
  font-family: system-ui, sans-serif;
  font-weight: 500;
}

.project-location, .project-summary { color: var(--project-soft); margin: 0; }
.project-location { font-size: .87rem; font-weight: 700; }
.project-summary { max-width: 33ch; line-height: 1.46; }

.project-stage[hidden] { display: none; }

@media (hover: hover) and (pointer: fine) {
  .project-copy a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; }
}

@media (max-width: 800px) {
  .project-chapters { grid-template-columns: minmax(0, 1fr); gap: 1.7rem; }
  .project-photo { aspect-ratio: 1.48; }
}

@media (max-width: 650px) {
  .project-intro { align-items: start; flex-direction: column; gap: .55rem; }
  .project-intro .text-link { min-height: 44px; align-content: center; }
  .project-copy { padding-block: .95rem 1.4rem; }
  .project-copy h3 { margin-block: .2rem .37rem; }
}

@media (min-width: 900px) and (min-height: 570px) and (prefers-reduced-motion: no-preference) {
  .signature-projects[data-project-mode="scroll"] .project-story {
    display: grid;
    grid-template-columns: minmax(15.5rem, .71fr) minmax(0, 1.49fr);
    gap: clamp(1.8rem, 5.3vw, 4.75rem);
    align-items: start;
    margin-top: clamp(2.25rem, 4.5vw, 4.5rem);
  }

  .signature-projects[data-project-mode="scroll"] .project-chapters {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    margin: 0;
  }

  .signature-projects[data-project-mode="scroll"] .project-chapter {
    display: grid;
    align-items: center;
    min-height: clamp(21rem, 56svh, 36rem);
    border-bottom: 1px solid var(--project-rule);
  }

  .signature-projects[data-project-mode="scroll"] .project-chapter:last-child { border-bottom: 0; }

  .signature-projects[data-project-mode="scroll"] .project-copy {
    border-bottom: 0;
    padding-block: 1.6rem;
    opacity: .74;
    transition: opacity 260ms var(--out, ease-out);
  }

  .signature-projects[data-project-mode="scroll"] .project-chapter[data-active] .project-copy,
  .signature-projects[data-project-mode="scroll"] .project-chapter:focus-within .project-copy { opacity: 1; }

  .signature-projects[data-project-mode="scroll"] .project-chapter[data-active] .project-location { color: var(--orange); }

  .signature-projects[data-project-mode="scroll"] .project-copy h3 {
    font-size: clamp(2rem, 3.55vw, 3.38rem);
    margin-block: .58rem .9rem;
    letter-spacing: -.055em;
  }

  .project-stage {
    position: sticky;
    inset-block-start: clamp(2.1rem, 12svh, 8.4rem);
    align-self: start;
    min-width: 0;
  }

  .project-stage-frame {
    position: relative;
    isolation: isolate;
    height: clamp(17rem, 61svh, 40rem);
    background: #182a4c;
    overflow: clip;
    border-radius: var(--media-radius, 16px);
  }

  .project-stage-frame .project-photo {
    position: absolute;
    inset: 0;
    height: 100%;
    opacity: 0;
    clip-path: inset(100% 0 0 0);
    transform: scale(1.045);
  }

  .project-stage-frame .project-photo[data-frame="before"] { clip-path: inset(0 0 100% 0); }

  .project-stage-frame .project-photo[data-frame="leaving"],
  .project-stage-frame .project-photo[data-active] {
    opacity: 1;
    clip-path: inset(0);
    transform: none;
  }

  .project-stage-frame .project-photo[data-frame="leaving"] { z-index: 1; }

  .project-stage-frame .project-photo[data-active] {
    z-index: 2;
    transition: clip-path 730ms var(--out, ease-out), transform 880ms var(--out, ease-out);
  }

  .project-stage-progress {
    display: grid;
    grid-template-columns: min-content 1fr min-content;
    gap: 1rem;
    align-items: center;
    margin-top: .92rem;
    color: var(--project-soft);
    font-size: .83rem;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
  }

  .project-stage-index { color: var(--project-paper); }
  .project-stage-track { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; }
  .project-stage-track i { height: 1px; background: var(--project-rule); }
  .project-stage-track i[data-active] { background: var(--orange); }
}
