/* ── SCROLL SCENE (sticky pin) ── */
.hero-scroll-scene {
  position: relative;
  height: 160vh;
  margin-bottom: 0;
  z-index: 1
}

.gold-divider {
  position: relative;
  z-index: 10
}

/* ── PARALLAX HERO ── */
.port-hero {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center
}

.parallax-columns {
  position: absolute;
  inset: -80px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  padding: 8px;
  transform: scale(1.5);
  transform-origin: center;
  will-change: transform
}

.parallax-col {
  overflow: hidden;
  position: relative
}

.parallax-track {
  display: flex;
  flex-direction: column;
  gap: 10px;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.parallax-col:nth-child(1) .parallax-track {
  animation: scrollUp 22s linear infinite
}

.parallax-col:nth-child(2) .parallax-track {
  animation: scrollDown 28s linear infinite
}

.parallax-col:nth-child(3) .parallax-track {
  animation: scrollUp 18s linear infinite
}

.parallax-col:nth-child(4) .parallax-track {
  animation: scrollDown 32s linear infinite
}

.parallax-col:nth-child(5) .parallax-track {
  animation: scrollUp 16s linear infinite
}

@keyframes scrollUp {
  0% {
    transform: translateY(0)
  }

  100% {
    transform: translateY(-50%)
  }
}

@keyframes scrollDown {
  0% {
    transform: translateY(-50%)
  }

  100% {
    transform: translateY(0)
  }
}

.parallax-img {
  width: 100%;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
  border: 1px solid rgba(201, 168, 76, 0.2);
}

.parallax-img.tall {
  height: 340px
}

.parallax-img.short {
  height: 200px
}

.parallax-img.mid {
  height: 270px
}

.port-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(10, 10, 10, .85) 0%, rgba(10, 10, 10, .55) 40%, rgba(10, 10, 10, .97) 100%);
  z-index: 2
}

.port-hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  padding: 2rem;
  transform-origin: center;
  will-change: transform, opacity
}

.port-hero-content .hero-tag {
  animation: fadeUp 1s ease .2s forwards;
  opacity: 0
}

.port-hero-content .hero-title {
  animation: fadeUp 1s ease .4s forwards;
  opacity: 0
}

.port-hero-content .hero-sub {
  animation: fadeUp 1s ease .6s forwards;
  opacity: 0
}

@keyframes fadeUp {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── DYNAMIC PORTFOLIO SECTION ── */
.dynamic-portfolio-section {
  position: relative;
  z-index: 10;
  background: transparent;
  padding: 5rem 5% 8rem;
  min-height: 80vh;
}

/* Extra top clearance when there's no parallax hero (navbar is ~80px tall) */
.dynamic-portfolio-section.no-hero {
  padding-top: 8rem;
}

/* ── Page Heading (shown on category/album pages) ── */
.portfolio-page-heading {
  margin-bottom: 3rem;
}

.portfolio-heading-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.25rem;
}

.portfolio-heading-nav {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.portfolio-page-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 300;
  color: var(--white);
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.portfolio-page-title em {
  color: var(--gold);
  font-style: italic;
}

.albums-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.album-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 4/5;
  text-decoration: none;
  border: 1px solid rgba(201, 168, 76, 0.2);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s ease, transform 0.6s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.album-card.reveal {
  opacity: 1;
  transform: translateY(0);
}

.album-card:hover {
  transform: translateY(-10px);
  border-color: rgba(201, 168, 76, 0.8);
  box-shadow: 0 15px 40px rgba(201, 168, 76, 0.2);
}

.album-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease, filter 0.4s ease;
  filter: brightness(0.8);
}

.album-card:hover img {
  transform: scale(1.05);
  filter: brightness(1);
}

.album-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.2) 50%, rgba(0, 0, 0, 0) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
  text-align: left;
}

.album-title {
  color: var(--white);
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.8rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
  transition: color 0.3s;
}

