/* Global Styles */
:root {
    --primary-color: #7c3aed;
    --primary-light: #8b5cf6;
    --secondary-color: #6d28d9;
    --accent-color: #a78bfa;
    --dark-color: #0f0f17;
    --darker-color: #0a0a0f;
    --light-color: #f5f3ff;
    --text-color: #e9e0ff;
    --text-light: #a78bfa;
    --card-bg: rgba(30, 24, 51, 0.6);
    --glass-bg: rgba(26, 16, 51, 0.5);
    --glass-border: rgba(167, 139, 250, 0.1);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    --blur: blur(12px);
    --gradient: linear-gradient(135deg, var(--primary-color), var(--secondary-color), #4c1d95);
    
    /* Animation Variables */
    --float-distance: 20px;
    --float-duration: 6s;
    --pulse-scale: 1.05;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: linear-gradient(135deg, #0a0a0f, #1e1b4b, #0f0c29);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite, fadeIn 1.5s ease-out;
    min-height: 100vh;
    overflow-x: hidden;
    opacity: 0;
    animation-fill-mode: forwards;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% auto;
    animation: gradientText 5s ease infinite;
}

@keyframes gradientText {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

h1 { 
    font-size: 4rem; 
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

h2 { 
    font-size: 3rem; 
    text-align: center; 
    margin: 2rem 0 4rem; 
    position: relative; 
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient);
    border-radius: 4px;
    transform: scaleX(0);
    transform-origin: left;
    animation: lineGrow 1s ease forwards;
}

@keyframes lineGrow {
    to { transform: scaleX(1); }
}

p {
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 0.9rem 2.2rem;
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    text-align: center;
    position: relative;
    overflow: hidden;
    z-index: 1;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color), var(--primary-color));
    z-index: -1;
    opacity: 0;
    transition: var(--transition);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.btn:hover::before {
    opacity: 1;
}

.btn i {
    transition: transform 0.3s ease;
}

.btn:hover i {
    transform: translateX(5px);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-light);
    box-shadow: none;
    position: relative;
    z-index: 1;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-outline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--gradient);
    transition: var(--transition);
    z-index: -1;
}

.btn-outline:hover {
    color: white;
    border-color: transparent;
}

.btn-outline:hover::before {
    width: 100%;
}

section {
    padding: 6rem 0;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1200px;
    z-index: 1000;
    background: var(--glass-bg);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1rem 2rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.navbar.scrolled {
    top: 0.5rem;
    width: 100%;
    max-width: 100%;
    border-radius: 0;
    border-left: none;
    border-right: none;
    padding: 0.8rem 2rem;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark-color);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-color);
    font-weight: 500;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.contact-btn {
    background: var(--primary-color);
    color: white !important;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    transition: var(--transition);
}

.contact-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--dark-color);
    border-radius: 5px;
    transition: var(--transition);
}

/* Animation Keyframes */
@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-10px) rotate(1deg); }
    50% { transform: translateY(-20px) rotate(-1deg); }
    75% { transform: translateY(-10px) rotate(1deg); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(var(--pulse-scale)); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    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);
    }
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 8rem 0 6rem;
    position: relative;
    overflow: hidden;
    opacity: 0;
    animation: fadeIn 0.8s ease-out 0.3s forwards;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(124, 58, 237, 0.15) 0%, transparent 25%),
        radial-gradient(circle at 80% 70%, rgba(76, 29, 149, 0.15) 0%, transparent 25%),
        radial-gradient(circle at 40% 80%, rgba(109, 40, 217, 0.1) 0%, transparent 30%);
    z-index: -1;
    animation: float 8s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiPjxkZWZzPjxwYXR0ZXJuIGlkPSJwYXR0ZXJuIiB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHBhdHRlcm5Vbml0cz0idXNlclNwYWNlT25Vc2UiIHBhdHRlcm5UcmFuc2Zvcm09InJvdGF0ZSg0NSkiPjxyZWN0IHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0icmdiYSgzNywgOTksIDIzNSwgMC4wNSkiLz48L3BhdHRlcm4+PC9kZWZzPjxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjcGF0dGVybikiLz48L3N2Zz4=');
    opacity: 0.6;
}

