/* ============================================================
   Netflix-style portfolio showcase  ·  Imperial Craft Studio
   A large cinematic "featured project" + a horizontal rail of
   project thumbnails. Tapping a thumbnail features it; the
   "View project" button opens the existing photo-gallery dialog.
   ============================================================ */

.portfolio-netflix {
  overflow: hidden;
}

.pf-head,
.pf-stage {
  max-width: var(--max, 1280px);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

.pf-head {
  margin-bottom: clamp(1rem, 2.5vw, 1.6rem);
}

/* ---- Featured project (cinematic banner) ---- */
.pf-featured {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: clamp(380px, 58vh, 600px);
  border-radius: 16px;
  overflow: hidden;
  background: #0d0f0e;
  box-shadow: 0 24px 60px rgba(12, 13, 11, 0.28);
}

.pf-featured-media {
  position: absolute;
  inset: 0;
}

.pf-featured-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.pf-featured::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 9, 8, 0.88) 0%, rgba(8, 9, 8, 0.55) 42%, rgba(8, 9, 8, 0.08) 78%),
    linear-gradient(0deg, rgba(8, 9, 8, 0.85), transparent 55%);
}

.pf-featured-body {
  position: relative;
  z-index: 1;
  max-width: 620px;
  padding: clamp(1.4rem, 4vw, 3rem);
  color: #fff;
}

.pf-featured-meta {
  margin: 0 0 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold, #d9a948);
}

.pf-featured-title {
  margin: 0 0 0.7rem;
  font-family: var(--font-display, "Playfair Display", Georgia, serif);
  font-size: clamp(1.9rem, 5vw, 3.4rem);
  line-height: 1.02;
  color: #fff;
}

.pf-featured-desc {
  margin: 0 0 1.2rem;
  max-width: 52ch;
  font-size: clamp(0.92rem, 1.4vw, 1.05rem);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
}

.pf-featured-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.pf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.72rem 1.35rem;
  border: 1px solid transparent;
  border-radius: 8px;
  font: inherit;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform 140ms ease, background 140ms ease, color 140ms ease;
}

.pf-btn.primary {
  background: #ffffff;
  color: #141610;
}

.pf-btn.primary:hover {
  transform: translateY(-1px);
  background: var(--gold, #d9a948);
}

.pf-btn.ghost {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(6px);
}

.pf-btn.ghost:hover {
  background: rgba(255, 255, 255, 0.26);
}

/* ---- Filters + thumbnail rail ---- */
.pf-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: clamp(1rem, 2.4vw, 1.5rem) 0 0.9rem;
}

.pf-rail {
  display: flex;
  gap: clamp(0.6rem, 1.5vw, 1rem);
  overflow-x: auto;
  padding-bottom: 0.6rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.pf-rail::-webkit-scrollbar {
  height: 6px;
}

.pf-rail::-webkit-scrollbar-thumb {
  background: rgba(120, 120, 110, 0.4);
  border-radius: 999px;
}

.pf-card {
  position: relative;
  flex: 0 0 auto;
  width: clamp(150px, 38vw, 230px);
  aspect-ratio: 3 / 4;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 12px;
  overflow: hidden;
  background: #0d0f0e;
  cursor: pointer;
  scroll-snap-align: start;
  transition: transform 160ms ease, border-color 160ms ease;
}

.pf-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pf-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(8, 9, 8, 0.8), transparent 52%);
}

.pf-card-cap {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  gap: 2px;
  padding: 0.7rem 0.8rem;
  text-align: left;
  color: #fff;
}

.pf-card-cap strong {
  font-size: 0.9rem;
  line-height: 1.15;
}

.pf-card-cap small {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.78);
}

.pf-card:hover {
  transform: translateY(-3px);
}

.pf-card.active {
  border-color: var(--gold, #d9a948);
}

.pf-card.is-hidden {
  display: none;
}

@media (max-width: 767px) {
  /* The section already supplies horizontal padding on phones. */
  .pf-head,
  .pf-stage {
    padding-inline: 0;
  }

  .pf-featured {
    min-height: clamp(360px, 62vh, 520px);
  }

  .pf-featured::after {
    background: linear-gradient(0deg, rgba(8, 9, 8, 0.92) 8%, rgba(8, 9, 8, 0.4) 58%, rgba(8, 9, 8, 0.1));
  }

  .pf-card {
    width: clamp(140px, 52vw, 200px);
  }
}
