/* Dark Academia Color Palette */
:root {
  /* Primary Colors */
  --gold: #b8956a;
  --purple: #4a3b5c; /* The Nebula */

  /* Deep Earth Tones */
  --forest-green: #2d3a2e; /* The Horizon (Dark) */
  --moss-green: #4a5a4d;   /* The Horizon (Light) */
  --stone-gray: rgba(184, 149, 106, 0.3);   /* Star lines/Faint borders */
  --weathered-wood: #6b5d52;

  /* Neutrals with Nordic feel */
  --dark-bg: #0d0a0f; /* The Void */
  --darker-bg: #050305;
  --light-bg: #1a141f;
  --text-primary: #e8dfd2;
  --text-secondary: #a89782;
  --rune-accent: #9d8b6f;

  /* Accent */
  --glow-gold: rgba(184, 149, 106, 0.4);
  --glow-purple: rgba(74, 59, 92, 0.4);

  /* Layout */
  --nav-height: 86px; /* Approximate height of the nav bar */
}

/* Selection & Scrollbar */
::selection {
  background: var(--gold);
  color: var(--darker-bg);
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--darker-bg);
}

::-webkit-scrollbar-thumb {
  background: rgba(184, 149, 106, 0.3);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gold);
}

/* Reset and Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Montserrat', sans-serif;
  background-color: var(--dark-bg);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
}

/* Global Axis Mundi */
.axis-mundi {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 100%;
  z-index: 1; /* Sits above content sections, but below the nav */
  pointer-events: none;
  /* The gradient is the glowing 'comet' */
  background: linear-gradient(
    to bottom,
    transparent 0%,
    var(--gold) 50%,
    transparent 100%
  );
  background-position-y: var(--axis-scroll, -100%);
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(13, 10, 15, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--stone-gray);
  transition: all 0.3s ease;
}

.nav.scrolled {
  background: rgba(13, 10, 15, 0.95);
  box-shadow: 0 4px 30px rgba(184, 149, 106, 0.1);
}

.nav-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-text {
  font-family: "Garamond", serif;
  font-size: clamp(0.8rem, 4vw, 1.5rem);
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.05em;
  white-space: nowrap; /* Ensures the text never wraps to a new line */
}

.logo-ornament {
  color: var(--gold);
  font-size: 1.25rem;
  display: flex;
  align-items: center;
}

.logo-ornament svg {
  animation: svg-pulse-glow 3s ease-in-out infinite;
  overflow: visible;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  width: 25px;
  height: 2px;
  background: var(--gold);
  transition: all 0.3s ease;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 3rem;
}

/* Enhanced navigation links with wild Nordic hover effects */
.nav-link {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.1rem;
  color: var(--text-secondary);
  text-decoration: none;
  position: relative;
  transition: all 0.4s ease;
  padding: 0.5rem 0;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.76, 0, 0.24, 1);
}

.nav-link::before {
  position: absolute;
  left: -15px;
  top: 50%;
  transform: translateY(-50%) scale(0);
  color: var(--moss-green);
  font-size: 1rem;
  opacity: 0;
  transition: all 0.4s ease;
  text-shadow: 0 0 10px var(--glow-forest);
}

.nav-link:hover {
  color: var(--gold);
  transform: translateY(-2px);
}

.nav-link:hover::after {
  transform: scaleX(1);
}

.nav-link:hover::before {
  transform: translateY(-50%) scale(1);
  opacity: 1;
  left: -20px;
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  height: 100vh;
  overflow: hidden;
  background: var(--dark-bg);
  display: flex;
  flex-direction: column;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.hero-bg video,
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-video {
  width: 100%;
  height: 100%;
  object-position: center;
  object-fit: cover;
  opacity: 0.3; /* Slightly darken for better text contrast */
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 50%, var(--dark-bg) 95%);
}

.hero-content {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100vh;
  align-items: center;  
  height: 100%; /* Change from 100vh to 100% */
  flex-grow: 1; /* Allow this container to grow and fill available space */
  z-index: 10;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
  padding: var(--nav-height) 2rem 4rem;
  padding: 0 2rem; /* Remove top and bottom padding */
}

.hero-content-inner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* max-height is no longer needed with justify-content: center */
  /* max-height: 1450px; */
}

.hero-content p{
  padding: 0.2rem;
}

.hero-content h2 {
  margin: 0;
}

.hero-ornament {
  color: var(--gold);
  font-size: 2rem;
  margin: 0;
  animation: pulse-glow 2s ease-in-out infinite;
}


