:root {
    --primary: #8b5cf6;
    --primary-dark: #6d28d9;
    --accent: #38bdf8;
    --glow: #f472b6;
    --bg: #060917;
    --card-bg: rgba(12, 20, 39, 0.78);
    --card-border: rgba(139, 92, 246, 0.28);
    --text: #f8fafc;
    --text-muted: #93accd;
    --radius: 18px;
    --shadow: 0 30px 65px rgba(6, 9, 23, 0.62);
    --glass: rgba(139, 92, 246, 0.1);
    --panel-gradient: linear-gradient(150deg, rgba(12, 16, 36, 0.92) 0%, rgba(18, 26, 52, 0.72) 55%, rgba(11, 16, 34, 0.86) 100%);
    --panel-outline: rgba(99, 102, 241, 0.28);
    --panel-shine: linear-gradient(120deg, rgba(139, 92, 246, 0.42), rgba(56, 189, 248, 0.35) 55%, rgba(244, 114, 182, 0.45));
    --chip-gradient: linear-gradient(130deg, rgba(139, 92, 246, 0.25), rgba(56, 189, 248, 0.2) 60%, rgba(244, 114, 182, 0.22));
}

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

body {
    font-family: "Poppins", sans-serif;
    background: radial-gradient(circle at 5% 20%, rgba(139, 92, 246, 0.25), transparent 60%),
        radial-gradient(circle at 92% 12%, rgba(56, 189, 248, 0.2), transparent 55%),
        linear-gradient(120deg, #050716 0%, #09112b 45%, #0d1535 100%);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    scroll-behavior: smooth;
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 12% 18%, rgba(244, 114, 182, 0.25), transparent 55%),
        radial-gradient(circle at 78% 14%, rgba(139, 92, 246, 0.22), transparent 55%),
        radial-gradient(circle at 80% 86%, rgba(56, 189, 248, 0.18), transparent 45%);
    z-index: -2;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    background: linear-gradient(125deg, rgba(148, 163, 184, 0.06), rgba(139, 92, 246, 0.14) 45%, rgba(244, 114, 182, 0.08));
    mix-blend-mode: screen;
    opacity: 0.8;
    z-index: -3;
    pointer-events: none;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    border-radius: var(--radius);
}

/* Profile picture (slightly smaller) */
.profile-pic {
    width: clamp(180px, 22vw, 240px);
    height: clamp(180px, 22vw, 240px);
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 20px 45px rgba(6, 9, 23, 0.55);
    transition: transform 0.3s ease;
}

.profile-pic:hover {
    transform: scale(1.05);
}

/* NAV */
nav {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(20px);
    background: linear-gradient(110deg, rgba(8, 12, 26, 0.88), rgba(12, 18, 36, 0.72));
    border-bottom: 1px solid rgba(99, 102, 241, 0.22);
    box-shadow: 0 16px 40px rgba(8, 12, 26, 0.45);
}

