/* 
  Klaas Kooistra — Portfolio CSS
  Style Guide Inspired: Pink Milk AI Film Studio (Neo-Noir + Synthwave Fusion)
*/

:root {
  /* Brand Color Palette from brand-spec.md */
  --deep-purple: #5B21B6;
  --neon-orange: #FF6B35;
  --soft-neon-pink: #FF00FF;
  --dark-bg: #0A0A0F;
  --secondary-bg: #0D1117;
  --ink-black: #050508;
  --text-primary: #FAFAFA;
  --text-secondary: #A1A1AA;
  --white: #FFFFFF;
  
  /* Fonts */
  --font-display: 'Bebas Neue', Impact, sans-serif;
  --font-body: 'Space Grotesk', -apple-system, sans-serif;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--dark-bg);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ==========================================================================
   premium cinematic overlays (film grain, halftone, grid)
   ========================================================================== */

/* CMYK Halftone Overlay */
.halftone-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 9997;
  background-image: radial-gradient(circle at center, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 8px 8px;
  mix-blend-mode: overlay;
  opacity: 0.4;
}

/* Animated Film Grain Overlay */
.grain-overlay {
  display: none; /* Disabled to remove grainy/VHS effect per user request */
  position: fixed;
  top: -50%;
  left: -50%;
  right: -50%;
  bottom: -50%;
  width: 200%;
  height: 200%;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  animation: grain-animation 8s steps(10) infinite;
}

@keyframes grain-animation {
  0%, 100% { transform:translate(0, 0); }
  10% { transform:translate(-5%, -10%); }
  20% { transform:translate(-15%, 5%); }
  30% { transform:translate(7%, -25%); }
  40% { transform:translate(-5%, 25%); }
  50% { transform:translate(-15%, 10%); }
  60% { transform:translate(15%, 0%); }
  70% { transform:translate(0%, 15%); }
  80% { transform:translate(3%, 35%); }
  90% { transform:translate(-10%, 10%); }
}

/* Horizon Tech Grid (Synthwave Perspective Grid) */
.horizon-grid {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 0;
  background: 
    linear-gradient(to bottom, transparent 0%, var(--dark-bg) 80%),
    linear-gradient(90deg, rgba(91, 33, 182, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(91, 33, 182, 0.08) 1px, transparent 1px);
  background-size: 100% 100%, 60px 60px, 60px 60px;
  perspective: 500px;
  transform-style: preserve-3d;
  transform: rotateX(60deg);
  transform-origin: center bottom;
  opacity: 0.5;
}

/* ==========================================================================
   Layout Containers
   ========================================================================== */

.portfolio-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 80px 40px 0 40px;
  position: relative;
  z-index: 10;
}

/* Header Styling */
.portfolio-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 30px 0;
  border-bottom: 1px solid rgba(255, 107, 53, 0.15);
  margin-bottom: 60px;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 15px;
}

.brand-logo {
  height: 38px;
  width: auto;
  filter: brightness(1.2);
}

.brand-title {
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: 0.08em;
  color: var(--white);
}

.brand-sub {
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.35em;
  color: var(--neon-orange);
  display: block;
  margin-top: -4px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--text-secondary);
  text-transform: uppercase;
  transition: color 0.3s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--neon-orange);
}

.btn-header-contact {
  padding: 10px 20px;
  border: 1px solid var(--neon-orange);
  color: var(--neon-orange);
  transition: all 0.3s ease;
}

.btn-header-contact:hover {
  background: var(--neon-orange);
  color: var(--dark-bg);
  box-shadow: 0 0 15px rgba(255, 107, 53, 0.4);
}

/* ==========================================================================
   Bio / Hero Section
   ========================================================================== */

.bio-section {
  padding: 40px 0 60px 0;
}

.bio-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 80px;
  align-items: center;
}

.bio-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.bio-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.25em;
  color: var(--neon-orange);
  background: rgba(255, 107, 53, 0.1);
  padding: 6px 14px;
  margin-bottom: 20px;
  border-left: 2px solid var(--neon-orange);
  text-transform: uppercase;
}

