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

:root {
  --bg:            #080810;
  --surface:       #0d0d1a;
  --card:          #111122;
  --card-hover:    #16162e;
  --purple:        #9333ea;
  --purple-light:  #b06cf5;
  --purple-dim:    #5b21b6;
  --glow:          rgba(147, 51, 234, 0.25);
  --border:        rgba(147, 51, 234, 0.14);
  --border-hover:  rgba(147, 51, 234, 0.45);
  --text:          #f0eeff;
  --text-muted:    #9b8ec4;
  --text-dim:      #5c527a;
  --radius:        6px;
  --font-body:     'Inter', system-ui, sans-serif;
  --font-display:  'Playfair Display', Georgia, serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--purple-light);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: #fff;
}

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ─── Nav ────────────────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2.5rem;
  background: rgba(8, 8, 16, 0.97);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.02em;
  color: var(--text);
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.2s;
}

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

/* ─── Hero ───────────────────────────────────────────────────────────── */
.site-header {
  min-height: 42svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3.5rem 2.5rem 3rem;
  position: relative;
  overflow: hidden;
}

.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 20% 60%, rgba(100, 30, 180, 0.18) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 80% 30%, rgba(147, 51, 234, 0.10) 0%, transparent 60%);
  pointer-events: none;
}

.hero {
  max-width: 760px;
}

.hero-eyebrow {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--purple-light);
  margin-bottom: 1.25rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.hero-title em {
  font-style: italic;
  color: var(--purple-light);
}

.hero-sub {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 300;
}

/* ─── Section shared ─────────────────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--text);
}

.section-note {
  font-size: 0.8rem;
  color: var(--text-dim);
  letter-spacing: 0.03em;
}

/* ─── Gallery ────────────────────────────────────────────────────────── */
.gallery {
  padding: 5rem 2.5rem;
  max-width: 1300px;
  margin: 0 auto;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

/* ─── Sequence Card ──────────────────────────────────────────────────── */
.seq-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}

.seq-card:hover,
.seq-card.is-playing {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.5), 0 0 0 1px var(--border-hover), 0 0 30px var(--glow);
}

/* Frames container — 4:3 aspect ratio */
.seq-frames {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--surface);
  overflow: hidden;
}

.seq-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: none; /* hard cut for stop-motion feel */
}

.seq-frame.is-active {
  opacity: 1;
}

/* Placeholder colored frames shown before real images load */
.seq-frame-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Overlay: dots + hover hint */
.seq-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0.75rem;
  background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.2s;
}

.seq-card:hover .seq-overlay,
.seq-card.is-playing .seq-overlay {
  opacity: 1;
}

.seq-hint {
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  margin-bottom: 0.5rem;
}

.seq-dots {
  display: flex;
  gap: 5px;
}

.seq-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  transition: background 0.1s, transform 0.1s;
}

.seq-dot.is-active {
  background: var(--purple-light);
  transform: scale(1.3);
}

