/* ── CSS VARIABLES ── */
:root {
    --void: #030508;
    --deep: #060c14;
    --surface: #0a1628;
    --glass-border: rgba(255,255,255,0.08);
    --glass-bg: rgba(255,255,255,0.04);
    --glass-hover: rgba(255,255,255,0.08);
    --aurora-1: #0ff;
    --aurora-2: #7c3aed;
    --aurora-3: #06b6d4;
    --aurora-4: #a855f7;
    --aurora-5: #0ea5e9;
    --text-1: rgba(255,255,255,0.95);
    --text-2: rgba(255,255,255,0.55);
    --text-3: rgba(255,255,255,0.3);
    --glow-cyan: rgba(0,255,255,0.15);
    --glow-purple: rgba(124,58,237,0.15);
}

/* ── RESET ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Sora', sans-serif;
    background: var(--void);
    color: var(--text-1);
    overflow-x: hidden;
    line-height: 1.7;
    cursor: none;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ── CUSTOM CURSOR ── */
#cursor {
    width: 12px; height: 12px;
    background: var(--aurora-1);
    border-radius: 50%;
    position: fixed; pointer-events: none; z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width .2s, height .2s, background .2s;
    mix-blend-mode: screen;
    box-shadow: 0 0 20px var(--aurora-1), 0 0 40px rgba(0,255,255,0.4);
}
#cursor-ring {
    width: 36px; height: 36px;
    border: 1px solid rgba(0,255,255,0.4);
    border-radius: 50%;
    position: fixed; pointer-events: none; z-index: 9998;
    transform: translate(-50%, -50%);
    transition: all .12s ease;
}
body:has(a:hover) #cursor,
body:has(button:hover) #cursor { width: 20px; height: 20px; }

