:root {
    --bg-light: #f5f5f5;
    --fg-light: #111;
    --bg-dark: #111;
    --fg-dark: #f5f5f5;
    --accent: #3fa9f5;
    --accent-soft: rgba(63,169,245,0.15);
    --font-main: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
    margin: 0;
    font-family: var(--font-main);
    background-color: var(--bg-light);
    color: var(--fg-light);
    transition: background-color 0.2s ease, color 0.2s ease;
}

body.dark {
    background-color: var(--bg-dark);
    color: var(--fg-dark);
}

a { color: var(--accent); text-decoration: none; }

header {
    position: sticky; top: 0; z-index: 10;
    backdrop-filter: blur(10px);
    background: rgba(245,245,245,0.9);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding: 0.5rem 1.5rem;
    display: flex; align-items: center; justify-content: space-between;
}

body.dark header {
    background: rgba(10,10,10,0.9);
    border-bottom-color: rgba(255,255,255,0.08);
}

.brand { font-weight: 600; letter-spacing: 0.03em; }
nav a { margin-left: 1rem; font-size: 0.95rem; }

.theme-toggle {
    border: 1px solid rgba(0,0,0,0.15);
    border-radius: 999px;
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
    cursor: pointer;
    background: transparent;
}

body.dark .theme-toggle { border-color: rgba(255,255,255,0.25); }

main { max-width: 960px; margin: 0 auto; padding: 2rem 1.5rem 3rem; }
section { margin-bottom: 3rem; }
h1 { font-size: 1.9rem; margin-bottom: 0.5rem; }
h2 { font-size: 1.4rem; border-left: 3px solid var(--accent); padding-left: 0.5rem; margin-bottom: 0.5rem; }
p { line-height: 1.6; margin: 0.4rem 0; }
.tagline { color: rgba(0,0,0,0.6); }
body.dark .tagline { color: rgba(255,255,255,0.6); }

.card {
    border-radius: 8px; padding: 1rem 1.2rem;
    background: rgba(0,0,0,0.02);
}
body.dark .card { background: rgba(255,255,255,0.03); }

table { width: 100%; border-collapse: collapse; margin-top: 0.75rem; font-size: 0.9rem; }
th, td { padding: 0.4rem 0.5rem; border-bottom: 1px solid rgba(0,0,0,0.06); }
body.dark th, body.dark td { border-bottom-color: rgba(255,255,255,0.08); }
th { text-align: left; font-weight: 600; }

.pill {
    display: inline-block; padding: 0.15rem 0.5rem;
    border-radius: 999px; background: var(--accent-soft);
    font-size: 0.75rem; margin-right: 0.25rem;
}

footer { font-size: 0.8rem; text-align: center; padding: 2rem 0 1rem; color: rgba(0,0,0,0.5); }
body.dark footer { color: rgba(255,255,255,0.5); }

form { display: grid; gap: 0.6rem; max-width: 420px; }
input, textarea {
    width: 100%; padding: 0.45rem 0.6rem; border-radius: 4px;
    border: 1px solid rgba(0,0,0,0.2); font-family: var(--font-main);
    font-size: 0.9rem; background: transparent; color: inherit;
}
body.dark input, body.dark textarea { border-color: rgba(255,255,255,0.3); }
button[type="submit"] {
    border-radius: 4px; border: none; padding: 0.5rem 0.9rem;
    background: var(--accent); color: #fff; cursor: pointer; justify-self: flex-start;
}
.anchor-offset { scroll-margin-top: 70px; }
