/* ═══════════════════════════════════════════════════════════
   BKAAI {.in} - Premium Futuristic Design System
   Professional • Dynamic • Cutting-Edge
   ═══════════════════════════════════════════════════════════ */

/* ===============================================
   CSS Custom Properties - Design Tokens
   =============================================== */
:root {
    /* Primary Color Palette */
    --primary-cyan: #00f2ff;
    --primary-purple: #bc13fe;
    --primary-pink: #ff006e;
    --primary-blue: #4361ee;
    --accent-green: #06ffa5;

    /* Background Colors */
    --bg-dark: #050510;
    --bg-darker: #020208;
    --bg-card: rgba(255, 255, 255, 0.03);

    /* Glass Effects */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-bg-hover: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-border-hover: rgba(0, 242, 255, 0.5);

    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-dim: #6c6c7c;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary-cyan), var(--primary-purple));
    --gradient-hero: linear-gradient(90deg, var(--primary-cyan), #fff, var(--primary-purple), var(--primary-pink));
    --gradient-card: linear-gradient(135deg, rgba(0, 242, 255, 0.1), rgba(188, 19, 254, 0.1));

    /* Shadows & Glows */
    --glow-cyan: 0 0 20px rgba(0, 242, 255, 0.3);
    --glow-purple: 0 0 20px rgba(188, 19, 254, 0.3);
    --glow-pink: 0 0 20px rgba(255, 0, 110, 0.3);
    --shadow-elevation-1: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-elevation-2: 0 8px 40px rgba(0, 0, 0, 0.4);
    --shadow-elevation-3: 0 15px 60px rgba(0, 0, 0, 0.5);

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-medium: 0.4s ease;
    --transition-slow: 0.6s ease;
    --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===============================================
   Base Styles & Reset
   =============================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Rajdhani', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
    position: relative;
}

/* ===============================================
   Loading Screen
   =============================================== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-darker);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-logo {
    font-family: 'Orbitron', sans-serif;
    font-size: 4rem;
    font-weight: 700;
    background: var(--gradient-hero);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: gradientShift 3s ease infinite, pulse 2s ease-in-out infinite;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--glass-border);
    border-top-color: var(--primary-cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-top: 30px;
}

/* ===============================================
   Particle Background
   =============================================== */
#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

.background-fx {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 10% 20%, rgba(188, 19, 254, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 90% 80%, rgba(0, 242, 255, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(255, 0, 110, 0.15) 0%, transparent 70%);
    z-index: -1;
    animation: backgroundPulse 15s ease-in-out infinite alternate;
    pointer-events: none;
}

/* ===============================================
   Navigation
   =============================================== */
nav {
    position: fixed;
    top: 20px;
    right: 30px;
    z-index: 1000;
    display: flex;
    gap: 20px;
}

.nav-item {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    padding: 12px 25px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all var(--transition-medium);
    position: relative;
    overflow: hidden;
}

.nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0;
    transition: all var(--transition-medium);
    z-index: -1;
}

.nav-item:hover {
    border-color: var(--primary-cyan);
    box-shadow: var(--glow-cyan);
    transform: translateY(-2px);
}

.nav-item:hover::before {
    left: 0;
    opacity: 0.2;
}

/* ===============================================
   Header / Hero Section
   =============================================== */
header {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.hero-logo {
    font-family: 'Orbitron', sans-serif;
    font-size: 5rem;
    font-weight: 700;
    background: var(--gradient-hero);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 15px;
    animation: gradientShift 8s ease infinite, float 6s ease-in-out infinite;
    position: relative;
    text-shadow: 0 0 40px rgba(0, 242, 255, 0.3);
    letter-spacing: 3px;
}

.hero-subtitle {
    font-size: 1.6rem;
    color: var(--text-secondary);
    letter-spacing: 4px;
    margin-bottom: 40px;
    font-weight: 300;
    animation: fadeInUp 1s ease 0.3s both;
    text-transform: uppercase;
}

.typing-container {
    font-size: 1.4rem;
    color: var(--primary-cyan);
    font-weight: 500;
    min-height: 2em;
    animation: fadeInUp 1s ease 0.6s both;
}

.typing-cursor {
    display: inline-block;
    width: 2px;
    height: 1.2em;
    background: var(--primary-cyan);
    margin-left: 3px;
    animation: blink 1s step-end infinite;
}

/* ===============================================
   Advanced Cursor Effects
   =============================================== */
/* Custom Cursor */
body {
    cursor: none;
}

.custom-cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-cyan);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.15s ease, border-color 0.2s ease;
    mix-blend-mode: difference;
}

