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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 0;
}

body, html {
  height: 100%;
  font-family: 'Georgia', serif;
  font-display: swap;
  background-color: #0d0d0d;
  color: white;
}

/* Navigation */
nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  background: linear-gradient(to bottom, #0b0b0b, #1a1a1a);
  transition: background-color 0.4s ease;
  opacity: 0;
  transform: translateY(-20px);
  transition: opacity 0.8s ease, transform 0.8s ease, background-color 0.4s ease;
}

nav.scrolled {
  background: linear-gradient(to bottom, rgba(11, 11, 11, 0.95), rgba(26, 26, 26, 0.95));
  backdrop-filter: blur(10px);
}

nav.fade-in {
  opacity: 1;
  transform: translateY(0);
}

nav .logo {
  font-family: 'Georgia', serif;
  font-size: 1.5rem;
  color: #b71c1c;
  font-weight: bold;
}

nav ul {
  display: flex;
  gap: 2rem;
  list-style: none;
}

nav a {
  text-decoration: none;
  color: #eaeaea;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  transition: color 0.3s ease;
  position: relative;
}

nav a:hover {
  color: #D4C5A0;
}

nav a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 1px;
  bottom: -5px;
  left: 0;
  background-color: #D0D4DC;
  transition: width 0.2s ease-out;
  will-change: width;
}

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

nav a.active {
  color: #eaeaea;
}

nav a.active::after {
  background-color: #D0D4DC;
  height: 1px;
}

/* Hero Section */
.hero {
  position: relative;
  background-image: url('./Images/gallery7.webp');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  height: 100vh;
  width: 100vw;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  overflow: hidden;
  opacity: 1;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.35);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  color: white;
}

.hero-content h1 {
  font-size: clamp(2.5rem, 8vw, 6rem);
  color: #b71c1c;
  margin-bottom: 1rem;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1.5s cubic-bezier(0.4, 0, 0.2, 1), transform 1.5s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity, transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.hero:hover .hero-content h1,
.hero-content h1.visible {
  opacity: 1;
  transform: translateY(0);
}

.hero-content p {
  font-size: clamp(1rem, 2vw, 1.5rem);
  color: #C0C0C0;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1.5s cubic-bezier(0.4, 0, 0.2, 1), transform 1.5s cubic-bezier(0.4, 0, 0.2, 1);
  transition-delay: 0.3s;
  will-change: opacity, transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.hero:hover .hero-content p,
.hero-content p.visible {
  opacity: 1;
  transform: translateY(0);
}

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

.scroll-down {
  position: relative;
  z-index: 2;
  font-size: 2rem;
  color: white;
  animation: bounce 2s infinite;
  margin-top: 1rem;
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(10px);
  }
}

/* Sections */
section {
  min-height: 100vh;
  padding: 14vh 2rem 14vh 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  opacity: 1;
  position: relative;
}

section.hero {
  padding: 0;
}

/* Section dividers */
section:not(.hero)::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(212, 197, 160, 0.3), transparent);
}

/* Sections have immediate background colors - no animation */
section:not(.hero) {
  opacity: 1;
  transform: none;
}

/* Animate only section children - fade-in + translateY up on hover */
section:not(.hero) > * {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 750ms cubic-bezier(0.4, 0, 0.2, 1), transform 750ms cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity, transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

section:not(.hero):hover > *,
section:not(.hero) > *.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered animation delays for section children on hover */
section:not(.hero):hover > *:nth-child(1) {
  transition-delay: 0ms;
}

section:not(.hero):hover > *:nth-child(2) {
  transition-delay: 70ms;
}

section:not(.hero):hover > *:nth-child(3) {
  transition-delay: 140ms;
}

section:not(.hero):hover > *:nth-child(4) {
  transition-delay: 210ms;
}

section:not(.hero):hover > *:nth-child(5) {
  transition-delay: 280ms;
}

section:not(.hero):hover > *:nth-child(6) {
  transition-delay: 350ms;
}

.section-content {
  max-width: 1100px;
  width: 100%;
  opacity: 1;
  margin: 0 auto;
}

.section-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  color: #C0C0C0;
  margin-bottom: 2rem;
  font-weight: bold;
}

.section-text {
  font-size: 1.2rem;
  line-height: 1.8;
  max-width: 800px;
  margin: 0 auto;
  color: #555555;
}

/* About section body text matches title color */
#about .section-text {
  color: #C0C0C0;
}

.section-text + .section-text {
  margin-top: 2rem;
}

/* Section Backgrounds */
#about {
  background-color: #0a0a0a;
  color: #C7CCD3;
}

