/* ============================================================================
   BRAND HEADER STYLES - Plus Jakarta Sans Typography
   Modern Navigation System with Accessibility & Responsiveness
   ============================================================================ */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@600;700;800&family=Inter:wght@600;700&display=swap');

/* CSS Variables - Brand Colors & Theme Tokens */
:root {
    /* Brand Gradients */
    --brand-gradient-start: #ffffff;
    --brand-gradient-mid: #60a5fa;
    --brand-gradient-end: #3b82f6;
    --brand-glow-color: rgba(59, 130, 246, 0.4);
    
    /* Core Colors */
    --brand-bg: #0a0a0a;
    --brand-bg-secondary: #111111;
    --brand-bg-tertiary: #1a1a1a;
    --brand-accent: #3b82f6;
    --brand-accent-light: #93c5fd;
    --brand-muted: #9ca3af;
    --brand-shadow: rgba(59, 130, 246, 0.25);
    
    /* Text Colors */
    --text-primary: #e5e5e5;
    --text-secondary: #a3a3a3;
    --text-muted: #737373;
    
    /* Border & UI */
    --border-color: rgba(255, 255, 255, 0.1);
    --border-color-hover: rgba(59, 130, 246, 0.3);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px var(--brand-glow-color);
}

/* Light Theme Variant - Support both .light-mode and .light-theme */
.light-mode,
.light-theme {
    --brand-gradient-start: #1e293b;
    --brand-gradient-mid: #3b82f6;
    --brand-gradient-end: #1e40af;
    --brand-glow-color: rgba(59, 130, 246, 0.2);
    --brand-shadow: rgba(59, 130, 246, 0.15);
    --brand-bg: #ffffff;
    --brand-bg-secondary: #f9fafb;
    --brand-bg-tertiary: #f3f4f6;
    --text-primary: #1f2937;
    --text-secondary: #4b5563;
    --text-muted: #9ca3af;
    --border-color: rgba(0, 0, 0, 0.1);
    --border-color-hover: rgba(59, 130, 246, 0.4);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Apply light theme to body background */
body.light-mode,
body.light-theme {
    background: #ffffff;
    color: #1f2937;
}

html.light-mode,
html.light-theme {
    background: #ffffff;
}

/* ============================================================================
   HEADER / NAVBAR
   ============================================================================ */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1050;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    transition: box-shadow 0.3s ease, background 0.3s ease;
}