.bio-name {
  font-family: var(--font-display);
  font-size: clamp(36px, 5.2vw, 76px);
  line-height: 1.05;
  letter-spacing: 0.02em;
  color: var(--white);
  margin-bottom: 16px;
  text-shadow: 0 0 30px rgba(91, 33, 182, 0.3);
}

.bio-name span {
  display: block;
}

.bio-name .line-1 {
  white-space: nowrap;
}

.bio-name .line-3 {
  font-size: 0.6em;
  opacity: 0.85;
}

.bio-subtitle {
  font-family: var(--font-body);
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--text-secondary);
  margin-bottom: 30px;
  text-transform: uppercase;
  position: relative;
}

.bio-subtitle::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--neon-orange);
}

.bio-body-text {
  font-size: 18px;
  font-weight: 300;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 40px;
  max-width: 580px;
}

.bio-body-text strong {
  color: var(--neon-orange);
  font-weight: 500;
}

.bio-cta-group {
  display: flex;
  gap: 20px;
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  padding: 16px 36px;
  background: var(--neon-orange);
  color: var(--ink-black);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  text-decoration: none;
  border: none;
  cursor: pointer;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary:hover {
  background: var(--white);
  transform: translateX(4px);
  box-shadow: 0 10px 30px rgba(255, 107, 53, 0.25);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  padding: 16px 36px;
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-secondary:hover {
  border-color: var(--neon-orange);
  color: var(--neon-orange);
  background: rgba(255, 107, 53, 0.05);
}

/* Headshot tilted 3% */
.bio-media {
  display: flex;
  justify-content: center;
  align-items: center;
}

.headshot-tilt-container {
  position: relative;
  width: 100%;
  max-width: 380px;
  perspective: 1000px;
}

.headshot-frame {
  position: relative;
  background: var(--secondary-bg);
  border: 4px solid var(--text-primary);
  padding: 12px 12px 48px 12px; /* Polaroid film stock container */
  box-shadow: 
    0 25px 60px rgba(0, 0, 0, 0.8), 
    0 0 40px rgba(91, 33, 182, 0.15);
  transform: rotate(3deg); /* 3% Angle */
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  transform-style: preserve-3d;
  z-index: 2;
}

.headshot-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  filter: grayscale(15%) contrast(1.05);
  transition: filter 0.6s ease;
  background: var(--ink-black);
}

.headshot-caption {
  font-family: var(--font-body);
  margin-top: 16px;
  text-align: center;
}

.headshot-name {
  display: block;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--white);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.headshot-quote {
  font-size: 11px;
  font-weight: 400;
  line-height: 1.45;
  color: var(--text-secondary);
  font-style: italic;
  max-width: 290px;
  margin: 0 auto;
}

.headshot-shadow-back {
  position: absolute;
  top: 15px;
  left: -15px;
  right: 15px;
  bottom: -15px;
  border: 2px dashed var(--neon-orange);
  transform: rotate(-2deg); /* Offset layout tilt */
  pointer-events: none;
  z-index: 1;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Micro-animations for Headshot */
.headshot-tilt-container:hover .headshot-frame {
  transform: rotate(0deg) scale(1.04) translateZ(15px);
  box-shadow: 
    0 35px 80px rgba(0, 0, 0, 0.9), 
    0 0 50px rgba(255, 107, 53, 0.25);
}

.headshot-tilt-container:hover .headshot-image {
  filter: grayscale(0%) contrast(1);
}

.headshot-tilt-container:hover .headshot-shadow-back {
  transform: rotate(0deg) scale(1.04);
  border-color: var(--soft-neon-pink);
}

/* ==========================================================================
   Horizontal Line Divider (Cinematic Neon Style)
   ========================================================================== */

.horizontal-divider {
  position: relative;
  width: 100%;
  margin: 30px 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.divider-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg, 
    transparent 0%, 
    rgba(255, 107, 53, 0.2) 20%, 
    var(--neon-orange) 50%, 
    rgba(255, 107, 53, 0.2) 80%, 
    transparent 100%
  );
  box-shadow: 0 0 10px rgba(255, 107, 53, 0.6);
}

.divider-badge {
  position: relative;
  background: var(--dark-bg);
  color: var(--neon-orange);
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 0.25em;
  padding: 8px 24px;
  border: 1px solid var(--neon-orange);
  box-shadow: 
    0 0 20px rgba(255, 107, 53, 0.15), 
    inset 0 0 10px rgba(255, 107, 53, 0.1);
  z-index: 2;
  text-transform: uppercase;
}

/* ==========================================================================
   Selected Works / Video Grid
   ========================================================================== */

.work-section {
  padding-bottom: 100px;
}

.section-header {
  margin-bottom: 50px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 48px);
  letter-spacing: 0.05em;
  color: var(--white);
}