/* About Section Layout */
.about-layout {
  display: flex;
  align-items: center;
  gap: 2.5rem; /* 40px gap for breathing room */
  margin-top: 2rem;
  max-width: 1140px;
  margin-left: auto;
  margin-right: auto;
}

.about-image {
  flex: 0 0 55%; /* 55% width for prominence */
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden; /* Ensures no overflow from the image */
}

.about-image img {
  width: 100%;
  height: auto;
  min-height: 400px; /* Minimum height to ensure good presence */
  max-height: 600px; /* Maximum height for desktop */
  object-fit: cover; /* Changed to cover to fill container completely */
  object-position: center; /* Center the subject in the frame */
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), 0 2px 8px rgba(0, 0, 0, 0.1);
  display: block; /* Remove any inline spacing */
}

.about-content {
  flex: 0 0 45%; /* Explicitly set to 45% for remaining space */
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-color: #1a1a1a;
  padding: 2rem;
  border-radius: 8px;
  border: 1px solid #333333;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.resume-button {
  color: #b71c1c;
  text-decoration: none;
  font-weight: bold;
  padding: 12px 24px;
  border: 1.5px solid #b71c1c;
  border-radius: 6px;
  display: inline-block;
  transition: all 0.3s ease;
  margin-top: 1rem;
}

.resume-button:hover {
  background-color: #B0152E;
  color: #ffffff;
  border-color: #B0152E;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(176, 21, 46, 0.3);
}

.resume-button:focus {
  outline: 2px solid #2AA84A;
  outline-offset: 2px;
}

.bio-link {
  color: #b71c1c;
  text-decoration: none;
  transition: color 0.3s ease;
}

.bio-link:hover {
  color: #C61E3D;
}

.bio-link:focus {
  outline: 2px solid #2AA84A;
  outline-offset: 2px;
}

/* Tablet adjustments */
@media (max-width: 1024px) {
  .about-layout {
    gap: 2rem; /* Reduce gap slightly on tablets */
  }

  .about-image img {
    min-height: 350px; /* Adjusted minimum height for tablets */
    max-height: 500px; /* Reduce max height on tablets */
  }
}

/* Responsive Design for About Section - Mobile */
@media (max-width: 768px) {
  .about-layout {
    flex-direction: column;
    gap: 0; /* Remove gap since we're using margin-bottom */
    text-align: center;
  }

  .about-image {
    flex: none;
    width: 100%; /* Full width on mobile */
    margin-bottom: 20px; /* 20px margin before text */
    padding: 0; /* Remove any padding */
  }

  .about-image img {
    min-height: 300px; /* Minimum height for mobile */
    max-height: 400px; /* Appropriate height for mobile */
    max-width: 100%;
    width: 100%; /* Ensure full width on mobile */
  }

  .about-content {
    flex: none;
    width: 100%;
  }
}

/* Section will be replaced with new .section-visuals styles */

#contact {
  background-color: #D0D0D0;
  color: #3a3834;
}

#reel .section-title {
  color: #0b0b0b;
}

#contact .section-title {
  color: #0b0b0b;
}

/* NEW ENHANCED DEMO REEL & GALLERY STYLES */

/* Section Layout */
.section-visuals { 
  background: #C0C0C0; 
  color: #2E2D29; 
}

.visuals-container { 
  max-width: 1140px; 
  margin: 0 auto; 
  padding: 72px 20px 80px; 
}

/* Video Card */
.reel-wrap { 
  margin: 0 auto; 
  width: min(90vw, 1100px); 
  aspect-ratio: 16/9; 
  border-radius: 12px;
  overflow: hidden; 
  box-shadow: 0 12px 40px rgba(0,0,0,0.18), 0 2px 12px rgba(0,0,0,0.08);
  transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;
}

.reel-wrap:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 50px rgba(0,0,0,0.22), 0 4px 16px rgba(0,0,0,0.12);
}

/* Stills Label */
.stills-label { 
  margin: 28px 0 18px; 
  text-align: center; 
  font-size: 12px; 
  letter-spacing: .12em;
  text-transform: uppercase; 
  color: rgba(46,45,41,.7); 
}

/* Gallery Shell */
.gallery-shell { 
  position: relative; 
  margin: 0 auto; 
  width: min(92vw, 1120px); 
}

.gallery-viewport { 
  overflow: hidden; 
}

