/* ========================================
   TRAC - Video & Photo Production
   Modern Portfolio CSS
   ======================================== */

/* CSS Variables for theming */
:root {
  /* Dark theme (default) */
  --bg-primary: #0a0a0a;
  --bg-secondary: #141414;
  --bg-tertiary: #1f1f1f;
  --text-primary: #fafafa;
  --text-secondary: #d4d4d4;
  --text-muted: #a3a3a3;
  --border-color: rgba(255, 255, 255, 0.08);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  --accent: #fafafa;
  --accent-hover: #d4d4d4;
  --overlay: rgba(0, 0, 0, 0.8);
  --glass: rgba(20, 20, 20, 0.8);

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Bebas Neue', 'Oswald', sans-serif;
  --font-logo: 'Bebas Neue', 'Oswald', Impact, sans-serif;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 500ms ease;
  --transition-slower: 700ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition: var(--transition-base); /* Alias for consistency */

  /* Border radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
}

/* Light theme */
[data-theme="light"] {
  --bg-primary: #fafafa;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f0f0f0;
  --text-primary: #0a0a0a;
  --text-secondary: #404040;
  --text-muted: #737373;
  --border-color: rgba(0, 0, 0, 0.08);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --accent: #0a0a0a;
  --accent-hover: #262626;
  --overlay: rgba(255, 255, 255, 0.8);
  --glass: rgba(255, 255, 255, 0.7);
}

/* ========================================
   Reset & Base
   ======================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  transition: background-color var(--transition-slow), color var(--transition-slow);
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

ul, ol {
  list-style: none;
}

/* ========================================
   Typography
   ======================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 600;
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

h3 {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
}

.text-muted {
  color: var(--text-muted);
}

/* ========================================
   Layout
   ======================================== */
.container {
  width: 100%;
  max-width: min(92%, 1800px);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.container-wide {
  max-width: min(96%, 2000px);
}

.container-narrow {
  max-width: min(90%, 900px);
}

/* ========================================
   Navigation
   ======================================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: var(--space-lg) 0;
  transition: all var(--transition-base);
}

.nav.scrolled {
  background: var(--glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  padding: var(--space-md) 0;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-logo);
  font-size: 1.75rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: opacity var(--transition-fast);
}

.nav-logo:hover {
  opacity: 0.7;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  position: relative;
  padding: var(--space-xs) 0;
}

.nav-icons {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.nav-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  transition: all var(--transition-fast);
  color: var(--text-primary);
}

.nav-icons a:hover {
  background: var(--border-color);
  transform: translateY(-2px);
}

.nav-icons svg {
  width: 18px;
  height: 18px;
  display: block;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--text-primary);
  transition: width var(--transition-base);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Theme toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  transition: all var(--transition-fast);
  color: var(--text-primary);
}

.theme-toggle:hover {
  background: var(--border-color);
  transform: rotate(180deg);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

[data-theme="light"] .theme-toggle .icon-moon {
  display: block;
}

[data-theme="light"] .theme-toggle .icon-sun {
  display: none;
}

[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

/* Mobile menu */
.nav-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-sm);
}

.nav-menu-btn span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all var(--transition-fast);
}

@media (max-width: 768px) {
  .nav-menu-btn {
    display: flex;
  }

  .nav-right {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    flex-direction: column;
    justify-content: center;
    gap: var(--space-2xl);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
  }

  .nav-right.open {
    opacity: 1;
    visibility: visible;
  }

  .nav-links {
    flex-direction: column;
  }

  .nav-link {
    font-size: 1.5rem;
  }

  .nav-icons {
    position: absolute;
    bottom: var(--space-3xl);
  }
}

/* ========================================
   Landing Section (Home)
   ======================================== */
.landing-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: var(--space-4xl) 0;
}

.landing-content {
  text-align: center;
  max-width: min(90%, 800px);
}

.site-title {
  font-family: var(--font-logo);
  letter-spacing: 0.03em;
  margin-bottom: var(--space-lg);
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s ease forwards;
}

.site-tagline {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-muted);
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s ease 0.2s forwards;
}

.scroll-indicator {
  position: absolute;
  bottom: var(--space-3xl);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0;
  animation: fadeIn 1s ease 0.6s forwards;
}

.scroll-line {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, var(--text-muted), transparent);
  animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
  0%, 100% { transform: scaleY(1); opacity: 1; }
  50% { transform: scaleY(0.5); opacity: 0.5; }
}

/* ========================================
   Projects Grid
   ======================================== */
.projects-section {
  padding: var(--space-4xl) 0;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3xl);
  flex-wrap: wrap;
  gap: var(--space-lg);
}

.section-title {
  position: relative;
}