/* Card info strip */
.seq-info {
  padding: 0.85rem 1rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.seq-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.seq-sub {
  font-size: 0.72rem;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ─── Stills ─────────────────────────────────────────────────────────── */
.stills {
  padding: 5rem 2.5rem;
  max-width: 1300px;
  margin: 0 auto;
}

.stills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
}

/*
  Row 1: [V1 col1 span2] [H1 col2 row1] [V2 col3 span2]
  Row 2:                 [H2 col2 row2]
  Row 3: [H3 col1]       [H4 col2]      [H5 col3]
*/
.stills-grid > :nth-child(1) { grid-column: 1; grid-row: 1 / span 2; } /* V1 */
.stills-grid > :nth-child(2) { grid-column: 2; grid-row: 1; }           /* H1 */
.stills-grid > :nth-child(3) { grid-column: 3; grid-row: 1 / span 2; } /* V2 */
.stills-grid > :nth-child(4) { grid-column: 2; grid-row: 2; }           /* H2 */
.stills-grid > :nth-child(5) { grid-column: 1; grid-row: 3; }           /* H3 */
.stills-grid > :nth-child(6) { grid-column: 2; grid-row: 3; }           /* H4 */
.stills-grid > :nth-child(7) { grid-column: 3; grid-row: 3; }           /* H5 */

/* Row 4: 3 horizontals */
.stills-grid > :nth-child(8)  { grid-column: 1; grid-row: 4; }          /* H6 */
.stills-grid > :nth-child(9)  { grid-column: 2; grid-row: 4; }          /* H7 */
.stills-grid > :nth-child(10) { grid-column: 3; grid-row: 4; }          /* H8 */

/* Rows 5–6: vertical | 2 stacked horizontals | vertical */
.stills-grid > :nth-child(11) { grid-column: 1; grid-row: 5 / span 2; } /* V3 */
.stills-grid > :nth-child(12) { grid-column: 2; grid-row: 5; }          /* H9  (stacked top) */
.stills-grid > :nth-child(13) { grid-column: 3; grid-row: 5 / span 2; } /* V4 */
.stills-grid > :nth-child(14) { grid-column: 2; grid-row: 6; }          /* H10 (stacked bottom) */

.still {
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
}

/* Landscape images: fix aspect ratio so rows have consistent height */
.still-h {
  aspect-ratio: 3 / 2;
}

/* Portrait images: stretch to fill the 2-row span, crop to fit */
.still-v {
  align-self: stretch;
}

.still img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease, filter 0.4s ease;
}

.still:hover img {
  transform: scale(1.025);
  filter: brightness(1.08);
}

/* ─── Lightbox ───────────────────────────────────────────────────────── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(4, 4, 10, 0.92);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}

.lightbox.is-open {
  display: flex;
}

.lightbox-img {
  display: block;
  max-width: 92vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 30px 80px rgba(0,0,0,0.7), 0 0 0 1px var(--border);
  cursor: default;
  /* Animate in */
  animation: lb-in 0.2s ease;
}

@keyframes lb-in {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}

.lightbox-close {
  position: fixed;
  top: 1.25rem;
  right: 1.5rem;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--border-hover);
  border-radius: 50%;
  background: rgba(14, 14, 26, 0.85);
  color: var(--text-muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.lightbox-close:hover {
  background: var(--purple-dim);
  border-color: var(--purple);
  color: #fff;
}

/* Make stills show they're clickable */
.still {
  cursor: zoom-in;
}

/* Sequence lightbox player */
.lightbox-seq {
  display: none;
  flex-direction: column;
  width: min(88vw, 960px);
  animation: lb-in 0.2s ease;
  cursor: default;
}

.lightbox-seq.is-visible {
  display: flex;
}

.lb-seq-frames {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,0.7), 0 0 0 1px var(--border);
}

.lb-seq-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
}

.lb-seq-frame.is-active {
  opacity: 1;
}

.lb-seq-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 0.25rem 0;
}

.lb-seq-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.lb-seq-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--text);
}

.lb-seq-sub {
  font-size: 0.75rem;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}

.lb-seq-dots {
  display: flex;
  gap: 6px;
  align-items: center;
}

.lb-seq-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  transition: background 0.1s, transform 0.1s;
}

.lb-seq-dot.is-active {
  background: var(--purple-light);
  transform: scale(1.35);
}

/* ─── Headshots ──────────────────────────────────────────────────────── */
.headshots {
  padding: 5rem 2.5rem;
  max-width: 1300px;
  margin: 0 auto;
}

.hs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

.hs-card {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: zoom-in;
  transition: border-color 0.25s, transform 0.2s, box-shadow 0.2s;
}

.hs-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.4), 0 0 20px var(--glow);
}

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

.hs-card:hover img {
  transform: scale(1.04);
}

/* ─── Lightbox — headshot mode ───────────────────────────────────────── */
.lightbox-hs {
  display: none;
  flex-direction: column;
  align-items: center;
  width: min(88vw, 680px);
  animation: lb-in 0.2s ease;
  cursor: default;
}

