/* --- General Styling & Resets --- */
:root {
    --background-color: #fcfcfc;
    --text-color: #333333;
    --primary-accent-color: #6a6a6a;
    --subtle-border-color: #e0e0e0;
    --header-font: 'Lato', sans-serif;
    --body-font: 'Lora', serif;
}

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

body {
    font-family: var(--body-font);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Header & Navigation Bar --- */
.site-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--subtle-border-color);
}

.site-header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.site-name {
    font-family: var(--header-font);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-color);
    text-decoration: none;
}

.main-nav ul {
    display: flex;
    list-style-type: none;
    gap: 1.5rem;
}

.main-nav a {
    font-family: var(--header-font);
    text-decoration: none;
    color: var(--primary-accent-color);
    font-size: 1rem;
    transition: color 0.2s ease-in-out;
}

.main-nav a:hover,
.main-nav a:focus {
    color: var(--text-color);
    text-decoration: underline;
}

/* --- Main Content Column --- */
.main-content {
    max-width: 800px; /* Ideal width for reading */
    margin: 2.5rem auto;
    padding: 0 2rem;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--header-font);
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 2rem;
}

p {
    margin-bottom: 1.5rem;
}

a {
    color: var(--primary-accent-color);
    text-decoration: underline;
}

a:hover {
    color: var(--text-color);
}

/* --- Footer --- */
.site-footer {
    text-align: center;
    padding: 2rem;
    margin-top: 2rem;
    font-family: var(--header-font);
    font-size: 0.9rem;
    color: var(--primary-accent-color);
    border-top: 1px solid var(--subtle-border-color);
}

/* --- Responsive Design for smaller screens --- */
@media (max-width: 600px) {
    .site-header nav {
        flex-direction: column;
        gap: 1rem;
    }

    h1 {
        font-size: 2rem;
    }

    .main-content {
        margin-top: 1.5rem;
        padding: 0 1rem;
    }
}

/* --- Article Lists --- */
.main-content ul,
.main-content ol {
    margin-bottom: 1.5rem; /* Matches paragraph spacing */
    padding-left: 2.5rem;  /* Indents the entire list */
}

.main-content li {
    margin-bottom: 0.75rem; /* Space between individual list items */
    padding-left: 0.5rem;   /* Space between the bullet/number and the text */
}


/* --- NEW: Fanfiction Archive Page --- */

.fandom-nav {
    margin: 2.5rem 0;
    padding: 1rem 1.5rem;
    background-color: #f7f7f7;
    border: 1px solid var(--subtle-border-color);
    text-align: center;
    border-radius: 4px;
}

.fandom-nav p {
    margin-bottom: 1rem;
    font-family: var(--header-font);
    font-weight: 700;
}

.fandom-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.fandom-nav a {
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid var(--subtle-border-color);
    background-color: #fff;
    font-family: var(--header-font);
    font-size: 0.9rem;
    transition: all 0.2s ease-in-out;
    border-radius: 4px;
}

.fandom-nav a:hover,
.fandom-nav a:focus {
    background-color: var(--text-color);
    color: var(--background-color);
    border-color: var(--text-color);
}

/* This is a helper to make sure anchor links don't get hidden by the browser's jump */
.fandom-section {
    padding-top: 2.5rem;
    margin-top: -2.5rem;
}

.fandom-heading {
    margin-top: 3rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--subtle-border-color);
    margin-bottom: 2rem;
}

.fanfic-entry {
    border-bottom: 1px solid var(--subtle-border-color);
    padding-bottom: 2rem;
    margin-bottom: 2rem;
}

/* Remove border and margin from the last entry in each fandom section */
.fandom-section .fanfic-entry:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.fanfic-title {
    margin-bottom: 0.5rem;
    font-size: 1.75rem;
}

.fanfic-title a {
    text-decoration: none;
    color: var(--text-color);
}

.fanfic-title a:hover,
.fanfic-title a:focus {
    color: var(--primary-accent-color);
    text-decoration: underline;
}

.fanfic-meta {
    font-family: var(--header-font);
    font-size: 0.9rem;
    color: var(--primary-accent-color);
    margin-bottom: 1rem;
}

.fanfic-summary p {
    margin-bottom: 0;
}

