/* === NAVIGATION — Shared Component (isolated) === */

/*
  Nav lives inside .hero but OUTSIDE .hero__content
  (hero__content has CSS animation transforms that break position:fixed).

  Default:  centered in hero, below the title (z-index: 10)
  Sticky:   JS adds .nav--sticky → position: fixed at top
*/

.nav {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    /* Position below hero content center — vertically offset */
    top: calc(50% + 70px);
    z-index: 10;
    animation: nav-fade-in 1s var(--ease-out) 0.8s both;
    transition: opacity 0.3s var(--ease-out);
}

/* ── Sticky state (added/removed by JS) ── */
.nav--sticky {
    position: fixed;
    top: var(--space-lg);
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    animation: nav-slide-in 0.4s var(--ease-out) both;
}

.nav__pill {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 0.3rem 1rem;
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-nav);
    border: 1px solid rgba(255, 255, 255, 0.6);
    white-space: nowrap;
}

.nav__links {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.nav__link {
    position: relative;
    font-family: var(--font-body);
    font-weight: 400;
    font-size: var(--text-nav);
    color: var(--color-text-primary);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-pill);
    transition: all var(--duration-fast) var(--ease-smooth);
    white-space: nowrap;
}

.nav__link:hover {
    background: rgba(58, 58, 69, 0.06);
}

.nav__link--active {
    background: rgba(58, 58, 69, 0.08);
    font-weight: 500;
}

.nav__cv {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: var(--text-nav);
    color: var(--color-text-primary);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-pill);
    transition: all var(--duration-fast) var(--ease-smooth);
}

.nav__cv:hover {
    background: rgba(58, 58, 69, 0.06);
}

.nav__cv-icon {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

/* ── Mobile hamburger ── */
.nav__hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 0.5rem;
    cursor: pointer;
}

.nav__hamburger-line {
    width: 22px;
    height: 2px;
    background: var(--color-text-primary);
    border-radius: 2px;
    transition: all var(--duration-fast) var(--ease-smooth);
}

/* ── Enhanced shadow when sticky ── */
.nav--sticky .nav__pill {
    box-shadow: 0 4px 32px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.96);
}

/* ── Animations ── */
@keyframes nav-fade-in {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes nav-slide-in {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}