/* ===========================
   N. Burchett - Author Website
   Classic Literary Theme
   =========================== */

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --parchment: #FAF8F0;
    --parchment-dark: #F0EDE0;
    --ink: #2C2C2C;
    --ink-light: #5A5A5A;
    --burgundy: #722F37;
    --burgundy-dark: #5A252C;
    --gold: #8B7355;
    --gold-light: #A89070;
    --border: #DDD5C5;
    --white: #FFFFFF;
    --shadow: rgba(0, 0, 0, 0.08);
    --radius: 4px;
}

html {
    font-size: 18px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Lora', Georgia, 'Times New Roman', serif;
    background-color: var(--parchment);
    color: var(--ink);
    line-height: 1.8;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--burgundy);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--burgundy-dark);
}

img {
    max-width: 100%;
    height: auto;
}

/* --- Container --- */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* --- Header --- */
.site-header {
    background: var(--white);
    border-bottom: 2px solid var(--border);
    padding: 1.5rem 0;
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.site-brand {
    text-decoration: none;
    color: var(--ink);
}

.site-brand:hover {
    color: var(--ink);
}

.site-title {
    font-family: 'Lora', Georgia, serif;
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.2;
}

.site-tagline {
    font-family: 'Source Sans 3', system-ui, sans-serif;
    font-size: 0.8rem;
    color: var(--gold);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-top: 0.15rem;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--ink);
    padding: 0.25rem;
}

.site-nav {
    display: flex;
    gap: 0.25rem;
}

.site-nav a {
    font-family: 'Source Sans 3', system-ui, sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ink-light);
    padding: 0.4rem 0.9rem;
    border-radius: var(--radius);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: all 0.2s;
}

.site-nav a:hover,
.site-nav a.active {
    color: var(--burgundy);
    background: var(--parchment);
}

/* --- Main --- */
main {
    flex: 1;
    padding: 2.5rem 0;
}

/* --- Section Titles --- */
.section-title {
    font-size: 1rem;
    font-family: 'Source Sans 3', system-ui, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--gold);
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

/* --- Home Layout --- */
.home-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 3rem;
}

/* --- Story Cards --- */
.story-card {
    margin-bottom: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--border);
}

.story-card:last-child {
    border-bottom: none;
}

.story-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
    font-family: 'Source Sans 3', system-ui, sans-serif;
    font-size: 0.78rem;
    color: var(--ink-light);
}

.story-category {
    background: var(--burgundy);
    color: var(--white) !important;
    padding: 0.15rem 0.6rem;
    border-radius: 2px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.story-category:hover {
    background: var(--burgundy-dark);
    color: var(--white) !important;
}

.story-reading-time {
    font-style: italic;
}

.story-title {
    font-size: 1.5rem;
    line-height: 1.3;
    margin-bottom: 0.6rem;
}

.story-title a {
    color: var(--ink);
}

.story-title a:hover {
    color: var(--burgundy);
}

.story-excerpt {
    color: var(--ink-light);
    line-height: 1.7;
    margin-bottom: 0.8rem;
}

.read-more {
    font-family: 'Source Sans 3', system-ui, sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}

/* --- Sidebar --- */
.sidebar {
    position: sticky;
    top: 2rem;
    align-self: start;
}

.novella-card-small {
    display: flex;
    gap: 0.8rem;
    margin-bottom: 1.2rem;
    align-items: start;
}

.novella-thumb {
    width: 60px;
    border-radius: var(--radius);
    box-shadow: 0 2px 8px var(--shadow);
}

.novella-info h4 {
    font-size: 0.85rem;
    line-height: 1.3;
}

.novella-info h4 a {
    color: var(--ink);
}

.novella-info h4 a:hover {
    color: var(--burgundy);
}

.view-all {
    font-family: 'Source Sans 3', system-ui, sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
}

/* --- Full Story --- */
.story-full {
    max-width: 700px;
    margin: 0 auto;
}

.story-header {
    margin-bottom: 2rem;
    text-align: center;
}

.story-header .story-meta {
    justify-content: center;
}

.story-title-full {
    font-size: 2.2rem;
    line-height: 1.25;
    margin-top: 0.5rem;
}

.story-body {
    font-size: 1.05rem;
    line-height: 1.9;
}

.story-body p {
    margin-bottom: 1.4rem;
}

.story-body blockquote {
    border-left: 3px solid var(--burgundy);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    color: var(--ink-light);
    font-style: italic;
}

.story-body h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.story-body h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
}

