@font-face {
    font-family: "Horizon";
    src: url("/fonts/Horizon.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg: #000;
    --surface: #0d0d0d;
    --surface-2: #111;
    --text: #dcdcdc;
    --text-soft: #888;
    --rule: rgba(255, 255, 255, 0.07);
    --rule-strong: rgba(255, 255, 255, 0.14);
    --accent: #00c2ff;
    --accent-mint: #42ffd1;
    --max-w: 780px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

button,
a {
    touch-action: manipulation;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    text-wrap: balance;
}
html,
body {
    margin: 0;
    padding: 0;
    color-scheme: dark;
}

::-webkit-scrollbar {
    width: 5px;
}
::-webkit-scrollbar-track {
    background: #000;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 2px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 194, 255, 0.35);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        radial-gradient(
            ellipse 80% 50% at 50% -5%,
            rgba(140, 111, 255, 0.07) 0%,
            transparent 65%
        ),
        radial-gradient(
            ellipse 60% 40% at 92% 108%,
            rgba(0, 194, 255, 0.05) 0%,
            transparent 55%
        );
    pointer-events: none;
    z-index: 0;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family:
        "Open Sans",
        -apple-system,
        BlinkMacSystemFont,
        sans-serif;
    font-weight: 300;
    font-size: 17px;
    line-height: 1.72;
    -webkit-font-smoothing: antialiased;
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 0 40px;
    height: 64px;
    border-bottom: 1px solid var(--rule);
    background: rgba(0, 0, 0, 0.92);
}

.wordmark {
    font-family: "Horizon", "Oxanium", sans-serif;
    font-size: 20px;
    letter-spacing: 0.12em;
    background: linear-gradient(90deg, #42ffd1 0%, #00c2ff 66%, #ff0099 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    border-bottom: none;
    transition: opacity 0.2s;
}
.wordmark:hover {
    opacity: 0.75;
    border-bottom: none;
}

.nav-back {
    justify-self: start;
    display: flex;
    align-items: center;
    padding: 5px 14px;
    background: transparent;
    border-radius: 1px;
    box-shadow: 0 0 9px rgba(0, 194, 255, 0.05);
    font-family: "Open Sans", sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #00c2ff;
    text-decoration: none;
    transition: box-shadow 0.5s ease;
}
.nav-back:hover {
    box-shadow: 0 0 22px rgba(0, 194, 255, 0.38);
}

/* Layout */
.wrap {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 72px 32px 120px;
    position: relative;
    z-index: 1;
    animation: rise 0.7s ease 0.05s both;
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Page header */
.page-eyebrow {
    font-family: "Oxanium", monospace;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--accent-mint);
    margin: 0 0 18px;
}

h1 {
    font-family: "Oxanium", monospace;
    font-weight: 800;
    font-size: 48px;
    line-height: 1.08;
    letter-spacing: -0.02em;
    color: #fff;
    margin: 0 0 16px;
}

.meta {
    font-family: "Space Mono", monospace;
    font-size: 13px;
    color: var(--text-soft);
    margin: 0 0 56px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--rule-strong);
}

.lede {
    font-size: 19px;
    font-weight: 300;
    line-height: 1.62;
    margin: 0 0 44px;
    color: #c8c8c8;
}

/* Headings */
h2 {
    font-family: "Oxanium", monospace;
    font-weight: 700;
    font-size: 22px;
    line-height: 1.2;
    letter-spacing: 0.01em;
    color: #fff;
    margin: 72px 0 14px;
}
h2::after {
    content: "";
    display: block;
    height: 1px;
    margin-top: 12px;
    background: linear-gradient(
        90deg,
        rgba(0, 194, 255, 0.45) 0%,
        rgba(140, 111, 255, 0.2) 45%,
        transparent 100%
    );
}

h3 {
    font-family: "Oxanium", monospace;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
    margin: 40px 0 10px;
}

p {
    margin: 0 0 16px;
}
ul,
ol {
    margin: 0 0 18px;
    padding-left: 24px;
}
li {
    margin-bottom: 7px;
}
strong {
    font-weight: 400;
    color: #fff;
}
em {
    font-style: italic;
}

a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid rgba(0, 194, 255, 0.25);
    transition:
        border-color 0.2s,
        color 0.2s;
}
a:hover {
    color: #fff;
    border-bottom-color: rgba(255, 255, 255, 0.4);
}

