/**
 * TechOps Pro - Premium Header & Footer Styles
 * Advanced Top Bar, Navigation, and Footer Design
 * 
 * @package TechOps_Pro
 * @version 2.0.0
 */

/* ===================================
   TOP BAR - PREMIUM DESIGN
   =================================== */
.top-bar {
    background: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 50%, #16213e 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.top-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(0, 212, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.top-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 45px;
    position: relative;
    z-index: 1;
}

/* Top Bar Social */
.top-bar-social {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.top-bar-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
}

.top-bar-social a:hover {
    background: var(--gradient-primary);
    border-color: transparent;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.top-bar-social a svg {
    width: 14px;
    height: 14px;
}

/* Top Bar Welcome Message */
.top-bar-message {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
}

.welcome-text {
    animation: wave 2s ease-in-out infinite;
}

@keyframes wave {

    0%,
    100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(20deg);
    }

    75% {
        transform: rotate(-10deg);
    }
}

.typing-welcome {
    font-family: var(--font-mono);
    color: var(--neon-cyan);
}

/* Top Bar Actions */
.top-bar-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* ===================================
   LANGUAGE SWITCHER - SIDE BY SIDE FLAGS
   =================================== */
.language-flags {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.flag-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 28px;
    font-size: 1.2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.6;
}

.flag-btn:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.flag-btn.active {
    opacity: 1;
    background: rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.6);
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.3);
}

/* ===================================
   THEME TOGGLE - ADVANCED
   =================================== */
.theme-toggle-advanced {
    position: relative;
    width: 52px;
    height: 28px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.toggle-track {
    position: relative;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.toggle-track:hover {
    border-color: rgba(102, 126, 234, 0.5);
}

.toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: var(--gradient-primary);
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.4);
}

[data-theme="dark"] .toggle-thumb {
    transform: translateX(24px);
    background: var(--gradient-accent);
}

.toggle-track .sun-icon,
.toggle-track .moon-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    transition: all 0.3s ease;
}

.toggle-track .sun-icon {
    left: 8px;
    color: #fbbf24;
    opacity: 1;
}

.toggle-track .moon-icon {
    right: 8px;
    color: #94a3b8;
    opacity: 0.5;
}

[data-theme="dark"] .toggle-track .sun-icon {
    opacity: 0.5;
}

[data-theme="dark"] .toggle-track .moon-icon {
    opacity: 1;
    color: #00d4ff;
}

/* ===================================
   ENHANCED HEADER
   =================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .site-header {
    background: rgba(13, 17, 23, 0.95) !important;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.header-gradient-line {
    height: 3px;
    background: var(--gradient-primary);
    position: relative;
    overflow: hidden;
}

.header-gradient-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    100% {
        left: 100%;
    }
}

/* Site Logo Advanced */
.site-logo-advanced {
    margin-right: 1rem;
}

.logo-icon {
    position: relative;
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
}

.logo-icon:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.6);
}

.logo-letter {
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    font-family: var(--font-heading);
}

.logo-glow {
    position: absolute;
    inset: -4px;
    background: var(--gradient-primary);
    border-radius: 18px;
    z-index: -1;
    opacity: 0;
    filter: blur(15px);
    transition: opacity 0.3s ease;
}

.logo-icon:hover .logo-glow {
    opacity: 0.6;
}

/* Site Identity */
.site-identity {
    display: flex;
    flex-direction: column;
}

.site-title {
    font-size: 1.4rem !important;
    margin: 0 !important;
    line-height: 1.2;
}

.site-title a {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    text-decoration: none !important;
}

.name-first {
    color: var(--color-text);
    font-weight: 700;
    transition: color 0.3s ease;
}