.light-mode .site-header,
.light-theme .site-header {
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.site-header.scrolled {
    box-shadow: var(--shadow-md);
    background: rgba(10, 10, 10, 0.95);
}

.light-mode .site-header.scrolled,
.light-theme .site-header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header-nav {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

.header-container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .header-container {
        padding: 0.5rem 1rem;
        gap: 0.5rem;
    }
}

/* ============================================================================
   BRAND SECTION (Left)
   ============================================================================ */

.header-brand {
    flex-shrink: 0;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    text-decoration: none;
    padding: 0.375rem 0.75rem;
    border-radius: 0.75rem;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.brand-link:hover {
    transform: translateY(-2px);
    filter: drop-shadow(var(--shadow-glow));
}

.brand-link:focus-visible {
    outline: 2px solid var(--brand-accent);
    outline-offset: 4px;
}

.brand-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 0.5rem;
    transition: transform 0.3s ease;
}

.brand-link:hover .brand-logo {
    transform: translateY(-2px) scale(1.05);
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1;
}

.brand-title {
    font-family: 'Orbitron', 'Rajdhani', 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    background: linear-gradient(135deg, var(--brand-gradient-start) 0%, var(--brand-gradient-mid) 50%, var(--brand-gradient-end) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 8px var(--brand-shadow));
    transition: filter 0.3s ease;
}

.brand-subtitle {
    font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 600;
    font-size: 0.688rem;
    letter-spacing: 0.075em;
    text-transform: uppercase;
    color: var(--brand-accent-light);
    opacity: 0.85;
    transition: opacity 0.3s ease, color 0.3s ease;
}

.brand-link:hover .brand-title {
    filter: drop-shadow(0 4px 12px var(--brand-glow-color));
}

.brand-link:hover .brand-subtitle {
    opacity: 1;
    color: var(--brand-accent);
}

/* ============================================================================
   DESKTOP NAVIGATION (Center/Right)
   ============================================================================ */

.nav-list {
    display: flex;
    flex-direction: row;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.25rem;
    align-items: center;
    flex-shrink: 1;
    min-width: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    flex-direction: row; /* Ensure icon and text are side-by-side */
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    border-radius: 0.5rem;
    text-decoration: none;
    color: var(--text-secondary);
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    position: relative;
}

/* Responsive nav links */
@media (max-width: 768px) {
    .nav-list {
        display: none !important; /* Hide desktop nav on mobile */
    }
    
    .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.813rem;
    }
    
    .nav-link span {
        display: none; /* Hide text on very small screens, show only icons */
    }
    
    .nav-link i {
        font-size: 1.1rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .nav-link {
        padding: 0.5rem 0.875rem;
        font-size: 0.813rem;
        gap: 0.375rem;
    }
}

.nav-link i {
    font-size: 1rem;
    transition: transform 0.2s ease;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(59, 130, 246, 0.1);
}

.nav-link:hover i {
    transform: translateY(-1px);
}

.nav-link:focus-visible {
    outline: 2px solid var(--brand-accent);
    outline-offset: 2px;
}

/* Active Link Indicator - Gradient Pill Underline */
.nav-link.active {
    color: var(--text-primary);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 3px;
    background: linear-gradient(90deg, var(--brand-accent) 0%, var(--brand-accent-light) 100%);
    border-radius: 2px;
    box-shadow: 0 2px 8px var(--brand-shadow);
}

/* ============================================================================
   HEADER ACTIONS (Right)
   ============================================================================ */

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* CTA Button with Gradient */
.btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    text-decoration: none;
    color: #ffffff;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 700;
    font-size: 0.875rem;
    background: linear-gradient(135deg, #3b82f6 0%, #93c5fd 100%);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
    color: #ffffff;
}

.btn-cta:focus-visible {
    outline: 2px solid var(--brand-accent-light);
    outline-offset: 3px;
}

.btn-cta:active {
    transform: translateY(0);
}

/* Show CTA on all screens, adjust size on mobile */
@media (max-width: 768px) {
    .btn-cta span {
        display: none; /* Show only icon on very small screens */
    }
    
    .btn-cta {
        padding: 0;
        width: 2.5rem;
        height: 2.5rem;
        border-radius: 0.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Icon Buttons (Theme Toggle, etc.) */
.btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    background: var(--brand-bg-tertiary);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background: var(--brand-bg-secondary);
    border-color: var(--border-color-hover);
    color: var(--text-primary);
}

.btn-icon:focus-visible {
    outline: 2px solid var(--brand-accent);
    outline-offset: 2px;
}

/* User Avatar */
.user-avatar {
    display: none;
}

@media (min-width: 1024px) {
    .user-avatar {
        display: block;
    }
}

.avatar-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-accent) 0%, var(--brand-accent-light) 100%);
    color: #ffffff;
    text-decoration: none;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    font-size: 1.125rem;
}

.avatar-link:hover {
    border-color: var(--brand-accent-light);
    transform: scale(1.05);
    box-shadow: var(--shadow-glow);
}

.avatar-link:focus-visible {
    outline: 2px solid var(--brand-accent-light);
    outline-offset: 3px;
}

/* ============================================================================
   SCREEN READER ONLY UTILITY
   ============================================================================ */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Navbar Brand Container */
.navbar-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    transition: transform 0.3s ease, filter 0.3s ease;
    padding: 6px 12px;
    border-radius: 12px;
}

.navbar-brand:hover {
    transform: translateY(-2px);
    filter: drop-shadow(0 4px 12px var(--brand-glow-color));
}