.hero-subtitle {
  font-family: "EB Garamond", serif;
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  color: var(--text-secondary);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.hero-title {
  font-family: "Cinzel", serif;
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.title-word {
  opacity: 0;
  animation: fadeInUp 0.8s ease forwards;
  background: linear-gradient(135deg, var(--gold) 0%, var(--text-primary) 50%, var(--gold) 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeInUp 0.8s ease forwards, shimmer 5s ease-in-out infinite;
}

.title-word::selection {
  -webkit-text-fill-color: var(--darker-bg);
  color: var(--darker-bg);
  text-shadow: none;
}

.title-word:nth-child(1) {
  animation-delay: 0.2s;
}
.title-word:nth-child(2) {
  animation-delay: 0.4s;
}
.title-word:nth-child(3) {
  animation-delay: 0.6s;
}

.hero-description {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.3rem;
  color: var(--text-secondary);
  margin-bottom: 3rem;
  line-height: 1.8;
}

/* --- Redesigned Hero CTA Button --- */
.hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: clamp(0.8rem, 2vw, 1.2rem) clamp(1.5rem, 4vw, 2.5rem);
  background: transparent;
  border: 1px solid var(--gold);
  border-radius: 4px; /* Slightly rounded corners */
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1rem, 2vw, 1.2rem);
  text-decoration: none;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--gold);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 0 20px rgba(184, 149, 106, 0.3);
  animation: pulse-glow-border 3s infinite ease-in-out; /* Subtle breathing glow */
  margin: 0 auto; /* Center the button */
}

.hero-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 30px rgba(184, 149, 106, 0.5);
  background: var(--gold);
  color: var(--dark-bg);
  border-color: #e8dfd2;
  /* Stop the default animation and just hold the glow */
  animation: none; 
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  color: var(--text-secondary);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
}

.scroll-line {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  animation: scroll-pulse 2s ease-in-out infinite;
}

/* Section Headers */
.section-header {
  text-align: center;
  margin-bottom: 1rem;
}

.section-ornament {
  display: block;
  color: var(--gold);
  font-size: 2rem;
  margin-bottom: 1rem;
  animation: pulse-glow 2s ease-in-out infinite;
}

.section-title {
  font-family: "Cinzel", serif;
  font-size: 3.5rem;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 0rem;
  letter-spacing: 0.05em;
}

.section-subtitle {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.3rem;
  font-style: italic;
  color: var(--text-secondary);
}

/* Portfolio Section */
.portfolio {
  padding: 6rem 0; /* Keep padding for content */
  background-color: var(--dark-bg);
  border-top: 1px solid var(--stone-gray);
  border-bottom: 1px solid var(--stone-gray);
  position: relative;
  overflow: hidden;
}

/* SVG Starfield Layers (Fixed) */
.portfolio::before,
.portfolio::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0; 
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 800'%3E%3Ctext x='400' y='400' font-size='20' fill='%23b8956a' opacity='0.8' text-anchor='middle'%3E✦%3C/text%3E%3Ctext x='100' y='200' font-size='15' fill='%23e8dfd2' opacity='0.7' text-anchor='middle'%3E✦%3C/text%3E%3Ctext x='700' y='600' font-size='15' fill='%23e8dfd2' opacity='0.9' text-anchor='middle'%3E✦%3C/text%3E%3Ctext x='300' y='700' font-size='10' fill='%23a89782' opacity='0.8' text-anchor='middle'%3E✦%3C/text%3E%3Ctext x='550' y='150' font-size='12' fill='%23e8dfd2' opacity='0.8' text-anchor='middle'%3E✦%3C/text%3E%3C/svg%3E");
  background-repeat: repeat;
}

/* Layer 2: Mid-ground */
.portfolio::before {
  background-size: 500px 500px;
  opacity: 0.8;
  transform: translateY(var(--parallax-y-1, 0px));
}

/* Layer 3: Foreground */
.portfolio::after {
  background-size: 300px 300px;
  transform: translateY(var(--parallax-y-2, 0px)); /* Keep parallax */
}


/* New full-width portfolio with image overlays and hover effects */
.portfolio-full-gallery {
  position: relative; /* Ensure it's above the starfield */
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%; /* Take full width of the container */
  margin: 0 auto; /* Keep it centered */
  gap: 6rem; /* Increased gap for more breathing room */
  align-items: center;
  padding: 4rem 0; /* Vertical padding */
}

.gallery-item {
  opacity: 0;
  animation: fadeInUp 1s ease 0.2s forwards;
  transition: all 1.3s ease;
  width: 100%;
  position: relative;
}

/* --- Basic Axis Mundi for Portfolio --- */
/* This line connects the individual project cards vertically */
.gallery-item::before {
  content: "";
  position: absolute;
  /* The gap between items is 8rem, so we extend the line 4rem up and 4rem down */
  top: -4rem;
  bottom: -4rem;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  background: var(--stone-gray);
  z-index: 0; /* Sits behind the gallery item link */
}

.gallery-item:hover{
  border-color: var(--gold);
}

.gallery-item-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.gallery-item-image {
  position: relative;
  width: 100%;
  aspect-ratio: 21 / 9;
  overflow: hidden;
  border: 1px solid var(--stone-gray); /* The frame */
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* Slower, smoother transition */
}

.gallery-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  filter: brightness(0.9) contrast(1.1) grayscale(0.1);
  opacity: 1;
}

