/* ============================================
   PROFESSIONAL TECH PORTFOLIO WITH FLASH
   Sophisticated, Clean, Modern with Cool Factor
   ============================================ */

/* CSS Variables for Professional Theme */
:root {
    /* Primary Colors - Professional Tech */
    --primary-blue: #0066FF;
    --primary-navy: #0A1929;
    --primary-slate: #1E293B;
    --accent-electric: #3B82F6;
    --accent-sky: #0EA5E9;
    --accent-violet: #8B5CF6;

    /* Background Colors */
    --bg-dark: #0F172A;
    --bg-darker: #020617;
    --bg-card: #1E293B;
    --bg-elevated: #334155;

    /* Text Colors */
    --text-primary: #F8FAFC;
    --text-secondary: #CBD5E1;
    --text-muted: #94A3B8;

    /* Subtle Effects */
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-medium: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-large: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-blue: 0 8px 32px rgba(59, 130, 246, 0.25);
    --shadow-glow: 0 0 40px rgba(59, 130, 246, 0.4);

    /* Spacing */
    --section-padding: 120px;
    --container-width: 1280px;
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Animated Gradient Mesh Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 20% 30%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(139, 92, 246, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(14, 165, 233, 0.08) 0%, transparent 50%);
    animation: meshMove 20s ease infinite;
    z-index: -2;
    pointer-events: none;
}

@keyframes meshMove {
    0%, 100% {
        background:
            radial-gradient(ellipse at 20% 30%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
            radial-gradient(ellipse at 80% 70%, rgba(139, 92, 246, 0.12) 0%, transparent 50%),
            radial-gradient(ellipse at 50% 50%, rgba(14, 165, 233, 0.08) 0%, transparent 50%);
    }
    33% {
        background:
            radial-gradient(ellipse at 70% 40%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
            radial-gradient(ellipse at 30% 80%, rgba(139, 92, 246, 0.12) 0%, transparent 50%),
            radial-gradient(ellipse at 60% 20%, rgba(14, 165, 233, 0.08) 0%, transparent 50%);
    }
    66% {
        background:
            radial-gradient(ellipse at 40% 70%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
            radial-gradient(ellipse at 60% 30%, rgba(139, 92, 246, 0.12) 0%, transparent 50%),
            radial-gradient(ellipse at 30% 60%, rgba(14, 165, 233, 0.08) 0%, transparent 50%);
    }
}

/* Matrix Rain Canvas - Professional Style */
#matrix-rain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.12;
    pointer-events: none;
}

/* Subtle Particle Background */
#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.3;
}

/* ============================================
   NAVIGATION
   ============================================ */
.navbar {
    background: rgba(15, 23, 42, 0.7) !important;
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(59, 130, 246, 0.1);
    padding: 1.5rem 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar.scrolled {
    background: rgba(15, 23, 42, 0.95) !important;
    padding: 1rem 0;
    box-shadow: var(--shadow-medium), 0 0 20px rgba(59, 130, 246, 0.1);
}

.navbar-brand {
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, #F8FAFC, #3B82F6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
    transition: all 0.3s ease;
}

.navbar-brand:hover {
    filter: brightness(1.2);
    transform: translateY(-1px);
}

.nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    margin: 0 1rem;
    position: relative;
    transition: color 0.3s ease;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-blue), var(--accent-violet));
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

.nav-link:hover {
    color: var(--text-primary) !important;
}

.nav-link:hover::after {
    width: 100%;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 120px 20px 80px;
}

/* Elegant floating gradient orb */
.hero-section::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 60%;
    height: 120%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.2) 0%, transparent 70%);
    filter: blur(60px);
    animation: floatOrb 20s ease-in-out infinite;
    pointer-events: none;
}

@keyframes floatOrb {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.2;
    }
    50% {
        transform: translate(-100px, 100px) scale(1.1);
        opacity: 0.3;
    }
}

/* Hero Content */
.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 1100px;
    padding: 0 20px;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 6.5rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #F8FAFC 0%, #3B82F6 50%, #8B5CF6 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
    letter-spacing: -3px;
    animation: gradientShift 8s ease infinite;
    filter: drop-shadow(0 0 30px rgba(59, 130, 246, 0.3));
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero-subtitle {
    font-size: clamp(1.3rem, 3vw, 2rem);
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.hero-tagline {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--accent-electric);
    margin-bottom: 3rem;
    font-weight: 500;
}

/* Professional CTA Buttons with Flash */
.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.btn-cyber {
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    border: 2px solid rgba(59, 130, 246, 0.3);
    background: var(--bg-card);
    color: var(--text-primary);
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn-cyber::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn-cyber:hover::before {
    left: 100%;
}

.btn-cyber:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-blue);
    border-color: var(--primary-blue);
    color: var(--text-primary);
}

.btn-cyber-primary {
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-electric), var(--accent-violet));
    background-size: 200% auto;
    border: none;
    color: white;
    animation: buttonGradient 3s ease infinite;
}

@keyframes buttonGradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.btn-cyber-primary:hover {
    box-shadow: var(--shadow-glow);
    transform: translateY(-3px) scale(1.02);
}

/* Social Links with Glow */
.social-links {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 3rem;
}

.social-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(59, 130, 246, 0.3);
    border-radius: 14px;
    color: var(--text-secondary);
    font-size: 1.3rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--bg-card);
    text-decoration: none;
    position: relative;
}

