:root {
    --bg: #0d0f12;
    --border: #292e36;
    --text: #e8e8e8;
    --muted: #9299a3;
    --accent: #8fd3ff;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Georgia, "Times New Roman", serif;
    line-height: 1.95;
}

a {
    color: inherit;
}

.site-header,
main,
.site-footer {
    width: min(920px, calc(100% - 40px));
    margin: 0 auto;
}

.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 0;
    border-bottom: 1px solid var(--border);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.site-title {
    font-family: monospace;
    text-decoration: none;
}

nav {
    display: flex;
    gap: 20px;
}

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

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

main {
    padding: 88px 0 120px;
}

.story {
    max-width: 700px;
    margin: 0 auto;
}

.story-header {
    margin-bottom: 96px;
    text-align: center;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--accent);
    font-family: monospace;
    font-size: 0.9rem;
    letter-spacing: 0.08em;
}

h1 {
    margin: 0;
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 500;
    line-height: 1;
}

.author {
    margin-top: 20px;
    color: var(--muted);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 0.95rem;
}

.story section {
    margin-top: 104px;
}

.story h2 {
    margin-bottom: 48px;
    color: var(--muted);
    font-family: monospace;
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-align: center;
    text-transform: uppercase;
}

.story p {
    margin: 0 0 1.45em;
    font-size: 1.08rem;
}

.dialogue {
    padding-left: 1.4rem;
    padding-right: 1.4rem;
}

.story em {
    color: #f2f2f2;
}

.final-chapter {
    margin-top: 128px;
}

.ending {
    margin-top: 56px !important;
    font-size: 1.2rem !important;
    text-align: center;
}

.story-footer {
    margin-top: 120px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

.story-footer a:hover {
    color: var(--text);
}

.site-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 0 40px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 16px;
}

.footer-links a {
    color: var(--muted);
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--text);
}

@media (max-width: 640px) {
    .site-header,
    .site-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    main {
        padding-top: 56px;
    }

    .story-header {
        margin-bottom: 72px;
    }

    .story section {
        margin-top: 80px;
    }

    .story p {
        font-size: 1rem;
    }

    .dialogue {
        padding-left: 0.6rem;
        padding-right: 0.6rem;
    }
}