.album-card:hover .album-title {
  color: var(--gold);
}

.album-view {
  color: var(--gold);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.8;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.album-card:hover .album-view {
  opacity: 1;
  transform: translateY(0);
}

/* ── PHOTO MASONRY (CSS columns — true puzzle fit) ── */
.photo-masonry {
  columns: 3;
  column-gap: 12px;
  max-width: 1400px;
  margin: 0 auto;
}

.photo-item {
  break-inside: avoid;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  cursor: pointer;
  border: 1px solid rgba(201, 168, 76, 0.3);
  box-shadow: 0 0 20px rgba(201, 168, 76, 0.1);
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease, border-color 0.35s, box-shadow 0.35s;
  display: block;
  /* needed for columns */
}

.photo-item.reveal {
  opacity: 1;
  transform: translateY(0);
}

.photo-item:hover {
  border-color: rgba(201, 168, 76, 0.85);
  box-shadow: 0 12px 35px rgba(201, 168, 76, 0.3);
}

.photo-item img {
  width: 100%;
  height: auto;
  /* let natural height define the row — this IS masonry */
  display: block;
  transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.4s ease;
  opacity: 0.88;
}

.photo-item:hover img {
  transform: scale(1.05);
  opacity: 1;
}

.empty-state {
  text-align: center;
  color: #888;
  font-size: 1.2rem;
  margin-top: 4rem;
}

/* ── LIGHTBOX ── */
.lightbox {
  display: flex;
  opacity: 0;
  visibility: hidden;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, .98);
  backdrop-filter: blur(30px);
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s ease, visibility 0.4s ease
}

.lightbox.open {
  opacity: 1;
  visibility: visible
}

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 40px 100px rgba(0, 0, 0, .8);
  transform: scale(0.95);
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1)
}

.lightbox.open img {
  transform: scale(1)
}

.lightbox-close {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, .2);
  background: rgba(255, 255, 255, .05);
  border-radius: 50%;
  color: var(--white);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .3s;
  z-index: 10000
}

.lightbox-close:hover {
  background: rgba(201, 168, 76, .2);
  color: var(--gold)
}

/* ── LIGHTBOX LOADER SPINNER ── */
.lightbox-loader {
  display: none;
  position: absolute;
  width: 48px;
  height: 48px;
  border: 3px solid rgba(201, 168, 76, 0.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: lbSpin 0.75s linear infinite;
}

@keyframes lbSpin {
  to {
    transform: rotate(360deg);
  }
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .photo-masonry {
    columns: 2;
  }

  .parallax-columns {
    grid-template-columns: repeat(3, 1fr);
  }

  .parallax-col:nth-child(4),
  .parallax-col:nth-child(5) {
    display: none;
  }

  .dynamic-portfolio-section {
    padding: 4rem 4% 6rem;
  }

  .dynamic-portfolio-section.no-hero {
    padding-top: 6rem;
  }
}

@media (max-width: 600px) {
  .photo-masonry {
    columns: 2;
    column-gap: 8px;
  }

  .parallax-columns {
    grid-template-columns: repeat(2, 1fr);
  }

  .parallax-col:nth-child(3) {
    display: none;
  }

  .dynamic-portfolio-section {
    padding: 2.5rem 4% 5rem;
  }

  .dynamic-portfolio-section.no-hero {
    padding-top: 5rem;
  }

  .portfolio-page-heading {
    margin-bottom: 2rem;
  }

  .portfolio-page-title {
    font-size: clamp(1.6rem, 7vw, 2.8rem);
  }

  .albums-grid {
    gap: 1.25rem;
  }

  .album-overlay {
    padding: 1.25rem;
  }

  .album-title {
    font-size: 1.4rem;
  }
}

@media (max-width: 380px) {
  .photo-masonry {
    columns: 1;
  }

  .albums-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .dynamic-portfolio-section {
    padding: 2rem 3% 4rem;
  }
}

/* ── VIDEOGRAPHY GRID ── */

.video-item {
  display: block;
  position: relative;
  background: rgba(20, 20, 20, 0.45);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(201, 168, 76, 0.25);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), inset 0 20px 40px rgba(255, 255, 255, 0.02);
  aspect-ratio: 9/16;
  text-decoration: none;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.4s ease, box-shadow 0.4s ease;
}

