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

html,
body {
    height: 100%
}

body {
    font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, Arial;
    background: #05060a;
    color: #e6eef6;
    -webkit-font-smoothing: antialiased;
    overflow: hidden;
    /* outer container handles scroll */
}

/* ---------- root vars (luxury palette) ---------- */
:root {
    --deep-1: #040414;
    --deep-2: #0b1020;
    --accent1: #8a6bff;
    --accent2: #00e5ff;
    --gold: #ffd166;
    --glass: rgba(255, 255, 255, 0.06);
    --glass-2: rgba(255, 255, 255, 0.03);
    --neon: rgba(138, 107, 255, 0.14);
    --radius: 18px;
}

/* ---------- app shell: full height scroll-snap ---------- */
.app {
    height: 100vh;
    width: 100vw;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch;
    position: relative;
}

section {
    height: 100vh;
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6vh 6vw;
    position: relative;
    isolation: isolate;
}

/* ---------- animated background layers ---------- */
.bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

/* animated gradient layer */
.bg .grad {
    position: absolute;
    inset: -20%;
    background: conic-gradient(from 180deg at 50% 50%, #05031a, var(--accent1), var(--accent2), #07122b);
    filter: blur(80px) saturate(120%);
    opacity: 0.9;
    transform: translateZ(0);
    animation: rotateGrad 18s linear infinite;
}

@keyframes rotateGrad {
    to {
        transform: rotate(360deg) scale(1.02);
    }
}

/* subtle waves svg (further back) */
.bg .waves {
    position: absolute;
    inset: 0;
    opacity: 0.06;
    transform: translateY(-8%);
}

/* particles canvas sits on top */
#particles {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* ---------- nav (floating) ---------- */
header {
    position: fixed;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 40;
    width: min(1100px, 94%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 18px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.04);
    box-shadow: 0 8px 30px rgba(2, 6, 23, 0.6);
    backdrop-filter: blur(6px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px
}

.brand img {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.06)
}

.brand h1 {
    font-family: "Playfair Display", serif;
    font-size: 20px;
    color: var(--gold);
    margin: 0
}

/* ... (existing CSS) ... */

/* ---------- nav (floating) ---------- */
header {
    /* ... (existing header styles) ... */
    position: fixed;
    /* Make sure this is present */
    z-index: 40;
    /* Make sure this is present */
}

/* Add this new class for the menu toggle button */
.menu-toggle {
    display: none;
    /* Hidden by default on large screens */
    background: transparent;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    transition: background .2s;
    line-height: 1;
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* ... (existing media queries) ... */

@media (max-width: 1000px) {
    /* ... (existing media query styles) ... */

    /* Show the menu toggle button */
    header .menu-toggle {
        display: block;
    }

    /* Hide the default navigation list */
    header nav {
        display: none;
        position: absolute;
        top: 68px;
        /* Position below the header */
        right: 18px;
        width: 200px;
        background: linear-gradient(180deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.9));
        border: 1px solid rgba(255, 255, 255, 0.04);
        border-radius: 12px;
        box-shadow: 0 8px 30px rgba(2, 6, 23, 0.8);
        padding: 10px 0;
        backdrop-filter: blur(8px);
    }

    header nav ul {
        flex-direction: column;
        gap: 0;
    }

    header nav a {
        display: block;
        padding: 12px 18px;
        border-radius: 0;
        width: 100%;
    }

    /* Class to show the mobile menu */
    header nav.show-nav {
        display: block;
    }
}

nav ul {
    display: flex;
    gap: 18px;
    align-items: center;
    list-style: none
}

nav a {
    color: rgba(230, 238, 246, 0.9);
    text-decoration: none;
    font-weight: 600;
    padding: 8px 10px;
    border-radius: 8px;
    transition: .2s
}

nav a:hover {
    background: linear-gradient(90deg, rgba(138, 107, 255, 0.08), rgba(0, 229, 255, 0.04));
    color: white
}

/* ---------- magnetic cursor ---------- */
.cursor {
    position: fixed;
    z-index: 60;
    pointer-events: none;
    transform: translate(-50%, -50%);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.6));
    box-shadow: 0 6px 20px rgba(138, 107, 255, 0.15), 0 0 40px rgba(0, 229, 255, 0.06);
    transition: transform .12s ease, width .15s ease, height .15s ease, opacity .15s;
    mix-blend-mode: screen;
    opacity: 0.95;
}