.gallery-item-link:hover .gallery-item-image {
  border-color: var(--gold);
  box-shadow: 0 0 30px -5px var(--glow-gold); /* The requested outer glow */
}

.gallery-item-link:hover .gallery-item-image img {
  transform: scale(1.05);
  filter: brightness(1) contrast(1.1) grayscale(0);
  opacity: 1;
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(13, 10, 15, 0.9) 0%, transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 3rem 4rem;
  transition: all 0.5s ease;
}

.gallery-item-link:hover .gallery-overlay {
  background: linear-gradient(to top, rgba(13, 10, 15) 0%, rgba(13, 10, 15, 0.5) 60%, rgba(13, 10, 15, 0.2) 100%);
}

.gallery-basic-info {
  transition: all 0.5s ease;
  text-align: left;
  transform: translateY(20px);
}

.gallery-title {
  font-family: "Cinzel", serif;
  font-size: 3rem;
  color: var(--gold);
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
  transition: all 0.3s ease;
}

.gallery-item-link:hover .gallery-title {
  transform: translateY(-10px);
}

.gallery-meta {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 1.2rem;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.meta-divider {
  color: var(--gold);
}

.gallery-expanded-info {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: all 0.6s ease; /* Slightly slower for a more graceful reveal */
  text-align: left;
  transform: translateY(20px);
}

.gallery-item-link:hover .gallery-expanded-info {
  max-height: 300px;
  opacity: 0.9;
  transform: translateY(0);
  margin-top: 1.5rem;
}

.gallery-description {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.3rem;
  color: var(--text-primary);
  line-height: 1.8;
  margin-bottom: 1.5rem;
  font-style: italic;
}

.gallery-details {
  display: flex;
  justify-content: flex-start;
  gap: 2rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 1.1rem;
  color: var(--text-secondary);
  padding: 0rem 0;
  border-top: 1px solid rgba(184, 149, 106, 0.3);
}

.gallery-details strong {
  color: var(--gold);
}


/* --- Refined About Section --- */
.about {
  padding: 2rem 0rem; /* Increased whitespace for luxury feel */
  background: var(--dark-bg);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-top: 1px solid var(--stone-gray);
}

.about-grid {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Background Geometry - The "Watermark" Effect */
.about::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 90vw;
  height: 90vw;
  max-width: 1400px;
  max-height: 1400px;
  /* Very slow, subtle rotation. scale(1.2) removed to prevent "thumping" visual */
  animation: alchemy-slow-drift 180s linear infinite;
  opacity: 0.1; /* Made it more subtle to sit in the background */
  pointer-events: none;
  
  /* Masking creates a soft fade-out towards the edges of the circle */
  -webkit-mask-image: radial-gradient(circle, black 30%, transparent 70%);
  mask-image: radial-gradient(circle, black 30%, transparent 70%);

  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cfilter id='scratch'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.4' numOctaves='3' result='noise'/%3E%3CfeDisplacementMap in='SourceGraphic' in2='noise' scale='0.6'/%3E%3C/filter%3E%3Cpath id='mid' d='M50,18a32,32 0 1,1 0,64a32,32 0 1,1 0,-64'/%3E%3C/defs%3E%3Cg filter='url(%23scratch)' stroke='%23b8956a' fill='none' stroke-width='0.25' opacity='0.8'%3E%3Ccircle cx='50' cy='50' r='48'/%3E%3Ccircle cx='50' cy='50' r='42'/%3E%3Ccircle cx='50' cy='50' r='36'/%3E%3Ccircle cx='50' cy='50' r='24'/%3E%3Cline x1='50' y1='0' x2='50' y2='100'/%3E%3Cline x1='0' y1='50' x2='100' y2='50'/%3E%3Cpath d='M15 15 L85 85 M85 15 L15 85'/%3E%3C/g%3E%3Ctext filter='url(%23scratch)'%3E%3CtextPath href='%23mid' startOffset='0' style='fill:%23b8956a; font-size:3px; font-family:serif; letter-spacing:4px; opacity:1;'%3Eᚠ ᚢ ᚦ ᚨ ᚱ ᚲ ᚷ ᚹ ᚺ ᚾ ᛁ ᛃ ᛇ ᛈ ᛉ ᛊ ᛏ ᛒ ᛖ ᛗ ᛚ ᛜ ᛞ ᛟ%3C/textPath%3E%3C/text%3E%3C/svg%3E") no-repeat center center / contain;
}

/* Central Content Container */
.about-content-wrapper {
  position: relative;
  z-index: 2;
  max-width: 800px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.about-intro {
  font-family: "Cinzel", serif;
  font-size: 2rem;
  color: var(--gold);
  letter-spacing: 0.2rem;
  text-transform: uppercase;
  margin-bottom: 2.5rem;
  /* Decorative line under title */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.about-intro::after {
  content: "";
  width: 60px;
  height: 1px;
  background: var(--gold);
  opacity: 0.5;
}

.about-text p {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.1rem;
  line-height: 2;
  color: var(--text-primary);
  margin-bottom: 2rem;
  font-weight: 300; /* Lighter weight = more professional */
}

/* Value Items Redesigned */
.about-values {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

.about-details-grid {
  position: relative;
  z-index: 2;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  margin-top: 6rem;
  padding-top: 4rem;
  border-top: 1px solid var(--stone-gray);
}

.about-svg-placeholder {
  width: 100%;
  height: 100%;
  min-height: 300px;
  opacity: 0.5;
  /* Use the SVG as a mask */
  -webkit-mask: url("/icon.svg") no-repeat center;
  mask: url("/icon.svg") no-repeat center;
  -webkit-mask-size: contain;
  mask-size: contain;
  /* Now we can control the color with background-color */
  background-color: var(--stone-gray);
  transition: opacity 1.5s ease-in-out;
}

.about-details-grid:hover .about-svg-placeholder {
  opacity: 1;
  background-color: var(--gold);
}

.value-item {
  position: relative;
  padding: 1rem 0;
  transition: all 0.5s ease;
  border-bottom: 1px solid rgba(184, 149, 106, 0.1);
}

.value-item:hover {
  transform: translateY(-5px);
  border-bottom-color: var(--gold);
}

.value-item h3 {
  font-family: "Cinzel", serif;
  font-size: 1.2rem;
  letter-spacing: 0.1rem;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

/* Stats Section */
.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 6rem;
  padding-top: 4rem;
  border-top: 1px solid rgba(184, 149, 106, 0.1);
  gap: 2rem;
}

.stat-item h4 {
  font-family: "Cinzel", serif;
  font-size: 1.8rem;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.stat-item p {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.7;
}

/* Smooth slow rotation */
@keyframes alchemy-slow-drift {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.stat-card {
  padding: 1rem;
  background: transparent;
  border: none;
  text-align: center;
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
}

.stat-number {
  font-family: "Cinzel", serif;
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 0.5rem;
  text-shadow: 0 0 20px rgba(184, 149, 106, 0.3);
}

.stat-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.1rem;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
}

/* Contact Section */
/* --- Contact Section: Sigil & Blueprint --- */
.contact {
  padding: 6rem 0;
  background: var(--dark-bg);
  position: relative;
  overflow: hidden;
  border-top: 1px solid rgba(184, 149, 106, 0.1);
}

/* Background Leilines - Faded towards the sigil */
.contact::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.12;
  /* This is now just a subtle grid, the constellation was moved */
  background-image: linear-gradient(rgba(184, 149, 106, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(184, 149, 106, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* Removed the ::after rule that contained the icon.svg */
.contact::after {
  display: none;
}

.contact-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* --- Left Column: Info Text Sitting Near Sigil --- */
.contact-info {
  position: relative;
  text-align: center;
  z-index: 3; /* Sits above the form */
}

.contact-info::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  z-index: -1;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cstyle%3E.star%7Bfill:%23b8956a;animation:star-shine 4s ease-in-out infinite alternate%7D.line%7Bstroke:%23b8956a;stroke-width:0.5;stroke-dasharray:100;stroke-dashoffset:100;animation:draw-line 8s ease-in-out infinite%7D@keyframes star-shine%7B0%25%7Bopacity:0.2%7D100%25%7Bopacity:1%7D%7D@keyframes draw-line%7B0%25,50%25%7Bstroke-dashoffset:100%7D100%25%7Bstroke-dashoffset:0%7D%7D.star:nth-of-type(2)%7Banimation-delay:-1s%7D.star:nth-of-type(3)%7Banimation-delay:-2s%7D.star:nth-of-type(4)%7Banimation-delay:-3s%7D.star:nth-of-type(5)%7Banimation-delay:-4s%7D.line:nth-of-type(2)%7Banimation-delay:-2s%7D.line:nth-of-type(3)%7Banimation-delay:-4s%7D.line:nth-of-type(4)%7Banimation-delay:-6s%7D%3C/style%3E%3C/defs%3E%3Cg%3E%3Cpath class='line' d='M50 50 L150 80'/%3E%3Cpath class='line' d='M150 80 L220 40'/%3E%3Cpath class='line' d='M220 40 L300 120'/%3E%3Cpath class='line' d='M300 120 L350 90'/%3E%3Ccircle class='star' cx='50' cy='50' r='3'/%3E%3Ccircle class='star' cx='150' cy='80' r='4'/%3E%3Ccircle class='star' cx='220' cy='40' r='3'/%3E%3Ccircle class='star' cx='300' cy='120' r='5'/%3E%3Ccircle class='star' cx='350' cy='90' r='3'/%3E%3C/g%3E%3C/svg%3E") no-repeat center center / 1000px auto;
  opacity: 0.4;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cstyle%3E.star%7Bfill:%23b8956a;animation:star-shine 4s ease-in-out infinite alternate%7D.line%7Bstroke:%23b8956a;stroke-width:0.5;stroke-dasharray:100;stroke-dashoffset:100;animation:draw-line 10s ease-in-out infinite%7D@keyframes star-shine%7B0%25%7Bopacity:0.2%7D100%25%7Bopacity:1%7D%7D@keyframes draw-line%7B0%25%7Bstroke-dashoffset:100;opacity:0%7D40%25%7Bstroke-dashoffset:0;opacity:1%7D60%25%7Bstroke-dashoffset:0;opacity:1%7D100%25%7Bstroke-dashoffset:0;opacity:0%7D%7D.star:nth-of-type(2)%7Banimation-delay:-1s%7D.star:nth-of-type(3)%7Banimation-delay:-2s%7D.star:nth-of-type(4)%7Banimation-delay:-3s%7D.star:nth-of-type(5)%7Banimation-delay:-4s%7D.line:nth-of-type(2)%7Banimation-delay:-2.5s%7D.line:nth-of-type(3)%7Banimation-delay:-5s%7D.line:nth-of-type(4)%7Banimation-delay:-7.5s%7D%3C/style%3E%3C/defs%3E%3Cg%3E%3Cpath class='line' d='M50 50 L150 80'/%3E%3Cpath class='line' d='M150 80 L220 40'/%3E%3Cpath class='line' d='M220 40 L300 120'/%3E%3Cpath class='line' d='M300 120 L350 90'/%3E%3Ccircle class='star' cx='50' cy='50' r='3'/%3E%3Ccircle class='star' cx='150' cy='80' r='4'/%3E%3Ccircle class='star' cx='220' cy='40' r='3'/%3E%3Ccircle class='star' cx='300' cy='120' r='5'/%3E%3Ccircle class='star' cx='350' cy='90' r='3'/%3E%3C/g%3E%3C/svg%3E") no-repeat center center / 1000px auto;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cstyle%3E.star%7Bfill:%23b8956a;animation:star-shine 4s ease-in-out infinite alternate%7D.line%7Bfill:%23b8956a;animation:fade-line 10s ease-in-out infinite%7D@keyframes star-shine%7B0%25%7Bopacity:0.2%7D100%25%7Bopacity:1%7D%7D@keyframes fade-line%7B0%25,100%25%7Bopacity:0%7D50%25%7Bopacity:1%7D%7D.star:nth-of-type(2)%7Banimation-delay:-1s%7D.star:nth-of-type(3)%7Banimation-delay:-2s%7D.star:nth-of-type(4)%7Banimation-delay:-3s%7D.star:nth-of-type(5)%7Banimation-delay:-4s%7D.line:nth-of-type(2)%7Banimation-delay:-2.5s%7D.line:nth-of-type(3)%7Banimation-delay:-5s%7D.line:nth-of-type(4)%7Banimation-delay:-7.5s%7D%3C/style%3E%3C/defs%3E%3Cg opacity='0.7'%3E%3Cpolygon class='line' points='50,50 49,51 150,80 51,49'/%3E%3Cpolygon class='line' points='150,80 149,81 220,40 151,79'/%3E%3Cpolygon class='line' points='220,40 219,41 300,120 221,39'/%3E%3Cpolygon class='line' points='300,120 299,121 350,90 301,119'/%3E%3Ccircle class='star' cx='50' cy='50' r='3'/%3E%3Ccircle class='star' cx='150' cy='80' r='4'/%3E%3Ccircle class='star' cx='220' cy='40' r='3'/%3E%3Ccircle class='star' cx='300' cy='120' r='5'/%3E%3Ccircle class='star' cx='350' cy='90' r='3'/%3E%3C/g%3E%3C/svg%3E") no-repeat center center / 1000px auto;
  opacity: 0.5;
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

.contact-info h2 {
  font-family: "Cinzel", serif;
  font-size: 3.5rem;
  color: var(--gold);
  margin-bottom: 2rem;
  letter-spacing: 4px;
  text-shadow: 0 0 15px rgba(184, 149, 106, 0.2);
}

.contact-detail {
  margin-bottom: 1rem;
  padding: 0.5rem 0;
  border-left: none;
  transition: all 0.4s ease;
}

.contact-detail a {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.1rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.3s ease;
}

.contact-detail a:hover {
  color: var(--gold);
  text-shadow: 0 0 15px var(--glow-gold);
}


.contact-form {
  background: rgba(13, 10, 15, 0.9);
  padding: 3rem;
  border: 1px solid var(--stone-gray);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  position: relative; /* z-index requires a position property */
}

.contact-form::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(86, 86, 86, 0.3);
  pointer-events: none;
}

.form-group {
  margin-bottom: 2rem;
}

.form-group label {
  display: block;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.8rem;
  color: var(--gold);
  margin-bottom: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--gold);
  color: var(--text-primary);
  font-family: 'Montserrat', sans-serif;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  border-radius: 0;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.05);
  border-bottom-color: var(--gold);
  box-shadow: none;
}


.submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2.5rem;
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-family: 'Montserrat', sans-serif;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.4s ease;
  letter-spacing: 0.1em;
  position: relative;
  overflow: hidden;
}

.submit-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
  z-index: -1;
}

.submit-btn:hover {
  animation: pulse-glow-border 2s infinite;
  background: var(--gold);
  color: var(--dark-bg);
}

.submit-btn:hover::before {
  transform: scaleX(1);
}

.contact-form a{
  font-family: 'Montserrat', sans-serif;
  font-size: 1.1rem;
  color: var(--weathered-wood);
  text-decoration: none;
  transition: all 0.3s ease;
}


/* Footer */
.footer {
  background: rgba(5, 3, 5, 0.9);
  padding: 4rem 0 2rem;
  border-top: 1px solid var(--stone-gray);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-title {
  font-family: "Garamond", serif;
  font-size: 1.5rem;
  color: var(--gold);
  margin-bottom: 1rem;
}

.footer-section h4 {
  font-family: "Cinzel", serif;
  font-size: 1.2rem;
  color: var(--gold);
  margin-bottom: 1rem;
}

.footer-section p {
  font-family: 'Montserrat', sans-serif;
  color: var(--text-secondary);
  line-height: 1.8;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.75rem;
}

.footer-section a {
  font-family: 'Montserrat', sans-serif;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
  text-shadow: 0 0 15px transparent; /* Add for smooth transition */
}

.footer-section a:hover {
  color: var(--gold);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(184, 149, 106, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Montserrat', sans-serif;
  color: var(--text-secondary);
}

.footer-ornament {
  color: var(--gold);
  font-size: 1.5rem;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shimmer {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@keyframes rotate-pulse {
  0% { transform: translate(-50%, -50%) rotate(0deg) scale(1); }
  50% { transform: translate(-50%, -50%) rotate(180deg) scale(1.1); }
  100% { transform: translate(-50%, -50%) rotate(360deg) scale(1); }
}

@keyframes rotate-pulse-counter {
  0% { transform: translate(-50%, -50%) rotate(360deg) scale(1); }
  50% { transform: translate(-50%, -50%) rotate(180deg) scale(0.9); }
  100% { transform: translate(-50%, -50%) rotate(0deg) scale(1); }
}

@keyframes pulse-glow {
  0%,
  100% {
    opacity: 1;
    text-shadow: var(--glow-x, 0px) var(--glow-y, 0px) 20px var(--glow-gold);
  }
  50% {
    opacity: 0.7;
    text-shadow: var(--glow-x, 0px) var(--glow-y, 0px) 30px var(--glow-gold);
  }
}

@keyframes pulse-glow-border {
  0%, 100% {
    box-shadow: 0 0 15px var(--glow-gold);
    border-color: var(--gold);
  }
  50% {
    box-shadow: 0 0 30px var(--glow-gold), 0 0 5px var(--gold);
    border-color: #e8dfd2;
  }
}

@keyframes pulse-glow-border-left {
  0%, 100% { box-shadow: -10px 0 20px -10px var(--glow-gold); border-left-color: var(--gold); }
  50% { box-shadow: -15px 0 30px -10px var(--glow-gold); border-left-color: #e8dfd2; }
}

@keyframes svg-pulse-glow {
  0%,
  100% {
    opacity: 1;
    filter: drop-shadow(var(--glow-x, 0px) var(--glow-y, 0px) 20px var(--glow-gold));
  }
  50% {
    opacity: 0.7;
    filter: drop-shadow(var(--glow-x, 0px) var(--glow-y, 0px) 30px var(--glow-gold));
  }
}

@keyframes float1 {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(50px, -50px) scale(1.1);
  }
  66% {
    transform: translate(-30px, 40px) scale(0.9);
  }
}

@keyframes float2 {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(-60px, -30px) scale(1.15);
  }
}

@keyframes float3 {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
  33% {
    transform: translate(-40%, -60%) scale(1.1);
  }
  66% {
    transform: translate(-60%, -40%) scale(0.9);
  }
}

@keyframes scroll-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scaleY(1);
  }
  50% {
    opacity: 0.5;
    transform: scaleY(0.8);
  }
}

/* Responsive Design */
@media (max-width: 991px) { /* Tablet and below */
  .container {
    padding: 0 1.5rem;
  }

  .nav-container {
    padding: 1.5rem;
  }

  .nav-toggle {
    display: flex;
    z-index: 1001; /* Ensure it's above the menu */
  }

  .nav-menu {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    flex-direction: column;
    background: rgba(13, 10, 15, 0.98);
    padding: 2rem;
    gap: 1.5rem;
    transition: left 0.3s ease;
    height: 100vh;
    padding-top: 6rem;
    align-items: center;
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-menu li {
    margin-bottom: 1.5rem;
  }

  .nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  .nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .section-title {
    font-size: 2.5rem;
  }

  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 4rem;
  }

  .about-details-grid {
    grid-template-columns: 1fr;
    gap: 4rem;
    margin-top: 4rem;
  }

  .contact-info {
    text-align: center;
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .about-stats {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .gallery-row-link {
    grid-template-columns: 1fr !important;
    gap: 2rem;
  }

  .gallery-row:nth-child(even) .gallery-row-image {
    order: 1;
  }

  .gallery-row:nth-child(even) .gallery-row-info {
    order: 2;
  }

  .project-meta,
  .credits-list {
    grid-template-columns: 1fr;
  }

  .gallery-item-image {
    aspect-ratio: 16 / 9;
  }

  .gallery-overlay {
    padding: 2rem;
  }

  .gallery-title {
    font-size: 2rem;
  }

  .gallery-details {
    flex-direction: column;
    gap: 0.5rem;
  }

  /* Mobile-specific overrides (from former 767px breakpoint) */
  .section-title {
    font-size: 2rem;
  }


  .lightbox-prev {
    left: 10px;
  }

  .lightbox-next {
    right: 10px;
  }

  .lightbox-content {
    max-width: 100vw;
    max-height: 100vh;
    padding: 1rem; /* Add some padding so image doesn't touch edges */
  }

  .lightbox-nav {
    width: 40px;
    height: 40px;
  }

  .hero-bottom-bar {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
  }
}

/* Project Page Styles */

/* Wrapper for the essentials bar at the bottom of the hero */
.hero-bottom-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  /* No longer needs absolute positioning */
  flex-shrink: 0; /* Prevent the bar from shrinking */
  z-index: 10;
  padding: 2.5rem 0;
  background: var(--darker-bg);
  padding-left: 2rem; /* Replicates container padding */
  padding-right: 2rem; /* Replicates container padding */
  border-top: 1px solid var(--stone-gray);
}

.project-hero-title {
  font-family: "Cinzel", serif;
  font-size: clamp(2.5rem, 6vw, 5.5rem); /* Responsive font size: min, preferred, max */
  align-items: center; /* Ensure title is always centered */
  text-shadow: #050305 2px 2px 15;
}

.essentials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
  max-width: 960px; /* Replicates container max-width */
  margin: 0 auto; /* Centers the grid */
  max-height: 500px;;
}

.essential-item {
  text-align: center;
}

.essential-label {
  font-family: "Cinzel", serif;
  font-size: 0.9rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 0.5rem;
}

.essential-value {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.1rem;
  color: var(--text-primary);
}

/* New Tagline Section */
.project-tagline-section .project-hero-tagline {
  padding: 2rem 0rem;
  text-align: center;
  background: var(--dark-bg);
  border-bottom: 1px solid var(--stone-gray);
}

.project-tagline-section .project-hero-tagline {
  font-size: 1.5rem;
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 800px;
  margin: 0 auto;
  font-style: italic;
}

/* Synopsis & Trailer Grid */
.synopsis-trailer-grid {
  display: grid;
  grid-template-columns: 1fr; /* Default for mobile */
  gap: 3rem;
  align-items: start;
}

.synopsis-trailer-grid.no-synopsis {
  grid-template-columns: 1fr;
}

.synopsis-content.hidden {
  display: none;
}

.trailer-content.hidden {
  display: none;
}

.project-video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  border: 1px solid rgba(184, 149, 106, 0.2);
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
  background: #000;
}

.project-video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Generic Project Section */
.project-section {
  display: flex;
  flex-direction: column;
  gap: 1rem; /* Spacing between video and about sections */
}

.project-video-section,
.project-info-section,
.project-summary-section,
.project-description-section {  
  max-width: 960px;
  margin: 0 auto;
}
.project-section {
  padding: 4rem 2rem 0rem;
  border-bottom: 1px solid var(--stone-gray);
}
.project-section:last-of-type {
  border-bottom: none;
}

.project-section {
  position: relative; /* New: Needed for absolute positioning of child */
  z-index: 1; /* New: Ensure content is above the background */
}

#projectBackground {
  position: absolute;
  inset: 0;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 0.05;
  pointer-events: none;
  z-index: -1;
}

.project-section-title {
  font-family: "Cinzel", serif;
  font-size: 2rem;
  color: var(--gold);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.project-section-title .section-ornament {
  display: inline-block;
  margin-bottom: 0;
  font-size: 1.5rem;
}

.project-description {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.2rem;
  color: var(--text-primary);
  line-height: 1.8;
}

.project-description p {
  margin-bottom: 1.5rem;
}

.project-synopsis-content {
  background: rgba(184, 149, 106, 0.05);
  padding: 2rem;
  border-left: 2px solid var(--gold);
}

.project-synopsis-content p {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.25rem;
  color: var(--text-primary);
  line-height: 1.6;
}

/* Combined Project Details Section */
.detail-subsection {
  padding-top: 2rem;
}
.detail-subsection {
  max-width: 960px;
  margin: 0 auto;
}

.detail-subsection:first-child {
  padding-top: 0;
  margin-top: 0;
  border-top: none;
}

/* Full Credits */
.full-credits-list {
  margin-top: 2rem;
  margin-bottom: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--stone-gray);
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem 2rem;
}

.credit-category-title {
  font-family: "Cinzel", serif;
  font-size: 1.2rem;
  color: var(--gold);
  margin-bottom: 1rem;
}

/* Gallery Section */
.credit-item {
  margin-bottom: 0.5rem;
}

.credit-category-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.credit-category {
  padding: 1rem 0;
  border-bottom: 1px solid rgba(184, 149, 106, 0.1);
}

.gallery-header {
  max-width: 960px;
  margin: 0 auto 0rem auto; /* Center header and add space below */
}

.gallery-content-wrapper {
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
}


.project-gallery {
  display: grid; /* Mobile-first: Default to a single vertical column */
  grid-template-columns: 1fr;
  gap: 1rem;
}

.project-gallery::-webkit-scrollbar { height: 8px; }
.project-gallery::-webkit-scrollbar-track { background: var(--darker-bg); }
.project-gallery::-webkit-scrollbar-thumb { background: var(--stone-gray); border-radius: 4px; }
.project-gallery::-webkit-scrollbar-thumb:hover { background: var(--gold);
}

.project-gallery-item {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  border: 1px solid var(--stone-gray);
  cursor: pointer;
  transition: all 0.4s ease;
}

.project-gallery-item:hover {
  transform: scale(1.03);
  box-shadow: 0 0 25px var(--glow-gold);
  border-color: var(--gold);
}

.project-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Lazy Loading Fade-in Effect */
.lazy-load {
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.lazy-load:not([src=""]) {
  opacity: 1;
}


.gallery-vignette {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.4) 0%, transparent 50%);
  pointer-events: none;
}