.lightbox-hs.is-visible {
  display: flex;
}

.lb-hs-stage {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
}

.lb-hs-imgwrap {
  flex: 1;
  min-width: 0;
}

.lb-hs-img {
  display: block;
  width: 100%;
  max-height: 76vh;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 30px 80px rgba(0,0,0,0.7), 0 0 0 1px var(--border);
  transition: opacity 0.15s ease;
}

.lb-hs-img.is-fading {
  opacity: 0;
}

.lb-hs-prev,
.lb-hs-next {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--border-hover);
  border-radius: 50%;
  background: rgba(14, 14, 26, 0.85);
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.lb-hs-prev:hover,
.lb-hs-next:hover {
  background: var(--purple-dim);
  border-color: var(--purple);
  color: #fff;
}

.lb-hs-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 0.75rem 0.25rem 0;
}

.lb-hs-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 400;
  color: var(--text);
}

.lb-hs-counter {
  font-size: 0.75rem;
  color: var(--text-dim);
  letter-spacing: 0.08em;
}

.lb-hs-alts {
  display: flex;
  gap: 0.5rem;
  padding-top: 0.6rem;
  width: 100%;
}

.lb-hs-alt {
  width: 56px;
  height: 72px;
  object-fit: cover;
  border-radius: 3px;
  border: 1px solid var(--border);
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.2s, border-color 0.2s;
}

.lb-hs-alt:hover,
.lb-hs-alt.is-active {
  opacity: 1;
  border-color: var(--purple-light);
}

/* ─── About ──────────────────────────────────────────────────────────── */
.about {
  padding: 7rem 2.5rem;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.about-inner {
  max-width: 640px;
  margin: 0 auto;
}

.about-eyebrow {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--purple-light);
  margin-bottom: 1.25rem;
}

.about-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 400;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 2rem;
}

.about-title em {
  font-style: italic;
  color: var(--purple-light);
}

.about-body p {
  font-size: 1rem;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 1.25rem;
}

.btn {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.65rem 1.6rem;
  border: 1px solid var(--border-hover);
  border-radius: var(--radius);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--purple-light);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.btn:hover {
  background: var(--purple-dim);
  border-color: var(--purple);
  color: #fff;
}

/* ─── Contact ────────────────────────────────────────────────────────── */
.contact {
  padding: 7rem 2.5rem;
  text-align: center;
}

.contact-eyebrow {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 1.5rem;
}

.contact-email {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
  font-weight: 400;
  color: var(--text);
  margin-bottom: 2rem;
  transition: color 0.2s;
}

.contact-email:hover {
  color: var(--purple-light);
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.contact-links a {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  transition: color 0.2s;
}

.contact-links a:hover {
  color: var(--purple-light);
}

/* ─── Footer ─────────────────────────────────────────────────────────── */
.site-footer {
  padding: 1.5rem 2.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.site-footer p {
  font-size: 0.75rem;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}

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

  /* Tablet: 3-col layout stays, grid just narrows naturally */

  .hs-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 580px) {
  .nav {
    padding: 0.85rem 1.25rem;
    gap: 0.5rem;
  }

  .nav-links {
    gap: 1rem;
    flex-wrap: wrap;
  }

  .site-header {
    padding: 5rem 1.25rem 3rem;
  }

  .gallery {
    padding: 3.5rem 1.25rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .stills {
    padding: 3.5rem 1.25rem;
  }

  /* Mobile: single column, natural aspect ratios, portraits unconstrained */
  .stills-grid {
    grid-template-columns: 1fr;
  }

  .stills-grid > * {
    grid-column: 1;
    grid-row: auto;
  }

  .still-v {
    aspect-ratio: 2 / 3;
  }

  .headshots {
    padding: 3.5rem 1.25rem;
  }

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

  .about,
  .contact {
    padding: 4rem 1.25rem;
  }

  .section-header {
    flex-direction: column;
    gap: 0.25rem;
  }
}