.social-icon::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-violet));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.social-icon:hover::before {
    opacity: 1;
}

.social-icon:hover {
    color: white;
    border-color: transparent;
    transform: translateY(-5px);
    box-shadow: var(--shadow-blue);
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
    padding: var(--section-padding) 0;
    position: relative;
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 800;
    text-align: center;
    margin-bottom: 4rem;
    background: linear-gradient(135deg, #F8FAFC, #3B82F6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    letter-spacing: -1.5px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -16px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--primary-blue), var(--accent-violet), transparent);
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

/* ============================================
   GLASS CARDS - WITH FLASH
   ============================================ */
.glass-card {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 24px;
    padding: 2.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
    transition: left 0.6s ease;
}

.glass-card::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-violet));
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.glass-card:hover::before {
    left: 100%;
}

.glass-card:hover::after {
    opacity: 0.2;
}

.glass-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-glow);
    border-color: rgba(59, 130, 246, 0.5);
}

.glass-card h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.glass-card h3 i {
    color: var(--accent-electric);
    margin-right: 0.5rem;
}

.glass-card p {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ============================================
   SKILLS SECTION
   ============================================ */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.skill-card {
    text-align: center;
    padding: 2.5rem 2rem;
}

.skill-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-electric), var(--accent-violet));
    background-size: 200% auto;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    transition: all 0.3s ease;
    animation: iconGradient 3s ease infinite;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

@keyframes iconGradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.skill-card:hover .skill-icon {
    transform: scale(1.15) rotate(5deg);
    box-shadow: var(--shadow-glow);
}

.skill-card h4 {
    font-size: 1.25rem;
    margin-bottom: 0.8rem;
    color: var(--text-primary);
    font-weight: 700;
}

.skill-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ============================================
   EXPERIENCE TIMELINE - PROFESSIONAL
   ============================================ */
.timeline {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg,
        transparent,
        rgba(59, 130, 246, 0.5),
        rgba(139, 92, 246, 0.5),
        transparent);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

.timeline-item {
    margin-bottom: 4rem;
    position: relative;
}

.timeline-item:nth-child(odd) {
    padding-right: 50%;
    padding-right: calc(50% + 30px);
}

.timeline-item:nth-child(even) {
    padding-left: 50%;
    padding-left: calc(50% + 30px);
}

.timeline-item::before {
    content: '';
    position: absolute;
    top: 24px;
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-violet));
    border: 4px solid var(--bg-dark);
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2), 0 0 20px rgba(59, 130, 246, 0.5);
    z-index: 1;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2), 0 0 20px rgba(59, 130, 246, 0.5);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(59, 130, 246, 0.1), 0 0 30px rgba(59, 130, 246, 0.7);
    }
}

.timeline-item:nth-child(odd)::before {
    right: calc(50% - 8px);
}

.timeline-item:nth-child(even)::before {
    left: calc(50% - 8px);
}

.timeline-content {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-content:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-blue);
    border-color: rgba(59, 130, 246, 0.5);
}

.timeline-content h3 {
    color: var(--text-primary);
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.timeline-content small {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.timeline-content ul {
    margin-top: 1rem;
    padding-left: 1.5rem;
    color: var(--text-secondary);
}

.timeline-content li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
    background: var(--bg-darker);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(59, 130, 246, 0.1);
    padding: 3rem 0;
    text-align: center;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-blue), var(--accent-violet), transparent);
}

footer p {
    color: var(--text-muted);
    margin: 0;
}

footer a {
    transition: all 0.3s ease;
}

footer a:hover {
    color: var(--primary-blue) !important;
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

/* ============================================
   ANIMATIONS & UTILITIES
   ============================================ */

/* Scroll Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Loading Animation */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loading.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(59, 130, 246, 0.1);
    border-top-color: var(--primary-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    :root {
        --section-padding: 80px;
    }

    .timeline::before {
        left: 20px;
    }

    .timeline-item {
        padding-left: 50px !important;
        padding-right: 0 !important;
    }

    .timeline-item::before {
        left: 12px !important;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn-cyber {
        width: 100%;
        max-width: 320px;
    }

    .hero-title {
        letter-spacing: -1px;
    }

    .section-title {
        letter-spacing: -1px;
    }
}

/* Custom Scrollbar - Elegant with Glow */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-blue), var(--accent-violet));
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-blue);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.7);
}

/* Container */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Utilities */
.text-muted {
    color: var(--text-muted);
}

/* Badge with Glow */
.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(139, 92, 246, 0.2));
    color: var(--accent-electric);
    border: 1px solid rgba(59, 130, 246, 0.3);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.2);
}

/* ============================================
   VIDEO THUMBNAIL STYLES
   ============================================ */
.video-thumbnail {
    position: relative;
    display: block;
    text-decoration: none;
    overflow: hidden;
    border-radius: 15px;
}

.video-thumbnail img {
    transition: transform 0.3s ease;
}

.video-thumbnail:hover img {
    transform: scale(1.05);
}

.video-thumbnail .play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background: rgba(255, 0, 0, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.4);
}

.video-thumbnail:hover .play-button {
    transform: translate(-50%, -50%) scale(1.1);
    background: rgba(255, 0, 0, 1);
    box-shadow: 0 6px 25px rgba(255, 0, 0, 0.6);
}

.video-thumbnail .play-button i {
    color: white;
    font-size: 1.8rem;
    margin-left: 4px;
}