/* Lightbox */
.gallery-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(5, 3, 5, 0.95);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(10px);
}

.gallery-lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 85vh; /* Give a bit more vertical room */
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 100%; /* Image will fill the container's height */
  border: 1px solid var(--gold);
  object-fit: contain; /* Ensures the image fits without being cropped */
  box-shadow: 0 0 50px rgba(184, 149, 106, 0.2);
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 2rem;
  cursor: pointer;
  transition: color 0.3s ease;
}

.lightbox-close:hover {
  color: var(--gold);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(13, 10, 15, 0.5);
  border: 1px solid rgba(184, 149, 106, 0.3);
  color: var(--gold);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.lightbox-nav:hover {
  background: var(--gold);
  color: var(--dark-bg);
}

/* Back Button */
.back-to-portfolio {
  padding: 4rem 0;
  background: rgba(5, 3, 5, 0.9);
  text-align: center;
  border-top: 1px solid rgba(184, 149, 106, 0.1);
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2.5rem;
  background: transparent;
  border: 1px solid var(--stone-gray);
  color: var(--gold);
  font-family: 'Montserrat', sans-serif;
  font-size: 1.1rem;
  text-decoration: none;
  letter-spacing: 0.1em;
  transition: all 0.3s ease;
}

.back-btn:hover {
  background: rgba(45, 58, 46, 0.1);
  animation: pulse-glow-border 2s infinite;
}

@media (min-width: 992px) { /* Desktop */
  
.full-credits-list {
  grid-template-columns: 1fr 1fr;
}

.credit-category {
  display: grid;
  grid-template-columns: 200px 1fr; /* Role | Names */
  align-items: start;
  gap: 2rem;
}

.credit-category-title {
  text-align: right;
  margin-bottom: 0;
}

.synopsis-trailer-grid {
  grid-template-columns: 2fr 1fr; /* 66/33 split on medium/large screens */
}
.synopsis-trailer-grid.no-synopsis {
  grid-template-columns: 1fr;
}
.synopsis-trailer-grid.no-trailer {
  grid-template-columns: 1fr;
}

.lightbox-prev {
  left: -70px;
}

.lightbox-next {
  right: -70px;
}

/* --- Desktop: Horizontal Scrolling Gallery --- */
.project-gallery {
    display: flex;
    overflow-x: auto;
    padding: 1rem 1rem; /* Space for scrollbar */
}
.project-gallery-item {
    flex-shrink: 0; /* Prevent items from shrinking */
    width: 400px; /* Fixed width for horizontal scroll items */
}
}

@media (min-width: 1200px) {
  .container,
  .nav-container,
  .essentials-grid,
  .detail-subsection,
  .gallery-header,
  .gallery-content-wrapper {
    max-width: 1140px;
  }
}

/* Responsive Project Page */

/* Media query for short viewports (e.g., mobile landscape) */
@media (max-height: 700px) {
  .hero-bottom-bar {
    padding-top: 1rem;
    padding-bottom: 1rem;
  }
  .essential-label {
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
  }
  .essential-value {
    font-size: 1rem;
  }
}