.hero-content {
    max-width: 800px;
    position: relative;
    z-index: 1;
    background: var(--glass-bg);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: var(--shadow);
    transform: translateY(0);
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    animation: float var(--float-duration) ease-in-out infinite, fadeInUp 1s ease-out 0.6s both;
    will-change: transform, box-shadow;
}

.hero-content:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.hero-content:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.4);
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    color: var(--dark-color);
    line-height: 1.1;
}

.tagline {
    font-size: 1.5rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    font-weight: 400;
    line-height: 1.7;
    max-width: 600px;
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    border-left: 3px solid var(--primary-color);
    animation: fadeIn 1s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* About Section */
.about {
    background-color: var(--dark-color);
}

.about-content {
    display: flex;
    align-items: center;
    gap: 4rem;
    margin-top: 3rem;
}

.about-text {
    flex: 1;
}

.about-text h3 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.skill-card {
    background: var(--glass-bg);
    padding: 2.5rem 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow);
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    text-align: center;
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    transform: translateY(0);
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards, float 6s ease-in-out infinite 2s;
    animation-delay: calc(var(--delay) * 0.15s), 0s;
    will-change: transform, box-shadow;
}

.skill-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(167, 139, 250, 0.3);
}

@keyframes fadeInUp {
    from { 
        opacity: 0;
        transform: translateY(30px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

.skill-card:nth-child(1) { --delay: 1; }
.skill-card:nth-child(2) { --delay: 2; }
.skill-card:nth-child(3) { --delay: 3; }

.skill-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.skill-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.skill-card h3 {
    margin-bottom: 1rem;
    color: var(--dark-color);
}

/* Projects Section */
.project-card {
    background: var(--glass-bg);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    transform: perspective(1000px) rotateX(0) rotateY(0);
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
    animation-delay: calc(var(--delay) * 0.1s);
    will-change: transform, box-shadow;
}

.project-card:hover {
    transform: perspective(1000px) rotateX(5deg) rotateY(5deg) translateY(-10px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border-color: rgba(167, 139, 250, 0.3);
}

/* Add delay classes for staggered animations */
.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; }

.project-card:hover {
    transform: perspective(1000px) rotateX(5deg) rotateY(5deg) translateY(-10px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.project-content {
    padding: 2.5rem;
}

.project-content h3 {
    font-size: 2rem;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.project-features {
    margin: 2rem 0;
}

.project-features h4 {
    color: var(--dark-color);
    margin: 1.5rem 0 1rem;
}

.project-features ul {
    list-style: none;
    padding-left: 1rem;
}

.project-features li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
}

.project-features li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

.project-links {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* Footer */
footer {
    background: rgba(2, 6, 23, 0.8);
    color: white;
    padding: 4rem 0 2rem;
    text-align: center;
    border-top: 1px solid var(--glass-border);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(76, 29, 149, 0.1), rgba(109, 40, 217, 0.1), rgba(124, 58, 237, 0.1));
    z-index: -1;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.social-links a {
    color: white;
    font-size: 1.5rem;
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0;
}

.footer-links a {
    color: #9ca3af;
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
}

.copyright {
    color: #9ca3af;
    font-size: 0.9rem;
    margin-top: 2rem;
}

/* Responsive Design */
@media (max-width: 992px) {
    h1 { font-size: 3rem; }
    h2 { font-size: 2.2rem; }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .hamburger span {
        background: var(--text-color);
    }
    
    .nav-links {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: var(--dark-color);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding: 3rem 0;
        transition: var(--transition);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .nav-links a {
        font-size: 1.2rem;
        margin: 1rem 0;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .tagline {
        font-size: 1.2rem;
    }
    
    .about-content {
        flex-direction: column;
        text-align: center;
    }
    
    .project-links {
        flex-direction: column;
    }
    
    .project-links .btn {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 1.5rem;
    }
    
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .tagline {
        font-size: 1.1rem;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
}
