/* CineScope page-specific styling
   Works on top of main.css / theme.css / projects.css */

.project-page {
  background: var(--gray-50);
}

body.dark-mode .project-page {
  background: var(--background-light);
}

/* HERO */

.project-hero {
  padding: 7rem 0 3rem; /* Extra top padding to account for fixed navbar */
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.4fr);
  gap: 3rem;
  align-items: flex-start;
}

.hero-kicker {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.project-hero h1 {
  font-family: "Playfair Display", serif;
  font-size: clamp(2.1rem, 2.6vw, 2.6rem);
  margin-bottom: 0.75rem;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.hero-text p {
  line-height: 1.7;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 1.75rem;
}

.hero-stat {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  background: white;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
  min-width: 150px;
}

body.dark-mode .hero-stat {
  background: var(--gray-800);
}

.hero-stat-number {
  display: block;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--primary-color);
  margin-bottom: 0.25rem;
}

.hero-stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* HERO COLLAGE */

.hero-collage {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.hero-collage figure {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.12);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: all 0.3s ease;
}

.hero-collage figure:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.18);
}

body.dark-mode .hero-collage figure {
  background: var(--gray-800);
}

.hero-collage img {
  width: 100%;
  display: block;
  transition: transform 0.3s ease;
}

.hero-collage figure:hover img {
  transform: scale(1.02);
}

.hero-collage figcaption {
  padding: 0.75rem 0.85rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  background: linear-gradient(
    135deg,
    rgba(79, 70, 229, 0.04),
    rgba(15, 23, 42, 0.02)
  );
}

/* SECTIONS */

.project-section {
  padding: 3rem 0;
}

.project-section h2 {
  font-family: "Playfair Display", serif;
  font-size: 1.7rem;
  margin-bottom: 1rem;
}

.project-section p {
  max-width: 60rem;
  line-height: 1.8;
  color: var(--text-dark);
}

/* VISUAL GRID */

.visual-grid {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.75rem;
}

.visual-grid figure {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  height: 100%;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.visual-grid figure:hover {
  transform: translateY(-6px);
  box-shadow: 0 25px 50px rgba(15, 23, 42, 0.15);
}

body.dark-mode .visual-grid figure {
  background: var(--gray-800);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.3);
}

body.dark-mode .visual-grid figure:hover {
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
}

/* Clickable indicator overlay */
.visual-grid figure::after {
  content: "🔍 Click to enlarge";
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.7rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.visual-grid figure:hover::after {
  opacity: 1;
}

.visual-grid img {
  width: 100%;
  display: block;
  transition: transform 0.3s ease;
}

.visual-grid figure:hover img {
  transform: scale(1.03);
}

.visual-grid figcaption {
  padding: 1rem 1.2rem;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-dark);
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  background: linear-gradient(
    135deg,
    rgba(139, 92, 246, 0.05) 0%,
    rgba(255, 255, 255, 0.8) 100%
  );
  flex-grow: 1;
}

body.dark-mode .visual-grid figcaption {
  background: linear-gradient(
    135deg,
    rgba(139, 92, 246, 0.1) 0%,
    rgba(30, 41, 59, 0.8) 100%
  );
  border-top-color: rgba(148, 163, 184, 0.1);
}

/* LIGHTBOX MODAL */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  cursor: zoom-out;
}

.lightbox.active {
  display: flex;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.lightbox-content {
  max-width: 95vw;
  max-height: 90vh;
  position: relative;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
  color: white;
  text-align: center;
  padding: 1.5rem;
  font-size: 1rem;
  line-height: 1.6;
  max-width: 800px;
  margin: 0 auto;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 3rem;
  color: white;
  cursor: pointer;
  z-index: 10001;
  transition: transform 0.2s ease;
  background: none;
  border: none;
  line-height: 1;
}

.lightbox-close:hover {
  transform: scale(1.1);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 3rem;
  color: white;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  padding: 1rem;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

/* TECH SECTION */

.project-tech .project-links {
  margin-top: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ANALYSIS BLOCKS - Professional Interpretation Sections */

.section-intro {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 50rem;
}

.analysis-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
  margin-top: 2rem;
}

.visual-featured {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.1);
  cursor: pointer;
  transition: all 0.3s ease;
}

.visual-featured:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.15);
}

body.dark-mode .visual-featured {
  background: var(--gray-800);
}

.visual-featured img {
  width: 100%;
  display: block;
}