/* ── AURORA BACKGROUND ── */
.aurora-bg {
    position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
}
.aurora-orb {
    position: absolute; border-radius: 50%;
    filter: blur(120px); opacity: 0.18;
    animation: drift 20s ease-in-out infinite alternate;
}
.aurora-orb:nth-child(1) {
    width: 700px; height: 700px;
    background: radial-gradient(circle, #0ff 0%, transparent 70%);
    top: -200px; left: -150px; animation-delay: 0s;
}
.aurora-orb:nth-child(2) {
    width: 600px; height: 600px;
    background: radial-gradient(circle, #7c3aed 0%, transparent 70%);
    top: 30%; right: -100px; animation-delay: -7s;
}
.aurora-orb:nth-child(3) {
    width: 500px; height: 500px;
    background: radial-gradient(circle, #06b6d4 0%, transparent 70%);
    bottom: 0; left: 20%; animation-delay: -14s;
}
.aurora-orb:nth-child(4) {
    width: 400px; height: 400px;
    background: radial-gradient(circle, #a855f7 0%, transparent 70%);
    bottom: 20%; right: 10%; animation-delay: -4s;
}
@keyframes drift {
    0%   { transform: translate(0, 0) scale(1); }
    33%  { transform: translate(60px, -40px) scale(1.1); }
    66%  { transform: translate(-30px, 50px) scale(0.95); }
    100% { transform: translate(40px, 20px) scale(1.05); }
}

/* ── GRID OVERLAY ── */
.grid-overlay {
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background-image:
        linear-gradient(rgba(0,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,255,255,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
}

/* ── NOISE TEXTURE ── */
.noise {
    position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── NAVBAR ── */
#navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    padding: 0;
    transition: all .4s ease;
}
#navbar .nav-inner {
    margin: 16px auto;
    max-width: 900px;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 2rem;
    background: rgba(3,5,8,0.6);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    height: 56px;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.04), 0 8px 40px rgba(0,0,0,0.4);
    transition: all .4s ease;
}
#navbar.scrolled .nav-inner {
    margin: 10px auto;
    background: rgba(3,5,8,0.8);
    box-shadow: 0 0 0 1px rgba(0,255,255,0.1), 0 8px 60px rgba(0,255,255,0.05), 0 20px 60px rgba(0,0,0,0.5);
}
.logo {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: .05em;
    background: linear-gradient(135deg, #fff 0%, var(--aurora-1) 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.nav-links { display: flex; gap: 0.25rem; }
.nav-links a {
    padding: 0.45rem 1rem;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-2);
    border-radius: 50px;
    letter-spacing: .04em;
    transition: all .25s;
}
.nav-links a:hover {
    color: var(--text-1);
    background: var(--glass-bg);
}
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}
.hamburger span {
    display: block; width: 22px; height: 2px;
    background: var(--text-2); border-radius: 2px;
    margin: 5px 0; transition: all .3s;
}

/* Nav Overlay (mobile) */
.nav-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 1999;
    backdrop-filter: blur(2px);
}
.nav-overlay.open { display: block; }

/* ── LAYOUT ── */
section { position: relative; z-index: 1; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 2rem; }

/* ── HERO ── */
#hero {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    text-align: center; padding: 120px 2rem 80px;
}
.hero-eyebrow {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem; font-weight: 400;
    letter-spacing: .2em; color: var(--aurora-1);
    text-transform: uppercase; margin-bottom: 2rem;
    opacity: 0; animation: fadeUp .8s ease .3s forwards;
    display: flex; align-items: center; justify-content: center; gap: 1rem;
}
.hero-eyebrow::before, .hero-eyebrow::after {
    content: ''; width: 40px; height: 1px;
    background: linear-gradient(90deg, transparent, var(--aurora-1));
}
.hero-eyebrow::after { background: linear-gradient(90deg, var(--aurora-1), transparent); }
.hero-name {
    font-size: clamp(3.5rem, 10vw, 8rem);
    font-weight: 800; line-height: 1;
    letter-spacing: -.03em; margin-bottom: 1.5rem;
    opacity: 0; animation: fadeUp .8s ease .5s forwards;
}
.hero-name .first { color: var(--text-1); }
.hero-name .last {
    background: linear-gradient(135deg, var(--aurora-1) 0%, var(--aurora-4) 50%, var(--aurora-5) 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text; position: relative;
}
.hero-name .last::after {
    content: attr(data-text);
    position: absolute; inset: 0;
    background: linear-gradient(135deg, var(--aurora-1) 0%, var(--aurora-4) 50%, var(--aurora-5) 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: blur(20px); opacity: 0.5; z-index: -1;
}
.hero-role {
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    font-weight: 300; color: var(--text-2);
    margin-bottom: 1.5rem;
    opacity: 0; animation: fadeUp .8s ease .7s forwards;
}
.hero-role strong { color: var(--text-1); font-weight: 500; }
.hero-desc {
    max-width: 560px; margin: 0 auto 3rem;
    font-size: 0.95rem; color: var(--text-2);
    opacity: 0; animation: fadeUp .8s ease .9s forwards;
    line-height: 1.8;
}
.hero-btns {
    display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap;
    opacity: 0; animation: fadeUp .8s ease 1.1s forwards;
}
.btn-glass {
    padding: 0.85rem 2rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    font-size: 0.875rem; font-weight: 500;
    font-family: 'Sora', sans-serif;
    color: var(--text-1); cursor: none;
    letter-spacing: .04em; transition: all .3s;
    backdrop-filter: blur(10px);
    position: relative; overflow: hidden;
    display: inline-flex; align-items: center; gap: .5rem;
}
.btn-glass::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, transparent 60%);
    opacity: 0; transition: opacity .3s;
}
.btn-glass:hover::before { opacity: 1; }
.btn-glass:hover {
    border-color: rgba(0,255,255,0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,255,255,0.1), 0 0 0 1px rgba(0,255,255,0.15);
}
.btn-glow {
    padding: 0.85rem 2rem;
    background: linear-gradient(135deg, rgba(0,255,255,0.15) 0%, rgba(124,58,237,0.15) 100%);
    border: 1px solid rgba(0,255,255,0.3);
    border-radius: 50px;
    font-size: 0.875rem; font-weight: 600;
    font-family: 'Sora', sans-serif;
    color: var(--aurora-1); cursor: none;
    letter-spacing: .04em; transition: all .3s;
    backdrop-filter: blur(10px);
    position: relative; overflow: hidden;
    display: inline-flex; align-items: center; gap: .5rem;
}
.btn-glow:hover {
    background: linear-gradient(135deg, rgba(0,255,255,0.25) 0%, rgba(124,58,237,0.25) 100%);
    box-shadow: 0 0 30px rgba(0,255,255,0.2), 0 8px 30px rgba(0,0,0,0.3);
    transform: translateY(-2px);
}
.hero-scroll {
    position: absolute; bottom: 2.5rem; left: 50%; transform: translateX(-50%);
    opacity: 0; animation: fadeUp .8s ease 1.5s forwards;
    display: flex; flex-direction: column; align-items: center; gap: .5rem;
}
.scroll-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem; letter-spacing: .2em;
    color: var(--text-3); text-transform: uppercase;
}
.scroll-line {
    width: 1px; height: 50px;
    background: linear-gradient(to bottom, var(--aurora-1), transparent);
    animation: scrollLine 2s ease-in-out infinite;
}
@keyframes scrollLine {
    0%, 100% { opacity: 0.2; transform: scaleY(1); }
    50%       { opacity: 1;   transform: scaleY(0.6); }
}