.navbar-brand:focus-visible {
    outline: 2px solid var(--brand-accent);
    outline-offset: 4px;
}

/* Logo Image */
.navbar-brand img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.navbar-brand:hover img {
    transform: rotate(5deg) scale(1.05);
}

/* Brand Text Container */
.navbar-brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1;
}

/* Main Brand Name */
.brand-name-main {
    font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 800;
    font-size: 20px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    background: linear-gradient(135deg, var(--brand-gradient-start) 0%, var(--brand-gradient-mid) 50%, var(--brand-gradient-end) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 8px var(--brand-shadow));
    transition: filter 0.3s ease;
}

/* Subtitle */
.brand-name-sub {
    font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--brand-accent-light);
    opacity: 0.85;
    transition: opacity 0.3s ease, color 0.3s ease;
}

.navbar-brand:hover .brand-name-main {
    filter: drop-shadow(0 4px 12px var(--brand-glow-color));
}

.navbar-brand:hover .brand-name-sub {
    opacity: 1;
    color: var(--brand-accent);
}


/* ============================================================================
   ACCESSIBILITY & RESPONSIVE ENHANCEMENTS
   ============================================================================ */

/* Accessibility: Fallback for browsers without gradient support */
@supports not (background-clip: text) {
    .brand-title {
        color: #ffffff;
        -webkit-text-fill-color: #ffffff;
    }
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .brand-link:hover,
    .brand-logo,
    .nav-link:hover i,
    .btn-cta:hover {
        transform: none;
    }
}

/* Accessibility: Focus Visible (enhance for all interactive elements) */
*:focus-visible {
    outline: 2px solid var(--brand-accent);
    outline-offset: 2px;
}

/* ============================================================================
   RESPONSIVE DESIGN - MOBILE & TABLET
   ============================================================================ */

@media (max-width: 1023px) {
    .header-container {
        padding: 0.625rem 1rem;
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .brand-title {
        font-size: 1.125rem;
        letter-spacing: 0.075em;
    }
    
    .brand-subtitle {
        font-size: 0.625rem;
        letter-spacing: 0.05em;
    }
    
    .brand-logo {
        width: 36px;
        height: 36px;
    }
    
    .brand-link {
        gap: 0.625rem;
        padding: 0.25rem 0.5rem;
    }
    
    .header-container {
        padding: 0.5rem 1rem;
    }
}

@media (max-width: 480px) {
    .brand-title {
        font-size: 1rem;
        letter-spacing: 0.05em;
    }
    
    .brand-subtitle {
        font-size: 0.563rem;
    }
    
    .brand-logo {
        width: 32px;
        height: 32px;
    }
    
    .mobile-drawer-content {
        width: 100%;
        max-width: 100%;
    }
}

/* ============================================================================
   HIGH CONTRAST MODE SUPPORT
   ============================================================================ */

@media (prefers-contrast: high) {
    .brand-title {
        background: none;
        -webkit-text-fill-color: #ffffff;
        color: #ffffff;
        text-shadow: 0 0 2px #000000;
    }
    
    .brand-subtitle {
        color: #ffffff;
        opacity: 1;
    }
    
    .nav-link,
    .mobile-nav-link {
        border: 1px solid currentColor;
    }
    
    .btn-cta {
        border: 2px solid #ffffff;
    }
}

/* ============================================================================
   PRINT STYLES
   ============================================================================ */

@media print {
    .site-header {
        position: static;
        background: none;
        border-bottom: 1px solid #000000;
    }
    
    .brand-link {
        filter: none;
        transform: none;
    }
    
    .brand-title {
        background: none;
        -webkit-text-fill-color: #000000;
        color: #000000;
    }
    
    .brand-subtitle {
        color: #000000;
    }
    
    .nav-toggle,
    .btn-cta,
    .btn-icon,
    .user-avatar,
    .mobile-drawer {
        display: none !important;
    }
    
    .nav-list {
        display: flex !important;
    }
}


