/* Northstar Hover Portfolio: intentionally minimal, so it inherits the site's typography. */
.nhp-portfolio {
  --nhp-gap: clamp(18px, 2.2vw, 34px);
  --nhp-columns: 3;
  display: grid;
  grid-template-columns: repeat(var(--nhp-columns, 3), minmax(0, 1fr));
  gap: var(--nhp-gap);
  width: 100%;
}

.nhp-section-title {
  margin: 0 0 clamp(24px, 3vw, 44px);
  color: #171717;
  font: inherit;
  font-size: clamp(27px, 3.5vw, 52px);
  font-weight: 700;
  letter-spacing: -.045em;
  line-height: 1.05;
}

.nhp-card {
  display: block;
  min-width: 0;
  color: inherit;
  text-decoration: none;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 16px;
  background: rgba(255, 255, 255, .025);
  box-shadow: 0 14px 32px rgba(0, 0, 0, .08);
  transition: border-color .25s ease, background-color .25s ease, transform .25s ease;
}

.nhp-card:hover { background: rgba(255, 255, 255, .05); transform: translateY(-2px); }

.nhp-viewport {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #f7f7f7;
  border: 1px solid rgba(18, 18, 18, .10);
  border-radius: 11px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .12);
  isolation: isolate;
}

.nhp-screenshot {
  display: block;
  width: 100%;
  height: auto;
  transform: translate3d(0, 0, 0);
  transition: transform var(--nhp-scroll-duration, 13s) cubic-bezier(.22, .61, .36, 1);
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  image-rendering: auto;
  filter: contrast(1.025) saturate(1.015) brightness(1.005);
}

.nhp-card:hover .nhp-screenshot,
.nhp-card:focus-visible .nhp-screenshot {
  transform: translate3d(0, calc(0px - var(--nhp-scroll, 0px)), 0);
}

.nhp-card.is-scrolling .nhp-screenshot {
  transform: translate3d(0, calc(0px - var(--nhp-scroll, 0px)), 0);
}

.nhp-card:focus-visible { outline: 2px solid currentColor; outline-offset: 5px; }

.nhp-title {
  margin: 13px 0 0;
  color: #fff;
  font: inherit;
  font-size: clamp(15px, 1.15vw, 18px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -.01em;
}

.nhp-empty {
  padding: 20px;
  border: 1px dashed #bbb;
  color: #555;
}

@media (max-width: 767px) {
  .nhp-viewport { height: 420px; aspect-ratio: auto; }
  .nhp-card:hover .nhp-screenshot,
  .nhp-card:focus-visible .nhp-screenshot { transform: translate3d(0, 0, 0); }
  .nhp-card:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .nhp-screenshot { transition: none; }
  .nhp-card:hover .nhp-screenshot,
  .nhp-card:focus-visible .nhp-screenshot,
  .nhp-card.is-scrolling .nhp-screenshot { transform: translate3d(0, 0, 0); }
}