/* ── GLASS CARD ── */
.glass-card {
    background: rgba(10,22,40,0.5);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    position: relative; overflow: hidden;
    transition: all .4s ease;
}
.glass-card::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, transparent 50%);
    pointer-events: none;
}
.glass-card:hover {
    border-color: rgba(0,255,255,0.2);
    box-shadow: 0 0 0 1px rgba(0,255,255,0.05), 0 30px 80px rgba(0,0,0,0.4), 0 0 60px rgba(0,255,255,0.04);
    transform: translateY(-4px);
}

/* ── SECTION LABELS ── */
.section-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem; letter-spacing: .2em;
    color: var(--aurora-1); text-transform: uppercase;
    display: block; text-align: center; margin-bottom: 1rem;
}
.section-title {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 700; text-align: center;
    margin-bottom: 4rem;
    letter-spacing: -.02em; line-height: 1.1;
}
.section-title .highlight {
    background: linear-gradient(135deg, var(--aurora-1) 0%, var(--aurora-4) 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── THE STORY ── */
#story { padding: 120px 0; }
.story-grid {
    max-width: 800px;
    margin: 0 auto;
}
.story-card { padding: 3rem; text-align: left; }
.story-card p {
    color: var(--text-2); line-height: 2;
    font-size: 1.1rem; margin-bottom: 2rem;
}
.story-card p:last-child { margin-bottom: 0; }
.story-card strong { color: var(--text-1); font-weight: 600; }

/* ── PRODUCTS ── */
#projects { padding: 120px 0; }
.projects-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.project-card { padding: 2rem; border-radius: 20px; display: flex; flex-direction: column; }
.project-card-header {
    display: flex; align-items: flex-start;
    justify-content: space-between; gap: 1rem; margin-bottom: 1rem;
}
.project-index {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem; color: var(--aurora-1); opacity: .6;
    flex-shrink: 0; margin-top: .2rem;
}
.project-card h3 { font-size: 1.05rem; font-weight: 700; line-height: 1.3; margin-bottom: 0; }
.project-card p {
    font-size: 0.84rem; color: var(--text-2);
    line-height: 1.75; margin-bottom: 1.5rem; flex-grow: 1;
}
.tech-row { display: flex; flex-wrap: wrap; gap: .4rem; }
.tech-tag {
    font-family: 'JetBrains Mono', monospace; font-size: 0.72rem;
    padding: .25rem .7rem;
    background: rgba(124,58,237,0.1); border: 1px solid rgba(124,58,237,0.2);
    border-radius: 4px; color: var(--aurora-4);
}

/* ── CONTACT ── */
#contact { padding: 120px 0; }
.contact-inner { max-width: 700px; margin: 0 auto; }
.contact-lead {
    text-align: center; color: var(--text-2);
    font-size: 0.97rem; margin-bottom: 3rem; line-height: 1.8;
}
.contact-cards { display: flex; flex-direction: column; gap: 1rem; }
.contact-link {
    display: flex; align-items: center; gap: 1.25rem;
    padding: 1.25rem 1.75rem; border-radius: 16px;
    font-size: 0.9rem; color: var(--text-2); transition: all .3s;
    border: 1px solid var(--glass-border); background: var(--glass-bg);
}
.contact-link:hover {
    border-color: rgba(0,255,255,0.25); color: var(--text-1);
    background: rgba(0,255,255,0.04); transform: translateX(6px);
}
.contact-icon {
    width: 40px; height: 40px; border-radius: 10px;
    background: linear-gradient(135deg, rgba(0,255,255,0.1), rgba(124,58,237,0.1));
    border: 1px solid rgba(0,255,255,0.15);
    display: flex; align-items: center; justify-content: center;
    color: var(--aurora-1); flex-shrink: 0;
}
.contact-link-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem; color: var(--text-3);
    text-transform: uppercase; letter-spacing: .1em;
    display: block; margin-bottom: .1rem;
}

/* ── FOOTER ── */
footer {
    position: relative; z-index: 1;
    border-top: 1px solid var(--glass-border); padding: 2.5rem 0;
}
.footer-inner {
    display: flex; align-items: center;
    justify-content: space-between; flex-wrap: wrap; gap: 1.5rem;
}
.footer-logo {
    font-family: 'JetBrains Mono', monospace; font-size: 1rem;
    background: linear-gradient(135deg, #fff, var(--aurora-1));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.footer-copy { font-size: 0.8rem; color: var(--text-3); }
.social-row { display: flex; gap: .75rem; }
.social-btn {
    width: 38px; height: 38px; border-radius: 10px;
    background: var(--glass-bg); border: 1px solid var(--glass-border);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-2); font-size: .9rem; transition: all .25s;
}
.social-btn:hover {
    border-color: rgba(0,255,255,0.3); color: var(--aurora-1);
    background: rgba(0,255,255,0.06);
}

/* ── REVEAL ANIMATIONS ── */
.reveal {
    opacity: 0; transform: translateY(24px);
    transition: opacity .7s ease, transform .7s ease;
}
.reveal.active { opacity: 1; transform: translateY(0); }

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════
   RESPONSIVE — TABLET (≤ 768px)
═══════════════════════════════════════ */
@media (max-width: 768px) {
    body { cursor: auto; }
    #cursor, #cursor-ring { display: none; }

    /* Navbar */
    #navbar .nav-inner {
        margin: 10px 1rem;
        padding: 0 1.25rem;
        border-radius: 16px;
    }

    /* Hamburger */
    .hamburger {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 5px;
        z-index: 3000;
        width: 36px; height: 36px;
    }
    .hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
    .hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

    /* Slide-in drawer */
    .nav-links {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        gap: 0;
        position: fixed;
        top: 0; right: 0; bottom: 0;
        width: 75%; max-width: 300px;
        background: rgba(6,12,20,0.97);
        backdrop-filter: blur(30px) saturate(180%);
        -webkit-backdrop-filter: blur(30px) saturate(180%);
        border-left: 1px solid var(--glass-border);
        z-index: 2000;
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.4,0,0.2,1);
        padding: 5rem 2rem 3rem;
        box-shadow: -20px 0 60px rgba(0,0,0,0.6);
    }
    .nav-links.open { transform: translateX(0); }
    .nav-links li { width: 100%; border-bottom: 1px solid rgba(255,255,255,0.05); }
    .nav-links li:first-child { border-top: 1px solid rgba(255,255,255,0.05); }
    .nav-links a {
        display: block; font-size: 1rem; font-weight: 500;
        color: var(--text-2); padding: 1rem 0;
        border-radius: 0; letter-spacing: .06em;
        transition: color .25s, padding-left .25s;
    }
    .nav-links a:hover { color: var(--aurora-1); background: none; padding-left: 0.5rem; }

    /* Layout */
    section { padding: 80px 0; }
    #hero { padding: 110px 1.5rem 80px; min-height: 100svh; }
    .container { padding: 0 1.25rem; }

    /* Hero */
    .hero-name { font-size: clamp(2.8rem, 14vw, 4.5rem); }
    .hero-role { font-size: 0.9rem; }
    .hero-desc { font-size: 0.875rem; }
    .hero-btns { flex-direction: column; align-items: center; gap: 0.75rem; }
    .btn-glass, .btn-glow { width: 100%; max-width: 260px; justify-content: center; }

    /* Hero */
    .contact-link { padding: 1rem 1.25rem; }

    /* Typography */
    .section-title { font-size: clamp(1.8rem, 7vw, 2.5rem); margin-bottom: 2.5rem; }

    /* Footer */
    .footer-inner { flex-direction: column; text-align: center; gap: 1rem; }
}

/* ═══════════════════════════════════════
   RESPONSIVE — MOBILE (≤ 480px)
═══════════════════════════════════════ */
@media (max-width: 480px) {
    .hero-name { font-size: clamp(2.4rem, 16vw, 3.2rem); letter-spacing: -.02em; }
    .hero-eyebrow { font-size: 0.65rem; }
    .badge { font-size: 0.72rem; padding: .28rem .7rem; }
    .tech-tag { font-size: 0.68rem; }
    .project-card h3 { font-size: 0.95rem; }
    .contact-link { font-size: 0.82rem; }
    .nav-links { width: 85%; max-width: none; }
}