@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=IBM+Plex+Mono:wght@400;500&family=Source+Serif+4:wght@400;500;600&display=swap");

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

:root {
    --paper: #f4efe4;
    --paper-deep: #e6dcc8;
    --paper-soft: rgba(255, 251, 244, 0.74);
    --ink: #202222;
    --muted: #5e5c54;
    --rule: #cbbca4;
    --rule-strong: #af9a79;
    --accent: #6c4023;
    --accent-soft: rgba(108, 64, 35, 0.08);
    --shadow: 0 18px 40px rgba(74, 57, 39, 0.08);
}

html,
body {
    min-height: 100%;
}

body {
    background:
        radial-gradient(
            circle at top left,
            rgba(167, 124, 79, 0.14),
            transparent 34%
        ),
        radial-gradient(
            circle at bottom right,
            rgba(114, 92, 64, 0.12),
            transparent 28%
        ),
        linear-gradient(180deg, #f8f4ea 0%, var(--paper) 100%);
    color: var(--ink);
    font-family: "Source Serif 4", Georgia, serif;
    padding: 2.5rem 1.5rem 4rem;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        repeating-linear-gradient(
            0deg,
            rgba(88, 73, 53, 0.026) 0,
            rgba(88, 73, 53, 0.026) 1px,
            transparent 1px,
            transparent 34px
        ),
        repeating-linear-gradient(
            90deg,
            rgba(88, 73, 53, 0.022) 0,
            rgba(88, 73, 53, 0.022) 1px,
            transparent 1px,
            transparent 34px
        );
    pointer-events: none;
    opacity: 0.7;
}

.shell {
    position: relative;
    max-width: 920px;
    margin: 0 auto;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--muted);
    text-decoration: none;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 2rem;
}

.back-link:hover {
    color: var(--accent);
}

.hero {
    display: grid;
    gap: 1.4rem;
    border-top: 1px solid var(--rule-strong);
    border-bottom: 1px solid var(--rule);
    padding: 1.6rem 0 2rem;
    margin-bottom: 2rem;
}

.hero-topline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
}

.eyebrow,
.hero-count {
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}

.hero-count {
    padding: 0.3rem 0.75rem;
    border: 1px solid var(--rule);
    border-radius: 999px;
    background: rgba(255, 251, 244, 0.58);
}

h1 {
    font-family: "Cormorant Garamond", "Times New Roman", serif;
    font-size: clamp(3.1rem, 8vw, 5.3rem);
    line-height: 0.95;
    font-weight: 600;
    letter-spacing: -0.03em;
    max-width: 12ch;
}

.hero p {
    max-width: 44rem;
    font-size: 1.08rem;
    line-height: 1.9;
    color: var(--muted);
}

.archive-notes {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.archive-note {
    background: var(--paper-soft);
    border: 1px solid rgba(175, 154, 121, 0.4);
    padding: 1rem 1.1rem 1.05rem;
    box-shadow: var(--shadow);
}

.archive-note-label {
    display: block;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.5rem;
}

.archive-note-value {
    display: block;
    font-size: 1rem;
    line-height: 1.55;
}

.archive-heading {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 1rem;
}

.archive-heading::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--rule);
}

.paper-list {
    list-style: none;
    display: grid;
    gap: 1rem;
    counter-reset: paper;
}

.paper-card {
    counter-increment: paper;
}

.paper-link {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 1.2rem;
    align-items: start;
    text-decoration: none;
    color: inherit;
    padding: 1.35rem 1.4rem;
    border: 1px solid var(--rule);
    background: linear-gradient(
        180deg,
        rgba(255, 252, 246, 0.92) 0%,
        rgba(249, 243, 232, 0.92) 100%
    );
    box-shadow: var(--shadow);
    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.paper-link:hover {
    transform: translateY(-2px);
    border-color: var(--rule-strong);
    background: linear-gradient(
        180deg,
        rgba(255, 252, 246, 1) 0%,
        rgba(246, 238, 224, 1) 100%
    );
    box-shadow: 0 20px 42px rgba(74, 57, 39, 0.11);
}

.paper-index {
    font-family: "Cormorant Garamond", "Times New Roman", serif;
    font-size: 2.25rem;
    line-height: 1;
    color: var(--accent);
    min-width: 2.4rem;
    text-align: center;
}

.paper-index::before {
    content: counter(paper, decimal-leading-zero);
}

.paper-copy {
    min-width: 0;
}

.paper-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.55rem;
    padding-left: 0.1rem;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.73rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.paper-kicker::before {
    content: "";
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 5px var(--accent-soft);
}

.paper-title {
    display: block;
    font-size: 1.34rem;
    line-height: 1.45;
    font-weight: 600;
    overflow-wrap: anywhere;
    margin-bottom: 0.65rem;
}

.paper-detail {
    display: block;
    color: var(--muted);
    line-height: 1.75;
    font-size: 0.96rem;
}

.paper-action {
    align-self: center;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.76rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    white-space: nowrap;
    padding-left: 1rem;
}

.paper-link:hover .paper-action {
    text-decoration: underline;
    text-underline-offset: 0.3em;
}

@media (max-width: 760px) {
    .archive-notes {
        grid-template-columns: 1fr;
    }

    .paper-link {
        grid-template-columns: auto 1fr;
    }

    .paper-action {
        grid-column: 2;
        padding-left: 0;
    }
}

@media (max-width: 640px) {
    body {
        padding: 1.4rem 1rem 2.8rem;
    }

    .hero {
        padding-top: 1.2rem;
    }

    h1 {
        font-size: clamp(2.6rem, 14vw, 4rem);
    }

    .paper-link {
        padding: 1.15rem;
        gap: 0.9rem;
    }

    .paper-title {
        font-size: 1.16rem;
    }
}