.custom-cursor.hover {
    transform: scale(1.8);
    border-color: var(--primary-purple);
    background: rgba(188, 19, 254, 0.1);
}

.custom-cursor-dot {
    position: fixed;
    width: 6px;
    height: 6px;
    background: var(--primary-cyan);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    box-shadow: 0 0 10px var(--primary-cyan);
}

/* Cursor Trail Particles */
.cursor-particle {
    position: fixed;
    pointer-events: none;
    border-radius: 50%;
    z-index: 9998;
    animation: particleFade 1s ease-out forwards;
}

@keyframes particleFade {
    0% {
        opacity: 0.8;
        transform: scale(1);
    }

    100% {
        opacity: 0;
        transform: scale(0.3);
    }
}

/* Hide custom cursor on touch devices */
@media (hover: none) and (pointer: coarse) {
    body {
        cursor: auto;
    }

    .custom-cursor,
    .custom-cursor-dot {
        display: none;
    }
}

/* Scroll Down Indicator */
.scroll-down {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-secondary);
    font-size: 2rem;
    animation: bounce 2s infinite;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.scroll-down:hover {
    color: var(--primary-cyan);
    text-shadow: var(--glow-cyan);
}

/* ===============================================
   Sections
   =============================================== */
.section {
    padding: 100px 30px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.section-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    margin-bottom: 50px;
    border-left: 5px solid var(--primary-cyan);
    padding-left: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    animation: fadeInLeft 0.8s ease;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100px;
    height: 2px;
    background: var(--gradient-primary);
    animation: lineExpand 1s ease;
}

/* ===============================================
   Cards - Premium Glassmorphism
   =============================================== */
.card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 35px;
    margin-bottom: 30px;
    transition: all var(--transition-medium);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(40px);
    will-change: transform, opacity;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-card);
    opacity: 0;
    transition: opacity var(--transition-medium);
    pointer-events: none;
}

.card.visible {
    opacity: 1;
    transform: translateY(0);
    animation: fadeInUp 0.6s ease both;
}

.card:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: var(--shadow-elevation-3), var(--glow-cyan);
    border-color: var(--glass-border-hover);
}

.card:hover::before {
    opacity: 1;
}

/* Animated gradient border effect */
.card::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--gradient-primary);
    border-radius: 20px;
    z-index: -1;
    opacity: 0;
    transition: opacity var(--transition-medium);
    filter: blur(10px);
}

.card:hover::after {
    opacity: 0.4;
    animation: rotate 4s linear infinite;
}

/* Ripple effect on card click */
.card-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(0, 242, 255, 0.3);
    transform: scale(0);
    animation: ripple 0.6s ease-out;
    pointer-events: none;
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* ===============================================
   Grid Layout
   =============================================== */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

/* ===============================================
   Project Cards
   =============================================== */
.icon-box {
    font-size: 2.5rem;
    margin-bottom: 20px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
    animation: iconFloat 3s ease-in-out infinite;
}

.project-tag {
    display: inline-block;
    background: rgba(0, 242, 255, 0.15);
    color: var(--primary-cyan);
    padding: 6px 15px;
    border-radius: 25px;
    font-size: 0.85rem;
    margin-right: 8px;
    margin-bottom: 12px;
    font-weight: 600;
    border: 1px solid rgba(0, 242, 255, 0.3);
    transition: all var(--transition-fast);
}

