/* ==============================================================
   site-nav.css — Top navigation bar for michaelpinotti.net
   Injected into every visible HTML page. Self-contained.
   Edit this single file to update the nav everywhere.
   ============================================================== */

/* Prevent this nav's styles from bleeding outside its own scope. */
.mp-nav, .mp-nav *, .mp-nav *::before, .mp-nav *::after {
    box-sizing: border-box;
}

.mp-nav {
    position: sticky;
    top: 0;
    z-index: 99999;

    width: 100%;
    background: rgba(32, 44, 58, 0.78);
    -webkit-backdrop-filter: blur(10px) saturate(140%);
            backdrop-filter: blur(10px) saturate(140%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);

    font-family: 'Karla', 'Helvetica Neue', Arial, sans-serif;
    color: #ffffff;
    line-height: 1;
}

.mp-nav-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: stretch;
    padding: 0 12px;
}

.mp-nav ul.mp-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: stretch;
    flex-wrap: wrap;
}

.mp-nav .mp-item {
    position: relative;
}

/* Top-level link / button */
.mp-nav .mp-top {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 22px 24px;

    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 2.2px;
    white-space: nowrap;

    background: transparent;
    border: none;
    cursor: pointer;

    transition: background 0.2s, color 0.2s;
}

.mp-nav .mp-item:hover > .mp-top,
.mp-nav .mp-item:focus-within > .mp-top,
.mp-nav .mp-top:focus-visible {
    background: rgba(255, 255, 255, 0.08);
    outline: none;
}

/* Leading em-dash on the current page */
.mp-nav .mp-item.mp-current > .mp-top::before {
    content: "— ";
    margin-right: 2px;
    color: #ffffff;
}

/* Chevron on dropdown parents */
.mp-chev {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translate(-1px, -1px);
    margin-left: 8px;
    opacity: 0.9;
    transition: transform 0.2s;
}

.mp-nav .mp-item:hover > .mp-top .mp-chev,
.mp-nav .mp-item:focus-within > .mp-top .mp-chev {
    transform: rotate(-135deg) translate(-3px, -3px);
}

/* Dropdown panel */
.mp-nav .mp-sub {
    position: absolute;
    top: 100%;
    left: 0;

    min-width: 240px;
    margin: 0;
    padding: 6px 0;
    list-style: none;

    background: rgba(20, 28, 38, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: none;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);

    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.18s, transform 0.18s, visibility 0s linear 0.18s;
}

.mp-nav .mp-item:hover > .mp-sub,
.mp-nav .mp-item:focus-within > .mp-sub {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity 0.18s, transform 0.18s, visibility 0s;
}

.mp-sub a {
    display: block;
    padding: 11px 22px;
    color: #f3f5f8;
    text-decoration: none;
    font-size: 13px;
    letter-spacing: 1.4px;
    white-space: nowrap;
    transition: background 0.15s;
}

.mp-sub a:hover,
.mp-sub a:focus-visible {
    background: rgba(255, 255, 255, 0.09);
    color: #ffffff;
    outline: none;
}

/* -------- Mobile (CSS-only hamburger via checkbox hack) -------- */
.mp-nav-toggle { display: none; }   /* hidden checkbox */

.mp-hamburger {
    display: none;
    margin-left: auto;
    padding: 18px 22px;
    cursor: pointer;
    color: #ffffff;
    font-size: 22px;
    user-select: none;
}
.mp-hamburger::before { content: "\2630"; }   /* ☰ */
.mp-nav-toggle:checked ~ .mp-nav-inner .mp-hamburger::before {
    content: "\2715";   /* ✕ */
}

@media (max-width: 880px) {
    .mp-nav-inner {
        flex-wrap: wrap;
        padding: 0;
    }
    .mp-hamburger { display: inline-flex; }

    .mp-nav .mp-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        background: rgba(20, 28, 38, 0.97);
    }
    .mp-nav-toggle:checked ~ .mp-nav-inner .mp-menu {
        display: flex;
    }
    .mp-nav .mp-item { width: 100%; }
    .mp-nav .mp-top {
        width: 100%;
        padding: 16px 22px;
    }
    .mp-nav .mp-sub {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        transition: none;
        box-shadow: none;
        border: none;
        padding-left: 14px;
        background: rgba(0, 0, 0, 0.18);
        display: none;
    }
    .mp-nav .mp-item:hover > .mp-sub,
    .mp-nav .mp-item:focus-within > .mp-sub {
        display: block;
    }
}

/* Reduced-motion users: skip all transitions. */
@media (prefers-reduced-motion: reduce) {
    .mp-nav *,
    .mp-nav *::before,
    .mp-nav *::after {
        transition: none !important;
    }
}
