/* ========================================
   Frank Rizzo IV — classy literary minimal
   ======================================== */

html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: #fdfdfb;
    color: #1a1a1a;
    font-family: 'EB Garamond', Georgia, 'Times New Roman', serif;
    font-size: 20px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 580px;
    margin: 0 auto;
    padding: 96px 32px 96px;
    box-sizing: border-box;
}

/* ----- Masthead (homepage) ----- */
.masthead {
    text-align: center;
    margin: 0 0 88px;
}

.author {
    font-family: 'EB Garamond', serif;
    font-weight: 400;
    font-size: 40px;
    letter-spacing: 0.02em;
    margin: 0;
    line-height: 1.1;
    color: #1a1a1a;
}

/* ----- Table of contents ----- */
.toc {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: poem-counter;
}

.toc-item {
    padding: 14px 0;
    border-bottom: 0.5px solid #ebe9e3;
    counter-increment: poem-counter;
}

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

.toc-link {
    display: block;
    color: #1a1a1a;
    text-decoration: none;
    font-size: 20px;
    transition: color 0.15s ease;
}

.toc-link:hover {
    color: #6b5b3f;
}

/* ----- Single poem page ----- */
.poem {
    margin: 0 0 64px;
}

.poem-title {
    font-family: 'EB Garamond', serif;
    font-weight: 400;
    font-size: 30px;
    line-height: 1.25;
    text-align: center;
    margin: 0 0 48px;
    letter-spacing: 0.01em;
    color: #1a1a1a;
}

.poem-body {
    font-family: 'EB Garamond', serif;
    font-size: 20px;
    line-height: 1.7;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: #1a1a1a;
    text-align: left;
}

.byline {
    margin: 48px 0 0;
    text-align: center;
    font-style: italic;
    font-size: 16px;
    color: #8a8884;
    letter-spacing: 0.02em;
}

/* ----- Poem page nav ----- */
.poem-nav {
    text-align: center;
    margin-top: 80px;
    padding-top: 32px;
    border-top: 0.5px solid #ebe9e3;
}

.poem-nav a {
    color: #6a6a68;
    text-decoration: none;
    font-size: 16px;
    font-style: italic;
    letter-spacing: 0.02em;
    transition: color 0.15s ease;
}

.poem-nav a:hover {
    color: #1a1a1a;
}

/* ----- Mobile ----- */
@media (max-width: 600px) {
    html, body {
        font-size: 18px;
    }

    .container {
        padding: 56px 24px 64px;
    }

    .author {
        font-size: 32px;
    }

    .masthead {
        margin-bottom: 64px;
    }

    .toc-link {
        font-size: 18px;
    }

    .poem-title {
        font-size: 26px;
        margin-bottom: 36px;
    }

    .poem-body {
        font-size: 18px;
    }
}
