:root {
    --bg-color: #0a0e27;
    --bg-secondary: #0f1629;
    --card-bg: rgba(20, 30, 50, 0.6);
    --card-bg-hover: rgba(30, 45, 70, 0.8);
    --text-primary: #ffffff;
    --text-secondary: #a0aec0;
    --text-tertiary: #718096;
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-tertiary: #ec4899;
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.3);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.7;
    margin: 0;
    padding: 0;
    background: var(--bg-color);
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(139, 92, 246, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(236, 72, 153, 0.15) 0px, transparent 50%),
        radial-gradient(at 0% 100%, rgba(99, 102, 241, 0.15) 0px, transparent 50%);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

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

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 6px;
    border: 2px solid var(--bg-secondary);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--accent-secondary), var(--accent-tertiary));
}

/* Header & Nav */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1.5rem 1rem;
    transition: all 0.3s ease;
}

.modern-navbar {
    max-width: 1400px;
    margin: 0 auto;
    background: rgba(10, 14, 39, 0.7);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.125);
    border-radius: 24px;
    padding: 0.75rem 2rem;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.modern-navbar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modern-navbar:hover::before {
    opacity: 0.6;
}

.modern-navbar:hover {
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 
        0 12px 48px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(99, 102, 241, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.nav-brand {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
    letter-spacing: -0.5px;
}

.nav-brand::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: width 0.3s ease;
}

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

.nav-brand:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.navbar-collapse {
    flex-grow: 1;
    flex-basis: 100%;
    align-items: center;
    display: flex !important;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.5rem;
    align-items: center;
}

.nav-item {
    margin: 0;
}

.nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    padding: 0.65rem 1.25rem !important;
    border-radius: 12px;
    text-decoration: none;
    display: block;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--accent-gradient);
    opacity: 0.1;
    transition: left 0.3s ease;
    z-index: -1;
}

.nav-link:hover::before {
    left: 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-link:hover {
    color: var(--text-primary) !important;
    transform: translateY(-2px);
}

.nav-link:hover::after {
    width: 70%;
}

/* Hamburger Menu */
.nav-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    flex-direction: column;
    gap: 5px;
    z-index: 1001;
    outline: none;
}

.nav-toggle:focus {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
    border-radius: 4px;
}

.hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 24px;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.nav-toggle[aria-expanded="true"] .hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.nav-toggle[aria-expanded="true"] .hamburger span:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] .hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile Navbar Styles */
@media (max-width: 768px) {
    header {
        padding: 1rem 0.75rem;
    }

    .modern-navbar {
        padding: 0.75rem 1.25rem;
        border-radius: 20px;
        position: relative;
    }

    .nav-container {
        position: relative;
        flex-wrap: nowrap;
    }

    .nav-toggle {
        display: flex;
        z-index: 1002;
    }

    .navbar-collapse {
        position: absolute;
        top: calc(100% + 0.75rem);
        left: 0;
        right: 0;
        width: 100%;
        z-index: 1001;
        margin: 0;
        padding: 0;
        display: none !important;
    }

    .navbar-collapse.show,
    .navbar-collapse.collapsing {
        display: block !important;
    }

    .nav-menu {
        flex-direction: column;
        background: rgba(10, 14, 39, 0.98);
        backdrop-filter: blur(24px) saturate(180%);
        -webkit-backdrop-filter: blur(24px) saturate(180%);
        border: 1px solid rgba(255, 255, 255, 0.15);
        border-radius: 20px;
        padding: 1.5rem;
        box-shadow: 
            0 12px 48px rgba(0, 0, 0, 0.5),
            0 0 40px rgba(99, 102, 241, 0.2);
        gap: 0.5rem;
        width: 100%;
        margin: 0;
        list-style: none;
        opacity: 0;
        max-height: 0;
        overflow: hidden;
        transform: translateY(-10px) scale(0.95);
        pointer-events: none;
        transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    .navbar-collapse.show .nav-menu,
    .navbar-collapse.collapsing .nav-menu {
        opacity: 1;
        max-height: 500px;
        transform: translateY(0) scale(1);
        pointer-events: all;
    }

    .nav-item {
        width: 100%;
    }

    .nav-link {
        width: 100%;
        text-align: center;
        padding: 1rem 1.5rem !important;
        border-radius: 12px;
        margin: 0;
    }

    .nav-link:hover {
        background: rgba(99, 102, 241, 0.2);
        transform: translateY(0);
    }

    .nav-link::after {
        display: none;
    }

    .nav-brand {
        font-size: 1.25rem;
    }

    .hamburger {
        width: 26px;
    }

    .hamburger span {
        height: 2.5px;
        background: var(--text-primary);
    }
}

@media (max-width: 576px) {
    header {
        padding: 0.75rem 0.5rem;
    }

    .modern-navbar {
        padding: 0.6rem 1rem;
        border-radius: 16px;
    }

    .nav-brand {
        font-size: 1.1rem;
    }

    .navbar-collapse {
        top: calc(100% + 0.5rem);
    }

    .nav-menu {
        padding: 1.25rem;
        border-radius: 16px;
    }

    .nav-link {
        padding: 0.9rem 1.25rem !important;
        font-size: 0.9rem;
    }
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 8rem 2rem 4rem;
    overflow: hidden;
}

.hero-content {
    text-align: center;
    z-index: 2;
    position: relative;
    animation: fadeInUp 1s ease-out;
}

.hero-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    animation: gradient-shift 3s ease infinite;
    background-size: 200% 200%;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero-subtitle {
    font-size: clamp(1.25rem, 3vw, 2rem);
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.hero-description {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-tertiary);
    max-width: 600px;
    margin: 0 auto;
}

.hero-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.3;
    animation: float 20s infinite ease-in-out;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: var(--accent-primary);
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: var(--accent-secondary);
    top: 60%;
    right: 10%;
    animation-delay: 5s;
}