/* Grid Layout for 9 Videoframes (2 columns x 5 rows, with last featured) */
.video-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
}

@media (min-width: 769px) {
  .video-card:nth-child(9) {
    grid-column: span 2;
  }
}

.video-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 14px;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.video-frame-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  background: var(--ink-black);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.portfolio-video, .portfolio-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.video-tag-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 10;
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--neon-orange);
  background: rgba(5, 5, 8, 0.85);
  border: 1px solid rgba(255, 107, 53, 0.4);
  padding: 4px 10px;
  border-radius: 4px;
  text-transform: uppercase;
  backdrop-filter: blur(4px);
}

.video-play-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 10, 15, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition: opacity 0.4s ease, background 0.4s ease;
  pointer-events: none;
  opacity: 1;
}

.play-icon {
  width: 52px;
  height: 52px;
  background: var(--neon-orange);
  color: var(--ink-black);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 25px rgba(255, 107, 53, 0.5);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  transform: scale(0.9);
  opacity: 0.85;
}

.play-icon.image-mode {
  background: var(--deep-purple);
  color: var(--white);
  box-shadow: 0 0 25px rgba(91, 33, 182, 0.5);
}

.play-icon svg {
  width: 22px;
  height: 22px;
  margin-left: 2px;
}

.video-info {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.video-title {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.05em;
  color: var(--white);
  margin-bottom: 10px;
  transition: color 0.3s ease;
}

.video-caption {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 300;
  line-height: 1.5;
  color: var(--text-secondary);
}

/* Video Card Hover Effects */
.video-card:hover {
  transform: translateY(-8px);
  border-color: rgba(255, 107, 53, 0.25);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 
    0 25px 50px rgba(0, 0, 0, 0.6), 
    0 0 30px rgba(255, 107, 53, 0.1);
}

.video-card:hover .portfolio-video, .video-card:hover .portfolio-image {
  transform: scale(1.05);
}

.video-card:hover .video-play-overlay {
  background: rgba(10, 10, 15, 0.15);
}

.video-card:hover .play-icon {
  transform: scale(1.05);
}

/* Hide play icon and fade overlay only when the video is actively playing */
.video-card.is-playing .video-play-overlay {
  opacity: 0;
}

.video-card.is-playing .play-icon {
  transform: scale(1.2);
  opacity: 0;
}

.video-card:hover .video-title {
  color: var(--neon-orange);
}

/* ==========================================================================
   Footer Section
   ========================================================================== */

.portfolio-footer {
  padding: 60px 0 40px 0;
  position: relative;
  z-index: 10;
}

.footer-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  margin-bottom: 40px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 30px;
}

.footer-logo .logo-text {
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: 0.1em;
  color: var(--white);
  margin-bottom: 8px;
}

.footer-copyright {
  font-size: 12px;
  color: var(--text-secondary);
}

.footer-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  text-align: right;
}
/* ==========================================================================
   Mobile Showcase Section & iPhone Mockups
   ========================================================================== */

.mobile-showcase-section {
  padding: 40px 0 80px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 10;
}

.mobile-showcase-section .section-header {
  margin-bottom: 40px;
  text-align: center;
}

