:root {
    --bg: #05070d;
    --bg-glow: #0a1428;
    --surface: #0b1220;
    --surface-2: #0f1a2e;
    --line: #1c2740;
    --blue: #2f7dff;
    --blue-bright: #6fa8ff;
    --blue-dim: #10305e;
    --text: #eef2fb;
    --text-mid: #a4aec2;
    --text-dim: #626c82;
    --mono: 'JetBrains Mono', ui-monospace, monospace;
    --body: 'Inter', system-ui, sans-serif;
    --logo-mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M40 15 L12 50 L40 85 L48 77 L26 50 L48 23 Z'/%3E%3Cpath d='M60 15 L88 50 L60 85 L52 77 L74 50 L52 23 Z'/%3E%3Cpath d='M50 78 L50 30 M50 30 L38 45 M50 30 L62 45' stroke='black' stroke-width='9' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
}

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

html {
    scroll-behavior: smooth;
}

body {
    background:
        radial-gradient(ellipse 900px 500px at 50% -10%, var(--bg-glow), transparent),
        var(--bg);
    color: var(--text);
    font-family: var(--body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

::selection {
    background: var(--blue);
    color: #fff;
}

:focus-visible {
    outline: 2px solid var(--blue-bright);
    outline-offset: 3px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px clamp(20px, 5vw, 64px);
    background: rgba(5, 7, 13, 0.75);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--mono);
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.03em;
}

.brand::before {
    content: "";
    display: inline-block;
    width: 22px;
    height: 22px;
    background-color: var(--blue);
    -webkit-mask: var(--logo-mark) center / contain no-repeat;
    mask: var(--logo-mark) center / contain no-repeat;
}

.brand span {
    color: var(--blue-bright);
}

.site-nav .nav-list {
    list-style: none;
    display: flex;
    gap: 8px;
}

.nav-link {
    display: inline-block;
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-mid);
    padding: 8px 14px;
    border-radius: 6px;
    border: 1px solid transparent;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.nav-link::before {
    content: "#";
    color: var(--blue);
    margin-right: 4px;
}

.nav-link:hover {
    color: var(--text);
    border-color: var(--line);
    background: var(--surface);
}

main {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 clamp(20px, 5vw, 64px);
}

.content-section {
    padding: 96px 0;
    border-bottom: 1px solid var(--line);
}

.content-section:last-of-type {
    border-bottom: none;
}

.section-label {
    display: inline-block;
    font-family: var(--mono);
    font-size: 13px;
    color: var(--blue-bright);
    background: var(--blue-dim);
    border: 1px solid var(--line);
    padding: 4px 10px;
    border-radius: 5px;
    margin-bottom: 24px;
}

.section-title {
    font-family: var(--mono);
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 0 0 18px;
}

.manifesto .section-title {
    font-size: clamp(30px, 4.5vw, 46px);
    line-height: 1.2;
    max-width: 16ch;
    margin-bottom: 48px;
}

.manifesto .section-title span {
    color: var(--blue-bright);
    display: block;
}

.manifesto-list {
    list-style: none;
    counter-reset: manifesto;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    overflow: hidden;
}

.manifesto-item {
    counter-increment: manifesto;
    position: relative;
    padding: 20px 24px 20px 64px;
    border-bottom: 1px solid var(--line);
    font-size: 15.5px;
    color: var(--text-mid);
}

.manifesto-item:last-child {
    border-bottom: none;
}

.manifesto-item::before {
    content: counter(manifesto, decimal-leading-zero);
    position: absolute;
    left: 22px;
    top: 20px;
    font-family: var(--mono);
    font-size: 13px;
    color: var(--text-dim);
}

.manifesto-item strong {
    color: var(--blue-bright);
    font-weight: 600;
}

.chapters .section-inner p,
.logs .section-inner p {
    color: var(--text-mid);
    max-width: 56ch;
    margin-bottom: 40px;
}

.chapter-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.chapter-card {
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    overflow: hidden;
    transition: transform 0.18s ease, border-color 0.18s ease;
}

.chapter-card:hover {
    transform: translateY(-3px);
    border-color: var(--blue-dim);
}

.chapter-id {
    display: block;
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.08em;
    color: var(--text-dim);
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    position: relative;
    padding-left: 52px;
}

.chapter-id::before {
    content: "";
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-dim);
    box-shadow: 12px 0 0 var(--text-dim), 24px 0 0 var(--text-dim);
    opacity: 0.5;
}

.chapter-info {
    padding: 18px 16px 8px;
}

.chapter-info h3 {
    font-size: 17px;
    margin-bottom: 8px;
}

.chapter-info p {
    font-family: var(--body);
    font-size: 14px;
    color: var(--text-mid);
    margin: 0;
}

.chapter-logs {
    display: inline-block;
    margin-top: 12px;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.05em;
    color: var(--blue-bright);
}

.chapter-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 14px 16px 18px;
    font-family: var(--mono);
    font-size: 11.5px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 5px 10px 5px 8px;
    border-radius: 999px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    color: var(--text-mid);
}