.cursor.huge {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: conic-gradient(from 180deg, #fff4, #fff0);
    opacity: .14;
    box-shadow: 0 18px 80px rgba(138, 107, 255, 0.08)
}

.cursor.hidden {
    opacity: 0
}

/* ---------- HERO (letter reveal + shimmer) ---------- */
.hero-inner {
    max-width: 1200px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 40px;
    align-items: center;
    z-index: 5
}

.hero-left {
    color: #fff
}

.eyebrow {
    display: inline-block;
    background: linear-gradient(90deg, rgba(138, 107, 255, 0.12), rgba(0, 229, 255, 0.06));
    color: var(--gold);
    padding: 6px 12px;
    border-radius: 999px;
    font-weight: 700;
    margin-bottom: 14px
}

.hero-title {
    font-family: "Playfair Display", serif;
    font-size: 3.6rem;
    line-height: 1.02;
    margin-bottom: 14px;
    display: inline-block
}

.shimmer {
    background: linear-gradient(90deg, var(--gold), #fff, var(--accent1));
    background-size: 200% 100%;
    -webkit-background-clip: text;
    color: transparent;
    animation: shimmer 2.6s linear infinite
}

@keyframes shimmer {
    0% {
        background-position: 0% 50%
    }

    100% {
        background-position: 200% 50%
    }
}

.hero-sub {
    color: rgba(230, 238, 246, 0.85);
    max-width: 640px;
    font-size: 1.05rem;
    margin-bottom: 22px
}

.hero-ctas {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    text-decoration: none;
}

.btn-cta {
    padding: 12px 22px;
    border-radius: 999px;
    border: none;
    background: linear-gradient(90deg, var(--accent1), var(--accent2));
    color: #021226;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}
.btn-cta a {
  text-decoration: none;
  color: inherit;
}

.btn-ghost {
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: #fff;
    background: transparent;
    cursor: pointer
}
.btn-ghost a {
  text-decoration: none;
  color: inherit; 
}

/* profile card (glass + neon rim) */
.hero-right {
    display: flex;
    justify-content: center;
    align-items: center
}

.profile {
    width: 380px;
    padding: 20px;
    border-radius: 20px;
    background: linear-gradient(180deg, var(--glass), var(--glass-2));
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 18px 60px rgba(2, 6, 23, 0.7);
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
}

.profile::before {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 22px;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(138, 107, 255, 0.14), rgba(0, 229, 255, 0.06));
    filter: blur(18px);
    opacity: 0.6;
    mix-blend-mode: screen;
}

.profile img {
    width: 150px;
    height: 150px;
    border-radius: 18px;
    object-fit: cover;
    border: 6px solid rgba(255, 255, 255, 0.04);
    display: block;
    margin: 0 auto
}

.profile h3 {
    margin-top: 12px;
    text-align: center;
    color: #fff
}

.profile p {
    color: rgba(230, 238, 246, 0.75);
    text-align: center;
    margin-top: 6px;
    font-size: 0.95rem
}

/* ---------- Sections content cards ---------- */
.content {
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
    display: grid;
    gap: 20px
}

.glass-card {
    padding: 20px;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.04);
    box-shadow: 0 12px 30px rgba(2, 6, 23, 0.6);
    backdrop-filter: blur(10px);
    transform: translateZ(0);
}

/* skills grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px
}

.skill-pill {
    padding: 18px;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
    border: 1px solid rgba(255, 255, 255, 0.03);
    text-align: center;
    transition: transform .28s;
}

.skill-pill:hover {
    transform: translateY(-10px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6)
}

/* project cards with 3D tilt and dynamic light */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px
}

