/* Portfolio — Home residences language, 2 columns */

.nsi-portfolio {
  background: var(--color-canvas);
  color: var(--color-ink, #1c1917);
  padding-top: clamp(1.75rem, 4vw, 2.75rem);
}

.nsi-portfolio__intro {
  padding: 0 clamp(1.5rem, 5vw, 4.5rem) clamp(1.75rem, 4vw, 2.75rem);
  max-width: 42rem;
}

.nsi-portfolio__eyebrow {
  margin: 0 0 0.65rem;
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--color-muted, #78716c);
}

.nsi-portfolio__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.75rem, 7vw, 4.5rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  color: var(--color-ink, #1c1917);
}

.nsi-portfolio__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  background: var(--color-canvas);
  color: #ffffff;
}

.nsi-portfolio .chapter {
  position: relative;
  min-height: clamp(18rem, 36vw, 28rem);
  isolation: isolate;
  overflow: hidden;
}

.nsi-portfolio .chapter__media {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.nsi-portfolio .chapter__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transform: scale(1.01);
  transition: transform 0.8s ease;
}

.nsi-portfolio .chapter:hover .chapter__media img,
.nsi-portfolio .chapter:focus-within .chapter__media img {
  transform: scale(1.04);
}

.nsi-portfolio .chapter__veil {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: linear-gradient(
    90deg,
    rgba(28, 25, 23, 0.52) 0%,
    rgba(28, 25, 23, 0.22) 42%,
    rgba(28, 25, 23, 0.1) 100%
  );
}

.nsi-portfolio .chapter__meta {
  position: relative;
  z-index: 2;
  min-height: inherit;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.5rem, 4vw, 2.75rem) clamp(1.25rem, 3.5vw, 2.75rem);
  max-width: min(28rem, 88%);
}

.nsi-portfolio .chapter__kicker,
.nsi-portfolio .chapter__title,
.nsi-portfolio .chapter__narrative,
.nsi-portfolio .chapter__link {
  text-shadow: 0 1px 18px rgba(28, 25, 23, 0.35);
  color: #ffffff;
}

.nsi-portfolio .chapter__kicker {
  margin: 0 0 0.65rem;
  font-family: var(--font-sans);
  font-size: 0.625rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
}

.nsi-portfolio .chapter__title {
  margin: 0 0 0.7rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.85rem, 3.4vw, 3rem);
  line-height: 1;
  letter-spacing: -0.02em;
}

.nsi-portfolio .chapter__narrative {
  margin: 0 0 1.1rem;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(0.95rem, 1.2vw, 1.1rem);
  line-height: 1.45;
  max-width: 28ch;
}

.nsi-portfolio .chapter__link {
  font-family: var(--font-sans);
  font-size: 0.625rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255, 255, 255, 0.9);
  padding-bottom: 0.28rem;
  align-self: flex-start;
  opacity: 0.92;
}

.nsi-portfolio .chapter--malibu .chapter__media img {
  object-position: 58% 48%;
}

.nsi-portfolio .chapter--jacksonville .chapter__media img {
  object-position: 55% 42%;
}

.nsi-portfolio .chapter--995-5th .chapter__media img {
  object-position: 48% 45%;
}

.nsi-portfolio .chapter--pasadena .chapter__media img,
.nsi-portfolio .chapter--santa-monica .chapter__media img {
  object-position: center 35%;
}

.nsi-portfolio .chapter__hit {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: block;
  text-decoration: none;
}

.nsi-portfolio .chapter__hit .screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.nsi-portfolio__empty {
  padding: 2rem clamp(1.5rem, 5vw, 4.5rem) 4rem;
  font-family: var(--font-display);
  font-style: italic;
  color: var(--color-muted, #78716c);
}

/* —— Single project —— */
.nsi-project {
  background: var(--color-canvas);
  color: var(--color-ink, #1c1917);
}

.nsi-project__hero {
  position: relative;
  min-height: clamp(22rem, 48vw, 34rem);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  color: #ffffff;
}

.nsi-project__hero-media {
  position: absolute;
  inset: 0;
}

.nsi-project__hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.nsi-project__hero-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(28, 25, 23, 0.15) 0%,
    rgba(28, 25, 23, 0.55) 100%
  );
}

.nsi-project__hero-meta {
  position: relative;
  z-index: 1;
  padding: clamp(2rem, 6vw, 4rem) clamp(1.5rem, 5vw, 4.5rem);
  max-width: 40rem;
}

.nsi-project__eyebrow {
  margin: 0 0 0.75rem;
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.nsi-project__title {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.75rem, 7vw, 4.75rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
}

.nsi-project__lede {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  line-height: 1.45;
  max-width: 34ch;
}

.nsi-project__toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.75rem;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem clamp(1.5rem, 5vw, 4.5rem);
  border-bottom: 1px solid rgba(181, 154, 125, 0.22);
}

.nsi-project__back,
.nsi-project__pdf {
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--color-ink, #1c1917);
  border-bottom: 1px solid rgba(28, 25, 23, 0.35);
  padding-bottom: 0.2rem;
}

.nsi-project__back:hover,
.nsi-project__pdf:hover {
  opacity: 0.75;
}

.nsi-project__gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  padding: clamp(1.5rem, 4vw, 2.5rem) clamp(1rem, 3vw, 2rem) clamp(3rem, 6vw, 4.5rem);
}

.nsi-project__shot {
  margin: 0;
  overflow: hidden;
  background: #e7e5e4;
}

.nsi-project__shot:nth-child(3n + 1) {
  grid-column: 1 / -1;
}

.nsi-project__shot img {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: middle;
}

.nsi-project__shot figcaption {
  padding: 0.65rem 0.85rem;
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-muted, #78716c);
}

.nsi-project__content {
  max-width: 42rem;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 5vw, 4.5rem) clamp(3rem, 6vw, 5rem);
  font-family: var(--font-display);
  font-size: 1.1rem;
  line-height: 1.65;
}

@media (max-width: 767px) {
  .nsi-project__gallery {
    grid-template-columns: 1fr;
  }

  .nsi-project__shot:nth-child(3n + 1) {
    grid-column: auto;
  }
}

@media (max-width: 899px) {
  .nsi-portfolio__grid {
    grid-template-columns: 1fr;
  }

  .nsi-portfolio .chapter {
    min-height: clamp(20rem, 62vw, 26rem);
  }

  .nsi-portfolio .chapter__meta {
    max-width: none;
    width: 100%;
    justify-content: flex-end;
    padding-bottom: clamp(1.75rem, 5vh, 2.5rem);
    background: linear-gradient(
      180deg,
      transparent 0%,
      rgba(28, 25, 23, 0.45) 100%
    );
  }

  .nsi-portfolio .chapter__veil {
    background: linear-gradient(
      180deg,
      rgba(28, 25, 23, 0.12) 0%,
      rgba(28, 25, 23, 0.35) 100%
    );
  }
}
