/* ========================================================= */
/* VINH KACER — HIGH-END CINEMATIC DARK MODE CSS             */
/* CHARCOAL OBSIDIAN & TITANIUM SILVER PALETTE               */
/* ========================================================= */

:root {
  --bg-cinema: #0A0A0C;         /* Deep charcoal obsidian */
  --bg-surface: #111215;        /* Surface panel */
  --bg-card: rgba(255, 255, 255, 0.02);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.2);
  --text-primary: #F4F4F5;       /* Crisp studio white */
  --text-secondary: #D1D5DB;     /* Metallic silver */
  --text-muted: #71717A;         /* Slate gray */
}

html {
  background-color: #0A0A0C;
  color: #F4F4F5;
  color-scheme: dark;
}

body {
  background-color: #0A0A0C;
  color: #F4F4F5;
  font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ========================================================= */
/* TYPOGRAPHY (MODERN SANS-SERIF)                            */
/* ========================================================= */

.font-display,
h1, h2,
#modalTitle,
#breakdownModalTitle {
  font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
  font-weight: 800 !important;
  letter-spacing: -0.02em !important;
}

/* Custom Scrollbar — Minimalist Charcoal */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #0A0A0C;
}
::-webkit-scrollbar-thumb {
  background: #27272A;
  border-radius: 9999px;
  border: 1px solid #0A0A0C;
}
::-webkit-scrollbar-thumb:hover {
  background: #3F3F46;
}

/* Selection Highlight — Titanium Silver */
::selection {
  background: #E4E4E7;
  color: #0A0A0C;
}

/* ========================================================= */
/* 1. CINEMATIC TEXTURE & FILM GRAIN OVERLAY                 */
/* ========================================================= */

/* Fullscreen Fixed 35mm Film Grain Texture Overlay */
.film-grain-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Subtle Film Studio Vignette */
.bg-grain {
  background-color: #0A0A0C;
  background-image: 
    radial-gradient(ellipse 90% 60% at 50% -10%, rgba(255, 255, 255, 0.04), transparent 70%),
    radial-gradient(circle at 50% 100%, rgba(255, 255, 255, 0.015), transparent 60%);
}

/* Zero gaming color orbs */
.orb-cyan, .orb-purple {
  display: none !important;
}

/* ========================================================= */
/* 2. NAVIGATION BAR                                         */
/* ========================================================= */

.glass-nav {
  background: rgba(10, 10, 12, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.nav-item {
  position: relative;
  text-decoration: none;
  transition: all 0.25s ease;
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
}
.nav-item::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0%;
  height: 2px;
  background: #F4F4F5;
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 9999px;
}
.nav-item:hover::after {
  width: 100%;
}
.nav-item:hover .nav-num {
  color: #E4E4E7;
}
.nav-item:hover .nav-text {
  color: #FFFFFF;
}

/* ========================================================= */
/* 3. PROJECT CARDS (VIDEO IS THE VISUAL HERO)               */
/* ========================================================= */

.glass-card {
  background: rgba(255, 255, 255, 0.02) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 1.25rem !important;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 16px 36px -12px rgba(0, 0, 0, 0.8) !important;
}
.glass-card:hover {
  background: rgba(255, 255, 255, 0.035) !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
  box-shadow: 0 24px 50px -12px rgba(0, 0, 0, 0.9) !important;
}

/* 16:9 Wide Project Card */
.card-16-9-wide {
  grid-column: 1 / -1 !important;
  width: 100% !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 1.5rem !important;
  background: rgba(255, 255, 255, 0.015) !important;
  box-shadow: 0 20px 48px -12px rgba(0, 0, 0, 0.85) !important;
  transition: all 0.3s ease !important;
}
.card-16-9-wide:hover {
  border-color: rgba(255, 255, 255, 0.2) !important;
  box-shadow: 0 28px 64px -16px rgba(0, 0, 0, 0.95) !important;
}

/* 16:9 Video Box with zero harsh borders */
.video-16-9-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #000000;
  border-radius: 1rem !important;
  overflow: hidden;
  box-shadow: 0 20px 48px -12px rgba(0, 0, 0, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}
.video-16-9-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

#projectsGrid .glass-card {
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 1.25rem !important;
}
#projectsGrid .glass-card:hover {
  border-color: rgba(255, 255, 255, 0.2) !important;
  transform: translateY(-2px);
  box-shadow: 0 20px 44px -10px rgba(0, 0, 0, 0.85) !important;
}

