:root {
    --bg: #030712;
    --panel: #0b0f19;
    --panel-strong: #0f172a;
    --border: #1e293b;
    --text: #e2e8f0;
    --muted: #94a3b8;
    --green: #10b981;
    --blue: #3b82f6;
    --purple: #8b5cf6;
    --amber: #f59e0b;
    --red: #f43f5e;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --glass: blur(14px) saturate(140%);
    color-scheme: dark;
}

* { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    background: var(--bg);
}

body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: -0.01em;
    -webkit-font-smoothing: antialiased;
    background: var(--bg);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.012) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.01) 1px, transparent 1px);
    background-size: 80px 80px;
    mask-image: linear-gradient(to bottom, black, transparent 82%);
}

a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }

#aetherCanvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -3;
    background: var(--bg);
    opacity: 0.9;
}

.grain {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -2;
    opacity: 0.12;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.42'/%3E%3C/svg%3E");
    mix-blend-mode: soft-light;
}

.shell {
    width: min(1200px, calc(100vw - 48px));
    margin: 0 auto;
}

/* Topbar styling - Glassmorphism floating header */
.topbar {
    position: fixed;
    top: 24px;
    left: 50%;
    z-index: 100;
    width: min(1200px, calc(100vw - 40px));
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(11, 17, 28, 0.72);
    backdrop-filter: var(--glass);
    -webkit-backdrop-filter: var(--glass);
    box-shadow: var(--shadow-sm, 0 4px 12px rgba(0, 0, 0, 0.3));
    transition: border-color 0.15s var(--ease);
}

.topbar:hover {
    border-color: var(--blue);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: max-content;
    font-family: Inter, sans-serif;
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: -0.02em;
}

.brand-mark {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 8px;
    color: #fff;
    background: var(--blue);
    font-weight: 800;
    font-size: 1.05rem;
}

.navlinks {
    display: flex;
    flex: 1;
    justify-content: center;
    gap: 6px;
}

.navlinks a,
.lang-toggle {
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 10px 14px;
    color: var(--muted);
    background: transparent;
    font-size: 0.82rem;
    font-weight: 800;
    transition: all 260ms var(--ease);
    letter-spacing: 0.02em;
}

.navlinks a:hover,
.lang-toggle:hover {
    color: #fff;
    border-color: var(--border);
    background: rgba(255, 255, 255, 0.04);
}

.portal-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    border-radius: 8px;
    padding: 0 16px;
    color: #fff;
    background: var(--blue);
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
    transition: background-color 0.15s var(--ease);
}

.portal-link:hover {
    background: #2563eb;
}