.proj {
    perspective: 1200px;
}

.proj-card {
    height: 340px;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    transform-style: preserve-3d;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
    border: 1px solid rgba(255, 255, 255, 0.04);
    box-shadow: 0 18px 40px rgba(2, 6, 23, 0.6);
    transition: transform .35s cubic-bezier(.15, .9, .3, 1), box-shadow .35s;
    will-change: transform;
}

.proj-card .thumb {
    height: 180px;
    overflow: hidden
}

.proj-card .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform-origin: center;
    transition: transform .6s
}

.proj-meta {
    padding: 16px
}

.proj-gloss {
    position: absolute;
    inset: 0;
    pointer-events: none;
    mix-blend-mode: screen;
    opacity: 0;
    transition: opacity .35s;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.02) 40%, rgba(255, 255, 255, 0.0) 100%);
    transform: translateZ(60px) scale(1.06);
}

.proj-card:hover .proj-gloss {
    opacity: 1
}

/* shimmer heading */
.section-heading {
    font-family: "Playfair Display", serif;
    font-size: 2.4rem;
    margin-bottom: 14px;
    display: inline-block;
    background: linear-gradient(90deg, var(--gold), #fff, var(--accent1));
    -webkit-background-clip: text;
    color: transparent;
    background-size: 200% 100%;
    animation: shimmer 3.2s linear infinite;
}

/* contact form */
.contact-form {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px
}

.field {
    padding: 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    background: rgba(255, 255, 255, 0.02);
    color: #fff
}

.send-btn {
    padding: 12px;
    border-radius: 999px;
    border: none;
    background: linear-gradient(90deg, var(--accent1), var(--accent2));
    color: #021226;
    font-weight: 800;
    cursor: pointer
}

/* footer */
footer {
    padding: 28px 0;
    text-align: center;
    color: rgba(230, 238, 246, 0.6)
}

/* reveal utility */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.9s cubic-bezier(0.2, 0.9, 0.2, 1);
}

.reveal.visible {
    opacity: 1;
    transform: none;
}

/* responsive */
@media (max-width: 1000px) {
    .hero-inner {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 30px;
    }

    .hero-right {
        order: 2;
    }

    header {
        left: 50%;
        transform: translateX(-50%);
        width: 92%;
        padding: 8px 14px;
    }

    .brand h1 {
        font-size: 18px;
    }

    header nav {
        display: none;
    }
}

@media (max-width: 768px) {
    section {
        padding: 5vh 5vw;
    }

    .hero-left,
    .hero-sub,
    .hero-ctas {
        max-width: 100%;
        text-align: center;
        justify-content: center;
        text-decoration: none;
    }

    .hero-title {
        font-size: 2.5rem;
        line-height: 1.1;
    }

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

    .profile {
        width: 100%;
        max-width: 300px;
    }

    .profile img {
        width: 120px;
        height: 120px;
    }

    .glass-card>div {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 12px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .proj-card {
        height: auto;
    }

    .proj-card .thumb {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .section-heading {
        font-size: 1.8rem;
    }

    .hero-sub {
        font-size: 0.95rem;
    }

    .btn-cta,
    .btn-ghost {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .contact-form .field {
        font-size: 0.9rem;
        padding: 12px;
    }
}

.home-sci a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(90deg, var(--accent1), var(--accent2));
    color: #021226;
    cursor: pointer;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
    text-decoration: none;
    margin: 30px 15px 30px 0;
}

.home-sci a:hover {
    background: linear-gradient(90deg, var(--accent1), var(--accent2));
    color: #081b29;
    box-shadow: 0 0 20px rgb(189, 188, 219);
}