:root {
    --bg: #0a1019;
    --bg-soft: #0f1525;
    --panel: #131b2e;
    --text: #ffffff;
    --muted: #7ab0c8;
    --rose: #ed0163;
    --neon: #09a8dc;
    --line: rgba(9, 168, 220, 0.2);
}

body.light {
    --bg: #f5f7fa;
    --bg-soft: #eaeff6;
    --panel: #ffffff;
    --text: #0a1019;
    --muted: #4a6a80;
    --line: rgba(9, 168, 220, 0.3);
    background: linear-gradient(160deg, #f5f7fa 0%, #e4eff8 100%) !important;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Montserrat", "Inter", "Segoe UI", sans-serif;
    color: var(--text);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
    min-height: 100vh;
}

/* ── Header always stays dark ── */
.topbar {
    position: sticky;
    top: 0;
    backdrop-filter: blur(8px);
    background: rgba(10, 16, 25, 0.92);
    border-bottom: 1px solid rgba(9, 168, 220, 0.2);
    z-index: 10;
    color: #ffffff;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 800;
    font-size: 0.95rem;
    text-transform: uppercase;
    color: #ffffff;
    text-decoration: none;
}

.brand-logo {
    height: 28px;
    width: auto;
    display: block;
}

.brand span {
    color: #ffffff;
}

.links {
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
}

.menu-toggle {
    display: none;
    border: 1px solid rgba(9, 168, 220, 0.3);
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    border-radius: 10px;
    padding: 0.35rem 0.55rem;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
}

.links a {
    color: #09a8dc;
    text-decoration: none;
    font-size: 0.92rem;
    border: 1px solid transparent;
    padding: 0.45rem 0.65rem;
    border-radius: 999px;
    transition: 0.2s ease;
}

.links a:hover,
.links a.active {
    border-color: rgba(9, 168, 220, 0.35);
    color: #ffffff;
}

/* ── Theme toggle button (always in dark header) ── */
.theme-toggle {
    background: transparent;
    border: 1px solid rgba(9, 168, 220, 0.3);
    color: #7ab0c8;
    border-radius: 999px;
    padding: 0.3rem 0.55rem;
    font-size: 0.9rem;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color 0.2s, color 0.2s;
}

.theme-toggle:hover {
    border-color: rgba(9, 168, 220, 0.6);
    color: #ffffff;
}
