/* index.css — standalone stylesheet for the archive index page.
   Self-contained: does not depend on the blog's style.css.
   Palette matches the blog: cream background, deep-red accent, serif type. */

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #f5f0eb;
    color: #2c2c2c;
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 16px;
    line-height: 1.7;
    min-height: 100vh;
}

a {
    color: #8b1a1a;
    text-decoration: none;
    transition: color 0.25s ease;
}

a:hover {
    color: #cc0000;
    text-decoration: underline;
}

/* ===== PAGE FRAME ===== */
.page {
    max-width: 1100px;
    margin: 0 auto;
    background: #ffffff;
    min-height: 100vh;
    border-left: 1px solid #e0d6ce;
    border-right: 1px solid #e0d6ce;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.1);
}

/* ===== HEADER ===== */
.site-header {
    text-align: center;
    padding: 30px 20px 20px 20px;
    border-bottom: 3px solid #8b1a1a;
}

.site-title {
    font-size: 34px;
    font-weight: bold;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #8b1a1a;
    line-height: 1.2;
}

.site-sub {
    margin-top: 8px;
    font-size: 13px;
    font-style: italic;
    letter-spacing: 0.3px;
    color: #666;
}

/* ===== MAIN ===== */
.index-main {
    max-width: 960px;
    margin: 0 auto;
    padding: 28px 30px 10px 30px;
}

.index-intro {
    font-size: 15px;
    color: #555;
    line-height: 1.7;
    margin-bottom: 22px;
}

/* ===== FILTER ===== */
.index-filter {
    display: block;
    width: 100%;
    padding: 11px 15px;
    font-family: inherit;
    font-size: 15px;
    color: #2c2c2c;
    background: #faf8f6;
    border: 1px solid #e0d6ce;
    border-radius: 4px;
    margin-bottom: 18px;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.index-filter:focus {
    outline: none;
    border-color: #8b1a1a;
    box-shadow: 0 0 0 3px rgba(139, 26, 26, 0.10);
}

.index-filter::placeholder {
    color: #a89c92;
    font-style: italic;
}

/* ===== JUMP NAV ===== */
.index-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 12px 0;
    margin-bottom: 26px;
    border-top: 1px solid #e8e0d8;
    border-bottom: 1px solid #e8e0d8;
}

.index-nav a {
    padding: 6px 16px;
    font-size: 13px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #555;
    border: 1px solid transparent;
    border-radius: 3px;
    transition: all 0.25s ease;
}

.index-nav a:hover {
    color: #8b1a1a;
    border-color: #d4c5b8;
    background: #faf8f6;
    text-decoration: none;
}

/* ===== SECTION HEADINGS ===== */
.section-heading {
    font-size: 15px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #8b1a1a;
    padding: 4px 0 8px 0;
    margin: 8px 0 18px 0;
    border-bottom: 2px solid #8b1a1a;
    scroll-margin-top: 16px;
}

.section-heading + * {
    margin-bottom: 34px;
}

/* ===== SERIES CARDS ===== */
.series-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.series-card {
    background: #faf8f6;
    border: 1px solid #e8e0d8;
    border-top: 3px solid #8b1a1a;
    border-radius: 4px;
    padding: 14px 16px 16px 16px;
}

.series-title {
    font-size: 17px;
    font-weight: bold;
    color: #2c2c2c;
    line-height: 1.3;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e8e0d8;
}

.series-count {
    display: inline-block;
    font-size: 11px;
    font-weight: normal;
    font-style: italic;
    color: #a08a7a;
    letter-spacing: 0.3px;
    margin-left: 4px;
}

.series-parts {
    list-style: none;
    counter-reset: part;
}

.series-parts li {
    margin: 0;
}

.s-link {
    display: block;
    padding: 6px 8px 6px 30px;
    position: relative;
    font-size: 14px;
    line-height: 1.4;
    color: #3c3c3c;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.s-link::before {
    counter-increment: part;
    content: counter(part);
    position: absolute;
    left: 6px;
    top: 6px;
    width: 18px;
    height: 18px;
    font-size: 11px;
    font-weight: bold;
    line-height: 18px;
    text-align: center;
    color: #8b1a1a;
    background: #f0e4de;
    border-radius: 50%;
}

.s-link:hover {
    color: #8b1a1a;
    background: #f3ebe6;
    text-decoration: none;
}

/* ===== STANDALONE LIST ===== */
.letter-group {
    margin-bottom: 22px;
    scroll-margin-top: 16px;
}

.letter-heading {
    font-size: 20px;
    font-weight: bold;
    color: #8b1a1a;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding-bottom: 5px;
    margin-bottom: 10px;
    border-bottom: 2px solid #f0e8e0;
}

.post-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 2px 22px;
}

.post-list li {
    margin: 0;
}

.post-link {
    display: block;
    padding: 7px 12px;
    font-size: 15px;
    line-height: 1.4;
    color: #3c3c3c;
    border-left: 2px solid transparent;
    border-radius: 0 3px 3px 0;
    transition: all 0.2s ease;
}

.post-link:hover {
    color: #8b1a1a;
    background: #faf8f6;
    border-left-color: #8b1a1a;
    text-decoration: none;
}

/* ===== EMPTY / FOOTER ===== */
.index-empty {
    text-align: center;
    font-style: italic;
    color: #888;
    padding: 30px 0;
}

.site-footer {
    max-width: 960px;
    margin: 0 auto;
    padding: 22px 30px 36px 30px;
    text-align: center;
    font-size: 13px;
    color: #999;
    border-top: 1px solid #e8e0d8;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .site-title {
        font-size: 25px;
        letter-spacing: 1px;
    }

    .index-main {
        padding: 20px 16px 10px 16px;
    }

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

    .post-list {
        grid-template-columns: 1fr;
    }

    .letter-heading {
        font-size: 18px;
    }
}