.section-subtitle-text {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 300;
  color: var(--text-secondary);
  margin-top: 10px;
  max-width: 600px;
}

.iphone-mockup-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 columns in a row on desktop */
  gap: 40px;
  width: 100%;
  max-width: 1300px; /* Match standard video-grid width */
  margin: 0 auto;
}

.iphone-card {
  display: flex;
  flex-direction: column !important; /* Stack vertically on desktop */
  align-items: center;
  padding: 24px 20px 20px 20px !important; /* Overriding default video card padding */
  width: 100%;
}

/* Hover effects overriding standard video card */
.iphone-card:hover .iphone-bezel {
  border-color: var(--neon-orange);
  box-shadow: 
    0 25px 60px rgba(0, 0, 0, 0.8), 
    0 0 35px rgba(255, 107, 53, 0.35);
}

.iphone-device {
  position: relative;
  width: 100%;
  max-width: 280px; /* Wider phone mockup to fill the card beautifully */
  margin: 0 auto 20px auto;
}

.iphone-bezel {
  position: relative;
  width: 100%;
  background: #141416;
  border-radius: 36px;
  padding: 36px 8px 10px 8px; /* Top padding for notch, side/bottom padding for slim bezel */
  border: 3px solid #2e2e33;
  box-shadow: 
    0 15px 35px rgba(0, 0, 0, 0.6), 
    inset 0 0 8px rgba(0, 0, 0, 0.8);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 2;
}

.iphone-screen {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16; /* Perfect 9:16 aspect ratio to prevent side cropping */
  border-radius: 26px;
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(0, 0, 0, 0.6);
  transform: translate3d(0, 0, 0); /* Force GPU acceleration and clip */
}

.iphone-screen .portfolio-video,
.iphone-screen .portfolio-poster,
.iphone-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.iphone-glare {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg, 
    rgba(255, 255, 255, 0.12) 0%, 
    rgba(255, 255, 255, 0) 45%, 
    rgba(255, 255, 255, 0) 100%
  );
  pointer-events: none;
  z-index: 6;
}

.iphone-notch {
  position: absolute;
  top: 10px; /* Placed in top padding of bezel */
  left: 50%;
  transform: translateX(-50%);
  width: 64px;
  height: 15px;
  background: #000000;
  border-radius: 8px;
  z-index: 10;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding-right: 10px;
  box-shadow: inset 0 0 3px rgba(255, 255, 255, 0.15);
}

.iphone-camera {
  width: 5px;
  height: 5px;
  background: #0d0d1a;
  border-radius: 50%;
  box-shadow: 
    inset 0 0 1px rgba(255, 255, 255, 0.4), 
    0 0 1px rgba(0, 0, 255, 0.3);
}

.iphone-speaker {
  width: 24px;
  height: 2px;
  background: #1a1a1a;
  border-radius: 1px;
  margin-left: 6px;
  box-shadow: inset 0 0 1px rgba(255, 255, 255, 0.1);
}

/* Side Buttons */
.iphone-button {
  position: absolute;
  background: #2e2e33;
  border-radius: 1.5px;
  z-index: 1;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.iphone-button.volume-up {
  left: -3px;
  top: 54px;
  width: 2px;
  height: 28px;
}

.iphone-button.volume-down {
  left: -3px;
  top: 90px;
  width: 2px;
  height: 28px;
}

.iphone-button.power {
  right: -3px;
  top: 70px;
  width: 2px;
  height: 38px;
}

.iphone-info {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Responsive adaptations for the iPhone mockups */
@media (max-width: 1024px) {
  .iphone-mockup-grid {
    gap: 24px;
    padding: 0 10px;
  }
}

@media (max-width: 768px) {
  .iphone-mockup-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 10px 20px 30px 20px;
    gap: 24px;
    -webkit-overflow-scrolling: touch;
    justify-content: flex-start;
    scroll-padding: 20px;
    margin-left: -20px;
    margin-right: -20px;
    width: calc(100% + 40px);
  }

  .iphone-mockup-grid::-webkit-scrollbar {
    height: 6px;
  }

  .iphone-mockup-grid::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
  }

  .iphone-mockup-grid::-webkit-scrollbar-thumb {
    background: rgba(255, 107, 53, 0.3);
    border-radius: 10px;
  }

  .iphone-mockup-grid::-webkit-scrollbar-thumb:hover {
    background: var(--neon-orange);
  }

  .iphone-card {
    flex: 0 0 270px;
    flex-direction: column !important; /* Back to column stacking on mobile device widths */
    align-items: center;
    scroll-snap-align: center;
  }

  .iphone-device {
    width: 100%;
    max-width: 210px;
    margin: 0 auto 20px auto;
  }

  .iphone-info {
    align-items: center;
    text-align: center;
  }
}