/* ========================================================= */
/* 4. MINIMALIST BADGES & VFX BREAKDOWN CAPSULE BUTTONS      */
/* ========================================================= */

/* Category & Role Tags — Minimalist Monospace */
[class*="rounded-full"][class*="text-neon-cyan"],
[class*="rounded-full"][class*="text-rose-300"],
[class*="rounded-full"][class*="text-cyan-300"],
#projectsGrid [class*="badge"],
#modalBadge {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #D1D5DB !important;
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 0.65rem !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  font-weight: 600 !important;
  border-radius: 9999px !important;
  box-shadow: none !important;
}

/* Vertical 9:16 Card Footer & Role Capsule */
.vertical-card-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  padding: 1.25rem 0.85rem 0.85rem;
  background: linear-gradient(180deg, transparent 0%, rgba(8, 8, 11, 0.72) 35%, rgba(8, 8, 11, 0.98) 100%);
  pointer-events: auto;
}

.vertical-card-title {
  color: #FFFFFF !important;
  font-size: 0.82rem !important;
  line-height: 1.35 !important;
  font-weight: 700 !important;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
}

.role-capsule {
  display: inline-flex;
  align-items: center;
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 0.68rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.02em;
  color: #38bdf8 !important;
  background: rgba(14, 15, 20, 0.92) !important;
  border: 1px solid rgba(56, 189, 248, 0.3) !important;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  white-space: nowrap;
  max-width: 65%;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

/* Minimalist Studio VFX Breakdown Button */
.vfx-breakdown-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.42rem 0.95rem;
  border-radius: 9999px !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  background: rgba(255, 255, 255, 0.035) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #E4E4E7 !important;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.025em;
  transition: all 0.25s ease;
  cursor: pointer;
  box-shadow: none;
}
.vfx-breakdown-btn:hover {
  border-color: rgba(255, 255, 255, 0.35) !important;
  color: #FFFFFF !important;
  background: rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  transform: translateY(-1px);
}
.vfx-breakdown-btn:active {
  transform: scale(0.98);
}
.vfx-breakdown-btn .text-neon-cyan {
  color: #D1D5DB !important;
}

/* Minimalist Studio Tab Buttons */
.tab-btn {
  border: 1px solid rgba(255, 255, 255, 0.09) !important;
  border-radius: 9999px !important;
  background: rgba(255, 255, 255, 0.025) !important;
  color: #A1A1AA !important;
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  font-weight: 600 !important;
  transition: all 0.25s ease !important;
  box-shadow: none !important;
}
.tab-btn:hover {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: #F4F4F5 !important;
}
.tab-btn.bg-neon-cyan,
button[id^="tabBtn"].bg-neon-cyan {
  background: #F4F4F5 !important;
  color: #0A0A0C !important;
  border-color: #F4F4F5 !important;
  border-radius: 9999px !important;
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.12) !important;
}
.tab-btn.bg-neon-cyan .tab-count,
button[id^="tabBtn"].bg-neon-cyan .tab-count {
  background: rgba(0, 0, 0, 0.18) !important;
  color: #0A0A0C !important;
  border-radius: 9999px !important;
}

/* Active Tab Description Banner */
#tabBanner {
  background: rgba(255, 255, 255, 0.02) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 0.75rem !important;
}
#tabBannerText {
  color: #D1D5DB !important;
}
#tabBanner .animate-pulse,
#tabBanner span.rounded-full {
  background: #D1D5DB !important;
}

/* ========================================================= */
/* 5. AVATAR PROFILE (METALLIC RING)                         */
/* ========================================================= */

.hero-avatar-wrapper {
  position: relative;
  display: inline-block;
  border-radius: 9999px;
  padding: 2px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.05));
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.7);
  transition: all 0.35s ease;
}
.hero-avatar-wrapper:hover {
  transform: scale(1.03);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.1));
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.85);
}
.hero-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 9999px;
  object-fit: cover;
  display: block;
  background-color: #111215;
}

