/* ==================== PREMIUM CSS DESIGN SYSTEM ==================== */
/* Author: Dhesurya Kella | Ultra-Modern Portfolio Design */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700;800&display=swap');

/* ==================== CSS VARIABLES & DESIGN TOKENS ==================== */
:root {
    /* Vibrant Color Palette - Neon & Gradient */
    --neon-cyan: #00ffff;
    --neon-magenta: #ff00ff;
    --neon-yellow: #ffff00;
    --neon-green: #39ff14;
    --electric-blue: #7df9ff;
    --hot-pink: #ff006e;
    --ultra-violet: #c724b1;

    /* Primary Gradients - Ultra Vibrant */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    --neon-gradient: linear-gradient(135deg, #ff00ff 0%, #00ffff 50%, #ffff00 100%);
    --cyber-gradient: linear-gradient(135deg, #00d4ff 0%, #7b2ff7 50%, #f107a3 100%);
    --fire-gradient: linear-gradient(135deg, #ff0080 0%, #ff8c00 50%, #40e0d0 100%);

    /* Background Gradients */
    --dark-gradient: linear-gradient(135deg, #0a0e27 0%, #1a1a2e 50%, #16213e 100%);
    --space-gradient: radial-gradient(ellipse at bottom, #1B2735 0%, #090A0F 100%);

    /* Solid Colors */
    --primary: #667eea;
    --secondary: #764ba2;
    --accent: #00d4ff;
    --text-light: var(--text, #ffffff);
    --text-dark: #0a0e27;
    --text-muted: var(--text-muted, #a8b2c8);

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-bg-hover: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.18);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);

    /* Neon Shadows & Glows */
    --shadow-neon-cyan: 0 0 30px rgba(0, 255, 255, 0.8), 0 0 60px rgba(0, 255, 255, 0.4);
    --shadow-neon-magenta: 0 0 30px rgba(255, 0, 255, 0.8), 0 0 60px rgba(255, 0, 255, 0.4);
    --shadow-glow-strong: 0 0 50px rgba(102, 126, 234, 0.9), 0 0 100px rgba(102, 126, 234, 0.5);
    --shadow-3d: 0 20px 60px rgba(0, 0, 0, 0.5), 0 10px 30px rgba(102, 126, 234, 0.3);

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;

    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);

    /* Border Radius */
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 32px;
    --radius-full: 50%;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    overflow-x: hidden;
    position: relative;
}

/* ==================== ANIMATED PARTICLE BACKGROUND ==================== */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark-gradient);
    z-index: -3;
}

/* Rotating Gradient Overlay */
body::after {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle at 20% 30%, rgba(102, 126, 234, 0.15) 0%, transparent 35%),
        radial-gradient(circle at 80% 70%, rgba(255, 0, 255, 0.12) 0%, transparent 35%),
        radial-gradient(circle at 50% 50%, rgba(0, 212, 255, 0.1) 0%, transparent 40%);
    animation: rotateGlow 30s linear infinite;
    z-index: -2;
    pointer-events: none;
}

/* Particle Stars Canvas */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

@keyframes rotateGlow {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(102, 126, 234, 0.5);
    }

    50% {
        box-shadow: 0 0 40px rgba(102, 126, 234, 0.9), 0 0 80px rgba(102, 126, 234, 0.4);
    }
}

/* ==================== TYPOGRAPHY ==================== */

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
}

h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    color: var(--text-light, #fff);
}

@keyframes shimmer {
    0% {
        background-position: 0% center;
    }

    100% {
        background-position: 200% center;
    }
}

h2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: var(--text-light);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    color: var(--text-light);
}

p {
    margin-bottom: var(--spacing-sm);
    color: var(--text-muted);
    line-height: 1.8;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition-fast);
    position: relative;
}

a:hover {
    color: var(--color-primary, var(--neon-cyan));
}

/* ==================== NAVIGATION - PREMIUM GLASS EFFECT ==================== */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: var(--spacing-sm) 0;
    background: rgba(10, 14, 39, 0.7);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3), 0 0 20px rgba(102, 126, 234, 0.1);
    transition: var(--transition-normal);
}

nav.scrolled {
    background: rgba(10, 14, 39, 0.95);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(102, 126, 234, 0.2);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    background: var(--cyber-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.5));
    animation: pulse-glow 2s infinite;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: var(--text-light);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    transition: var(--transition-normal);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-xs);
}

.mobile-menu-btn span {
    width: 28px;
    height: 3px;
    background: var(--neon-cyan);
    border-radius: 2px;
    transition: var(--transition-normal);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.6);
}

