:root {
  --bg-color: #0b0c15; /* Dark cinematic base */
  --text-primary: #e6e8f0; /* Softer, slightly grey/blueish white */
  --text-secondary: #a0a5b5;
  --accent-line: rgba(255, 255, 255, 0.15); /* Thin line color */
}

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

body {
  font-family: 'Domine', serif;
  background-color: #03040a;
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
  /* Simulated NLE timeline tracks + dark blue cinematic gradient */
  background: 
    repeating-linear-gradient(
      transparent,
      transparent 120px,
      rgba(255, 255, 255, 0.015) 120px,
      rgba(255, 255, 255, 0.025) 121px
    ),
    radial-gradient(circle at 40% 30%, #171d33 0%, #090e1f 50%, #020308 100%);
}

/* Header & Nav */
header {
  width: 100%;
  padding: 50px 0;
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 10;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translate3d(0, -100%, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

nav {
  display: flex;
  gap: 50px;
  opacity: 0;
  animation: fadeInDown 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  animation-delay: 1.5s;
}

nav a {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 15px;
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: opacity 0.4s ease;
  opacity: 0.6;
}

nav a:hover {
  opacity: 1;
}

/* Main Content */
main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10% 10vh 10%; /* 10vh bottom padding shifts the vertical center higher */
  max-width: 1800px;
  margin: 0 auto;
  width: 100%;
  min-height: 85vh; /* Forces the hero to occupy the full initial screen */
}

/* Left side content */
.text-content {
  flex: 0 0 45%;
  z-index: 2;
  position: relative;
  text-align: center; /* Forces letter-spacing animation to expand from the center */
}

@keyframes focus-in-expand {
  0% {
    letter-spacing: -0.5em;
    filter: blur(12px);
    opacity: 0;
  }
  100% {
    filter: blur(0px);
    opacity: 1;
  }
}

.name {
  font-size: 3.8rem; /* Smaller text size */
  font-weight: 700;
  line-height: 1.05;
  color: #a6abb8; /* Slightly grey as requested */
  margin-bottom: 20px;
  letter-spacing: 2px; /* Increased spacing */
  text-shadow: 0 8px 25px rgba(0,0,0,0.5); /* Softer shadow */
  opacity: 0;
  animation: focus-in-expand 0.8s cubic-bezier(0.390, 0.575, 0.565, 1.000) both;
  animation-delay: 0.5s;
}

.title {
  font-size: 1.5rem;
  color: #a0a2b0; /* Already dimmed via color instead of opacity */
  font-weight: 400;
  line-height: 1.6;
  opacity: 0;
  animation: focus-in-expand 0.8s cubic-bezier(0.390, 0.575, 0.565, 1.000) both;
  animation-delay: 1.5s;
}

/* Right side content featuring video */
.video-content {
  flex: 0 0 50%;
  position: relative;
  z-index: 2;
  opacity: 0;
  animation: focus-in-expand 0.8s cubic-bezier(0.390, 0.575, 0.565, 1.000) both;
  animation-delay: 1.5s;
}

/* The thin line underlay / frame aesthetics */
.video-wrapper {
  position: relative;
  width: 100%;
  padding: 15px; /* Spacing between video and thin line */
  border: 1px solid var(--accent-line); /* The subtle thin line border requested */
  background: rgba(255, 255, 255, 0.02);
  border-radius: 4px;
}

/* Additional decorative cross-lines for cinematic feel */
.video-wrapper::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -30px;
  width: 30px;
  height: 1px;
  background-color: var(--accent-line);
}

.video-wrapper::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -30px;
  width: 30px;
  height: 1px;
  background-color: var(--accent-line);
}

.video-container {
  position: relative;
  width: 100%;
  background-color: #000;
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.6);
}
.video-container::before {
  content: "";
  display: block;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 bulletproof aspect ratio */
}

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

/* Responsive */
@media (max-width: 1200px) {
  nav {
    gap: 30px;
  }
  .name {
    font-size: 3.2rem;
  }
}

@media (max-width: 900px) {
  nav {
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0 20px;
  }
  
  main {
    flex-direction: column;
    text-align: center;
    padding: 40px 20px;
    gap: 40px;
  }
  
  .text-content, .video-content {
    flex: none;
    width: 100%;
  }

  .video-wrapper::before,
  .video-wrapper::after {
    display: none; 
  }
}

/* --- Portfolio Sections Layout --- */
.portfolio-section {
  padding: 150px 10% 100px;
  max-width: 1800px;
  margin: 15vh auto 0; /* Significant gap making it feel like the next screen */
  border-top: 1px solid rgba(255, 255, 255, 0.05); /* Subtle separator */
}

.section-title {
  font-size: 1.1rem;
  font-weight: 500;
  color: #666;
  margin-bottom: 60px;
  letter-spacing: 8px;
  text-align: center;
  text-transform: uppercase;
  text-shadow: none; /* Clean category aesthetic */
}

.project-block {
  display: flex;
  align-items: center; /* Vertically centered as requested */
  justify-content: space-between;
  margin-bottom: 150px;
  gap: 80px;
}

.project-block:last-child {
  margin-bottom: 50px;
}

.project-info {
  flex: 0 0 45%;
}

.project-title {
  font-size: 2.8rem;
  color: #a6abb8; /* Slightly grey */
  margin-bottom: 25px;
  line-height: 1.1;
  letter-spacing: 1px; /* Increased spacing */
}

.project-award {
  font-size: 0.95rem;
  color: #c9aa71; /* Cinematic gold tint for awards */
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-top: -15px;
  margin-bottom: 25px;
  font-weight: 500;
}

.project-desc {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.65; /* Increased whitespace padding between lines as requested */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.project-video {
  flex: 0 0 50%;
  max-width: 800px;
}

/* --- Custom YouTube Poster UI --- */
.custom-poster {
  cursor: pointer;
}
.custom-poster .poster-image {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-size: cover;
  background-position: center;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.custom-poster.crop-235 .poster-image {
  background-size: 135%; /* Zooms in to crop black bars on 2.35:1 thumbnails */
}
.custom-poster.align-left .poster-image {
  background-position: left center !important;
}
.custom-poster:hover .poster-image {
  transform: scale(1.03);
}
.custom-poster .play-button {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 75px; height: 75px;
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(5px);
  border-radius: 50%;
  box-shadow: 0 10px 40px rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, background-color 0.3s ease;
}
.custom-poster .play-button::before {
  content: "";
  display: block;
  margin-left: 6px;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  border-left: 20px solid #000;
}
.custom-poster:hover .play-button {
  transform: translate(-50%, -50%) scale(1.1);
  background-color: #fff;
}

/* Scroll Animation Classes */
.fade-in-on-scroll {
  opacity: 0;
  transform: translateY(60px);
  filter: blur(5px);
  transition: opacity 1.2s cubic-bezier(0.2, 0.8, 0.2, 1), 
              transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1), 
              filter 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.fade-in-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

.commercial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-bottom: 130px;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  padding: 0 4vw;
  box-sizing: border-box;
}

.commercial-item {
  width: 100%;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
  position: relative;
}

@media (max-width: 1200px) {
  .commercial-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .commercial-grid {
    grid-template-columns: 1fr;
    padding: 0 6vw;
  }
  .project-block {
    flex-direction: column;
    text-align: center;
    gap: 40px;
    margin-bottom: 100px;
  }
  
  .project-info, .project-video {
    flex: 1 1 100%;
    width: 100%;
  }

  .portfolio-section {
    padding: 60px 20px;
    margin: 50px auto 0;
  }

  .section-title {
    font-size: 2.5rem;
    margin-bottom: 60px;
  }
}

