:root {
    --nav-height: 86px;
    --nav-bg: #080807;
    --nav-border: rgba(255,255,255,0.04);
    --switch-border: rgba(255,255,255,0.66);
}

html.page-enter-pending[data-page-enter="left"] body { opacity: 0; transform: translateX(-28px); }
html.page-enter-pending[data-page-enter="right"] body { opacity: 0; transform: translateX(28px); }
body.page-exit-left { opacity: 0; transform: translateX(-28px); }
body.page-exit-right { opacity: 0; transform: translateX(28px); }

.starfield {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.meteorfield {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 220;
    pointer-events: none;
}

.noise-overlay {
    position: fixed;
    inset: 0;
    z-index: 1;
    opacity: 0.03;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.cursor-glow {
    position: fixed;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--accent-blue-rgb),0.07) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s;
}

.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: center;
    padding: 24px 0;
    background: var(--nav-bg);
    border-bottom: 1px solid var(--nav-border);
    transform: translateY(-100%);
    transition: transform 0.6s cubic-bezier(0.2,0,0.2,1);
}
.top-nav.visible { transform: translateY(0); }

.nav-inner {
    max-width: 1200px;
    width: 100%;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-title {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    transition: color 0.2s;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transform: translateX(-6px);
}

.nav-logo {
    height: 22px;
    width: auto;
    display: block;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 28px;
    transform: translateX(6px);
}

.page-switch {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 154px;
    height: 38px;
    padding: 4px;
    border-radius: 999px;
    background: rgba(var(--accent-blue-rgb),0.045);
    border: 1px solid var(--switch-border);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.025), 0 8px 28px rgba(var(--accent-blue-rgb),0.08);
}

.switch-thumb {
    position: absolute;
    top: 4px;
    left: 4px;
    width: calc(50% - 4px);
    height: calc(100% - 8px);
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(0,0,0,0.28);
    transition: transform 0.28s cubic-bezier(0.2,0.8,0.2,1);
}

.page-switch[data-active="resume"] .switch-thumb { transform: translateX(100%); }

.switch-link {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.72);
    font-size: 0.86rem;
    font-weight: 650;
    letter-spacing: 0;
    text-decoration: none;
    transition: color 0.2s;
}

.switch-link:hover { color: #fff; }
.switch-link.active,
.switch-link.active:hover { color: #080807; }

.hero-cta {
    position: relative;
    justify-content: center;
    min-width: 128px;
    padding-inline: 30px;
    overflow: hidden;
}

.hero-cta-label {
    display: inline-block;
    transform: translateX(0);
    transition: transform 0.28s cubic-bezier(0.2,0.8,0.2,1);
}

.hero-cta::after {
    content: "\2192";
    position: absolute;
    right: 22px;
    top: 50%;
    opacity: 0;
    transform: translate(0, -50%);
    transition: opacity 0.2s, transform 0.28s cubic-bezier(0.2,0.8,0.2,1);
}

.hero-cta:hover .hero-cta-label {
    transform: translateX(-8px);
}

.hero-cta:hover::after {
    opacity: 1;
    transform: translate(5px, -50%);
}

body .hero-cta:hover {
    background: #fff;
}

@media (max-width: 768px) {
    .top-nav { padding: 1rem 0; }
    .nav-inner {
        justify-content: center;
        gap: 1rem;
        flex-wrap: wrap;
        padding: 0 1rem;
    }
    .nav-title,
    .nav-actions { transform: none; }
    .nav-title { font-size: 0.9rem; }
    .nav-inner > a {
        flex: 0 1 auto;
        justify-content: center;
    }
    .nav-actions {
        flex-direction: row;
        gap: 0;
    }
    .page-switch {
        width: 9.25rem;
        height: 2.25rem;
    }
    .switch-link { font-size: 0.82rem; }
    body .hero-cta {
        min-width: 118px;
        padding-inline: 24px;
    }
    .hero-cta::after { right: 17px; }
}