.gallery-track { 
  display: flex; 
  gap: 20px; 
  padding: 0 4px; 
  will-change: transform;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.gallery-track::-webkit-scrollbar {
  display: none;
}

.gallery-card { 
  flex: 0 0 auto; 
  width: 360px; 
  height: 240px; 
  border-radius: 10px; 
  overflow: hidden; 
}

.gallery-card img { 
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
  display: block;
  transform: translateZ(0); 
  transition: transform .26s cubic-bezier(0.4, 0, 0.2, 1), box-shadow .26s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.gallery-card:hover img { 
  transform: translateZ(0) scale(1.02); 
  box-shadow: 0 0 28px rgba(0,0,0,.18); 
}


/* Specific positioning for gallery11, gallery12 to show person on right's face */
.gallery-card:nth-child(10) img, /* gallery11.jpg */
.gallery-card:nth-child(11) img { /* gallery12.jpg */
  object-position: 60% 30%; /* Focus on right side, higher up to show faces */
}


/* Gallery Arrows */
.gallery-arrow { 
  position: absolute; 
  top: 50%; 
  transform: translateY(-50%); 
  width: 44px; 
  height: 44px;
  display: grid; 
  place-items: center; 
  color: #0b0b0b;
  background: none;
  border: none;
  cursor: pointer;
  transition: transform .2s ease, color .2s ease;
  z-index: 10;
  font-size: 60px;
  font-weight: 100;
  line-height: 1;
}

.gallery-arrow::before {
  content: '';
  width: 0;
  height: 0;
  border-style: solid;
}

.gallery-arrow--prev::before {
  border-width: 15px 20px 15px 0;
  border-color: transparent #0b0b0b transparent transparent;
}

.gallery-arrow--next::before {
  border-width: 15px 0 15px 20px;
  border-color: transparent transparent transparent #0b0b0b;
}

.gallery-arrow:hover { 
  transform: translateY(-50%) scale(1.06); 
}

.gallery-arrow--prev:hover::before {
  border-color: transparent #D4C5A0 transparent transparent;
}

.gallery-arrow--next:hover::before {
  border-color: transparent transparent transparent #D4C5A0;
}

.gallery-arrow--prev { 
  left: -60px; 
}

.gallery-arrow--next { 
  right: -60px; 
}

/* Responsive Gallery Cards */
@media (max-width: 1024px) {
  .gallery-card { 
    width: 300px; 
    height: 200px; 
  }
  .gallery-arrow { 
    font-size: 55px;
  }
  .gallery-arrow--prev { 
    left: -50px; 
  }
  .gallery-arrow--next { 
    right: -50px; 
  }
}

@media (max-width: 768px) {
  .gallery-card { 
    width: 240px; 
    height: 164px; 
  }
  .gallery-arrow { 
    width: 40px; 
    height: 40px; 
    font-size: 50px;
  }
  .gallery-arrow--prev { 
    left: -40px; 
  }
  .gallery-arrow--next { 
    right: -40px; 
  }
}

/* Enhanced Lightbox */
.lightbox { 
  position: fixed; 
  inset: 0; 
  background: rgba(0,0,0,.9); 
  display: none; 
  align-items: center; 
  justify-content: center; 
  z-index: 1000; 
}

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

.lightbox img { 
  max-width: 92vw; 
  max-height: 92vh; 
  object-fit: contain; 
  border-radius: 6px; 
}

.lightbox-close { 
  position: absolute; 
  top: 20px; 
  right: 24px; 
  color: #fff; 
  font-size: 28px; 
  cursor: pointer; 
  background: none;
  border: none;
  z-index: 1001;
}

/* Demo Reel Poster */
.demo-reel-container {
  max-width: 800px;
  margin: 3rem auto 0 auto;
  padding: 0;
  box-shadow: 0 6px 25px rgba(46, 45, 41, 0.15);
  border-radius: 12px;
  transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;
}

.demo-reel-poster {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;
  background-color: #2a2a2a;
  outline: none;
}

.demo-reel-container:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(46, 45, 41, 0.25);
}

.demo-reel-poster:hover {
  /* Removed shadow as it's now on container */
}

.demo-reel-poster:focus {
  outline: 2px solid #D4C5A0;
  outline-offset: 4px;
}

.demo-reel-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.poster-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #3a3a3a 0%, #2a2a2a 50%, #1a1a1a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.poster-placeholder::before {
  content: "Demo Reel";
  color: #888;
  font-size: 1.5rem;
  font-weight: 300;
  letter-spacing: 2px;
}

.demo-reel-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.1) 0%,
    rgba(0, 0, 0, 0.3) 50%,
    rgba(0, 0, 0, 0.5) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease-out;
}

.demo-reel-poster:hover .demo-reel-overlay {
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.2) 0%,
    rgba(0, 0, 0, 0.4) 50%,
    rgba(0, 0, 0, 0.6) 100%
  );
}