/* ==========================================================================
   Animations & Responsive Media Queries
   ========================================================================== */

/* Simple Scroll Reveal styles */
.animate-fade-in-left {
  animation: fadeInLeft 1.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.animate-fade-in-right {
  animation: fadeInRight 1.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s ease, transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .bio-grid {
    grid-template-columns: 1fr;
    gap: 60px;
    text-align: center;
  }
  
  .bio-copy {
    align-items: center;
  }
  
  .bio-body-text {
    margin-left: auto;
    margin-right: auto;
  }
  
  .bio-subtitle::after {
    left: 50%;
    transform: translateX(-50%);
  }
  
  .video-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }
  
  .footer-meta {
    align-items: flex-start;
    text-align: left;
  }
  
  .portfolio-header {
    margin-bottom: 40px;
  }
}

@media (max-width: 768px) {
  .portfolio-container {
    padding: 0 20px;
  }
  
  .portfolio-header {
    flex-direction: column;
    gap: 20px;
    padding-bottom: 24px;
  }
  
  .video-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .footer-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .footer-meta {
    align-items: center;
    text-align: center;
  }
}

/* ==========================================================================
   Dual Continuous Video Sliders (9:16 & 16:9) & Lightbox Modal
   ========================================================================== */

.showcase-slider-section {
  padding: 25px 0 25px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 10;
  width: 100%;
}

.showcase-slider-section .section-header {
  margin-bottom: 25px;
  text-align: center;
}

.continuous-marquee-wrapper {
  --marquee-gap: 32px;
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  left: 0;
  right: 0;
  overflow: hidden;
  padding: 10px 0 20px 0;
  box-sizing: border-box;
  align-self: center;
}

/* Subtle edge fades on the marquee sides */
.marquee-edge-fade {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 120px;
  z-index: 5;
  pointer-events: none;
}

.marquee-edge-fade.edge-left {
  left: 0;
  background: linear-gradient(to right, var(--dark-bg) 0%, rgba(10, 10, 15, 0) 100%);
}

.marquee-edge-fade.edge-right {
  right: 0;
  background: linear-gradient(to left, var(--dark-bg) 0%, rgba(10, 10, 15, 0) 100%);
}

.marquee-track {
  display: flex;
  gap: var(--marquee-gap);
  width: max-content;
  will-change: transform;
}

/* Left to Right slider (9:16 vertical) */
.ltr-marquee .marquee-track {
  animation: marquee-ltr 45s linear infinite;
}

@keyframes marquee-ltr {
  0% {
    transform: translateX(calc(-50% - (var(--marquee-gap) / 2)));
  }
  100% {
    transform: translateX(0);
  }
}

/* Right to Left slider (16:9 widescreen) */
.rtl-marquee .marquee-track {
  animation: marquee-rtl 50s linear infinite;
}

@keyframes marquee-rtl {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(calc(-50% - (var(--marquee-gap) / 2)));
  }
}

/* Pause animation on hover */
.continuous-marquee-wrapper:hover .marquee-track {
  animation-play-state: paused;
}

