/* Custom Properties */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --accent-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #0a0a0a;
    overflow-x: hidden;
}

/* Glass Morphism */
.glass-card {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Floating Shapes Animation */
.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.shape {
    position: absolute;
    background: linear-gradient(45deg, rgba(99, 102, 241, 0.1), rgba(168, 85, 247, 0.1));
    border-radius: 50%;
    animation: float 20s infinite ease-in-out;
}

.shape-1 {
    width: 200px;
    height: 200px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 150px;
    height: 150px;
    top: 60%;
    right: 10%;
    animation-delay: -5s;
}

.shape-3 {
    width: 100px;
    height: 100px;
    top: 30%;
    left: 70%;
    animation-delay: -10s;
}

.shape-4 {
    width: 120px;
    height: 120px;
    top: 80%;
    left: 20%;
    animation-delay: -15s;
}

.shape-5 {
    width: 180px;
    height: 180px;
    top: 20%;
    right: 30%;
    animation-delay: -7s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) translateX(0px) scale(1) rotate(0deg);
    }
    25% {
        transform: translateY(-20px) translateX(10px) scale(1.1) rotate(90deg);
    }
    50% {
        transform: translateY(0px) translateX(-10px) scale(0.9) rotate(180deg);
    }
    75% {
        transform: translateY(-10px) translateX(15px) scale(1.05) rotate(270deg);
    }
}

/* Particles Background */
#particles {
    position: absolute;
    width: 100%;
    height: 100%;
}

/* Navigation */
.nav-floating {
    animation: slideDown 0.8s ease-out;
}

.nav-link::before {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    background: linear-gradient(90deg, #06b6d4, #8b5cf6);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

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

/* Hero Animations */
.animate-fade-up {
    animation: fadeUp 1s ease-out;
}

.animate-float {
    animation: avatarFloat 6s ease-in-out infinite;
}

.animate-gradient {
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

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

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

/* Typewriter Effect */
.typewriter {
    overflow: hidden;
    border-right: 2px solid rgba(255, 255, 255, 0.7);
    white-space: nowrap;
    margin: 0 auto;
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink-caret {
    from, to {
        border-color: transparent;
    }
    50% {
        border-color: rgba(255, 255, 255, 0.7);
    }
}

/* 3D Project Cards */
.perspective-1000 {
    perspective: 1000px;
}

.preserve-3d {
    transform-style: preserve-3d;
}

.project-card-3d:hover .project-card-inner {
    transform: rotateY(12deg) translateY(-16px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.project-card-inner {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Skill Cards */
.skill-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    border-radius: 1rem;
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.skill-card:hover {
    transform: translateY(-8px) rotateX(10deg);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.2);
}

.skill-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    filter: grayscale(0.5);
    transition: filter 0.3s ease;
}

.skill-card:hover .skill-icon {
    filter: grayscale(0);
}

.skill-name {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
    text-align: center;
    transition: color 0.3s ease;
}

.skill-card:hover .skill-name {
    color: #06b6d4;
}

/* Stats */
.stat-item {
    text-align: center;
    padding: 1.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #06b6d4;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

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

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Hover Effects */
.hover-glow:hover {
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #06b6d4, #8b5cf6);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #0891b2, #7c3aed);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-floating .flex {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 1.5rem;
    }
    
    .nav-floating ul {
        flex-direction: row;
        gap: 1rem;
    }
    
    .shape {
        display: none;
    }
    
    .skill-card {
        padding: 1.5rem 0.5rem;
    }
    
    .project-card-3d:hover .project-card-inner {
        transform: translateY(-8px);
    }
}

/* Loading Animation */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(99, 102, 241, 0.4);
    }
    50% {
        box-shadow: 0 0 20px rgba(99, 102, 241, 0.8), 0 0 30px rgba(168, 85, 247, 0.4);
    }
}

.animate-pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* Text Effects */
.text-shadow-glow {
    text-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}