.interpretation {
  background: linear-gradient(
    135deg,
    rgba(139, 92, 246, 0.03) 0%,
    rgba(255, 255, 255, 0.8) 100%
  );
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

body.dark-mode .interpretation {
  background: linear-gradient(
    135deg,
    rgba(139, 92, 246, 0.08) 0%,
    rgba(30, 41, 59, 0.9) 100%
  );
  border-color: rgba(139, 92, 246, 0.25);
}

.interpretation h3 {
  font-family: "Playfair Display", serif;
  font-size: 1.3rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.interpretation h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--text-dark);
}

.interpretation p {
  line-height: 1.7;
  margin-bottom: 0.75rem;
}

.interpretation.standalone {
  margin-top: 2rem;
}

/* Example Grids */

.example-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.example-category {
  background: rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-md);
  padding: 1rem;
  border-left: 3px solid var(--primary-color);
}

body.dark-mode .example-category {
  background: rgba(30, 41, 59, 0.5);
}

.example-category h4 {
  margin-top: 0;
  font-size: 0.9rem;
  color: var(--primary-color);
}

.example-category p {
  font-size: 0.85rem;
  margin-bottom: 0;
  color: var(--text-muted);
}

/* Film Examples Lists */

.film-examples {
  margin: 0.75rem 0;
  padding-left: 1.25rem;
}

.film-examples li {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Era Breakdown */

.era-breakdown {
  margin: 1.5rem 0;
}

.era {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.era:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.era h4 {
  margin-top: 0;
}

.era p {
  margin-bottom: 0.5rem;
}

.era .film-examples {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Stats Grid */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}

.stats-grid-horizontal {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.stat-card {
  background: white;
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.15);
}

body.dark-mode .stat-card {
  background: var(--gray-800);
  border-color: rgba(148, 163, 184, 0.1);
}

.stat-decade {
  display: block;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--primary-color);
  margin-bottom: 0.25rem;
}

.stat-highlight {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.stat-card p {
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.stat-card .examples {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
}

.stat-number {
  display: block;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-bottom: 0.25rem;
}

.stat-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

/* Insight Callout */

.insight {
  background: rgba(139, 92, 246, 0.08);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-top: 1.5rem;
  border-left: 4px solid var(--primary-color);
}

body.dark-mode .insight {
  background: rgba(139, 92, 246, 0.12);
}

.insight strong {
  color: var(--primary-color);
}

/* Actor Tables */

.actor-table {
  margin: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.actor-table.compact {
  gap: 0.35rem;
}

.actor-row {
  display: grid;
  grid-template-columns: 180px auto 1fr;
  gap: 1rem;
  padding: 0.6rem 0.85rem;
  background: rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-sm);
  align-items: center;
  font-size: 0.9rem;
}

body.dark-mode .actor-row {
  background: rgba(30, 41, 59, 0.5);
}

.actor-table.compact .actor-row {
  grid-template-columns: 160px 1fr;
  padding: 0.5rem 0.75rem;
}

.actor-name {
  font-weight: 600;
  color: var(--text-dark);
}

.actor-count {
  font-weight: 500;
  color: var(--primary-color);
  font-size: 0.85rem;
}

.actor-films {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Metadata Note */

.metadata-note {
  font-size: 0.9rem;
  color: var(--text-muted);
  padding: 0.75rem 1rem;
  background: rgba(148, 163, 184, 0.1);
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
}

body.dark-mode .metadata-note {
  background: rgba(148, 163, 184, 0.15);
}

/* Two Column Visual Grid */

.visual-grid-2col {
  grid-template-columns: repeat(2, 1fr);
}

/* RESPONSIVE */

@media (max-width: 960px) {
  .hero-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-collage {
    order: -1;
  }

  .visual-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }

  .analysis-block {
    grid-template-columns: 1fr;
  }

  .visual-grid-2col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .project-hero {
    padding-top: 3rem;
  }

  .hero-stats {
    gap: 1rem;
  }

  .hero-stat {
    min-width: 0;
    flex: 1 1 calc(50% - 0.5rem);
  }

  .visual-grid figure::after {
    display: none;
  }

  .lightbox-nav {
    font-size: 2rem;
    padding: 0.5rem;
  }

  .lightbox-close {
    font-size: 2rem;
    top: 10px;
    right: 15px;
  }

  .interpretation {
    padding: 1.5rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .example-grid {
    grid-template-columns: 1fr;
  }

  .actor-row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .actor-table.compact .actor-row {
    grid-template-columns: 1fr;
  }

  .actor-count {
    font-size: 0.8rem;
  }
}