.project-tag:hover {
    background: rgba(0, 242, 255, 0.25);
    border-color: var(--primary-cyan);
    box-shadow: var(--glow-cyan);
    transform: scale(1.05);
}

/* ===============================================
   Skills Section
   =============================================== */
.skill-item {
    margin-bottom: 25px;
}

.skill-name {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-primary);
}

.skill-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.skill-progress {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 10px;
    position: relative;
    width: 0;
    transition: width 1.5s var(--transition-smooth);
    box-shadow: var(--glow-cyan);
}

.skill-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

/* ===============================================
   Footer
   =============================================== */
footer {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-secondary);
    font-size: 1rem;
    border-top: 1px solid var(--glass-border);
    margin-top: 80px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 25px;
    font-size: 1.8rem;
}

.social-icons a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.social-icon {
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.social-icons a:hover,
.social-icon:hover {
    color: var(--primary-cyan);
    text-shadow: var(--glow-cyan);
    transform: translateY(-3px) scale(1.1);
}

/* ===============================================
   Animations & Keyframes
   =============================================== */
@keyframes gradientShift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

@keyframes backgroundPulse {
    0% {
        transform: scale(1) rotate(0deg);
        opacity: 0.8;
    }

    100% {
        transform: scale(1.15) rotate(5deg);
        opacity: 1;
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(-15px);
    }

    60% {
        transform: translateX(-50%) translateY(-8px);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes lineExpand {
    from {
        width: 0;
    }

    to {
        width: 100px;
    }
}

@keyframes iconFloat {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-10px) rotate(5deg);
    }
}

@keyframes bracketGlow {
    0% {
        text-shadow: 0 0 10px rgba(0, 242, 255, 0.5);
        filter: brightness(1);
    }

    100% {
        text-shadow: 0 0 25px rgba(0, 242, 255, 1);
        filter: brightness(1.3);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

@keyframes blink {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0;
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* ===============================================
   Responsive Design
   =============================================== */

/* Navigation scroll behavior */
nav.nav-hidden {
    transform: translateY(-100px);
    opacity: 0;
}

@media (max-width: 768px) {
    .hero-logo {
        font-size: 3.5rem;
        letter-spacing: 2px;
    }

    .hero-subtitle {
        font-size: 1.2rem;
        letter-spacing: 2px;
    }

    .typing-container {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    /* Fixed navigation for mobile */
    nav {
        top: 15px;
        right: 15px;
        left: 15px;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
        transition: transform 0.3s ease, opacity 0.3s ease;
        background: rgba(5, 5, 16, 0.95);
        backdrop-filter: blur(20px);
        padding: 10px;
        border-radius: 50px;
        border: 1px solid var(--glass-border);
    }

    .nav-item {
        padding: 8px 16px;
        font-size: 0.8rem;
        flex-shrink: 0;
    }

    .grid-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .section {
        padding: 60px 15px;
    }

    .card {
        padding: 25px;
        /* Ensure animations work on mobile */
        transition: all 0.6s ease;
    }

    /* Better touch targets */
    .social-icon {
        font-size: 2rem;
        margin: 0 15px;
    }

    /* Smoother animations for mobile */
    .card:hover {
        transform: translateY(-5px) scale(1.01);
    }

    /* Ensure scroll animations work */
    .card.fade-in {
        opacity: 0;
        transform: translateY(50px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }

    .card.fade-in.visible {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .hero-logo {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
        letter-spacing: 1px;
    }

    .loading-logo {
        font-size: 2.5rem;
    }

    .section-title {
        font-size: 1.6rem;
    }

    nav {
        top: 10px;
        right: 10px;
        left: 10px;
        padding: 8px;
    }

    .nav-item {
        padding: 6px 12px;
        font-size: 0.75rem;
    }
}

/* ===============================================
   Utility Classes
   =============================================== */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.glow-cyan {
    text-shadow: var(--glow-cyan);
}

.glow-purple {
    text-shadow: var(--glow-purple);
}

.hidden {
    display: none !important;
}