@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;800&family=Outfit:wght@400;700&family=Luckiest+Guy&display=swap');

:root {
  --bg-color: #000000;
  --text-color: #ffffff;
  --text-muted: #cccccc;
  --accent-coral: #ff6b6b;
  --accent-blue: #4dabf7;
  --accent-green: #FF0800;

  --card-bg: #141414;
  --card-border: rgba(255, 255, 255, 0.08);
  --card-img-bg: #0a0a0a;

  --font-body: 'Inter', sans-serif;
  --font-heading: 'Outfit', sans-serif;
  
  --nav-height: 12vh;
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);

  /* Standard content area width, shared across all pages */
  --content-max: 1200px;
  /* Fluid side padding: scales smoothly with viewport width */
  --content-pad: clamp(1rem, 5vw, 3rem);
  /* Footer icon height — icons keep their natural aspect ratio */
  --footer-icon-size: 30px;
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
}

a {
  color: var(--accent-blue);
  text-decoration: none;
  transition: var(--transition);
}

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

/* Navigation */
.navbar {
  position: sticky;
  top: 0;
  width: 100%;
  /* min-height (not a fixed height) so the bar can grow to fit a
     wrapped second line of menu items on narrow viewports. */
  min-height: var(--nav-height);
  background: #000000;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 3vw;
  border-bottom: 1px solid #1a1a1a;
}

.nav-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.nav-logo {
  /* Wide wordmark (~6.75:1). Size by viewport WIDTH so the logo
     shrinks as the viewport narrows: clamp() floors it for
     readability and caps it on large screens, while max-width is a
     hard overflow guard. width/height:auto + both maxes makes the
     browser scale-to-fit, preserving the SVG's aspect ratio. */
  width: auto;
  height: auto;
  max-height: clamp(2rem, 5vw, 4.5rem);
  max-width: 72vw;
  display: block;
  transition: var(--transition);
}

.nav-logo:hover {
  opacity: 0.85;
  transform: scale(1.02);
}

.nav-links {
  display: flex;
  align-items: center;
  /* gap: 0 — inter-item spacing comes from each item's own padding
     (see .nav-links li), so the 5px/20px values actually take
     effect instead of stacking with a container gap. */
  gap: 0;
  list-style: none;
  /* ~20px side margins on the menu, and let items wrap to a new
     line ("stack") once the viewport is narrower than the row of
     items. */
  flex-wrap: wrap;
  padding: 0 20px;
}

.nav-links li {
  display: flex;
  align-items: center;
  /* 5px top/bottom, 20px sides per individual menu item. Padding
     (not margin) per request; with the container gap at 0 this is
     the sole source of inter-item spacing. */
  padding: 5px 20px;
}

.nav-links a {
  font-family: 'Luckiest Guy', cursive, sans-serif;
  color: #FF0800;
  font-size: 1.3rem;
  font-weight: 400;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.05;
  text-decoration: none;
  transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: #ff4d4d;
  transform: translateY(-2px);
}

.hamburger {
  display: none;
  cursor: pointer;
  background: none;
  border: none;
  font-size: 2.5rem;
  color: #FF0800;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}

/* Main Container */
main {
  min-height: calc(100vh - var(--nav-height));
  padding: 4rem var(--content-pad);
  max-width: var(--content-max);
  margin: 0 auto;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  min-height: 44px;
  background-color: var(--accent-coral);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 700;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  text-transform: uppercase;
  transition: var(--transition);
  box-shadow: 0 4px 6px rgba(255, 107, 107, 0.2);
}

.btn:hover {
  background-color: #ff5252;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(255, 107, 107, 0.3);
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-color);
  border: 2px solid var(--accent-blue);
  box-shadow: none;
}

.btn-secondary:hover {
  background-color: var(--accent-blue);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(77, 171, 247, 0.3);
}

/* Home Page */
.hero {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 2rem;
}

