:root {
    --font: "IBM Plex Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    --bg: #0e0f11;
    --panel: #14161a;
    --text: #e6e6e6;
    --muted: #9aa0a6;
    --line: #2a2d33;

    --accent: #6fb1ff;
    --accent-2: #0ea5e9;
    --danger: #ef4444;
    --draft: #caa96c;
    --preprint: #6fb1ff;
    --published: #6fd18c;

    --fs-0: 0.875rem;
    --fs-1: 1rem;
    --fs-2: 1.1rem;
    --fs-3: 1.3rem;
    --fs-4: 1.8rem;
    --lh: 1.6;

    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 3rem;
    --space-xl: 5rem;

    --r-sm: 4px;
    --r-md: 8px;
    --r-lg: 12px;

    --shadow: 0 10px 25px rgba(2, 6, 23, 0.08);
    --transition-fast: 150ms ease;

    --header-height: 53px;
}

:root[data-theme="light"] {
    --bg: #fafafa;
    --panel: #ffffff;
    --text: #1a1a1a;
    --muted: #6b7280;
    --line: #e5e7eb;
    --accent: #2563eb;
}

* { box-sizing: border-box; }
html { height: 100%; }
body { min-height: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: var(--fs-1);
    line-height: var(--lh);
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }

a {
    color: var(--accent);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

a:hover { color: color-mix(in srgb, var(--accent) 80%, white 20%); }

::selection { background: color-mix(in srgb, var(--accent) 25%, transparent); }

:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--accent) 70%, transparent);
    outline-offset: 3px;
    border-radius: var(--r-md);
}

@media (prefers-reduced-motion: reduce) {
    * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}