/* -- NAV --------------------------------------------------------------------
   Three-zone grid: [breadcrumb | SITENAME | links]
   SITENAME is always truly centered relative to full bar width.           */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 52px;
    z-index: 200;
    backdrop-filter: blur(5px);
    border-bottom: 1px solid rgba(160, 120, 255, 0.22);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 0 2rem;
}

/* -- LEFT ZONE: breadcrumb -------------------------------------------------- */
.nav-left {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    justify-content: flex-start;
    min-width: 0;
    /* allow truncation */
}

/* -- CENTER ZONE: SITENAME -------------------------------------------------- */
.brand {
    font-family: 'Syne', sans-serif;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: #f0eaff;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
}

/* -- RIGHT ZONE: nav links -------------------------------------------------- */
.nav-right {
    display: flex;
    align-items: center;
    gap: 2rem;
    justify-content: flex-end;
}

nav a {
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    color: rgba(210, 195, 255, 0.75);
    text-decoration: none;
    text-transform: uppercase;
    transition: color 0.2s;
    white-space: nowrap;
}

nav a:hover {
    color: #fff;
}

/* -- BREADCRUMB ------------------------------------------------------------- */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    color: rgba(200, 185, 255, 0.5);
    overflow: hidden;
    /* stop it blowing past nav-left */
}

.breadcrumb a {
    color: rgba(200, 185, 255, 0.65);
    text-decoration: none;
    transition: color 0.2s;
    white-space: nowrap;
}

.breadcrumb a:hover {
    color: #fff;
}

.breadcrumb .sep {
    color: rgba(160, 120, 255, 0.35);
    user-select: none;
    flex-shrink: 0;
}

.breadcrumb .current {
    color: rgba(210, 195, 255, 0.9);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* -- NARROW: hide nav links, collapse breadcrumb ----------------------------
   Below 640px the right-hand links would overlap the brand.
   Hide them - a mobile nav menu can be added later if needed.             */
@media (max-width: 640px) {
    nav {
        padding: 0 1rem;
        grid-template-columns: 1fr auto 1fr;
    }

    .nav-right {
        display: none;
    }

    /* With no right column content the brand can stay centered */
    .breadcrumb .sep,
    .breadcrumb a:not(:last-of-type) {
        /* hide all but the immediate parent on very small screens */
        display: none;
    }
}

/* -- VERY NARROW: tighten further ------------------------------------------*/
@media (max-width: 400px) {
    .breadcrumb {
        display: none;
    }
}