.hero-content {
  flex: 1;
  text-align: center;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 0.5rem;
  background: linear-gradient(45deg, var(--accent-coral), var(--accent-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-tagline {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-weight: 300;
}

.hero-image {
  flex: 1;
  width: 100%;
  max-width: 500px;
  border-radius: 10px;
  box-shadow: 20px 20px 0 var(--accent-green);
  transition: var(--transition);
}

.hero-image:hover {
  transform: translate(-10px, -10px);
  box-shadow: 30px 30px 0 var(--accent-blue);
}

.video-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  width: 100%;
  margin-top: 3rem;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Reels grid — one responsive box per reel (YouTube/Vimeo) */
.reels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.reel-box .video-container {
  margin-top: 1rem;
}

.reel-box h3 {
  margin-bottom: 0;
}

/* Animations */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeIn 0.8s ease forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Page title: the <h2> at the top of each content page is a direct
   child of .fade-in. Center it on every page for consistency. The
   nested "Resume" heading on the reel-resume page lives inside a
   flex row and is not a direct child, so it is left untouched. */
.fade-in > h2 {
  text-align: center;
}

/* Bio Page */
.bio-content p {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  color: var(--text-muted);
}

/* Projects */
.filter-tags {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.filter-btn {
  padding: 0.5rem 1rem;
  border: 2px solid var(--accent-green);
  background: transparent;
  color: var(--text-color);
  border-radius: 20px;
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
}

.filter-btn:hover, .filter-btn.active {
  background: var(--accent-green);
  color: #fff;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 2rem;
}

.project-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0,0,0,0.4);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  height: 100%;
  color: var(--text-color);
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-green);
  box-shadow: 0 12px 24px rgba(0,0,0,0.5);
}

/* Clickable variant — rendered as an <a> when the project has a link */
.project-card-link {
  cursor: pointer;
  text-decoration: none;
}

.project-card-link:hover {
  color: inherit;
}

.project-img {
  width: 100%;
  height: 320px;
  object-fit: contain;
  background: var(--card-img-bg);
  padding: 0.75rem;
  display: block;
  transition: var(--transition);
}

.project-card:hover .project-img {
  transform: scale(1.03);
}

.project-info {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.project-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  flex: 1;
  margin-bottom: 1rem;
}

.project-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tag {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
  gap: 1.5rem;
}

.gallery-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: var(--card-img-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  transition: var(--transition);
  cursor: pointer;
}

.gallery-img:hover {
  transform: scale(1.04);
  box-shadow: 0 0 20px rgba(255, 8, 0, 0.45);
  border: 1px solid #FF0800;
}

/* Lightbox Modal */
.lightbox {
  display: none;
  position: fixed;
  z-index: 2000;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.92);
  align-items: safe center;
  justify-content: safe center;
  padding: 2rem;
  backdrop-filter: blur(8px);
  overscroll-behavior: contain;
}

.lightbox.active {
  display: flex;
}

.lightbox-content {
  max-width: 90dvw;
  max-height: 85dvh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 0 40px rgba(0,0,0,0.8);
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f1f1f1;
  font-size: 45px;
  line-height: 1;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.2s ease;
  user-select: none;
}

.lightbox-close:hover {
  color: #FF0800;
}

/* Resume */
.resume-section {
  margin-bottom: 3rem;
}