/* 9:16 Phone Card in Slider */
.slider-iphone-card {
  flex: 0 0 280px;
  width: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.slider-iphone-card:hover {
  transform: translateY(-8px) scale(1.02);
}

.slider-iphone-card:hover .iphone-bezel {
  border-color: var(--neon-orange);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 35px rgba(255, 107, 53, 0.35);
}

.slider-iphone-card .iphone-device {
  width: 100%;
  max-width: 260px;
  margin-bottom: 16px;
}

.slider-iphone-card .iphone-info {
  width: 100%;
  text-align: center;
  padding: 0 10px;
}

/* 16:9 Widescreen Card in Slider */
.slider-widescreen-card {
  flex: 0 0 420px;
  width: 420px;
  background: rgba(18, 18, 24, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  user-select: none;
}

.slider-widescreen-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: var(--soft-neon-pink);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 30px rgba(255, 0, 255, 0.25);
}

.widescreen-thumbnail-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
}

.widescreen-thumbnail-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.slider-widescreen-card:hover .widescreen-thumbnail-wrapper img {
  transform: scale(1.05);
}

.slider-card-play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s ease;
}

.slider-iphone-card:hover .slider-card-play-overlay,
.slider-widescreen-card:hover .slider-card-play-overlay {
  background: rgba(0, 0, 0, 0.15);
}

