/* Work page: compact editorial layout with minimal gallery spacing */

.work-index {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.work-index a {
  display: grid;
  gap: 0.7rem;
  min-height: 8rem;
  padding: 1.25rem;
  border-right: 1px solid var(--line);
  text-decoration: none;
}

.work-index a:last-child {
  border-right: 0;
}

.work-index a:hover {
  background: var(--paper-2);
}

.work-index-number {
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
}

.project-section + .project-section {
  border-top: 1px solid var(--line);
}

.project-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 34rem);
  align-items: start;
  gap: clamp(2rem, 6vw, 6rem);
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
}

.project-heading-title {
  min-width: 0;
}

.project-title {
  max-width: 10ch;
  margin: 0;
  font-size: clamp(3.2rem, 7.5vw, 8rem);
  font-weight: 500;
  line-height: 0.86;
  letter-spacing: -0.075em;
}

.project-copy {
  max-width: 36rem;
  font-family: var(--serif);
  font-size: clamp(1rem, 1.55vw, 1.28rem);
  line-height: 1.42;
}

.project-copy p {
  margin: 0;
}

.project-pending {
  display: grid;
  min-height: clamp(12rem, 28vw, 24rem);
  place-items: center;
  border: 1px solid var(--line);
  background:
    linear-gradient(
      135deg,
      transparent 0 49.7%,
      var(--line) 49.8% 50.2%,
      transparent 50.3% 100%
    );
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

/* Gallery spacing */

.project-sequence {
  display: grid;
  gap: 10px;
}

.project-spread {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: start;
  gap: 10px;
}

.project-shot {
  min-width: 0;
  margin: 0;
}

.project-shot--opener,
.project-shot--wide-center,
.project-shot--wide-left,
.project-shot--wide-right,
.project-shot--closer {
  width: 100%;
  margin: 0;
}

/* Two-image rows: no artificial vertical offsets */

.project-spread--small-left > :first-child,
.project-spread--small-left-reversed > :first-child,
.project-spread--balanced-offset > :first-child {
  grid-column: 1 / span 6;
  width: 100%;
  margin: 0;
}

.project-spread--small-left > :last-child,
.project-spread--small-left-reversed > :last-child,
.project-spread--balanced-offset > :last-child {
  grid-column: 7 / -1;
  width: 100%;
  margin: 0;
}

.project-spread--portrait-left > :first-child {
  grid-column: 1 / span 5;
  width: 100%;
  margin: 0;
}

.project-spread--portrait-left > :last-child {
  grid-column: 6 / -1;
  width: 100%;
  margin: 0;
}

.project-shot img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--paper-2);
  cursor: zoom-in;
}

.project-shot figcaption {
  display: block;
  margin-top: 4px;
  padding-top: 5px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.photo-caption-main {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.64rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.photo-metadata {
  display: block;
  margin-top: 3px;
  font-size: 0.58rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.035em;
  line-height: 1.45;
  opacity: 0.72;
  text-transform: none;
}

@media (max-width: 850px) {
  .work-index {
    grid-template-columns: 1fr;
  }

  .work-index a {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .work-index a:last-child {
    border-bottom: 0;
  }

  .project-heading {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .project-title {
    max-width: 100%;
    font-size: clamp(3rem, 15vw, 5.2rem);
  }

  .project-copy {
    max-width: none;
  }

  .project-sequence {
    gap: 10px;
  }

  .project-spread {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .project-shot--wide-center,
  .project-shot--wide-left,
  .project-shot--wide-right,
  .project-shot--closer,
  .project-spread--small-left > :first-child,
  .project-spread--small-left > :last-child,
  .project-spread--small-left-reversed > :first-child,
  .project-spread--small-left-reversed > :last-child,
  .project-spread--portrait-left > :first-child,
  .project-spread--portrait-left > :last-child,
  .project-spread--balanced-offset > :first-child,
  .project-spread--balanced-offset > :last-child {
    grid-column: 1;
    width: 100%;
    margin: 0;
  }

  .photo-caption-main {
    font-size: 0.61rem;
  }

  .photo-metadata {
    font-size: 0.56rem;
  }
}