.resume-category {
  font-size: 1.5rem;
  border-bottom: 2px solid var(--accent-coral);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.resume-item {
  display: grid;
  grid-template-columns: 2fr 1fr 2fr;
  gap: 1rem;
  margin-bottom: 0.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid #eee;
}

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

.resume-item .r-title { font-weight: 600; color: var(--text-color); }

/* Resume preview (clickable to enlarge) */
.resume-preview-wrap {
  display: flex;
  justify-content: center;
}

.resume-preview-img {
  /* Keep the image at its intrinsic (original) size, centered in the content
     area. max-width: 100% lets it shrink only when the content area is
     narrower than the image, so it never overflows on small screens. */
  width: max-content;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.resume-preview-img:hover {
  transform: scale(1.02);
  border-color: var(--accent-green);
  box-shadow: 0 0 20px rgba(255, 8, 0, 0.45);
}

/* Contact Form */
.contact-container {
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.form-group .opt {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 400;
}

/* Radio group (preferred contact method) */
.radio-group {
  border: none;
  padding: 0;
  margin: 0 0 1.5rem 0;
}

.radio-group legend {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.radio-options {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 1rem;
  min-height: 44px;
}

.radio-option input[type="radio"] {
  accent-color: var(--accent-green);
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.form-control {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 16px;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-green);
  box-shadow: 0 0 0 3px rgba(255, 8, 0, 0.2);
}

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

/* Contact form submission status message */
.contact-status {
  margin-top: 1rem;
  text-align: center;
  font-weight: 600;
  min-height: 1.2em;
}

.contact-status.sending { color: var(--text-muted); }
.contact-status.success { color: #34d058; }
.contact-status.error   { color: #34d058; }

/* Dynamic Home Page Backgrounds */
main.dynamic-main {
  position: relative;
  width: 100%;
  height: calc(100dvh - var(--nav-height));
  min-height: 0;
  max-width: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.bg-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: contain;
  background-position: center bottom;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 0.35s ease-in-out;
  z-index: 0;
}

.bg-layer.active {
  opacity: 1;
  z-index: 1;
}

main.dynamic-main::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    linear-gradient(to right, #000000 0%, rgba(0,0,0,0) 12%, rgba(0,0,0,0) 88%, #000000 100%),
    linear-gradient(to top, #000000 0%, rgba(0,0,0,0) 15%);
  pointer-events: none;
  z-index: 2;
}

/* Mobile Home Carousel (auto-rotating hero) */
.mobile-hero {
  display: none;                 /* hidden on desktop; shown via mobile media query */
  position: relative;
  aspect-ratio: 2 / 3;           /* height from the image ratio, not the viewport */
  margin: 12px 10px 0;           /* ~12px gap under nav; 10px margin each side */
  background: #000;
  box-sizing: border-box;
  flex: none;                    /* keep the aspect-ratio box from being squeezed */
  /* Suppress the default blue tap-highlight flash on touch devices
     (the slideshow is tap-to-advance; the flash is cosmetic).
     Front-page mobile hero only — gallery images stay tappable. */
  -webkit-tap-highlight-color: transparent;
}

.carousel-slide {
  position: absolute;
  inset: 0;                      /* all slides stack identically — no position toggling */
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
}

.carousel-slide.active {
  opacity: 1;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;          /* full image shown, scaled to fit */
  object-position: center;
  display: block;
  /* Decorative hero imagery: block text selection, the long-press
     "save image" callout on iOS, and drag-select. Scoped to the hero
     only — gallery images stay fully interactive. */
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

@media (prefers-reduced-motion: reduce) {
  .carousel-slide {
    transition: none;
  }
}

/* Home Page Below-Fold Content */
.home-content {
  background: #0a0a0a;
  color: var(--text-color);
  padding: 6rem 10vw;
  min-height: 40vh;
  display: flex;
  align-items: center;
  justify-content: center;
  border-top: 1px solid #1f1f1f;
}

.home-content .content-container {
  max-width: 850px;
  text-align: center;
}

.home-content h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 5vw, 2.2rem);
  margin-bottom: 1.5rem;
  color: #FF0800;
  letter-spacing: 0.5px;
}

.home-content p {
  font-family: var(--font-body);
  font-size: 1.15rem;
  line-height: 1.85;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  /* Fixed 20px side padding on mobile so the logo gets a true 20px
     margin on each side (see the .nav-logo max-width calc below). */
  .navbar {
    padding: 0 20px;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: -100%;
    width: 100%;
    height: calc(100dvh - var(--nav-height));
    background: var(--bg-color);
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: safe center;
    justify-content: safe center;
    gap: 1.5rem;
    transition: var(--transition);
    overscroll-behavior: contain;
    overflow-y: auto;
  }

  .nav-links.active {
    left: 0;
  }

  /* Comfortable tap targets in the mobile menu */
  .nav-links a {
    font-size: 1.5rem;
    padding: 0.5rem 1rem;
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .hero {
    flex-direction: column-reverse;
  }

  .resume-item {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  /* Remove backgrounds for mobile for now */
  main.dynamic-main {
    display: none !important;
  }

  /* Mobile hero carousel takes over the hero area on phones */
  .mobile-hero {
    display: block;
  }

  /* Fluid --content-pad (clamp) handles responsive side padding at all widths */

  /* Larger, easier-to-tap filter buttons */
  .filter-btn {
    padding: 0.75rem 1.25rem;
    min-height: 44px;
  }

  /* Mobile logo: render at its natural/full size (max-height 4.5rem
     -> ~486px wide at the SVG's ~6.75:1 ratio) when the screen has
     room; otherwise shrink to fit while keeping 20px margins on
     both sides. max-width subtracts, from the viewport: 40px of
     navbar side padding (20px each side), 44px for the hamburger
     button, and 20px for the right-side gap to that button. With
     width/height:auto + max-height, the logo renders at full size
     when it fits and only width-caps (preserving aspect ratio) when
     it doesn't. */
  .nav-logo {
    max-height: 4.5rem;
    max-width: calc(100vw - 40px - 44px - 20px);
  }

  .home-content {
    padding: 3rem 5vw;
  }

  .projects-grid,
  .gallery-grid {
    gap: 1rem;
  }

  /* Give the contact-method radio group a bit more breathing room on mobile */
  .radio-group {
    padding: 0.75rem 1rem;
  }

  .radio-options {
    gap: 1.5rem;
  }
}

/* Footer */
.site-footer {
  background: #000000;
  border-top: 1px solid #1a1a1a;
  padding: 3rem 5vw 2rem 5vw;
  margin-top: auto;
  color: var(--text-muted);
}

.footer-container {
  max-width: var(--content-max);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 2.2rem;
}

.footer-link {
  color: var(--text-color);
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-decoration: none;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.25rem 0.5rem;
}

.footer-link:hover {
  color: #FF0800;
  transform: translateY(-2px);
}

.footer-icon svg {
  /* Size by height + auto width so each logo keeps its natural aspect ratio
     (square icons stay square; wide wordmarks like Actors Access/IMDb no
     longer get squished into a 30x30 square). */
  height: var(--footer-icon-size);
  width: auto;
  max-width: 100%;
  fill: currentColor;
  display: block;
}

.footer-copyright p {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: #777777;
  text-align: center;
  margin: 0;
}