.nav-avatar {
  width: 36px;
  height: 36px;
  border-radius: 9999px;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  transition: all 0.3s ease;
}
.group:hover .nav-avatar {
  border-color: rgba(255, 255, 255, 0.45);
  transform: scale(1.04);
}

/* ========================================================= */
/* 6. MODALS & POPUPS                                        */
/* ========================================================= */

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.97) translateY(6px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
.animate-modal-in {
  animation: modalFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

#vfxBreakdownModal > div,
#cinemaModal > div {
  background: #111215 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 1.5rem !important;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.95) !important;
}

#breakdownPartSelector {
  background: #0A0A0C !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}
#breakdownPartSelector button {
  border-radius: 0.5rem !important;
  transition: all 0.2s ease;
}
#breakdownPartSelector button:hover {
  transform: translateY(-1px);
}

/* ========================================================= */
/* 7. YOUTUBE FACADE & TIKTOK 9:16 VERTICAL OPTIMIZATION    */
/* ========================================================= */

.youtube-facade {
  position: relative;
  width: 100%;
  height: 100%;
  background-color: #000;
  cursor: pointer;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.youtube-facade img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.youtube-facade:hover img {
  transform: scale(1.03);
}

.youtube-play-btn {
  position: absolute;
  width: 68px;
  height: 48px;
  background-color: rgba(239, 68, 68, 0.9);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  cursor: pointer;
}

.youtube-facade:hover .youtube-play-btn {
  background-color: #ef4444;
  transform: scale(1.12);
  box-shadow: 0 0 25px rgba(239, 68, 68, 0.6);
}

/* Local MP4 Video Facade */
.mp4-facade {
  position: relative;
  width: 100%;
  height: 100%;
  background-color: #000;
  cursor: pointer;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mp4-facade img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.mp4-facade:hover img {
  transform: scale(1.04);
}

.mp4-play-btn {
  position: absolute;
  width: 60px;
  height: 60px;
  background-color: rgba(14, 15, 21, 0.88);
  border: 1.5px solid rgba(56, 189, 248, 0.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #38bdf8;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.mp4-facade:hover .mp4-play-btn {
  background-color: #38bdf8;
  color: #09090d;
  transform: scale(1.14);
  box-shadow: 0 0 30px rgba(56, 189, 248, 0.6);
}

/* Dedicated TikTok 9:16 Vertical Video Rules */
.tiktok-vertical-container {
  max-width: 380px;
  width: 100%;
  aspect-ratio: 9 / 16;
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  background: #000;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
}

.tiktok-pill-badge {
  background: rgba(254, 44, 85, 0.15) !important;
  border: 1px solid rgba(254, 44, 85, 0.4) !important;
  color: #ff5e82 !important;
}

.tiktok-pill-badge:hover {
  background: #fe2c55 !important;
  color: #ffffff !important;
}

/* ========================================================= */
/* 8. MOBILE 9:16 VERTICAL REEL & COMPACT GRID UX            */
/* ========================================================= */

.vertical-scroll-reel {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  gap: 0.875rem;
  padding: 0.25rem 0.25rem 1rem 0.25rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.vertical-scroll-reel::-webkit-scrollbar {
  height: 5px;
}

.vertical-scroll-reel::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 9999px;
}

.vertical-scroll-reel::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.22);
  border-radius: 9999px;
}

.vertical-scroll-reel > * {
  scroll-snap-align: start;
  flex-shrink: 0;
  width: 58vw;
  max-width: 220px;
}

@media (min-width: 640px) {
  .vertical-scroll-reel {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    overflow-x: visible !important;
    scroll-snap-type: none !important;
    gap: 1.5rem !important;
    padding: 0 !important;
  }
  .vertical-scroll-reel > * {
    width: auto !important;
    max-width: none !important;
  }
}

@media (min-width: 1024px) {
  .vertical-scroll-reel {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 2rem !important;
  }
}

/* Mobile Compact 2-Col Grid */
.mobile-compact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .mobile-compact-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .mobile-compact-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2rem;
  }
}


