/* ═══════════════════════════════════════════════════════
   KRIDHA PRODUCTIONS — Work / Portfolio Page Styles
   ═══════════════════════════════════════════════════════ */

/* ── Page Hero with Film Grain ── */
.work-hero {
  position: relative;
}

.work-hero .grain-overlay::after {
  opacity: 0.06;
}

/* ── Portfolio Grid ── */
.portfolio-section {
  background: var(--black);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.portfolio-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4/3;
  transition: transform var(--transition);
}

.portfolio-card:nth-child(1) { aspect-ratio: 4/3; }
.portfolio-card:nth-child(2) { aspect-ratio: 3/4; }
.portfolio-card:nth-child(3) { aspect-ratio: 4/3; }
.portfolio-card:nth-child(4) { aspect-ratio: 3/4; }
.portfolio-card:nth-child(5) { aspect-ratio: 4/3; }
.portfolio-card:nth-child(6) { aspect-ratio: 4/3; }

.portfolio-card .work-thumbnail {
  width: 100%;
  height: 100%;
}

.portfolio-card .work-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 20%, rgba(5, 10, 9, 0.92) 100%);
  opacity: 0;
  transition: opacity var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px;
}

.portfolio-card:hover .work-card-overlay {
  opacity: 1;
}

.portfolio-card:hover .work-thumbnail {
  transform: scale(1.05);
}

.portfolio-card .work-card-overlay .work-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.portfolio-card .work-year {
  font-size: 0.75rem;
  color: var(--text-secondary);
  letter-spacing: 0.1em;
}

/* ── Lightbox Modal ── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.lightbox.active {
  opacity: 1;
  pointer-events: all;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 10, 9, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.lightbox-content {
  position: relative;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow-y: auto;
  z-index: 1;
  transform: translateY(40px) scale(0.95);
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.lightbox.active .lightbox-content {
  transform: translateY(0) scale(1);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--black);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  z-index: 2;
}

.lightbox-close:hover,
.lightbox-close:focus-visible {
  border-color: var(--green);
  color: var(--green);
  box-shadow: 0 0 15px var(--green-glow);
}

.lightbox-image {
  width: 100%;
  aspect-ratio: 16/9;
}

.lightbox-body {
  padding: 32px;
}

.lightbox-body h2 {
  font-size: 1.8rem;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.lightbox-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.lightbox-meta .tag {
  padding: 4px 12px;
  background: rgba(0, 166, 147, 0.12);
  color: var(--green);
  font-size: 0.75rem;
  border-radius: 20px;
  letter-spacing: 0.05em;
}

.lightbox-meta .year {
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 0.85rem;
}

.lightbox-body .description {
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 24px;
}

.lightbox-video {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--black);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.lightbox-video iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.video-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--text-secondary);
}

.video-placeholder i {
  font-size: 3rem;
  color: var(--green);
  opacity: 0.5;
}

.video-placeholder span {
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ── Showreel Section ── */
.showreel-section {
  background: var(--surface);
}

.showreel-wrapper {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
}

.showreel-frame {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--black);
  border-radius: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.showreel-frame iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.play-btn-wrapper {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
}

.play-btn {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--black);
  font-size: 1.5rem;
  cursor: pointer;
  position: relative;
  z-index: 1;
  transition: all var(--transition);
}

.play-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 0 40px var(--green-glow);
}

.play-ripple {
  position: absolute;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid var(--green);
  animation: ripple 2s ease-out infinite;
}

.play-ripple:nth-child(2) {
  animation-delay: 0.5s;
}

.play-ripple:nth-child(3) {
  animation-delay: 1s;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .portfolio-card {
    aspect-ratio: 16/10 !important;
  }

  .lightbox-content {
    width: 95%;
    max-height: 95vh;
  }

  .lightbox-body {
    padding: 20px;
  }
}
