:root {
    --bg: #fafafa;
    --surface: #ffffff;
    --border: #e8e8e8;
    --text: #1a1a1a;
    --text-secondary: #555;
    --text-muted: #888;
    --accent: #1a1a1a;
    --radius: 12px;
    --max-width: 1120px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0f0f0f;
        --surface: #1a1a1a;
        --border: #2a2a2a;
        --text: #f0f0f0;
        --text-secondary: #aaa;
        --text-muted: #666;
        --accent: #f0f0f0;
    }
}

[data-theme="light"] {
    --bg: #fafafa;
    --surface: #ffffff;
    --border: #e8e8e8;
    --text: #1a1a1a;
    --text-secondary: #555;
    --text-muted: #888;
    --accent: #1a1a1a;
}

[data-theme="dark"] {
    --bg: #0f0f0f;
    --surface: #1a1a1a;
    --border: #2a2a2a;
    --text: #f0f0f0;
    --text-secondary: #aaa;
    --text-muted: #666;
    --accent: #f0f0f0;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', Roboto, sans-serif;
    font-size: 16px;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 16px 40px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    backdrop-filter: blur(10px);
}

.nav-brand-group {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-self: start;
}
.nav-brand {
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: -0.3px;
    text-transform: uppercase;
}
.nav-tagline {
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--text-muted);
    letter-spacing: 0;
    text-transform: none;
    padding-left: 10px;
    border-left: 1px solid var(--border);
}
@media (max-width: 640px) {
    .nav-tagline { display: none; }
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
    justify-self: center;
}

.nav-right {
    display: flex;
    align-items: center;
    justify-self: end;
}

.nav-link {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--text);
}

.nav-link.active {
    color: var(--text);
    font-weight: 600;
}

.nav-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: help;
    transition: color 0.2s;
}

.nav-icon:hover {
    color: var(--text);
}

.nav-icon-img {
    width: 18px;
    height: 18px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.nav-icon:hover .nav-icon-img {
    opacity: 1;
}

[data-theme="dark"] .nav-icon-img {
    filter: invert(1);
}

.nav-icon[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: 260px;
    padding: 10px 12px;
    background: var(--text);
    color: var(--bg);
    font-size: 0.75rem;
    line-height: 1.4;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
    z-index: 100;
    pointer-events: none;
}

.nav-icon[data-tooltip]:hover::after,
.nav-icon[data-tooltip]:focus::after {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.theme-toggle {
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 6px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    border-color: var(--text-muted);
}

.theme-icon {
    width: 16px;
    height: 16px;
}

[data-theme="dark"] .theme-icon {
    filter: invert(1);
}

.hero {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 100px 40px 80px;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -1.5px;
    line-height: 1.1;
    margin-bottom: 4px;
}

.hero p {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 560px;
    line-height: 1.7;
}

.content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 40px 120px;
}

footer {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 40px 40px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    nav { padding: 14px 20px; }
    .hero { padding: 60px 20px 50px; }
    .hero h1 { font-size: 2.4rem; }
    .content { padding: 0 20px 80px; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 2rem; }
}
