:root {
    --primary-color: #818cf8;
    --secondary-color: #f472b6;
    --accent-color: #2dd4bf;
    --bg-dark: #020617;
    /* Even deeper navy */
    --bg-card: rgba(15, 23, 42, 0.4);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --glass-bg: rgba(2, 6, 23, 0.7);
    --glass-border: rgba(255, 255, 255, 0.05);
    --font-heading: 'Sora', sans-serif;
    --font-body: 'Inter', sans-serif;
    --card-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-weight: 400;
    overflow-x: hidden;
    line-height: 1.7;
    letter-spacing: -0.01em;
}

h1,
h2,
h3,
h4,
.logo {
    font-family: var(--font-heading);
    letter-spacing: -0.03em;
}

/* Background Animation */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: url('bg.png') no-repeat center center/cover;
    opacity: 0.4;
    filter: blur(5px);
}

/* Scroll Progress Bar */
.scroll-progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    z-index: 2000;
}

.scroll-progress-bar {
    height: 100%;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color), var(--accent-color));
    width: 0%;
}

/* Header & Nav */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

header.scrolled {
    padding: 10px 0;
    background: rgba(3, 7, 18, 0.95);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg,
            var(--primary-color),
            var(--secondary-color),
            var(--accent-color),
            #a78bfa,
            var(--primary-color));
    background-size: 400% 400%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
    animation: fluidGradient 12s ease infinite;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-links a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content {
    animation: fadeInLeft 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(129, 140, 248, 0.1);
    border: 1px solid rgba(129, 140, 248, 0.2);
    border-radius: 50px;
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-content h1 {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-weight: 800;
}

.gradient-text {
    background: linear-gradient(135deg,
            var(--primary-color),
            var(--secondary-color),
            var(--accent-color),
            #a78bfa,
            var(--primary-color));
    background-size: 400% 400%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fluidGradient 15s ease infinite;
    font-weight: 800;
}

.glow-text {
    text-shadow: 0 0 20px rgba(129, 140, 248, 0.3);
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 90%;
}

.profile-visual {
    position: relative;
    display: flex;
    justify-content: center;
    animation: fadeInRight 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.image-glow {
    position: relative;
    width: 380px;
    height: 380px;
}

.image-glow::before {
    content: '';
    position: absolute;
    inset: -20px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    filter: blur(35px);
    opacity: 0.3;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation: morph 8s linear infinite;
    z-index: -1;
}

.image-glow img {
    width: 100%;
    height: 100%;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    object-fit: cover;
    border: 5px solid var(--bg-card);
    animation: morph 8s linear infinite;
}

/* Stats Container */
.stats {
    display: flex;
    gap: 3rem;
    margin-top: 3rem;
}

.stat-item h2 {
    font-size: 2.5rem;
    margin-bottom: 0;
}

.stat-item p {
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* Cards & Sections */
section {
    padding: 120px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 5rem;
}

.section-header h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.line {
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    margin: 0 auto;
    border-radius: 2px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
}

.feature-card {
    background: var(--bg-card);
    padding: 3rem 2rem;
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 20px 40px -20px rgba(129, 140, 248, 0.3);
}

.feature-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

/* Skill Tags */
.skills-container {
    background: var(--bg-card);
    padding: 4rem;
    border-radius: 32px;
    border: 1px solid var(--glass-border);
}

.skill-row {
    margin-bottom: 2rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.tag {
    padding: 0.6rem 1.2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tag:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.05);
}

/* Projects */
.project-card {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    height: 400px;
    cursor: pointer;
}

.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(3, 7, 18, 0.9), transparent);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2.5rem;
    opacity: 0.9;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

.project-card:hover .project-img {
    transform: scale(1.1);
}

.project-card:hover .project-overlay {
    transform: translateY(0);
}

/* Buttons */
.btn {
    padding: 1rem 2.5rem;
    border-radius: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 1rem;
}

.btn-glow {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 0 20px rgba(129, 140, 248, 0.4);
}

.btn-glow:hover {
    box-shadow: 0 0 35px rgba(129, 140, 248, 0.6);
    transform: translateY(-2px);
}

.btn-outline {
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    backdrop-filter: blur(10px);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary-color);
}

/* Animations */
@keyframes fluidGradient {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes morph {

    0%,
    100% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }

    25% {
        border-radius: 58% 42% 75% 25% / 76% 46% 54% 24%;
    }

    50% {
        border-radius: 50% 50% 33% 67% / 55% 27% 73% 45%;
    }

    75% {
        border-radius: 33% 67% 58% 42% / 63% 68% 32% 37%;
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1.2s cubic-bezier(0.2, 1, 0.3, 1),
        transform 1.2s cubic-bezier(0.2, 1, 0.3, 1);
    will-change: opacity, transform;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.staggered-item {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s cubic-bezier(0.2, 1, 0.3, 1);
}

.staggered-item.active {
    opacity: 1;
    transform: translateY(0);
}

.btn-magnetic {
    transition: transform 0.2s cubic-bezier(0.23, 1, 0.32, 1);
    display: inline-flex;
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .hero-content {
        order: 2;
    }

    .profile-visual {
        order: 1;
    }

    .hero-content p {
        margin: 0 auto 2.5rem;
    }

    .stats {
        justify-content: center;
    }

    .grid-3 {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 3rem;
    }

    .nav-links {
        display: none;
    }

    .grid-3 {
        grid-template-columns: 1fr;
    }

    .stats {
        flex-direction: column;
        gap: 1.5rem;
    }
}