.chapter-status::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-dim);
    flex-shrink: 0;
}

.status-neutral {
    color: var(--text-mid);
}

.status-live {
    color: var(--blue-bright);
    border-color: var(--blue-dim);
}

.status-live::before {
    background: var(--blue-bright);
    box-shadow: 0 0 0 3px rgba(111, 168, 255, 0.18);
    animation: pulse 2s infinite;
}

.status-paused {
    color: #f2b263;
}

.status-paused::before {
    background: #f2b263;
}

.status-finished {
    color: #70d6a0;
    border-color: rgba(112, 214, 160, 0.35);
}

.status-finished::before {
    background: #70d6a0;
}

.status-soon {
    opacity: 0.55;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 3px rgba(111, 168, 255, 0.18);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(111, 168, 255, 0.06);
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }
}

.signal-divider {
    display: block;
    width: 100%;
    max-width: 420px;
    margin: 0 auto 56px;
    opacity: 0.85;
}

.logs-list {
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.log-entry {
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    padding: 28px clamp(20px, 4vw, 36px) 32px;
}

.log-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.04em;
}

.log-meta span {
    padding: 5px 10px;
    border-radius: 5px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    color: var(--text-mid);
}

.log-meta span:first-child {
    color: var(--blue-bright);
    border-color: var(--blue-dim);
}

.log-entry h3 {
    font-size: clamp(20px, 3vw, 26px);
    margin-bottom: 18px;
}

.log-body {
    color: var(--text-mid);
    font-size: 15.5px;
    margin-bottom: 16px;
}

.log-body em {
    color: var(--text);
    font-style: italic;
}

.log-body ul {
    list-style: none;
    margin: 4px 0 16px;
    padding: 0;
}

.log-body li {
    position: relative;
    padding-left: 22px;
}

.log-body li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--blue-bright);
}

.log-author {
    margin-top: 20px;
    font-family: var(--mono);
    font-size: 13px;
    color: var(--blue-bright);
}

.log-image {
    display: block;
    width: 100%;
    max-width: 760px;
    height: auto;
    margin: 28px auto 16px;
    padding: 8px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.log-image-tall {
    max-height: 70vh;
    object-fit: contain;
}

.pagination-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin: 32px 0 0;
    color: var(--text-mid);
    font-family: var(--mono);
    font-size: 13px;
}

.pagination-button {
    padding: 10px 16px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--surface-2);
    color: var(--text);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, transform 0.15s;
}

.pagination-button:hover:not(:disabled) {
    border-color: var(--blue);
    background: var(--surface);
    transform: translateY(-1px);
}

.pagination-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-pages {
    min-width: 120px;
    text-align: center;
}

.site-footer {
    padding: 72px clamp(20px, 5vw, 64px) 40px;
    text-align: center;
    border-top: 1px solid var(--line);
}

.site-footer h3 {
    font-size: clamp(22px, 3vw, 28px);
    margin-bottom: 12px;
}

.site-footer > p:first-of-type {
    color: var(--text-mid);
    max-width: 46ch;
    margin: 0 auto 32px;
}

.social-links {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 48px;
    padding: 0;
}

.social-link {
    font-family: var(--mono);
    font-size: 13px;
    padding: 12px 20px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--surface);
    transition: border-color 0.15s, transform 0.15s, background 0.15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.social-link::before {
    content: "> ";
    color: var(--blue-bright);
}

.social-link:hover {
    border-color: var(--blue);
    background: var(--surface-2);
    transform: translateY(-2px);
}

.footer-note {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--text-dim);
}

@media (min-width: 641px) and (max-width: 880px) {
    .site-header {
        flex-wrap: wrap;
        justify-content: center;
        padding: 18px 24px;
        gap: 18px;
    }

    .site-nav {
        width: 100%;
    }

    .nav-list {
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
    }

    .content-section {
        padding: 72px 0;
        scroll-margin-top: 76px;
    }

    .chapter-grid {
        gap: 18px;
    }

    .log-entry {
        padding: 24px clamp(20px, 4vw, 32px) 28px;
    }

    .log-meta {
        gap: 12px;
    }

    .site-footer {
        padding: 64px clamp(20px, 5vw, 64px) 32px;
    }
}

@media (max-width: 640px) {
    .site-header {
        padding: 14px 20px;
        gap: 14px;
    }

    .brand {
        font-size: 13px;
        flex-shrink: 0;
    }

    .site-nav {
        min-width: 0;
        overflow: hidden;
    }

    .nav-list {
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 6px;
    }

    .nav-link {
        padding: 7px 11px;
        font-size: 11px;
        white-space: nowrap;
    }

    .content-section {
        padding: 64px 0;
        scroll-margin-top: 76px;
    }

    .chapter-grid {
        grid-template-columns: 1fr;
    }

    .social-links {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .social-link {
        display: block;
        text-align: center;
        padding: 14px 20px;
    }
}