/* Story Navigation */
.story-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border);
    gap: 1rem;
}

.story-nav-link {
    max-width: 45%;
}

.story-nav-link.next {
    text-align: right;
    margin-left: auto;
}

.nav-label {
    font-family: 'Source Sans 3', system-ui, sans-serif;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gold);
    display: block;
    margin-bottom: 0.2rem;
}

.nav-title {
    font-size: 0.9rem;
    color: var(--ink);
    display: block;
}

.story-nav-link:hover .nav-title {
    color: var(--burgundy);
}

/* --- Stories Page --- */
.stories-page h1 {
    margin-bottom: 1rem;
}

.category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 2rem;
}

.filter-tag {
    font-family: 'Source Sans 3', system-ui, sans-serif;
    font-size: 0.78rem;
    padding: 0.3rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--ink-light);
    transition: all 0.2s;
}

.filter-tag:hover,
.filter-tag.active {
    background: var(--burgundy);
    color: var(--white);
    border-color: var(--burgundy);
}

/* --- Novellas Page --- */
.novellas-page h1 {
    margin-bottom: 0.5rem;
}

.page-intro {
    color: var(--ink-light);
    margin-bottom: 2rem;
}

.novellas-grid {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.novella-card {
    display: flex;
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 2px 12px var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.novella-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.novella-cover-link {
    flex-shrink: 0;
}

.novella-cover {
    width: 200px;
    display: block;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.novella-details {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.novella-details h2 {
    font-size: 1.3rem;
    margin-bottom: 0.6rem;
}

.novella-details p {
    font-size: 0.95rem;
    color: var(--ink-light);
    margin-bottom: 1.2rem;
    line-height: 1.7;
}

.btn-amazon {
    display: inline-block;
    background: #FF9900;
    color: var(--white) !important;
    font-family: 'Source Sans 3', system-ui, sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.5rem 1.2rem;
    border-radius: var(--radius);
    transition: background 0.2s;
}

.btn-amazon:hover {
    background: #E68A00;
    color: var(--white) !important;
}

/* --- About Page --- */
.about-page h1 {
    margin-bottom: 1.5rem;
}

.about-content {
    max-width: 700px;
}

.about-photo {
    float: right;
    margin: 0 0 1.5rem 2rem;
    max-width: 250px;
}

.about-photo img {
    border-radius: var(--radius);
    box-shadow: 0 4px 16px var(--shadow);
}

.about-text {
    font-size: 1.05rem;
    line-height: 1.9;
}

.about-text p {
    margin-bottom: 1.4rem;
}

/* --- Pagination --- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    font-family: 'Source Sans 3', system-ui, sans-serif;
}

.page-link {
    font-weight: 600;
    font-size: 0.85rem;
}

.page-info {
    color: var(--ink-light);
    font-size: 0.85rem;
}

/* --- Empty State --- */
.empty-message {
    color: var(--ink-light);
    font-style: italic;
    text-align: center;
    padding: 3rem 0;
}

/* --- Footer --- */
.site-footer {
    background: var(--white);
    border-top: 2px solid var(--border);
    padding: 1.5rem 0;
    margin-top: auto;
}

.site-footer p {
    text-align: center;
    font-family: 'Source Sans 3', system-ui, sans-serif;
    font-size: 0.8rem;
    color: var(--ink-light);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    html {
        font-size: 16px;
    }

    .nav-toggle {
        display: block;
    }

    .site-nav {
        display: none;
        flex-direction: column;
        width: 100%;
        padding-top: 0.5rem;
    }

    .site-nav.open {
        display: flex;
    }

    .site-nav a {
        padding: 0.6rem 0;
    }

    .home-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        border-top: 1px solid var(--border);
        padding-top: 2rem;
    }

    .story-title-full {
        font-size: 1.6rem;
    }

    .novella-card {
        flex-direction: column;
    }

    .novella-cover {
        width: 100%;
    }

    .about-photo {
        float: none;
        margin: 0 auto 1.5rem;
        max-width: 200px;
    }

    .story-nav {
        flex-direction: column;
    }

    .story-nav-link {
        max-width: 100%;
    }

    .story-nav-link.next {
        text-align: left;
    }
}