/* ==================== CONTAINERS & SECTIONS ==================== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

section {
    min-height: 100vh;
    padding: var(--spacing-xl) 0;
    display: flex;
    align-items: center;
    position: relative;
}

.section-title {
    text-align: center;
    margin-bottom: var(--spacing-lg);
    position: relative;
    animation: fadeInUp 0.8s ease;
}

.section-title h1,
.section-title h2 {
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    display: block;
    width: 120px;
    height: 5px;
    background: var(--cyber-gradient);
    margin: var(--spacing-sm) auto 0;
    border-radius: 3px;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.6);
    animation: pulse-width 2s infinite;
}

@keyframes pulse-width {

    0%,
    100% {
        width: 120px;
    }

    50% {
        width: 160px;
    }
}

/* ==================== PREMIUM 3D CARDS ===== ================= */
.card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 0 40px rgba(102, 126, 234, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all var(--transition-slow);
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    perspective: 1000px;
}

/* Gradient Overlay on Hover */
.card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: var(--transition-slow);
    pointer-events: none;
}

.card:hover::before {
    opacity: 1;
    animation: rotateGlow 3s linear infinite;
}

.card:hover {
    transform: translateY(-15px) rotateX(5deg) scale(1.02);
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.5),
        0 0 60px rgba(0, 212, 255, 0.4),
        0 0 100px rgba(102, 126, 234, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-color: rgba(0, 212, 255, 0.5);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.08) 100%);
}

/* ==================== BUTTONS - ULTRA MODERN ==================== */
.btn {
    display: inline-block;
    padding: 1.2rem 3rem;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-bounce);
    text-align: center;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.btn-primary {
    background: var(--cyber-gradient);
    color: var(--text-light);
    border: 2px solid transparent;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.4);
}

/* Shimmer Effect */
.btn-primary::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -150%;
    width: 100%;
    height: 200%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transform: rotate(30deg);
    transition: var(--transition-slow);
}

.btn-primary:hover::before {
    left: 150%;
}

.btn-primary:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow:
        0 15px 50px rgba(102, 126, 234, 0.6),
        0 0 50px rgba(0, 212, 255, 0.5);
    background: var(--neon-gradient);
}

.btn-primary:active {
    transform: translateY(-2px) scale(1.02);
}

.btn-outline {
    background: transparent;
    color: var(--neon-cyan);
    border: 2px solid var(--neon-cyan);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3), inset 0 0 20px rgba(0, 212, 255, 0.1);
}

.btn-outline:hover {
    background: var(--neon-cyan);
    color: var(--text-dark);
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 40px rgba(0, 212, 255, 0.6), 0 0 50px rgba(0, 212, 255, 0.8);
}

/* ==================== GRID LAYOUTS ==================== */
.grid {
    display: grid;
    gap: var(--spacing-md);
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* ==================== ANIMATIONS - ADVANCED ==================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.fade-in {
    animation: fadeIn 1s ease forwards;
}

.slide-in-left {
    animation: slideInLeft 0.8s ease forwards;
}

.slide-in-right {
    animation: slideInRight 0.8s ease forwards;
}

.scale-in {
    animation: scaleIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

/* Staggered Animation Delays */
.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

.delay-4 {
    animation-delay: 0.4s;
}

.delay-5 {
    animation-delay: 0.5s;
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(10, 14, 39, 0.98);
        backdrop-filter: blur(30px);
        flex-direction: column;
        padding: var(--spacing-md);
        transition: var(--transition-normal);
        border-right: 1px solid rgba(0, 212, 255, 0.2);
        z-index: 2000;
        visibility: hidden;
        /* Hide when closed to prevent focusing */
        opacity: 0;
    }

    .nav-links.active {
        left: 0;
        visibility: visible;
        opacity: 1;
        display: flex !important;
        /* Force override any display: none */
    }

    .nav-links a {
        width: 100%;
        text-align: center;
        padding: var(--spacing-sm);
        color: #ffffff !important;
        /* Force white text for visibility on dark mobile menu */
        font-size: 1.2rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .nav-links a.active {
        color: var(--neon-cyan) !important;
        /* Keep active link bright */
    }

    section {
        padding: var(--spacing-lg) 0;
    }

    .container {
        padding: 0 var(--spacing-sm);
    }

    .card {
        padding: var(--spacing-sm);
    }
}

/* ==================== UTILITY CLASSES ==================== */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.text-gradient {
    background: var(--cyber-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-neon {
    color: var(--neon-cyan);
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.8);
}

.mt-1 {
    margin-top: var(--spacing-sm);
}

.mt-2 {
    margin-top: var(--spacing-md);
}

.mt-3 {
    margin-top: var(--spacing-lg);
}

.mb-1 {
    margin-bottom: var(--spacing-sm);
}

.mb-2 {
    margin-bottom: var(--spacing-md);
}

.mb-3 {
    margin-bottom: var(--spacing-lg);
}

.hidden {
    display: none;
}

/* Floating Effect */
.float {
    animation: float 3s ease-in-out infinite;
}

/* Pulse Effect */
.pulse {
    animation: pulse-glow 2s infinite;
}