.nav-inner {
    max-width: 1200px;
    margin: auto;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    gap: 18px;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.nav-links a {
    position: relative;
    padding-bottom: 4px;
    transition: color 0.2s ease;
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}

.nav-links a:hover {
    color: var(--text);
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after {
    transform: scaleX(1);
}

/* HEADER (reduced padding) */
header {
    padding: 80px 20px 40px;
}

.hero-panel {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: clamp(32px, 4vw, 50px);
    border-radius: calc(var(--radius) + 28px);
    background: var(--panel-gradient);
    border: 1px solid var(--panel-outline);
    backdrop-filter: blur(28px);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.header-inner {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    grid-template-rows: auto auto;
    grid-template-areas:
        "avatar text"
        "skills skills";
    align-items: center;
    gap: 40px 50px;
    max-width: 1100px;
}

        .hero-avatar {
    grid-area: avatar;
    display: flex;
    justify-content: center;
}


        .hero-avatar::after {
            content: "";
            position: absolute;
            inset: -18px;
            border-radius: 50%;
            background: radial-gradient(circle, rgba(139, 92, 246, 0.35), transparent 65%);
            filter: blur(12px);
            z-index: 0;
        }

        .hero-avatar img {
            position: relative;
            z-index: 1;
        }

.header-copy {
    grid-area: text;
    display: flex;
    flex-direction: column;
    align-items: center;       /* center content horizontally */
    text-align: center;        /* center text */
    gap: 20px;
}

/* Titles & text spacing */
.header-copy h1 {
    margin-top: 0;
}

.header-copy p {
    max-width: 520px;
    line-height: 1.55;
}
        .eyebrow {
            display: inline-flex;
            align-items: center;
            gap: 10px;
            padding: 8px 16px;
            border-radius: 999px;
            background: linear-gradient(90deg, rgba(139, 92, 246, 0.18), rgba(56, 189, 248, 0.18));
            color: var(--text);
            font-size: 0.85rem;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            width: fit-content;
        }

        header h1 {
            font-size: clamp(2.6rem, 5vw, 3.4rem);
            font-weight: 800;
            margin: 0;
            background: linear-gradient(90deg, var(--primary), var(--accent));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
            text-rendering: optimizeLegibility;
        }

        header p {
            font-size: 1.12rem;
            color: var(--text-muted);
            max-width: 620px;
            text-align: center;
        }

        .cta-group {
            display: flex;
            flex-wrap: wrap;
            gap: 14px;
            justify-content: center;
        }

        .cta-btn {
            padding: 14px 28px;
            font-size: 1rem;
            border-radius: 999px;
            background: linear-gradient(130deg, rgba(139, 92, 246, 0.92), rgba(56, 189, 248, 0.9) 55%, rgba(244, 114, 182, 0.95));
            color: white;
            font-weight: 600;
            border: none;
            cursor: pointer;
            position: relative;
            overflow: hidden;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            box-shadow: 0 18px 32px rgba(139, 92, 246, 0.45);
        }

        .cta-btn::before {
            content: "";
            position: absolute;
            top: 0;
            left: -50%;
            width: 200%;
            height: 100%;
            background: linear-gradient(120deg,
                    rgba(255, 255, 255, 0.3),
                    rgba(255, 255, 255, 0));
            transform: skewX(-25deg);
            transition: left 0.6s;
        }

        .cta-btn:hover::before {
            left: 100%;
        }

        .cta-btn:hover {
            transform: translateY(-2px) scale(1.02);
            box-shadow: 0 24px 36px rgba(139, 92, 246, 0.58);
        }

        .cta-btn.secondary {
            background: rgba(15, 23, 42, 0.4);
            border: 1px solid rgba(148, 163, 184, 0.45);
            color: var(--text);
            box-shadow: none;
        }

        .cta-btn.secondary::before {
            display: none;
        }

        .cta-btn.secondary:hover {
            transform: translateY(-2px);
            border-color: rgba(244, 114, 182, 0.55);
            background: rgba(139, 92, 246, 0.18);
        }

        .profile-card {
            position: relative;
            background: rgba(10, 16, 34, 0.78);
            border-radius: calc(var(--radius) + 8px);
            border: 1px solid rgba(99, 102, 241, 0.25);
            padding: 32px 26px;
            display: grid;
            gap: 18px;
            box-shadow: var(--shadow);
            backdrop-filter: blur(22px);
            width: min(100%, 400px);
            overflow: hidden;
        }

        .profile-card::before {
            content: "";
            position: absolute;
            inset: 0;
            padding: 1px;
            border-radius: inherit;
            background: var(--panel-shine);
            -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
            -webkit-mask-composite: xor;
            mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
            mask-composite: exclude;
            pointer-events: none;
            opacity: 0.85;
        }

        .profile-card::after {
            content: "";
            position: absolute;
            inset: 20% 12% auto 12%;
            height: 90px;
            background: radial-gradient(circle at top, rgba(255, 255, 255, 0.18), transparent 68%);
            pointer-events: none;
            opacity: 0.65;
        }

        .profile-card > * {
            position: relative;
            z-index: 1;
        }

        .profile-card h2 {
            font-size: 1.12rem;
            text-align: center;
            background: linear-gradient(90deg, var(--primary), var(--accent));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .profile-card p {
            color: var(--text-muted);
            font-size: 0.98rem;
            text-align: center;
        }

        .skills-card .skill-groups {
            display: grid;
            gap: 18px;
        }


        .skills-card .skill-card {
            background: linear-gradient(140deg, rgba(255, 255, 255, 0.08), rgba(99, 102, 241, 0.16) 65%, rgba(56, 189, 248, 0.12));
            border-radius: var(--radius);
            border: 1px solid rgba(148, 163, 184, 0.4);
            padding: 20px;
            box-shadow: none;
            backdrop-filter: blur(12px);
            transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
        }

        .skills-card .skill-card h3 {
            font-size: 1rem;
            margin-bottom: 12px;
            color: var(--text);
            text-align: center;
        }

        .skills-card .skill-chips {
            justify-content: center;
        }

        .skills-card .skill-card:hover {
            transform: translateY(-6px);
            border-color: rgba(139, 92, 246, 0.65);
            box-shadow: 0 22px 34px rgba(8, 12, 26, 0.48);
        }

        /* Floating background blobs */
        .background {
            position: fixed;
            inset: 0;
            z-index: -1;
            overflow: hidden;
        }

        .blob {
            position: absolute;
            width: 400px;
            height: 400px;
            background: radial-gradient(circle at center,
                    rgba(99, 102, 241, 0.6),
                    transparent 70%);
            border-radius: 50%;
            filter: blur(120px);
            animation: float 20s infinite alternate ease-in-out;
        }

        .blob:nth-child(2) {
            background: radial-gradient(circle at center,
                    rgba(168, 85, 247, 0.6),
                    transparent 70%);
            top: 50%;
            left: 60%;
            animation-duration: 25s;
        }

        @keyframes float {
            0% {
                transform: translate(0, 0);
            }

            100% {
                transform: translate(100px, -80px) scale(1.2);
            }
        }

        /* Sections */
        section {
            padding: 100px 20px;
            position: relative;
        }

        .section-panel {
            position: relative;
            max-width: 1200px;
            margin: 0 auto;
            padding: clamp(48px, 6vw, 64px);
            border-radius: calc(var(--radius) + 20px);
            background: var(--panel-gradient);
            border: 1px solid var(--panel-outline);
            backdrop-filter: blur(24px);
            box-shadow: var(--shadow);
            overflow: hidden;
        }

        .section-panel::before,
        .section-panel::after {
            content: "";
            position: absolute;
            inset: 0;
            pointer-events: none;
        }

        .section-panel::before {
            background: radial-gradient(circle at 18% 18%, rgba(99, 102, 241, 0.28), transparent 58%);
            mix-blend-mode: screen;
        }

        .section-panel::after {
            background: linear-gradient(160deg, rgba(255, 255, 255, 0.07), transparent 65%);
            opacity: 0.7;
        }

        .section-panel > * {
            position: relative;
            z-index: 1;
        }

        .section-panel h2 {
            font-size: 2rem;
            text-align: center;
            margin-bottom: 50px;
            font-weight: 700;
            background: linear-gradient(90deg, var(--primary), var(--accent));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .about p,
        .contact p {
            color: var(--text-muted);
            margin: auto;
            max-width: 700px;
            margin-bottom: 30px;
            text-align: center;
        }

        .skill-chips {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
        }

        .skill-chip {
            padding: 8px 16px;
            border-radius: 999px;
            background: var(--chip-gradient);
            color: var(--text);
            font-size: 0.9rem;
            border: 1px solid rgba(148, 163, 184, 0.45);
            box-shadow: 0 12px 22px rgba(15, 23, 42, 0.35);
        }

        /* Custom Dropdown */
        .custom-dropdown {
            position: relative;
            display: inline-block;
            width: 220px;
            margin-bottom: 50px;
        }

        .dropdown-selected {
            padding: 12px 18px;
            background: rgba(20, 25, 40, 0.95);
            border-radius: var(--radius);
            cursor: pointer;
            font-weight: 500;
            color: var(--text);
            display: flex;
            justify-content: space-between;
            align-items: center;
            backdrop-filter: blur(12px);
            transition: all 0.3s;
        }

        .dropdown-selected:hover {
            background: rgba(30, 35, 55, 0.95);
            box-shadow: 0 0 12px rgba(99, 102, 241, 0.6);
        }

        .dropdown-selected::after {
            content: "▾";
            font-size: 0.8rem;
            margin-left: 10px;
        }

        .dropdown-options {
            position: absolute;
            top: 110%;
            left: 0;
            width: 100%;
            background: rgba(20, 25, 40, 0.95);
            border-radius: var(--radius);
            backdrop-filter: blur(12px);
            display: none;
            flex-direction: column;
            z-index: 10;
            max-height: 200px;
            overflow-y: auto;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
        }

        .dropdown-options div {
            padding: 10px 18px;
            cursor: pointer;
            transition: 0.2s;
        }

        .dropdown-options div:hover {
            background: rgba(99, 102, 241, 0.2);
        }

        /* Projects */
        .projects-container {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 36px;
        }

        .project {
            perspective: 1000px;
            height: auto;
        }

        .project-inner {
            background: linear-gradient(145deg, rgba(13, 20, 40, 0.88), rgba(26, 35, 63, 0.74));
            border-radius: var(--radius);
            backdrop-filter: blur(18px);
            overflow: hidden;
            display: flex;
            flex-direction: column;
            transition: transform 0.35s ease, box-shadow 0.35s ease;
            position: relative;
            height: auto;
            border: 1px solid rgba(99, 102, 241, 0.22);
            box-shadow: 0 18px 40px rgba(8, 12, 26, 0.55);
        }

        .project-inner::before {
            content: "";
            position: absolute;
            top: -140px;
            right: -60px;
            width: 240px;
            height: 240px;
            background: radial-gradient(circle, rgba(168, 85, 247, 0.45), transparent 60%);
            opacity: 0;
            transition: opacity 0.35s ease;
            pointer-events: none;
        }

        .project-content {
            padding: 24px;
            display: flex;
            flex-direction: column;
            height: auto;
            gap: 16px;
        }

        .project-content h2 {
            font-size: 1.5rem;
            margin-bottom: 12px;
            font-weight: 700;
            color: var(--text);
            background: linear-gradient(90deg, var(--primary), var(--accent));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            text-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
        }

        .project-content p {
            color: var(--text-muted);
            font-size: 1rem;
        }

        .project-content a {
            display: inline-block;
            padding: 12px 22px;
            border-radius: 50px;
            background: linear-gradient(130deg, rgba(99, 102, 241, 0.92), rgba(168, 85, 247, 0.9) 55%, rgba(56, 189, 248, 0.95));
            color: white;
            font-weight: 600;
            font-size: 0.95rem;
            text-align: center;
            transition: all 0.3s;
            position: relative;
            overflow: hidden;
            box-shadow: 0 16px 28px rgba(99, 102, 241, 0.45);
        }

        .project-content a::before {
            content: "";
            position: absolute;
            top: 0;
            left: -50%;
            width: 200%;
            height: 100%;
            background: linear-gradient(120deg,
                    rgba(255, 255, 255, 0.3),
                    rgba(255, 255, 255, 0));
            transform: skewX(-25deg);
            transition: left 0.6s;
        }

        .project-content a:hover::before {
            left: 100%;
        }

        .project-content a:hover {
            transform: translateY(-2px) scale(1.03);
            box-shadow: 0 26px 36px rgba(99, 102, 241, 0.6);
        }

        .project-inner:hover {
            transform: translateY(-8px) scale(1.01);
            box-shadow: 0 30px 58px rgba(5, 10, 26, 0.65);
        }

        .project-inner:hover::before {
            opacity: 0.5;
        }

        footer {
            text-align: center;
            padding: 50px 20px 70px;
            color: var(--text-muted);
            font-size: 0.9rem;
            margin-top: 60px;
            border-top: 1px solid rgba(99, 102, 241, 0.2);
            background: linear-gradient(110deg, rgba(8, 12, 26, 0.85), rgba(12, 18, 36, 0.7));
        }

        iframe {
            width: 100%;
            border-radius: var(--radius);
        }

        @media (max-width: 800px) {
            .nav-links {
                display: none;
            }

            nav {
                background: rgba(8, 12, 26, 0.9);
            }
        }

        @media (max-width: 850px) {
    .header-inner {
        grid-template-columns: 1fr;
        grid-template-areas:
            "avatar"
            "text"
            "skills";
        text-align: center;
    }

    .header-copy {
        text-align: center !important;
        align-items: center !important;
    }
}


        @media (max-width: 600px) {
            header {
                padding-top: 100px;
            }

            .hero-panel {
                padding: 42px 28px;
            }

            header h1 {
                font-size: 2.4rem;
            }

            header p {
                font-size: 1rem;
            }

            .cta-group {
                width: 100%;
            }

            .cta-group .cta-btn,
            .cta-group a {
                width: 100%;
                text-align: center;
            }

            .profile-card {
                width: 100%;
            }

            .section-panel {
                padding: 40px 26px;
            }
        }
        
.skills-card {
    grid-area: skills;
    width: 100%;
}

/* Fix: Dropdown must appear ABOVE projects */
.custom-dropdown {
    position: relative;
    z-index: 50; /* Higher than project cards */
}

.custom-dropdown .dropdown-options {
    position: absolute;
    z-index: 9999; /* Very high so nothing covers it */
    background: rgba(20, 25, 40, 0.95);
    border-radius: var(--radius);
    backdrop-filter: blur(12px);
    display: none;
    flex-direction: column;
    max-height: 260px;
    overflow-y: auto;
    box-shadow: 0 6px 20px rgba(0,0,0,0.9);
}

/* Ensure section panel does NOT hide overflow */
.section-panel {
    overflow: visible !important;
}
