/* ==========================================================================
   CSS Custom Properties
   ========================================================================== */

:root {
  /* Colors - Update --bg with your off-white hex */
  --bg: #F5F3EF;
  --bg-card: #FFFFFF;
  --text-primary: #1A1A1A;
  --text-secondary: #5A5A5A;
  --text-muted: #8A8A8A;
  --border: rgba(26, 26, 26, 0.08);
  --shadow: rgba(26, 26, 26, 0.06);
  
  /* Typography */
  --font-serif: 'Libre Baskerville', Georgia, serif;
  --font-sans: 'Source Sans 3', -apple-system, BlinkMacSystemFont, sans-serif;
  
  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;
  
  /* Layout */
  --max-width: 1200px;
  --nav-height: 72px;
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg);
}

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

a {
  color: inherit;
  text-decoration: none;
}

/* ==========================================================================
   Navigation
   ========================================================================== */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-md);
  background: var(--bg);
  z-index: 100;
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  gap: var(--space-md);
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--text-primary);
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--nav-height) var(--space-md) var(--space-lg);
}

.hero-content {
  text-align: center;
  max-width: 900px;
  width: 100%;
}

.hero-gifs {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
}

.hero-gif-item {
  flex: 1;
  max-width: 280px;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: var(--border);
  display: block;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-gif-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px var(--shadow);
}

.hero-gif-item video {
  width: 100%;
  height: auto;
  display: block;
}

.hero-gif-label {
  position: absolute;
  bottom: var(--space-sm);
  left: var(--space-sm);
  font-family: var(--font-serif);
  font-size: 0.875rem;
  font-weight: 400;
  color: #fff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
  letter-spacing: 0.04em;
}

.hero-portrait {
  width: 160px;
  height: 160px;
  margin: 0 auto var(--space-md);
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--border);
}

.hero-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-text {
  margin-bottom: var(--space-lg);
}

.hero-text h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-xs);
}

.tagline {
  font-size: 1.125rem;
  font-weight: 300;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
}

.tagline a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.tagline a:hover {
  color: var(--text-primary);
}

/* ==========================================================================
   Sections
   ========================================================================== */

.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-xl) var(--space-md);
}

.section h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  margin-bottom: var(--space-xs);
  letter-spacing: -0.02em;
}

.section-intro {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: var(--space-lg);
}

/* ==========================================================================
   Film Cards
   ========================================================================== */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-md);
}

.card {
  background: var(--bg-card);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 20px var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 40px var(--shadow);
}

.card-media {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--border);
}

.card-media img,
.card-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.card:hover .card-media img,
.card:hover .card-media video {
  transform: scale(1.03);
}

.card-info {
  padding: var(--space-sm) var(--space-md);
  position: relative;
}

.card-date {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-md);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.card-info h3 {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 400;
  margin-bottom: 0.25rem;
}

.card-role {
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ==========================================================================
   Photo Gallery
   ========================================================================== */

.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-sm);
}

.photo-item {
  border-radius: 8px;
  overflow: hidden;
  background: var(--border);
  cursor: pointer;
}

.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 5;
  transition: transform 0.4s ease, filter 0.3s ease;
}

.photo-item:hover img {
  transform: scale(1.02);
  filter: brightness(1.05);
}

/* Special sizing for variety */
@media (min-width: 768px) {
  .photo-tall {
    grid-row: span 2;
  }
  
  .photo-tall img {
    aspect-ratio: auto;
    height: 100%;
  }
  
  .photo-wide {
    grid-column: span 2;
  }
  
  .photo-wide img {
    aspect-ratio: 16 / 9;
  }
}

/* ==========================================================================
   Audio Section
   ========================================================================== */

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

.audio-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding: var(--space-md);
  background: var(--bg-card);
  border-radius: 12px;
  box-shadow: 0 2px 20px var(--shadow);
}

@media (min-width: 600px) {
  .audio-card {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.audio-info h3 {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 400;
  margin-bottom: 0.25rem;
}

.audio-project {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.audio-player {
  flex-shrink: 0;
  min-width: 250px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.audio-player audio {
  width: 100%;
  min-width: 250px;
  height: 40px;
}

/* Audio card with video thumbnail */
.audio-card-full {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-sm);
  align-items: center;
}

@media (min-width: 768px) {
  .audio-card-full {
    grid-template-columns: 1fr minmax(250px, auto) 200px;
    gap: var(--space-md);
  }
}

.audio-video-thumb {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
}

.audio-video-thumb video {
  width: 100%;
  display: block;
}

/* Custom audio styling */
audio {
  background: var(--text-primary);
  border-radius: 30px;
}

audio::-webkit-media-controls-panel {
  background: var(--text-primary);
}

audio::-webkit-media-controls-play-button,
audio::-webkit-media-controls-current-time-display,
audio::-webkit-media-controls-time-remaining-display {
  filter: invert(1);
}

/* ==========================================================================
   Contact / Footer
   ========================================================================== */

.section-contact {
  text-align: center;
  padding-bottom: var(--space-lg);
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  margin: var(--space-md) 0 var(--space-lg);
}

.contact-link {
  font-size: 0.9375rem;
  font-weight: 500;
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--text-primary);
  border-radius: 100px;
  transition: background 0.2s ease, color 0.2s ease;
}

.contact-link:hover {
  background: var(--text-primary);
  color: var(--bg);
}

.copyright {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Mobile Responsive
   ========================================================================== */

@media (max-width: 600px) {
  :root {
    --space-md: 1.5rem;
    --space-lg: 3rem;
    --space-xl: 4rem;
  }
  
  .nav-links {
    gap: var(--space-sm);
  }
  
  .nav-links a {
    font-size: 0.75rem;
  }
  
  .hero-gifs {
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
  }
  
  .hero-gif-item {
    max-width: 100%;
    width: 100%;
  }
  
  .card-grid {
    grid-template-columns: 1fr;
  }
  
  .photo-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .contact-links {
    flex-direction: column;
    align-items: center;
  }
  
  .contact-link {
    width: 100%;
    max-width: 200px;
    text-align: center;
  }
}

/* ==========================================================================
   Video Modal
   ========================================================================== */

.video-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.video-modal.active {
  opacity: 1;
  visibility: visible;
}

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

.modal-content video {
  max-width: 100%;
  max-height: 85vh;
  border-radius: 8px;
}

.modal-content-embed {
  width: 90vw;
  max-width: 900px;
  aspect-ratio: 16 / 9;
}

.modal-content-embed iframe {
  width: 100%;
  height: 100%;
  border-radius: 8px;
}

.modal-content-photo {
  max-width: 90vw;
  max-height: 90vh;
}

.modal-content-photo img {
  max-width: 100%;
  max-height: 85vh;
  border-radius: 8px;
  object-fit: contain;
}

.modal-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  padding: 0.5rem;
  line-height: 1;
  transition: opacity 0.2s ease;
}

.modal-close:hover {
  opacity: 0.7;
}

/* Make clickable cards show pointer */
.card[onclick] {
  cursor: pointer;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
}