.name-last {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

.site-title a:hover .name-first {
    color: var(--color-primary);
}

.site-tagline {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0.2rem 0 0 0 !important;
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.tagline-icon {
    font-size: 0.9rem;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.hamburger {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 100%;
    height: 100%;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ===================================
   PREMIUM FOOTER
   =================================== */
.site-footer {
    position: relative;
    background: linear-gradient(180deg, #0f0f1a 0%, #1a1a2e 100%) !important;
    color: rgba(255, 255, 255, 0.9);
    padding: 0 !important;
    border: none !important;
    overflow: hidden;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 10% 80%, rgba(102, 126, 234, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 90% 20%, rgba(0, 212, 255, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

/* Footer Wave */
.footer-wave {
    position: relative;
    height: 60px;
    color: var(--color-bg);
    margin-bottom: -1px;
}

.footer-wave svg {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

[data-theme="dark"] .footer-wave {
    color: var(--color-bg);
}

/* Footer Main */
.footer-main {
    position: relative;
    padding: 4rem 0 3rem;
    z-index: 1;
}

/* Footer Grid */
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 3rem;
}

/* Footer About */
.footer-about {
    padding-right: 2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.logo-icon-footer {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
}

.footer-brand {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
}

.brand-title {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

.footer-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

/* Footer Social */
.footer-social {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.social-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-btn svg {
    width: 16px;
    height: 16px;
}

.social-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.social-btn.github:hover {
    background: #333;
    border-color: #333;
    color: white;
}

.social-btn.linkedin:hover {
    background: #0077b5;
    border-color: #0077b5;
    color: white;
}

.social-btn.youtube:hover {
    background: #ff0000;
    border-color: #ff0000;
    color: white;
}

/* Footer Sections */
.footer-section {
    position: relative;
}

.footer-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1.25rem;
}

.title-icon {
    font-size: 1rem;
}

/* Footer Links */
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.footer-links a:hover {
    color: var(--neon-cyan);
    transform: translateX(5px);
}

.footer-links .count {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
}

/* Footer Contact */
.footer-contact {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
}

.footer-contact li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.footer-contact li svg {
    color: var(--neon-cyan);
}

.footer-contact a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-contact a:hover {
    color: var(--neon-cyan);
}

/* Tech Stack */
.tech-stack {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tech-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.tech-icons {
    display: flex;
    gap: 0.5rem;
}

.tech-badge {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 1.2rem;
    cursor: default;
    transition: all 0.2s ease;
}

.tech-badge:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

/* Footer Bottom */
.footer-bottom {
    position: relative;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.25rem 0;
    z-index: 1;
}

.footer-bottom-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Copyright */
.copyright {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

.copyright-icon {
    color: var(--neon-cyan);
}

.copyright-name {
    color: white;
    font-weight: 600;
}

.copyright-divider {
    color: rgba(255, 255, 255, 0.3);
}

/* Back to Top */
.back-to-top {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: var(--gradient-primary);
    border: none;
    border-radius: 50px;
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

.back-to-top svg {
    transition: transform 0.3s ease;
}

.back-to-top:hover svg {
    transform: translateY(-2px);
}

/* Made With Love */
.made-with {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

.heart {
    animation: heartbeat 1.5s infinite;
}

@keyframes heartbeat {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }
}

/* ===================================
   RESPONSIVE - HEADER & FOOTER
   =================================== */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer-about {
        grid-column: 1 / -1;
        padding-right: 0;
    }
}

@media (max-width: 768px) {
    .top-bar-message {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .main-navigation {
        display: none;
    }

    .main-navigation.is-open {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--color-bg);
        border-bottom: 1px solid var(--color-border);
        padding: 1rem;
    }

    .main-navigation.is-open .nav-menu {
        flex-direction: column;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-bottom-inner {
        flex-direction: column;
        text-align: center;
    }

    .copyright {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .top-bar-social a {
        width: 28px;
        height: 28px;
    }

    .top-bar-social a svg {
        width: 12px;
        height: 12px;
    }

    .footer-social {
        flex-direction: column;
    }

    .social-btn {
        justify-content: center;
    }
}

/* ===================================
   TECH TAGS - COLOR CODED
   =================================== */
.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.tech-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    background: rgba(102, 126, 234, 0.15);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 20px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.tech-tag:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Cloud Services - Orange */
.tech-tag.cloud {
    background: rgba(255, 153, 0, 0.2);
    border-color: rgba(255, 153, 0, 0.5);
    color: #ffb347;
}

.tech-tag.cloud:hover {
    background: rgba(255, 153, 0, 0.35);
}

/* Container Tech - Blue */
.tech-tag.container {
    background: rgba(0, 149, 255, 0.2);
    border-color: rgba(0, 149, 255, 0.5);
    color: #5bc0de;
}

.tech-tag.container:hover {
    background: rgba(0, 149, 255, 0.35);
}

/* Infrastructure as Code - Purple */
.tech-tag.iac {
    background: rgba(156, 89, 182, 0.2);
    border-color: rgba(156, 89, 182, 0.5);
    color: #c39bd3;
}

.tech-tag.iac:hover {
    background: rgba(156, 89, 182, 0.35);
}

/* Operating Systems - Green */
.tech-tag.os {
    background: rgba(39, 174, 96, 0.2);
    border-color: rgba(39, 174, 96, 0.5);
    color: #58d68d;
}

.tech-tag.os:hover {
    background: rgba(39, 174, 96, 0.35);
}

/* DevOps Tools - Cyan */
.tech-tag.devops {
    background: rgba(0, 212, 255, 0.2);
    border-color: rgba(0, 212, 255, 0.5);
    color: #00d4ff;
}

.tech-tag.devops:hover {
    background: rgba(0, 212, 255, 0.35);
}

/* Web Servers - Pink */
.tech-tag.web {
    background: rgba(255, 105, 180, 0.2);
    border-color: rgba(255, 105, 180, 0.5);
    color: #ff69b4;
}

.tech-tag.web:hover {
    background: rgba(255, 105, 180, 0.35);
}

/* Database - Yellow */
.tech-tag.db {
    background: rgba(241, 196, 15, 0.2);
    border-color: rgba(241, 196, 15, 0.5);
    color: #f7dc6f;
}

.tech-tag.db:hover {
    background: rgba(241, 196, 15, 0.35);
}

/* Monitoring - Teal */
.tech-tag.monitoring {
    background: rgba(26, 188, 156, 0.2);
    border-color: rgba(26, 188, 156, 0.5);
    color: #48c9b0;
}

.tech-tag.monitoring:hover {
    background: rgba(26, 188, 156, 0.35);
}

/* Security - Red */
.tech-tag.security {
    background: rgba(231, 76, 60, 0.2);
    border-color: rgba(231, 76, 60, 0.5);
    color: #f1948a;
}

.tech-tag.security:hover {
    background: rgba(231, 76, 60, 0.35);
}

/* Footer Website Link */
.footer-website {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-website svg {
    color: var(--neon-cyan);
}

.footer-website a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.footer-website a:hover {
    color: var(--neon-cyan);
}

/* Update footer grid for 3 columns */
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.2fr;
    gap: 3rem;
}

@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer-about {
        grid-column: 1 / -1;
    }

    .tech-tags {
        max-width: 350px;
    }
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}