/* ===================================
   PATRICK BROWN — Actor Portfolio
   Art Direction: Clean, modern, cinematic
   =================================== */

/* --- Fonts --- */
/* Instrument Serif (display) + Satoshi (body) */

/* --- Design Tokens --- */
:root {
  /* Type Scale */
  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem    + 0.75vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1.2rem  + 1.25vw, 2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3.5rem);
  --text-3xl:  clamp(2.5rem,   1rem    + 4vw,    5rem);
  --text-hero: clamp(3rem,     0.5rem  + 7vw,    8rem);

  /* Spacing */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Font families */
  --font-display: 'Instrument Serif', Georgia, serif;
  --font-body: 'Satoshi', 'Inter', sans-serif;

  /* Content widths */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;
  --content-full: 100%;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Light Mode (default) --- */
:root, [data-theme="light"] {
  --color-bg:             #faf9f7;
  --color-surface:        #ffffff;
  --color-surface-2:      #f5f4f2;
  --color-surface-offset: #eeedeb;
  --color-divider:        #e0dfdd;
  --color-border:         #d4d3d1;
  --color-text:           #1a1a1a;
  --color-text-muted:     #6b6b6b;
  --color-text-faint:     #a0a0a0;
  --color-text-inverse:   #faf9f7;
  --color-primary:        #1a1a1a;
  --color-primary-hover:  #333333;
  --color-accent:         #c8a97e;
  --color-accent-hover:   #b8956a;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.12);
}

/* --- Dark Mode --- */
[data-theme="dark"] {
  --color-bg:             #0e0e0e;
  --color-surface:        #161616;
  --color-surface-2:      #1e1e1e;
  --color-surface-offset: #1a1a1a;
  --color-divider:        #2a2a2a;
  --color-border:         #333333;
  --color-text:           #e8e8e8;
  --color-text-muted:     #8a8a8a;
  --color-text-faint:     #555555;
  --color-text-inverse:   #0e0e0e;
  --color-primary:        #e8e8e8;
  --color-primary-hover:  #cccccc;
  --color-accent:         #c8a97e;
  --color-accent-hover:   #d4b88e;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.5);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg:             #0e0e0e;
    --color-surface:        #161616;
    --color-surface-2:      #1e1e1e;
    --color-surface-offset: #1a1a1a;
    --color-divider:        #2a2a2a;
    --color-border:         #333333;
    --color-text:           #e8e8e8;
    --color-text-muted:     #8a8a8a;
    --color-text-faint:     #555555;
    --color-text-inverse:   #0e0e0e;
    --color-primary:        #e8e8e8;
    --color-primary-hover:  #cccccc;
    --color-accent:         #c8a97e;
    --color-accent-hover:   #d4b88e;

    --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
    --shadow-lg: 0 12px 32px rgba(0,0,0,0.5);
  }
}

/* ===================================
   LAYOUT
   =================================== */

.container {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.container--narrow {
  max-width: var(--content-default);
}

/* ===================================
   NAVIGATION
   =================================== */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: var(--space-4) 0;
  background: oklch(from var(--color-bg) l c h / 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: box-shadow 0.3s ease, padding 0.3s ease;
}

.nav--scrolled {
  box-shadow: var(--shadow-sm);
  padding: var(--space-3) 0;
}

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

.nav__logo {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--color-text);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  list-style: none;
}

.nav__links a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 500;
}

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

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-2);
}

.nav__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.theme-toggle {
  padding: var(--space-1);
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
}

.theme-toggle:hover {
  color: var(--color-text);
}

/* Mobile nav */
@media (max-width: 767px) {
  .nav__links {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-bg);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: var(--space-8);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 99;
  }

  .nav__links.active {
    opacity: 1;
    pointer-events: auto;
  }

  .nav__links a {
    font-size: var(--text-xl);
    font-family: var(--font-display);
    text-transform: none;
    letter-spacing: 0;
    color: var(--color-text);
  }

  .nav__toggle {
    display: flex;
    z-index: 101;
  }

  .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);
  }
}

/* ===================================
   HERO
   =================================== */

.hero {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: var(--color-surface-2);
}

.hero__content {
  text-align: center;
  z-index: 2;
  padding: var(--space-20) var(--space-6);
}

.hero__name {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 0.95;
  color: var(--color-text);
  margin-bottom: var(--space-4);
}

.hero__tagline {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 500;
}

.hero__scroll {
  position: absolute;
  bottom: var(--space-8);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text-faint);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
}

.hero__scroll-line {
  width: 1px;
  height: 40px;
  background: var(--color-text-faint);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
  50% { opacity: 1; transform: scaleY(1); }
}

/* ===================================
   SECTIONS
   =================================== */

.section {
  padding: clamp(var(--space-12), 8vw, var(--space-32)) 0;
}

.section--alt {
  background: var(--color-surface-2);
}

.section__header {
  margin-bottom: var(--space-10);
}

.section__label {
  font-size: var(--text-xs);
  color: var(--color-accent);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: var(--space-2);
}

.section__title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 400;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

/* ===================================
   ABOUT
   =================================== */

.about__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10);
  align-items: start;
}

@media (min-width: 768px) {
  .about__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-16);
  }
}

.about__image-wrapper {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--color-surface-offset);
}

.about__image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
}

.about__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-faint);
  font-size: var(--text-sm);
  font-style: italic;
}

.about__text p {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
  line-height: 1.75;
}

.about__text p:first-child {
  color: var(--color-text);
  font-size: var(--text-lg);
  line-height: 1.6;
}

.about__details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin-top: var(--space-8);
  padding-top: var(--space-8);
  border-top: 1px solid var(--color-divider);
}

.about__detail-label {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-1);
}

