/* ── navbar.css ─────────────────────────────────────────────────────────────
 * Shared nav for portfolio (index.html) and blog pages.
 * The nav is always full-width. On the portfolio page the profile sidebar
 * and main content shift right; on blog pages there is no sidebar offset.
 * ────────────────────────────────────────────────────────────────────────── */

/* ── Animation ─────────────────────────────────────────────────────────── */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Base nav ───────────────────────────────────────────────────────────── */
.nav-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: var(--nav-bar-height);

    /* Always full-width — no sidebar offset on either page */
    width: 100%;
    margin-left: 0;

    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    box-sizing: border-box;
    background-color: #181818;
    border-bottom: 1px solid #303030;
    z-index: 10001; /* Below reading progress bar (10002) and lightbox (10003) */
    overflow: visible;
}

/* ── Logo / name (left slot) ────────────────────────────────────────────── */
.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #ffffff;
    font-family: "Lexend", sans-serif;
    font-size: 0.85rem;
    font-weight: 400;
    white-space: nowrap;
    transition: color 0.2s;
}

.nav-logo:hover {
    color: #b0b0b0;
}

.nav-logo img {
    width: 22px;
    height: 22px;
    border-radius: 3px;
    flex-shrink: 0;
}

/* ── Desktop link list (centre / right) ─────────────────────────────────── */
.nav-bar ul {
    display: flex;
    align-items: center;
    list-style-type: none;
    height: 100%;
    gap: 2rem;
}

.nav-bar a {
    display: flex;
    align-items: center;
    text-decoration: none;
    font-family: "Lexend", sans-serif;
    font-size: 0.82rem;
    font-weight: 400;
    color: #b0b0b0;
    transition: color 0.2s;
}

.nav-bar a:hover {
    color: #ffffff;
}

/* ── "Back to portfolio" link (blog pages only) ─────────────────────────── */
.nav-back {
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    font-family: "Lexend", sans-serif;
    font-size: 0.78rem;
    color: #666666;
    transition: color 0.2s;
    white-space: nowrap;
}

.nav-back:hover {
    color: #ffffff;
}

.nav-back svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* ── Hamburger button ───────────────────────────────────────────────────── */
#hamburger-icon {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    outline: inherit;
    overflow: visible;
}

#hamburger-icon svg {
    overflow: visible;
    display: block;
}

#hamburger-icon svg rect {
    transition: opacity 0.2s, transform 0.25s;
    transform-box: fill-box;
    transform-origin: center center;
}

/* ── Mobile drawer ──────────────────────────────────────────────────────── */
#mobile-menu {
    display: none;
    position: fixed;
    top: var(--nav-bar-height);
    left: 0;
    width: 100%;
    /* always full-width, no sidebar offset */
    margin-left: 0;
    background-color: #202020;
    border-bottom: 1px solid #303030;
    z-index: 10001; /* Below reading progress bar (10002) and lightbox (10003) */
}

#mobile-menu.is-open {
    display: block;
}

#mobile-menu ul {
    list-style: none;
    padding: 0.5rem 0;
}

#mobile-menu ul li a {
    display: block;
    padding: 0.85rem 2rem;
    color: #b0b0b0;
    text-decoration: none;
    font-family: "Lexend", sans-serif;
    font-size: 0.82rem;
    font-weight: 400;
    transition: color 0.2s, background-color 0.2s;
}

#mobile-menu ul li a:hover {
    color: #ffffff;
    background-color: #2a2a2a;
}

/* ── Breakpoints ────────────────────────────────────────────────────────── */

/* Large: show desktop links, hide hamburger */
@media (min-width: 1200px) {
    .hide-when-big {
        display: none !important;
    }

    .hide-when-small {
        display: flex !important;
    }
}

/* Small: hide desktop links, show hamburger */
@media (max-width: 1200px) {
    .hide-when-small {
        display: none !important;
    }
}