.projects-grid {
  display: grid;
  gap: var(--space-lg);
}

/* Grid columns will be set dynamically by JavaScript for optimal layout */

/* Project Card */
.project-card {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-tertiary);
}

.project-card-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slower);
}

.project-card:hover .project-card-image {
  transform: scale(1.05);
}

.project-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.8) 0%,
    rgba(0, 0, 0, 0.2) 50%,
    transparent 100%
  );
  opacity: 0;
  transition: opacity var(--transition-base);
}

.project-card:hover .project-card-overlay {
  opacity: 1;
}

.project-card-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-xl);
  color: #fff;
  transform: translateY(20px);
  opacity: 0;
  transition: all var(--transition-base);
}

.project-card:hover .project-card-content {
  transform: translateY(0);
  opacity: 1;
}

.project-card-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.project-card-year {
  font-size: 0.875rem;
  opacity: 0.8;
}

.project-card-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all var(--transition-base);
}

.project-card:hover .project-card-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.project-card-play svg {
  width: 24px;
  height: 24px;
  color: #0a0a0a;
  margin-left: 4px;
}

/* ========================================
   Project Page
   ======================================== */
.project-media-section {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 500px;
  background: var(--bg-secondary);
  overflow: hidden;
}

.project-video-container {
  position: absolute;
  inset: 0;
}

.project-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-video-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    transparent 60%,
    var(--bg-primary) 100%
  );
  pointer-events: none;
}

/* YouTube embed container */
.youtube-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.youtube-iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.project-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-xl);
  cursor: pointer;
}

.project-play-btn:hover {
  transform: translate(-50%, -50%) scale(1.1);
  box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.4);
}

.project-play-btn svg {
  width: 32px;
  height: 32px;
  color: #0a0a0a;
  margin-left: 4px;
}

.project-header-overlay {
  position: absolute;
  bottom: var(--space-3xl);
  left: 0;
  right: 0;
  z-index: 20;
  color: var(--text-primary);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

.project-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 600;
  margin-bottom: var(--space-sm);
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s ease 0.2s forwards;
}

.project-year {
  font-size: var(--font-size-lg);
  color: var(--text-secondary);
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s ease 0.4s forwards;
}

.project-header {
  padding: var(--space-3xl) 0;
  position: relative;
  z-index: 10;
  margin-top: -100px;
}

/* Project Credits */
.project-credits {
  padding: var(--space-3xl) 0;
  border-top: 1px solid var(--border-color);
}

.credits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: var(--space-xl) var(--space-3xl);
}

.credit-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.credit-role {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.credit-name {
  font-size: 1rem;
}

/* Project Gallery */
.project-gallery {
  padding: var(--space-3xl) 0;
}

.gallery-title {
  margin-bottom: var(--space-2xl);
}

.gallery-grid {
  display: grid;
  gap: var(--space-md);
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  justify-items: center;
}

/* Single image: centered */
.gallery-grid:has(.gallery-item:first-child:nth-last-child(1)) {
  grid-template-columns: minmax(350px, 600px);
  justify-content: center;
}

/* Two images: two columns */
.gallery-grid:has(.gallery-item:first-child:nth-last-child(2)) {
  grid-template-columns: repeat(2, 1fr);
}

/* Three or more images: responsive grid */
.gallery-grid:has(.gallery-item:first-child:nth-last-child(n+3)) {
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

@media (max-width: 768px) {
  .gallery-grid,
  .gallery-grid:has(.gallery-item:first-child:nth-last-child(2)),
  .gallery-grid:has(.gallery-item:first-child:nth-last-child(n+3)) {
    grid-template-columns: 1fr;
  }

  .gallery-grid:has(.gallery-item:first-child:nth-last-child(1)) {
    grid-template-columns: 1fr;
  }
}

.gallery-item {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-tertiary);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slower);
}

.gallery-item:hover img {
  transform: scale(1.05);
}

/* ========================================
   Lightbox
   ======================================== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

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

.lightbox-content img,
.lightbox-content video {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: var(--space-lg);
  right: var(--space-lg);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  z-index: 10;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

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

.lightbox-prev {
  left: var(--space-lg);
}

.lightbox-next {
  right: var(--space-lg);
}

/* ========================================
   Contact Page
   ======================================== */
.contact-section {
  min-height: calc(100vh - 200px);
  display: flex;
  align-items: center;
  padding: var(--space-4xl) 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4xl);
  align-items: center;
}

@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: var(--space-3xl);
  }
}

.contact-info h1 {
  margin-bottom: var(--space-lg);
}

.contact-info p {
  color: var(--text-secondary);
  margin-bottom: var(--space-2xl);
}

.contact-social {
  display: flex;
  gap: var(--space-md);
}

