/* ============================================================================
   DESKTOP NAVBAR V2 - ULTRA PROFESSIONAL ENGINEERING THEME
   Red, Black, White - Maximum Visibility & Modern Design
   Created: January 16, 2026
   ============================================================================ */

/* ============================================================================
   NAVBAR CONTAINER - GLASS MORPHISM EFFECT
   ============================================================================ */
.desktop-navbar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 10000 !important;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border-bottom: 2px solid transparent;
    border-image: linear-gradient(90deg, transparent, #CC0000 30%, #FF0000 50%, #CC0000 70%, transparent) 1;
    box-shadow: 
        0 4px 30px rgba(0, 0, 0, 0.8),
        0 0 60px rgba(204, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: navbarSlideDown 0.6s ease-out;
}

@keyframes navbarSlideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.desktop-navbar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(204, 0, 0, 0.03) 25%,
        rgba(204, 0, 0, 0.05) 50%,
        rgba(204, 0, 0, 0.03) 75%,
        transparent 100%
    );
    animation: shimmerEffect 8s infinite linear;
    pointer-events: none;
    opacity: 0.5;
}

@keyframes shimmerEffect {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Scrolled State */
.desktop-navbar.scrolled {
    background: rgba(0, 0, 0, 0.97);
    box-shadow: 
        0 8px 40px rgba(0, 0, 0, 0.9),
        0 0 80px rgba(204, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* ============================================================================
   INNER CONTAINER
   ============================================================================ */
.desktop-nav-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 clamp(14px, 3vw, 50px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(10px, 1.6vw, 22px);
    min-height: 72px;
    height: clamp(72px, 7.8vw, 95px);
    position: relative;
}

/* ============================================================================
   LOGO SECTION - ENHANCED VISIBILITY
   ============================================================================ */
.desktop-nav-logo {
    display: flex;
    align-items: center;
    gap: clamp(5px, 0.8vw, 10px);
    text-decoration: none;
    position: relative;
    z-index: 10;
    flex-shrink: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.desktop-nav-logo::before {
    content: '';
    position: absolute;
    inset: -8px;
    background: radial-gradient(circle at center, rgba(204, 0, 0, 0.15), transparent 70%);
    border-radius: 20px;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.desktop-nav-logo:hover::before {
    opacity: 1;
}

.desktop-nav-logo:hover {
    transform: translateY(-3px) scale(1.02);
}

.desktop-nav-logo::after {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 50px;
    height: 50px;
    transform: translateY(-50%);
    border-radius: 14px;
    pointer-events: none;
    border: 1.5px solid rgba(204, 0, 0, 0.82);
    background: linear-gradient(145deg, rgba(255, 70, 70, 0.08), rgba(60, 0, 0, 0.16));
    box-shadow:
        inset 1px 1px 0 rgba(255, 220, 220, 0.35),
        inset -2px -2px 0 rgba(65, 0, 0, 0.75),
        0 0 0 1px rgba(130, 0, 0, 0.75),
        0 8px 16px rgba(0, 0, 0, 0.52),
        0 0 22px rgba(204, 0, 0, 0.30);
    z-index: 0;
    transition: all 0.3s ease;
}

.desktop-nav-logo:hover::after {
    transform: translateY(-50%) scale(1.08);
    border-color: rgba(255, 85, 85, 0.95);
    box-shadow:
        inset 1px 1px 0 rgba(255, 235, 235, 0.45),
        inset -2px -2px 0 rgba(80, 0, 0, 0.85),
        0 0 0 1px rgba(160, 0, 0, 0.88),
        0 12px 22px rgba(0, 0, 0, 0.62),
        0 0 30px rgba(204, 0, 0, 0.42);
}

/* Logo Image - Enhanced Bold & Prominent with Depth */
.desktop-nav-logo-img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    object-position: center;
    border-radius: 14px;
    clip-path: inset(0 round 14px);
    border: 0;
    box-shadow: none;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
    filter: 
        drop-shadow(0 4px 12px rgba(0, 0, 0, 0.7))
        drop-shadow(0 0 20px rgba(0, 0, 0, 0.5))
        brightness(1.04)
        contrast(1.12);
    animation: logoFloat 3s ease-in-out infinite alternate;
}

@keyframes logoFloat {
    0% {
        filter: 
            drop-shadow(0 4px 12px rgba(0, 0, 0, 0.7))
            drop-shadow(0 0 20px rgba(0, 0, 0, 0.5))
            brightness(1.04)
            contrast(1.12);
        transform: translateY(0px);
    }
    100% {
        filter: 
            drop-shadow(0 8px 18px rgba(0, 0, 0, 0.85))
            drop-shadow(0 0 28px rgba(0, 0, 0, 0.65))
            brightness(1.06)
            contrast(1.14);
        transform: translateY(-2px);
    }
}

.desktop-nav-logo:hover .desktop-nav-logo-img {
    transform: scale(1.12) translateY(-3px);
    filter: 
        drop-shadow(0 8px 18px rgba(0, 0, 0, 0.85))
        drop-shadow(0 0 28px rgba(0, 0, 0, 0.65))
        brightness(1.06)
        contrast(1.14);
    animation: none;
}

/* Brand Text - MAXIMUM VISIBILITY */
.desktop-nav-brand {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.desktop-nav-brand-name {
    font-size: clamp(1.02rem, 1.15vw, 1.4rem);
    font-weight: 900;
    letter-spacing: 0.8px;
    color: #FFFFFF;
    text-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.9),
        0 0 20px rgba(204, 0, 0, 0.5),
        1px 1px 0 rgba(204, 0, 0, 0.3);
    line-height: 1.2;
    background: linear-gradient(135deg, #FFFFFF 0%, #F0F0F0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.desktop-nav-brand-name::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    z-index: -1;
    background: linear-gradient(135deg, #FF0000, #CC0000);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: blur(10px);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.desktop-nav-logo:hover .desktop-nav-brand-name::after {
    opacity: 0.6;
}

/* Tagline - ENHANCED VISIBILITY */
.desktop-nav-brand-tagline {
    font-size: clamp(0.64rem, 0.62vw, 0.75rem);
    color: #FF0000;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    line-height: 1.2;
    text-shadow: 
        0 2px 6px rgba(0, 0, 0, 1),
        0 0 15px rgba(204, 0, 0, 0.8),
        0 1px 0 rgba(0, 0, 0, 0.5);
    padding: 4px 8px;
    background: rgba(204, 0, 0, 0.1);
    border-radius: 6px;
    border: 1px solid rgba(204, 0, 0, 0.3);
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.desktop-nav-brand-tagline::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.desktop-nav-logo:hover .desktop-nav-brand-tagline::before {
    left: 100%;
}

/* ============================================================================
   NAVIGATION MENU - PROFESSIONAL BUTTONS
   ============================================================================ */
.desktop-nav-menu {
    display: flex;
    align-items: center;
    gap: clamp(3px, 0.7vw, 8px);
    list-style: none;
    margin: 0;
    padding: 0;
    min-width: 0;
    flex-wrap: nowrap;
}

.desktop-nav-item {
    position: relative;
}

/* Nav Links - Modern Button Style */
.desktop-nav-link {
    display: flex;
    align-items: center;
    gap: clamp(6px, 0.8vw, 10px);
    padding: clamp(9px, 1vw, 13px) clamp(11px, 1.5vw, 24px);
    text-decoration: none;
    color: #FFFFFF;
    font-size: clamp(0.79rem, 0.78vw, 0.95rem);
    font-weight: 700;
    letter-spacing: 0.5px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

/* Animated Background Gradient */
.desktop-nav-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, 
        rgba(204, 0, 0, 0) 0%,
        rgba(204, 0, 0, 0.1) 50%,
        rgba(204, 0, 0, 0) 100%
    );
    transform: translateX(-100%) skewX(-15deg);
    transition: transform 0.6s ease;
    z-index: 0;
}

.desktop-nav-link:hover::before {
    transform: translateX(100%) skewX(-15deg);
}

.desktop-nav-link > * {
    position: relative;
    z-index: 1;
}

.desktop-nav-link i {
    font-size: clamp(0.95rem, 0.96vw, 1.1rem);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    color: #CC0000;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8));
}

.desktop-nav-link:hover {
    color: #FFFFFF;
    background: linear-gradient(135deg, rgba(204, 0, 0, 0.25), rgba(153, 0, 0, 0.2));
    border-color: rgba(204, 0, 0, 0.5);
    transform: translateY(-3px);
    box-shadow: 
        0 8px 25px rgba(204, 0, 0, 0.4),
        0 0 30px rgba(204, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.desktop-nav-link:hover i {
    transform: scale(1.2) rotate(5deg);
    color: #FF0000;
    filter: drop-shadow(0 0 10px rgba(255, 0, 0, 0.6));
}

/* Optional command/search trigger used on pages like Home */
.desktop-navbar .cmd-trigger-btn {
    display: inline-flex;
    align-items: center;
    gap: clamp(6px, 0.7vw, 8px);
    min-width: 0;
    white-space: nowrap;
    padding: clamp(8px, 0.9vw, 10px) clamp(9px, 1vw, 12px);
    border-radius: 10px;
    font-size: clamp(0.68rem, 0.68vw, 0.78rem);
}

.desktop-navbar .cmd-trigger-btn kbd {
    display: inline-flex;
    align-items: center;
}

/* Active State */
.desktop-nav-link.active {
    color: #FFFFFF;
    background: linear-gradient(135deg, rgba(204, 0, 0, 0.9), rgba(153, 0, 0, 0.9));
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 6px 30px rgba(204, 0, 0, 0.6),
        inset 0 2px 0 rgba(255, 255, 255, 0.2),
        0 0 40px rgba(204, 0, 0, 0.4);
    position: relative;
}

.desktop-nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 15%;
    right: 15%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #FFFFFF, transparent);
    border-radius: 2px;
    animation: activeGlow 2s ease-in-out infinite;
}

@keyframes activeGlow {
    0%, 100% {
        opacity: 0.6;
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    }
    50% {
        opacity: 1;
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
    }
}

.desktop-nav-link.active i {
    color: #FFFFFF;
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15);
    }
}

/* ============================================================================
   CV BUTTON - SPECIAL CTA (Call-to-Action)
   ============================================================================ */
.desktop-nav-cv-btn {
    background: linear-gradient(135deg, #CC0000, #990000) !important;
    border: 2px solid #FF0000 !important;
    color: #FFFFFF !important;
    font-weight: 800;
    padding: clamp(9px, 1vw, 13px) clamp(11px, 1.8vw, 30px) !important;
    margin-left: clamp(2px, 0.9vw, 16px);
    box-shadow: 
        0 6px 25px rgba(204, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 0 40px rgba(204, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.desktop-nav-cv-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: translateX(-100%) skewX(-25deg);
    transition: transform 0.8s ease;
}

.desktop-nav-cv-btn:hover::before {
    transform: translateX(100%) skewX(-25deg);
}

.desktop-nav-cv-btn:hover {
    background: linear-gradient(135deg, #FF0000, #CC0000) !important;
    border-color: #FFFFFF !important;
    transform: translateY(-4px) scale(1.05);
    box-shadow: 
        0 10px 40px rgba(204, 0, 0, 0.7),
        inset 0 2px 0 rgba(255, 255, 255, 0.3),
        0 0 60px rgba(204, 0, 0, 0.5);
}

.desktop-nav-cv-btn i {
    color: #FFFFFF !important;
    animation: downloadBounce 2s ease-in-out infinite;
}

@keyframes downloadBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-4px);
    }
}

/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */
@media (max-width: 1400px) {
    .desktop-nav-brand-tagline {
        letter-spacing: 1.2px;
    }
}

@media (max-width: 1200px) {
    .desktop-nav-logo::after {
        width: 46px;
        height: 46px;
    }

    .desktop-nav-logo-img {
        width: 46px;
        height: 46px;
    }

    .desktop-nav-link {
        padding: 10px 14px;
        font-size: 0.83rem;
    }

    .desktop-nav-brand-tagline {
        font-size: 0.67rem;
        letter-spacing: 1px;
        padding: 3px 6px;
    }

    .desktop-nav-cv-btn {
        margin-left: 4px;
    }

    .desktop-navbar .cmd-trigger-btn kbd {
        display: none;
    }
}

@media (max-width: 1100px) {
    .desktop-nav-container {
        min-height: 70px;
        height: 75px;
    }

    .desktop-nav-link span {
        max-width: 72px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .desktop-nav-link {
        gap: 6px;
        padding: 9px 12px;
        font-size: 0.8rem;
    }

    .desktop-nav-cv-btn {
        padding: 9px 12px !important;
    }

    .desktop-nav-logo::after {
        width: 42px;
        height: 42px;
    }

    .desktop-nav-logo-img {
        width: 42px;
        height: 42px;
    }

    /* Hide tagline on smaller screens */
    .desktop-nav-brand-tagline {
        display: none;
    }
}

@media (max-width: 980px) {
    .desktop-nav-link span {
        display: none;
    }

    .desktop-nav-link {
        justify-content: center;
        min-width: 40px;
        padding: 10px;
    }

    .desktop-nav-cv-btn span {
        display: none !important;
    }

    .desktop-nav-cv-btn {
        margin-left: 0;
    }

    .desktop-navbar .cmd-trigger-btn span {
        display: none;
    }

    .desktop-navbar .cmd-trigger-btn {
        justify-content: center;
        min-width: 40px;
        padding: 10px;
    }
}

@media (max-width: 860px) {
    .desktop-nav-brand {
        display: none;
    }
}

@media (max-width: 768px) {
    .desktop-navbar {
        display: none !important;
    }
}

/* ============================================================================
   ACCESSIBILITY & FOCUS STATES
   ============================================================================ */
.desktop-nav-link:focus-visible {
    outline: 3px solid rgba(204, 0, 0, 0.8);
    outline-offset: 4px;
}

.desktop-nav-link:focus {
    outline: none;
}

/* ============================================================================
   SMOOTH SCROLLING
   ============================================================================ */
html {
    scroll-behavior: smooth;
}

/* ============================================================================
   PREVENT COLOR BLEEDING
   ============================================================================ */
.desktop-navbar * {
    box-sizing: border-box;
}

.desktop-navbar a {
    -webkit-tap-highlight-color: transparent;
}

/* ============================================================================
   ENGINEERING GRID OVERLAY (OPTIONAL)
   ============================================================================ */
.desktop-navbar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background-image: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 10px,
        rgba(204, 0, 0, 0.2) 10px,
        rgba(204, 0, 0, 0.2) 11px
    );
    pointer-events: none;
}

/* ============================================================================
   PERFORMANCE OPTIMIZATIONS
   ============================================================================ */
.desktop-navbar,
.desktop-nav-link,
.desktop-nav-logo-img {
    will-change: transform;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* ============================================================================
   ZOOM RESILIENCE BASELINE (DESKTOP-PAGE COVERAGE)
   Many desktop pages include this file even when they do not include
   Optimization/styles.css.
   ============================================================================ */
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    overflow-x: clip;
}

img,
video,
canvas,
svg,
iframe {
    max-width: 100%;
}

pre,
code,
.code-block,
table {
    max-width: 100%;
    overflow-x: auto;
}