.play-button {
  width: 80px;
  height: 80px;
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
  transition: all 0.3s ease-out;
  transform: scale(1);
}

.demo-reel-poster:hover .play-button {
  background-color: rgba(255, 255, 255, 1);
  transform: scale(1.1);
}

.play-button svg {
  margin-left: 4px; /* Optical centering for play triangle */
}

/* Demo Reel Modal */
.demo-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s ease-out;
  padding: 2rem;
  box-sizing: border-box;
}

.demo-modal.active {
  display: flex;
  opacity: 1;
}

.demo-modal-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  width: 100%;
  background-color: #000;
  border-radius: 12px;
  overflow: hidden;
  transform: scale(0.9);
  transition: transform 0.3s ease-out;
  display: flex;
  flex-direction: column;
}

.demo-modal.active .demo-modal-content {
  transform: scale(1);
}

.demo-modal-close {
  position: absolute;
  top: -40px;
  right: 0;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.2);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease-out;
  backdrop-filter: blur(10px);
  z-index: 10001;
}

.demo-modal-close:hover {
  background-color: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.demo-video-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
}

.demo-video-container video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background-color: #000;
}

/* Contact Section */
.contact-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 2rem 0;
  text-align: center;
}

.contact-email {
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.contact-email a {
  color: #0b0b0b;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease-out;
}

.contact-email a:hover {
  color: #D4C5A0;
}

.contact-subtitle {
  font-size: 1.1rem;
  color: #555555;
  margin-bottom: 2.5rem;
}

.contact-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  background-color: transparent;
  color: #555555;
  text-decoration: none;
  border: 1.5px solid #555555;
  border-radius: 6px;
  font-weight: 500;
  font-size: 1rem;
  transition: all 0.2s ease-out;
  min-width: 140px;
}

.cta-button:hover {
  background-color: rgba(86, 84, 78, 0.05);
  border-color: #000000;
  color: #000000;
  transform: translateY(-1px);
}

.social-icons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  align-items: center;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: #555555;
  border: 1.5px solid #555555;
  border-radius: 50%;
  text-decoration: none;
  opacity: 0.8;
  transition: all 0.2s ease-out;
}

.social-icon:hover {
  opacity: 1;
  transform: translateY(-1px);
  border-color: #000000;
  color: #000000;
}

.social-icon svg {
  width: 20px;
  height: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
  nav {
    padding: 1rem;
  }

  nav ul {
    gap: 1rem;
    font-size: 0.8rem;
  }

  section {
    padding: 11vh 1rem 11vh 1rem;
  }

  section.hero {
    padding: 0;
  }

  .section-content {
    max-width: 95%;
  }

  .section-title {
    margin-bottom: 1.5rem;
  }

  .section-text + .section-text {
    margin-top: 1.5rem;
  }

  .horizontal-gallery-container {
    margin: 2rem 1rem 0 1rem;
  }

  .gallery-track {
    gap: 0.75rem;
    padding: 1rem;
  }

  .gallery-item {
    flex: 0 0 240px;
    height: 240px;
  }

  .gallery-nav {
    width: 40px;
    height: 40px;
  }

  .gallery-nav-left {
    left: -20px;
  }

  .gallery-nav-right {
    right: -20px;
  }

  .lightbox {
    padding: 1rem;
  }

  .lightbox-content {
    max-width: 95vw;
    max-height: 95vh;
  }

  .demo-reel-container {
    margin: 2rem 1rem 0 1rem;
    max-width: none;
  }

  .demo-modal {
    padding: 1rem;
  }

  .demo-modal-content {
    max-width: 95vw;
    max-height: 95vh;
  }

  .demo-modal-close {
    top: -30px;
    width: 32px;
    height: 32px;
  }

  .play-button {
    width: 60px;
    height: 60px;
  }

  .contact-container {
    padding: 1.5rem 1rem;
  }

  .contact-buttons {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }

  .cta-button {
    width: 100%;
    max-width: 280px;
  }

  .social-icons {
    gap: 1rem;
  }

  .social-icon {
    width: 40px;
    height: 40px;
  }

  .social-icon svg {
    width: 18px;
    height: 18px;
  }

  /* Remove mobile parallax override since we removed parallax */
}

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .hero {
    scroll-behavior: auto;
  }
  
  section:not(.hero) > *,
  .gallery-item img,
  .cta-button,
  .social-icon,
  nav a::after,
  .demo-reel-poster,
  .play-button {
    transition: none !important;
    transform: none !important;
    animation: none !important;
  }
}