.contact-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  transition: all var(--transition-fast);
}

.contact-social a:hover {
  background: var(--accent);
  color: var(--bg-primary);
  transform: translateY(-4px);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.form-group input,
.form-group textarea {
  padding: var(--space-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 1rem;
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent), 0.1);
}

.form-group textarea {
  min-height: 150px;
  resize: vertical;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-primary);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* ========================================
   Footer
   ======================================== */
.footer {
  padding: var(--space-3xl) 0;
  border-top: 1px solid var(--border-color);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-lg);
}

.footer-copy {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ========================================
   Animations
   ======================================== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scroll reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all var(--transition-slower);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
}

.stagger-children.visible > * {
  opacity: 1;
  transform: translateY(0);
}

.stagger-children.visible > *:nth-child(1) { transition-delay: 0ms; }
.stagger-children.visible > *:nth-child(2) { transition-delay: 100ms; }
.stagger-children.visible > *:nth-child(3) { transition-delay: 200ms; }
.stagger-children.visible > *:nth-child(4) { transition-delay: 300ms; }
.stagger-children.visible > *:nth-child(5) { transition-delay: 400ms; }
.stagger-children.visible > *:nth-child(6) { transition-delay: 500ms; }
.stagger-children.visible > *:nth-child(7) { transition-delay: 600ms; }
.stagger-children.visible > *:nth-child(8) { transition-delay: 700ms; }

/* ========================================
   Related Projects Carousel
   ======================================== */
.related-projects {
  padding: var(--space-4xl) 0;
  border-top: 1px solid var(--border-color);
}

.related-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-2xl);
}

.related-title {
  margin: 0;
}

.carousel-controls {
  display: flex;
  gap: var(--space-sm);
}

.carousel-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
}

.carousel-btn:hover {
  background: var(--bg-tertiary);
  border-color: var(--text-primary);
}

.carousel-btn svg {
  width: 20px;
  height: 20px;
  color: var(--text-primary);
}

.carousel-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.carousel-btn:disabled:hover {
  background: var(--bg-secondary);
  border-color: var(--border-color);
}

.carousel-container {
  overflow: hidden;
  position: relative;
}

.carousel-track {
  display: flex;
  gap: var(--space-lg);
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-card {
  position: relative;
  flex: 0 0 280px;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-secondary);
  display: block;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
}

.carousel-card:hover {
  border-color: var(--text-primary);
}

.carousel-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  filter: brightness(0.9);
}

.carousel-card:hover .carousel-card-image {
  filter: brightness(1.1);
  transform: scale(1.02);
}

.carousel-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    transparent 50%,
    rgba(0, 0, 0, 0.7) 100%
  );
  transition: background 0.4s ease;
}

.carousel-card:hover .carousel-card-overlay {
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.2) 0%,
    rgba(0, 0, 0, 0.5) 50%,
    rgba(0, 0, 0, 0.85) 100%
  );
}

.carousel-card-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(4px);
}

.carousel-card:hover .carousel-card-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.1);
  background: rgba(255, 255, 255, 1);
}

.carousel-card-play svg {
  width: 22px;
  height: 22px;
  color: #0a0a0a;
  margin-left: 3px;
}

.carousel-card-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-lg);
  color: var(--text-primary);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
  transition: all 0.3s ease;
}

.carousel-card:hover .carousel-card-content {
  padding-bottom: calc(var(--space-lg) + 4px);
}

.carousel-card-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  display: block;
  line-height: 1.3;
}

.carousel-card-year {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.75);
  display: block;
  font-weight: 400;
  letter-spacing: 0.02em;
}

/* ========================================
   Loading & Transitions
   ======================================== */
.page-transition {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  z-index: 3000;
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.5s cubic-bezier(0.86, 0, 0.07, 1);
}

.page-transition.active {
  transform: scaleY(1);
  transform-origin: top;
}

/* Cursor (optional custom cursor) */
.cursor {
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  .cursor {
    display: block;
    position: fixed;
    width: 20px;
    height: 20px;
    border: 1px solid var(--text-primary);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.15s ease, opacity 0.15s ease;
    mix-blend-mode: difference;
  }

  .cursor.hover {
    transform: scale(2);
    background: var(--text-primary);
  }
}

/* ========================================
   Responsive - Carousel
   ======================================== */
@media (max-width: 768px) {
  .related-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-lg);
  }

  .carousel-card {
    flex: 0 0 240px;
  }

  .carousel-controls {
    align-self: flex-end;
  }
}

@media (max-width: 480px) {
  .carousel-card {
    flex: 0 0 200px;
  }

  .carousel-btn {
    width: 40px;
    height: 40px;
  }
}

/* ========================================
   Utility Classes
   ======================================== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.visually-hidden {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}