.about__detail-value {
  font-size: var(--text-sm);
  color: var(--color-text);
  font-weight: 500;
}

/* ===================================
   HEADSHOTS GALLERY
   =================================== */

.gallery__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

/* Headshots grid — landscape images, 1 column on mobile stacking, side-by-side on desktop */
.gallery__grid--headshots {
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .gallery__grid--headshots {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-5);
  }

  /* Make the first headshot span full width as hero */
  .gallery__grid--headshots .gallery__item:first-child {
    grid-column: 1 / -1;
  }
}

/* Verticals grid — portrait images, 3-up on desktop */
.gallery__grid--verticals {
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 768px) {
  .gallery__grid--verticals {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-5);
  }
}

@media (min-width: 1024px) {
  .gallery__grid--verticals {
    grid-template-columns: repeat(4, 1fr);
  }
}

.gallery__item {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--color-surface-offset);
  cursor: pointer;
}

.gallery__item--landscape {
  aspect-ratio: 3 / 2;
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery__item:hover img {
  transform: scale(1.04);
}

.gallery__item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.4) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.4s ease;
  display: flex;
  align-items: flex-end;
  padding: var(--space-4);
}

.gallery__item:hover .gallery__item-overlay {
  opacity: 1;
}

.gallery__item-label {
  color: #fff;
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
}

.gallery__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  color: var(--color-text-faint);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.gallery__placeholder svg {
  width: 32px;
  height: 32px;
  stroke: var(--color-text-faint);
  fill: none;
  stroke-width: 1.5;
}

/* ===================================
   RESUME
   =================================== */

.resume__layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10);
}

@media (min-width: 768px) {
  .resume__layout {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-16);
  }
}

.resume__category {
  margin-bottom: var(--space-8);
}

.resume__category:last-child {
  margin-bottom: 0;
}

.resume__category-title {
  font-size: var(--text-sm);
  color: var(--color-accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--color-divider);
}

.resume__item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-2);
  padding: var(--space-3) 0;
  border-bottom: 1px solid oklch(from var(--color-text) l c h / 0.06);
}

.resume__item:last-child {
  border-bottom: none;
}

.resume__role {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-text);
}

.resume__production {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.resume__detail {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  text-align: right;
  white-space: nowrap;
}

.resume__download {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-8);
  padding: var(--space-3) var(--space-6);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background var(--transition-interactive);
}

.resume__download:hover {
  background: var(--color-primary-hover);
}

/* Training & Skills */
.resume__skills {
  margin-top: var(--space-8);
}

.resume__skill-group {
  margin-bottom: var(--space-6);
}

.resume__skill-label {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-2);
}

.resume__skill-value {
  font-size: var(--text-sm);
  color: var(--color-text);
  line-height: 1.6;
}

/* ===================================
   REEL
   =================================== */

.reel__wrapper {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  background: var(--color-surface);
  overflow: hidden;
}

.reel__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
}

.reel__play-btn {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.reel__play-btn:hover {
  transform: scale(1.08);
}

.reel__play-btn svg {
  width: 28px;
  height: 28px;
  fill: var(--color-text-inverse);
  margin-left: 4px;
}

.reel__placeholder-text {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-align: center;
}

.reel__note {
  text-align: center;
  margin-top: var(--space-6);
  font-size: var(--text-sm);
  color: var(--color-text-faint);
  font-style: italic;
}

/* ===================================
   CONTACT
   =================================== */

.section--contact {
  background: var(--color-surface-2);
  border-top: 1px solid var(--color-divider);
}

.contact__layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10);
}

@media (min-width: 768px) {
  .contact__layout {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-16);
    align-items: start;
  }
}

.contact__text .section__title {
  margin-bottom: var(--space-4);
}

.contact__intro {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.7;
  max-width: 480px;
}

.contact__details {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.contact__item {
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-divider);
}

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

.contact__item-label {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
  margin-bottom: var(--space-1);
}

.contact__item-value {
  font-size: var(--text-base);
  color: var(--color-text);
  font-weight: 500;
}

.contact__item-link {
  text-decoration: none;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-divider);
  padding-bottom: 2px;
  transition: color var(--transition-interactive), border-color var(--transition-interactive);
}

.contact__item-link:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
}

.contact__socials {
  display: flex;
  gap: var(--space-4);
  margin-top: var(--space-1);
}

.contact__socials a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
  transition: color var(--transition-interactive);
}

.contact__socials a:hover {
  color: var(--color-accent);
}

/* ===================================
   FOOTER
   =================================== */

.footer {
  padding: var(--space-8) 0;
  border-top: 1px solid var(--color-divider);
}

.footer__bottom {
  text-align: center;
}

.footer__bottom p {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  max-width: none;
}

.footer__bottom a {
  color: var(--color-text-faint);
  text-decoration: none;
}

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

/* ===================================
   LIGHTBOX
   =================================== */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: oklch(from var(--color-bg) l c h / 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox__close {
  position: absolute;
  top: var(--space-6);
  right: var(--space-6);
  color: var(--color-text);
  padding: var(--space-2);
  z-index: 201;
}

.lightbox__close svg {
  width: 28px;
  height: 28px;
}

.lightbox__img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
}

/* ===================================
   SCROLL ANIMATIONS
   =================================== */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Stagger children */
.stagger > .reveal:nth-child(1) { transition-delay: 0ms; }
.stagger > .reveal:nth-child(2) { transition-delay: 80ms; }
.stagger > .reveal:nth-child(3) { transition-delay: 160ms; }
.stagger > .reveal:nth-child(4) { transition-delay: 240ms; }
.stagger > .reveal:nth-child(5) { transition-delay: 320ms; }
.stagger > .reveal:nth-child(6) { transition-delay: 400ms; }
