@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
    --bg: #0a0a0a;
    --text: #e5e5e5;
    --text-muted: #737373;
    --accent: #22d3ee;
    --accent-glow: rgba(34, 211, 238, 0.15);
    --border: #262626;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

.page { display: flex; flex-direction: column; min-height: 100vh; }

/* Header */
.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 4rem;
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background: rgba(10, 10, 10, 0.7);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.site-header.scrolled {
    background: rgba(10, 10, 10, 0.92);
    border-bottom-color: var(--border);
    box-shadow: 0 0 30px -10px var(--accent-glow);
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.25em;
}

.brand img {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 4px;
}

.brand span { color: var(--accent); font-weight: 400; }

.nav { display: flex; gap: 2rem; }

.nav a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.8125rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav a:hover,
.nav a[aria-current="page"] { color: var(--text); }

.nav a.has-update {
    color: #c4c4c4;
}

.nav a.has-update::after {
    content: "";
    display: inline-block;
    width: 0.38rem;
    height: 0.38rem;
    margin-left: 0.42rem;
    margin-bottom: 0.08rem;
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.55);
    box-shadow: 0 0 8px rgba(34, 211, 238, 0.16);
}

/* Surface */
.surface {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 8rem 2rem 4rem;
    max-width: 680px;
    margin: 0 auto;
    width: 100%;
}

.content-container {
    max-width: 100%;
    margin: 0 auto;
    width: 100%;
}

/* Typography */
.hero-title {
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
}

.hero-title span { color: var(--accent); }

.hero-lede {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.7;
}

h2 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
    color: var(--text);
    letter-spacing: -0.01em;
}

h2 span {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.loading {
    color: var(--text-muted);
    font-style: italic;
}

p {
    color: var(--text-muted);
    font-size: 0.9375rem;
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

ul {
    margin: 0.5rem 0 0.75rem 1.25rem;
    color: var(--text-muted);
    font-size: 0.9375rem;
}

li { margin-bottom: 0.375rem; }

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

code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8125rem;
    color: var(--accent);
}

/* Code */
.code-wrapper {
    position: relative;
    margin: 0.5rem 0 1rem;
}

.code-wrapper pre {
    background: transparent;
    border: none;
    border-left: 2px solid var(--accent);
    padding: 0.5rem 0 0.5rem 1rem;
    overflow-x: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8125rem;
    line-height: 1.6;
    color: var(--accent);
    margin: 0;
}

.copy-btn {
    position: absolute;
    top: 0.25rem;
    right: 0;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.code-wrapper:hover .copy-btn { opacity: 1; }
.copy-btn:hover { color: var(--text); }
.copy-btn.copied::after { content: "✓"; color: var(--accent); }
.copy-btn.copied::before { display: none; }
.copy-btn::before { content: "copy"; }

/* Button */
.button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.button.primary {
    background: var(--accent);
    color: #000;
    margin-right: 0.5rem;
}

.button.primary:hover {
    opacity: 0.85;
}

.button.secondary {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
}

.button.secondary:hover {
    border-color: var(--text-muted);
    color: var(--text);
}

/* Footer */
.footnote {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    padding: 2rem;
    margin-top: auto;
}

/* Responsive */
@media (max-width: 768px) {
    .site-header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 1.25rem;
        position: relative;
    }

    .nav { gap: 1rem; flex-wrap: wrap; justify-content: center; }

    .surface {
        padding: 3rem 1.25rem 2rem;
    }

    .content-container {
        padding: 0 0.5rem;
    }

    .hero-title { font-size: 1.75rem; }

    .hero-lede { font-size: 0.9375rem; }

    h2 { font-size: 1rem; }

    p, ul, li { font-size: 0.875rem; }

    .code-wrapper pre { font-size: 0.75rem; }

    .actions { flex-direction: column; gap: 0.5rem; }

    .button {
        display: block;
        text-align: center;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .nav a {
        font-size: 0.75rem;
    }

    .brand { font-size: 0.875rem; }

    .brand img {
        width: 1.25rem;
        height: 1.25rem;
    }

    .hero-title { font-size: 1.5rem; }

    .surface { padding: 2rem 1rem 1.5rem; }

    .footnote { padding: 1.5rem 1rem; }
}

@media (pointer: coarse) {
    .copy-btn { opacity: 1; }
}