/* Callout */
.callout {
    background: var(--surface);
    border-left: 2px solid var(--accent);
    padding: 18px 24px;
    margin: 28px 0;
    font-size: 15px;
    line-height: 1.6;
    color: #c0c0c0;
}

/* TOC */
.toc {
    background: var(--surface);
    border: 1px solid var(--rule-strong);
    padding: 28px 32px;
    margin: 0 0 52px;
}

.toc-label {
    font-family: "Oxanium", monospace;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--accent-mint);
    margin: 0 0 14px;
}

.toc ol {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 14px;
    columns: 2;
    column-gap: 32px;
    font-family: "Open Sans", sans-serif;
}

.toc li {
    margin-bottom: 5px;
    break-inside: avoid;
}

.toc a {
    color: #999;
    border-bottom: none;
    transition: color 0.2s;
}
.toc a:hover {
    color: var(--accent);
    border-bottom: none;
}

/* All-caps legal text */
.allcaps {
    font-size: 14px;
    letter-spacing: 0.025em;
    text-transform: uppercase;
    font-weight: 300;
    line-height: 1.65;
    color: #aaa;
}

/* Contact block */
.contact {
    background: var(--surface);
    border: 1px solid var(--rule-strong);
    padding: 24px 28px;
    margin-top: 16px;
    font-size: 15px;
    line-height: 1.75;
    font-family: "Space Mono", monospace;
}
.contact strong {
    font-family: "Oxanium", monospace;
    font-size: 14px;
    letter-spacing: 0.06em;
}

/* Footer */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0 2rem;
    padding-bottom: max(1.2rem, env(safe-area-inset-bottom));
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 20;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 0;
    animation: fadeIn 0.5s ease 0.3s forwards;
    overflow: hidden;
    max-width: 100%;
}
footer span {
    font-family: "Open Sans", sans-serif;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.65);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
footer > span:first-child {
    flex: 1;
}
footer a {
    font-family: "Open Sans", sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    padding: 4px 12px;
    border-radius: 1px;
    background: transparent;
    box-shadow: 0 0 9px rgba(140, 111, 255, 0.06);
    transition:
        box-shadow 0.5s ease,
        color 0.2s ease;
}
footer a:hover {
    box-shadow: 0 0 18px rgba(140, 111, 255, 0.34);
    color: rgba(255, 255, 255, 0.9);
}
.footer-links {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}
.footer-legal {
    display: none;
}

@media (max-width: 600px) {
    footer {
        flex-direction: column;
        align-items: center;
        gap: 0.18rem;
        padding: 0.35rem 1rem;
        padding-bottom: max(0.6rem, env(safe-area-inset-bottom));
    }
    footer span {
        font-size: 9px;
        letter-spacing: 0.05em;
    }
    footer a {
        font-size: 9px;
        letter-spacing: 0.05em;
        padding: 3px 8px;
        box-shadow: 0 0 14px rgba(140, 111, 255, 0.28);
    }
    .footer-links {
        gap: 4px;
    }
}

@media (max-width: 600px) {
    .site-header {
        padding: 0 20px;
    }
    .wrap {
        padding: 52px 20px 96px;
    }
    h1 {
        font-size: 34px;
    }
    body {
        font-size: 16px;
    }
    .toc ol {
        columns: 1;
    }
    .allcaps {
        font-size: 13px;
    }
}

.skip-link {
    position: absolute;
    top: -48px;
    left: 16px;
    background: var(--accent);
    color: #000;
    font-family: "Open Sans", sans-serif;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 16px;
    z-index: 1000;
    text-decoration: none;
    border: none;
    transition: top 0.15s;
}
.skip-link:focus {
    top: 8px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}