/* ==========================================================================
   1. BACKGROUND VIDEO LAYER & OVERLAY
   ========================================================================== */
#video-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}

#bg-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background-color: #000;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

#video-container::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1;
  pointer-events: none;
}

/* ==========================================================================
   2. GLOBAL DESIGN SYSTEM VARIABLES (LIGHT MODE DEFAULT)
   ========================================================================== */
:root { 
  --bg-primary: rgba(255, 255, 255, 0.82); 
  --bg-nav-box: rgba(255, 255, 255, 0.65);
  --bg-secondary: rgba(248, 249, 250, 0.85);
  --text-primary: #111827; 
  --text-secondary: #374151;
  --border-color: rgba(229, 231, 235, 0.7);
  --accent-color: #2563eb; 
  --accent-hover: #1d4ed8;
  --focus-ring: rgba(37, 99, 235, 0.35);
}

/* ==========================================================================
   3. DARK MODE ENGINE (DOM TARGETED VARIABLES)
   ========================================================================== */
[data-theme="dark"] {
  --bg-primary: rgba(26, 26, 36, 0.88);
  --bg-nav-box: rgba(30, 41, 59, 0.55);
  --bg-secondary: rgba(15, 23, 42, 0.8);
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --border-color: rgba(51, 65, 85, 0.7);
  --accent-color: #3b82f6;
  --accent-hover: #60a5fa;
  --focus-ring: rgba(59, 130, 246, 0.5);
}

/* ==========================================================================
   4. BASE DOCUMENT RESET & BODY PIPELINE
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2.5rem 1.5rem;
  line-height: 1.6;
}

/* ==========================================================================
   5. LAYOUT CONTAINER WRAPPER
   ========================================================================== */
.container {
  width: 100%;
  max-width: 680px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.content-card {
  background: var(--bg-primary);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: 32px;
  padding: 2.5rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
  transition: background 0.3s ease, border-color 0.3s ease;
}

/* ==========================================================================
   6. TYPOGRAPHIC HIERARCHY & CONTENT STYLES
   ========================================================================== */
.content-card h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

blockquote {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent-color);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

p, ol, ul {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

li {
  margin-left: 1.25rem;
  margin-bottom: 0.25rem;
}

/* ==========================================================================
   7. NAVIGATION GRID ENGINE
   ========================================================================== */
.nav-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  width: 100%;
}

.nav-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-nav-box);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 0.75rem 0.5rem;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
}

.nav-box:hover, .nav-box.active {
  background: var(--bg-secondary);
  border-color: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.05);
}

.nav-box.active .nav-title {
  color: var(--accent-color);
  font-weight: 700;
}

.nav-num {
  font-size: 0.7rem;
  opacity: 0.6;
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.nav-title {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* Utility Containers: Full Width Grid Rows */
.nav-print, .nav-back {
  grid-column: span 4;
  padding: 0;
  overflow: hidden;
}

/* Unified Interactive Button Architectures */
.nav-print button, .nav-back button {
  width: 100%;
  height: 100%;
  border: none;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.85rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

/* Print Specific Colors */
.nav-print button {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(37, 99, 235, 0.02) 100%);
  color: var(--accent-color);
}

.nav-print:hover button {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.12) 0%, rgba(37, 99, 235, 0.04) 100%);
}

/* Back Button Specific Colors */
.nav-back button {
  background: linear-gradient(135deg, rgba(156, 163, 175, 0.08) 0%, rgba(156, 163, 175, 0.02) 100%);
  color: var(--text-secondary);
}

.nav-back:hover button {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(37, 99, 235, 0.02) 100%);
  color: var(--accent-color);
}

/* ==========================================================================
   8. MINI CONTACT BAR
   ========================================================================== */
.contact-mini {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 0.75rem 1.25rem;
  gap: 12px;
}

.contact-mini a, .contact-mini span {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.contact-mini a:hover {
  color: var(--accent-color);
}

/* ==========================================================================
   9. STRUCTURAL FOOTER UTILITY
   ========================================================================== */
footer {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  line-height: 1.5;
}

/* ==========================================================================
   10. LIGHT/DARK THEME SWITCH FAB UI MODULE
   ========================================================================== */
.theme-toggle-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  z-index: 1000;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
  transform: scale(1.1) rotate(15deg);
  background: var(--text-primary);
  color: var(--bg-primary);
}

/* ==========================================================================
   11. MOBILE RESPONSIVE MEDIA PIPELINES
   ========================================================================== */
@media (max-width: 850px) {
  .nav-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .nav-print, .nav-back {
    grid-column: span 3;
  }
}

@media (max-width: 600px) {
  body {
    padding: 1.5rem 1rem;
  }
  
  .content-card {
    padding: 1.75rem;
    border-radius: 24px;
  }
  
  .content-card h1 {
    font-size: 1.6rem;
  }
  
  .nav-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  
  .nav-print, .nav-back {
    grid-column: span 2;
  }
  
  .contact-mini {
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem 1.25rem;
    gap: 8px;
  }
}

/* ==========================================================================
   12. HIGH-FIDELITY PRINT ARCHITECTURE
   ========================================================================== */
@media print {
  #video-container, .theme-toggle-btn, .nav-grid {
    display: none !important;
  }
  
  body {
    background: #fff !important;
    color: #000 !important;
    padding: 0;
  }
  
  .container {
    max-width: 100% !important;
  }
  
  .content-card {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  
  .contact-mini {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    flex-direction: row !important;
    justify-content: flex-start !important;
    gap: 24px !important;
  }
  
  footer {
    color: #555 !important;
    margin-top: 3rem;
  }
}