.slider-play-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(10, 10, 15, 0.8);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--white);
  backdrop-filter: blur(6px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.slider-iphone-card:hover .slider-play-btn,
.slider-widescreen-card:hover .slider-play-btn {
  transform: scale(1.15);
  background: var(--neon-orange);
  color: var(--dark-bg);
  border-color: var(--neon-orange);
  box-shadow: 0 0 20px rgba(255, 107, 53, 0.8);
}

.slider-play-btn svg {
  width: 22px;
  height: 22px;
  margin-left: 3px;
}

.widescreen-card-info {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.widescreen-card-info .video-title {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0.05em;
  color: var(--white);
  margin: 0;
}

.widescreen-card-info .video-caption {
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Lightbox Modal Player */
.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox-modal.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 8, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.lightbox-dialog {
  position: relative;
  z-index: 2;
  max-width: 960px;
  width: 100%;
  max-height: 92vh;
  background: #0E0E14;
  border: 1px solid rgba(255, 107, 53, 0.3);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.9), 0 0 50px rgba(255, 107, 53, 0.2);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: scale(0.92);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox-modal.active .lightbox-dialog {
  transform: scale(1);
}

.lightbox-dialog.vertical-mode {
  max-width: 440px;
}

.lightbox-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 10;
  background: rgba(14, 14, 20, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--white);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all 0.2s ease;
}

.lightbox-close-btn:hover {
  background: var(--neon-orange);
  color: var(--dark-bg);
  border-color: var(--neon-orange);
  transform: rotate(90deg) scale(1.1);
}

.lightbox-media-container {
  position: relative;
  width: 100%;
  background: #000;
  display: flex;
  justify-content: center;
  align-items: center;
  max-height: 70vh;
  overflow: hidden;
}

.lightbox-media-container video {
  width: 100%;
  height: 100%;
  max-height: 70vh;
  object-fit: contain;
  outline: none;
}

.lightbox-details {
  padding: 18px 24px;
  background: #0E0E14;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.lightbox-title {
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: 0.05em;
  color: var(--white);
}

.lightbox-caption {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

@media (max-width: 1024px) {
  .slider-iphone-card {
    flex: 0 0 160px;
    width: 160px;
  }
  .slider-iphone-card .iphone-device {
    max-width: 150px;
  }
  .slider-iphone-card .iphone-bezel {
    border-radius: 22px;
    padding: 22px 6px 8px 6px;
  }
  .slider-iphone-card .iphone-screen {
    border-radius: 16px;
  }
  .slider-widescreen-card {
    flex: 0 0 280px;
    width: 280px;
  }
  .marquee-track {
    gap: 16px;
  }
}

@media (max-width: 768px) {
  .continuous-marquee-wrapper {
    --marquee-gap: 10px;
    width: calc(100% + 40px);
    margin-left: -20px;
    margin-right: -20px;
    left: 0;
    right: 0;
    padding: 6px 0 10px 0;
    box-sizing: border-box;
  }

  .showcase-slider-section {
    padding: 10px 0 10px 0;
  }

  .showcase-slider-section .section-header {
    margin-bottom: 10px;
  }

  .showcase-slider-section .section-label {
    font-size: 9.5px;
    letter-spacing: 0.25em;
    margin-bottom: 3px;
  }

  .showcase-slider-section .section-title {
    font-size: 24px;
    line-height: 1.1;
    margin: 0;
  }

  .showcase-slider-section .section-subtitle-text {
    font-size: 12px;
    margin-top: 3px;
    line-height: 1.35;
    padding: 0 10px;
  }

  .horizontal-divider {
    margin: 10px 0;
  }

  .divider-badge {
    font-size: 11px;
    letter-spacing: 0.16em;
    padding: 0 8px;
  }
  
  /* Narrower edge fades so cards in the center & sides stay visible */
  .marquee-edge-fade {
    width: 20px;
  }
  
  .marquee-track {
    gap: 10px;
  }

  /* 9:16 Phone Slider: scaled down so 3.5 to 4 phones are visible at once! */
  .slider-iphone-card {
    flex: 0 0 90px;
    width: 90px;
  }
  
  .slider-iphone-card .iphone-device {
    width: 100%;
    max-width: 90px;
    margin-bottom: 4px;
  }

  .slider-iphone-card .iphone-bezel {
    border-radius: 14px;
    padding: 11px 3px 5px 3px;
    border-width: 1.5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
  }

  .slider-iphone-card .iphone-screen {
    border-radius: 9px;
    border-width: 0.5px;
  }

  .slider-iphone-card .iphone-notch {
    width: 22px;
    height: 5px;
    top: 3px;
    border-radius: 3px;
    padding-right: 3px;
  }

  .slider-iphone-card .iphone-camera {
    width: 2px;
    height: 2px;
  }

  .slider-iphone-card .iphone-speaker {
    width: 7px;
    height: 1px;
    margin-left: 2px;
  }

  .slider-iphone-card .iphone-button {
    display: none; /* Hide side buttons on miniature view */
  }

  .slider-iphone-card .slider-play-btn {
    width: 22px;
    height: 22px;
  }

  .slider-iphone-card .slider-play-btn svg {
    width: 9px;
    height: 9px;
    margin-left: 1px;
  }

  .slider-iphone-card .iphone-info {
    padding: 0 2px;
    width: 100%;
  }

  .slider-iphone-card .iphone-info .video-tag-badge {
    font-size: 6.5px;
    letter-spacing: 0.04em;
    padding: 1px 3px;
    margin-bottom: 2px;
    border-radius: 2px;
  }

  .slider-iphone-card .iphone-info .video-title {
    font-size: 9px;
    letter-spacing: 0.02em;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    margin: 0;
  }

  .slider-iphone-card .iphone-info .video-caption {
    display: none; /* Hide long paragraphs to keep cards compact & aligned */
  }

  /* 16:9 Widescreen Slider on mobile: scaled down so 2.5 to 3 cards are visible */
  .slider-widescreen-card {
    flex: 0 0 140px;
    width: 140px;
    border-radius: 8px;
  }

  .slider-widescreen-card .slider-play-btn {
    width: 24px;
    height: 24px;
  }

  .slider-widescreen-card .slider-play-btn svg {
    width: 10px;
    height: 10px;
    margin-left: 1px;
  }

  .widescreen-card-info {
    padding: 6px 8px;
    gap: 2px;
  }

  .widescreen-card-info .video-tag-badge {
    font-size: 6.5px;
    letter-spacing: 0.04em;
    padding: 1px 3px;
    align-self: flex-start;
    border-radius: 2px;
  }

  .widescreen-card-info .video-title {
    font-size: 9.5px;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    margin: 0;
  }

  .widescreen-card-info .video-caption {
    display: none; /* Hide caption to maintain neat height alignment */
  }

  .lightbox-details {
    padding: 14px 16px;
  }
  
  .lightbox-title {
    font-size: 20px;
  }
}