.shape-3 {
    width: 350px;
    height: 350px;
    background: var(--accent-tertiary);
    bottom: 10%;
    left: 50%;
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -30px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

/* Main Container */
.container.mt-4 {
    margin-top: 0 !important;
    padding-top: 2rem;
    position: relative;
    z-index: 2;
}

/* About Section */
#about {
    padding: 6rem 2rem;
    animation: fadeIn 1s ease-out;
}

.about-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

.profile-pic {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 4px solid transparent;
    background: var(--accent-gradient);
    padding: 4px;
    box-shadow: var(--shadow-glow);
    margin-bottom: 2.5rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    object-fit: cover;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.profile-pic:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 0 40px rgba(99, 102, 241, 0.5);
}

.section-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 2rem;
    color: var(--text-primary);
    text-align: center;
    position: relative;
    display: inline-block;
    width: 100%;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--accent-gradient);
    border-radius: 2px;
}

.about-text {
    color: var(--text-secondary);
    font-size: 1.125rem;
    max-width: 800px;
    margin: 0 auto 2.5rem;
    line-height: 1.8;
}

.about-text #age {
    color: var(--accent-primary);
    font-weight: 600;
}

.connect-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 2.5rem 0 1.5rem;
}

/* Social Media */
.social-media {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    list-style: none;
    padding: 0;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 1rem;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(10px);
}

.social-link i {
    font-size: 1.25rem;
    transition: transform 0.3s ease;
}

.social-link:hover {
    color: var(--text-primary);
    background: var(--card-bg-hover);
    border-color: var(--accent-primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.social-link:hover i {
    transform: scale(1.2);
}

/* Projects & Certifications Sections */
#projects, #certifications {
    padding: 6rem 2rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--glass-border);
    flex-wrap: wrap;
    gap: 1rem;
}

.project-count {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Cards */
.card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    height: 100%;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
}

.card.fade-in-visible {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.6s ease-out;
}

.card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    border-color: rgba(99, 102, 241, 0.5);
    background: var(--card-bg-hover);
}

.card-img-top {
    height: 220px;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    width: 100%;
}

.card:hover .card-img-top {
    transform: scale(1.15);
}

.card-body {
    padding: 2rem;
}

.card-title {
    font-family: 'Space Grotesk', sans-serif;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.card-text {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.github-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-primary);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 10px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.github-link:hover {
    background: var(--accent-gradient);
    color: #fff;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    text-decoration: none;
}

/* Certifications */
#certifications {
    background: rgba(15, 22, 41, 0.3);
    border-radius: 30px;
    margin: 4rem 1rem;
    padding: 4rem 2rem;
}

#certifications img {
    border-radius: 16px;
    transition: transform 0.4s ease;
    width: 100%;
    height: auto;
}

#certifications .card {
    border: none;
    background: transparent;
    padding: 0;
}

#certifications .card:hover {
    transform: translateY(-8px);
    box-shadow: none;
}

#certifications .card:hover img {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

/* Footer */
footer {
    padding: 4rem 2rem 2rem;
    border-top: 1px solid var(--glass-border);
    margin-top: 4rem;
    color: var(--text-secondary);
    text-align: center;
    background: rgba(10, 14, 39, 0.5);
}

footer .social-media {
    margin-top: 1rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar {
        margin: 0.5rem;
        padding: 0.75rem 1rem;
        border-radius: 15px;
    }

    .navbar-brand {
        font-size: 1.5rem;
    }

    .hero-section {
        padding: 6rem 1rem 3rem;
        min-height: 80vh;
    }

    .profile-pic {
        width: 160px;
        height: 160px;
    }

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

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .card-body {
        padding: 1.5rem;
    }

    #certifications {
        margin: 2rem 0.5rem;
        padding: 3rem 1rem;
    }

    .social-link {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .hero-section {
        min-height: 70vh;
    }

    .shape {
        filter: blur(40px);
    }

    .shape-1, .shape-2, .shape-3 {
        width: 200px;
        height: 200px;
    }
}

/* Stagger animation for cards */
.card:nth-child(1) { transition-delay: 0.1s; }
.card:nth-child(2) { transition-delay: 0.2s; }
.card:nth-child(3) { transition-delay: 0.3s; }
.card:nth-child(4) { transition-delay: 0.4s; }
.card:nth-child(5) { transition-delay: 0.5s; }
.card:nth-child(6) { transition-delay: 0.6s; }
