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

:root {
    --primary: #2563eb;
    --secondary: #7c3aed;
    --dark: #0f172a;
    --light: #f8fafc;
    --accent: #06b6d4;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--dark);
    color: var(--light);
    overflow-x: hidden;
}

/* Animated background */
.background-animation {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    overflow: hidden;
}

.background-animation::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.1) 0%, transparent 50%);
    animation: pulse 15s ease-in-out infinite;
}

/* Floating particles */
.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(37, 99, 235, 0.6);
    border-radius: 50%;
    pointer-events: none;
}

@keyframes pulse {
    0%, 100% { transform: translate(-25%, -25%) scale(1); }
    50% { transform: translate(-30%, -30%) scale(1.1); }
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 5%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: padding 0.3s, background 0.3s;
}

nav.scrolled {
    padding: 1rem 5%;
    background: rgba(15, 23, 42, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.nav-links a {
    color: var(--light);
    text-decoration: none;
    transition: color 0.3s;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s;
}

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

.nav-links a.active {
    color: var(--accent);
}

.nav-links a.active::after {
    width: 100%;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5%;
    position: relative;
}

.hero-content {
    max-width: 1400px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 4rem;
    align-items: center;
}

.hero-text h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #fff, var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 1s ease-out;
}

.hero-text h2 {
    font-size: 1.8rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
    animation: fadeInUp 1s ease-out 0.2s backwards;
}

.hero-text p {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    color: #94a3b8;
    animation: fadeInUp 1s ease-out 0.4s backwards;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease-out 0.6s backwards;
}

.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--light);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    transform: translateY(-2px);
}

/* Hero Visual */
.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-image-container {
    position: relative;
    width: 350px;
    height: 350px;
    animation: fadeIn 1.5s ease-out;
}

.profile-image {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid transparent;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding: 4px;
    box-shadow: 0 20px 60px rgba(37, 99, 235, 0.4);
    animation: float 6s ease-in-out infinite;
}

.profile-image::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    z-index: -1;
}

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

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Skills Section */
.skills {
    padding: 8rem 5%;
    background: rgba(30, 41, 59, 0.3);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    text-align: center;
    color: #94a3b8;
    font-size: 1.2rem;
    margin-bottom: 4rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    justify-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.skill-card {
    background: rgba(30, 41, 59, 0.5);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 400px;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.1), transparent);
    transition: left 0.5s;
}

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

.skill-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 40px rgba(37, 99, 235, 0.2);
}

.skill-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    transition: transform 0.3s;
}

.skill-card:hover .skill-icon {
    transform: scale(1.1) rotate(5deg);
}

.skill-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.skill-card p {
    color: #94a3b8;
    line-height: 1.6;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tag {
    background: rgba(37, 99, 235, 0.2);
    color: var(--accent);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.9rem;
}

/* Projects Section */
.projects {
    padding: 8rem 5%;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    justify-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.project-card {
    background: rgba(30, 41, 59, 0.5);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
    width: 100%;
    max-width: 400px;
}

.project-card::after {
    content: 'View Details →';
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    background: var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s;
}

.project-card:hover::after {
    opacity: 1;
    transform: translateX(0);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.4);
}

.project-image {
    height: 200px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
    transition: transform 0.3s;
    overflow: hidden;
}

.project-card:hover .project-image {
    transform: scale(1.05);
}

.project-content {
    padding: 2rem;
}

.project-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.project-content p {
    color: #94a3b8;
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* Contact Section */
.contact {
    padding: 8rem 5%;
    background: rgba(30, 41, 59, 0.3);
}

.contact-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.contact-item {
    padding: 2rem;
    background: rgba(30, 41, 59, 0.5);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
    position: relative;
    text-decoration: none;
    color: var(--light);
    display: block;
}

.contact-item p {
    color: var(--accent);
    margin: 0;
}

.contact-item h3 {
    margin-bottom: 0.5rem;
}

.contact-item::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    padding: 2px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s;
}

.contact-item:hover::before {
    opacity: 1;
}

.contact-item:hover {
    transform: translateY(-5px);
}

.contact-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    transition: transform 0.3s;
}

.contact-item:hover .contact-icon {
    transform: scale(1.2) rotate(10deg);
}

/* Footer */
.cursor-trail {
    position: fixed;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--primary), transparent);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 9999;
}

/* Scroll progress indicator */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    z-index: 101;
    transform-origin: left;
    transform: scaleX(0);
    width: 100%;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transform: translateY(100px);
    transition: all 0.3s;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.4);
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 30px rgba(37, 99, 235, 0.6);
}

.back-to-top svg {
    width: 24px;
    height: 24px;
    stroke: white;
}

/* Footer */
footer {
    padding: 2rem 5%;
    text-align: center;
    color: #64748b;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    .hero-visual {
        display: none;
    }

    .nav-links {
        display: none;
    }

    .section-title {
        font-size: 2rem;
    }

    .cta-buttons {
        justify-content: center;
    }
}