.video-item:hover {
  transform: translateY(-8px);
  border-color: rgba(201, 168, 76, 0.65);
  box-shadow: 0 35px 80px rgba(201, 168, 76, 0.3);
}

/* ── Solution 1: Instagram Embed Crop ── */
.instagram-embed-card {
  background: #000;
}

.embed-crop-container {
  position: absolute;
  top: -54px;
  bottom: -150px;
  left: 0;
  right: 0;
  overflow: hidden;
}

.embed-crop-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  pointer-events: auto;
}

/* ── Solution 2: Native HTML5 Video Card ── */
.native-video-card {
  background: #050505;
  cursor: pointer;
}

.native-video-card:hover {
  border-color: rgba(201, 168, 76, 0.75);
  box-shadow: 0 35px 80px rgba(201, 168, 76, 0.35);
}

.video-player-wrapper {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.portfolio-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.native-video-card:hover .portfolio-video {
  transform: scale(1.04);
}

.video-overlay-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.1) 40%, rgba(0, 0, 0, 0.85) 75%, rgba(0, 0, 0, 0.95) 100%);
  z-index: 1;
  pointer-events: none;
  transition: background 0.4s ease;
}

.native-video-card:hover .video-overlay-gradient {
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.2) 60%, rgba(0, 0, 0, 0.85) 100%);
}

.video-ui-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.75rem;
  pointer-events: none;
}



.video-metadata {
  transform: translateY(0);
}

.video-title {
  font-family: 'Cormorant Garamond', serif;
  color: var(--white);
  font-size: 1.45rem;
  font-weight: 400;
  margin-bottom: 0.25rem;
  letter-spacing: 0.02em;
}

.video-subtitle {
  color: var(--white);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
}

/* ── REEL GRID (Videography page) ── */
.reel-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.reel-card {
  display: block;
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(201, 168, 76, 0.3);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  text-decoration: none;
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
  background: #0a0a0a;
}

.reel-card:hover {
  transform: translateY(-6px);
  border-color: rgba(201, 168, 76, 0.75);
  box-shadow: 0 30px 70px rgba(201, 168, 76, 0.25);
}

/* Video Grid Layout */
.video-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Glassmorphic Card Container */
.video-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.video-card:hover {
  transform: translateY(-5px);
  border-color: rgba(212, 175, 55, 0.3);
}

/* Enforce 9:16 Cinematic Aspect Ratio */
.video-aspect-container {
  position: relative;
  width: 100%;
  padding-top: 177.78%;
  border-radius: 12px;
  overflow: hidden;
}

.video-aspect-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ── Instagram Badge ── */
.insta-badge {
  position: absolute;
  top: 1.1rem;
  left: 1.1rem;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem 0.35rem 0.55rem;
  background: rgba(10, 10, 10, 0.72);
  border: 1px solid rgba(201, 168, 76, 0.35);
  border-radius: 999px;
  color: var(--gold);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 1;
  pointer-events: none;
}

/* Responsive: 2 columns on tablets */
@media (max-width: 1024px) {
  .video-grid,
  .reel-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }
}

/* Responsive: 2 columns on mobile */
@media (max-width: 600px) {
  .video-grid,
  .reel-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    padding: 1rem 0.5rem;
  }

  .reel-card {
    border-radius: 14px;
  }
}

/* Responsive: single column on very small screens */
@media (max-width: 360px) {
  .video-grid,
  .reel-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1rem 0.5rem;
  }
}