/* ── Sprites canvas ── */
#sprites {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 100;
}

/* ── Reset & Base ── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #0a0a0f;
    --text-primary: #fffeff;
    --text-warm: #ccc1b4;
    --text-muted: rgba(255, 255, 255, 0.30);
    --accent-blue: #77caf5;
    --content-width: 790px;
    --text-grey: #c9c9cd;
}

html {
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: clip;
}

body {
    background: var(--bg);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    line-height: 1.4;
    overflow-x: hidden;
}

a {
    color: #77caf5;
    text-decoration: underline;
}

strong {
    font-weight: 800;
}

/* ── Hero ── */
.hero {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: var(--content-width);
    pointer-events: none;
    z-index: -1;
}

.hero-image {
    display: block;

    /* image is wider than content column — let it overflow */
    width: 1280px;
    max-width: none;
    opacity: 1;

    /* offset right to match visual weight of the asymmetric composition */
    margin-left: -206px;
    margin-top: 0px;
}

.hero-logo {
    position: absolute;

    /* tweak these to place the logo over the bg image */
    top: 290px;
    left: 460px;
    transform: translate(-50%, -50%);
    width: 399px;
    height: auto;
}

/* ── Content ── */
.content {
    position: relative;
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 24px 100px;
}

.content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;

    /* follows content height exactly */
    background: #14141a;
    z-index: -2;
}

/* Invisible anchor for sprite swarm center — position with margin-top */
.sprite-anchor {
    height: 0;
    margin-top: 100px;

    /* tweak to place the swarm center */
}

/* ── Nav ── */
.site-nav {
    padding-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-brand {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 800;
    font-size: 15px;
    color: var(--text-warm);
}

.nav-brand a {
    text-decoration: none;
}

.nav-brand .nav-highlight {
    color: var(--text-primary);
}

.nav-sub {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
    font-size: 15px;
    color: var(--text-primary);
    opacity: 0.9;
}

/* ── Word Cloud ── */
.word-cloud {
    margin-top: 5px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-muted);
}

.word-cloud span {
    display: block;
    margin-top: 5px;
}

.word-cloud br {
    display: block;
    content: '';
    margin-top: 0.4em;
}

/* ── Description ── */
.description {
    margin-top: 150px;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.45;
    color: var(--text-primary);
    text-shadow: 0px 0px 4px rgb(0, 0, 0, 0.9);
    opacity: 0.9;
}

.description p {
    margin-bottom: 1.2em;
}

.description p:last-child {
    margin-bottom: 0;
}

.description .lead {
    font-size: 18px;
    font-weight: 400;
    line-height: 1.4;
    margin-bottom: 0.4em;
}

.description .byline {
    color: var(--text-warm);
    margin-bottom: 2em;
}

.description h3 {
    font-family: 'JetBrains Mono', monospace;
    margin-top: 2.5em;
    margin-bottom: 0.8em;
    text-transform: uppercase;
    font-weight: 300;
    color: var(--text-warm);
}

.description a {
    color: var(--accent-blue);
}

.description a:hover {
    text-decoration: underline;
}

/* ── TOC ── */
.toc {
    position: fixed;
    top: 50%;
    left: 24px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 50;
}

@media (max-width: 1100px) {
    .toc {
        position: static;
        transform: none;
        flex-direction: row;
        gap: 20px;
        margin-top: 10px;
    }
}

.toc-link {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    font-weight: 400;
    color: var(--text-primary);
    opacity: 0.5;
    text-decoration: none;
    transition: opacity 0.3s;
    letter-spacing: 0.05em;
}

.toc-link:hover {
    opacity: 0.6;
}

.toc-link.active {
    opacity: 0.9;
}

/* ── Papers & Related sections ── */
.papers-section,
.related-section {
    margin-top: 3em;
}

.papers-section h3,
.related-section h3 {
    font-family: 'JetBrains Mono', monospace;
    text-transform: uppercase;
    font-weight: 300;
    margin-bottom: 1.2em;
    font-size: 26px;
}

.paper,
.related-link {
    display: block;
    padding: 14px 0;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.paper:first-of-type,
.related-link:first-of-type {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.paper:hover .paper-title,
.related-link:hover .related-title {
    color: var(--text-primary);
}

.paper-title,
.related-title {
    display: block;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 1.3;
    color: var(--text-warm);
    transition: color 0.2s;
}

.paper-meta,
.related-meta {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 300;
    font-size: 13px;
    margin-top: 4px;
    color: var(--text-primary);
    opacity: 0.5;
}
