nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--nav-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}

nav ul {
    width: 100%;
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: center;
}

nav li {
    height: 68px;
    display: flex;
    align-items: center;
}

nav a {
    padding: 0 24px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    height: 100%;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    position: relative;
    transition: color 0.2s ease;
}

nav a:hover {
    color: var(--green);
}

/* Underline hover */
nav a::after {
    content: "";
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--green);
    border-radius: 1px;
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 24px;
}

.logo-link::after {
    display: none;
}

nav img.logo {
    height: 48px;
    padding: 0;
    object-fit: contain;
}

nav li:first-child {
    margin-right: auto;
}

/* Theme toggle */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--bg-alt);
    color: var(--text);
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 8px;
}

.theme-toggle:hover {
    border-color: var(--green);
    color: var(--green);
}

[data-theme="light"] .icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: block; }
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: block; }

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 280px;
    z-index: 999;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: -4px 0 32px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding-top: 8px;
    border-left: 1px solid var(--border);
}

.sidebar li {
    width: 100%;
    height: 60px;
}

.sidebar a {
    width: 100%;
    padding: 0 32px;
    justify-content: flex-start;
    font-size: 1rem;
}

.sidebar a::after {
    display: none;
}

.menu-button {
    display: none;
}

@media (max-width: 1000px) {
    .hideOnMobile {
        display: none;
    }

    .menu-button {
        display: flex;
    }
}

@media (max-width: 450px) {
    .sidebar {
        width: 100%;
    }

    nav a {
        padding: 0 12px;
    }

    nav img.logo {
        height: 36px;
    }
}
