/* ── 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
}

.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.3);
  box-shadow: 0 0 25px rgba(201, 168, 76, 0.15)
}

.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(280px, 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)
}

/* ── 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
  }
}

@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
  }
}