/* Font Definitions */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;700&display=swap');

@font-face {
    font-family: 'Cormorant Garamond';
    src: url('../fonts/CormorantGaramond-VariableFont_wght.ttf') format('truetype-variations');
    font-weight: 300 700;
    font-style: normal;
}

@font-face {
    font-family: 'Cormorant Garamond';
    src: url('../fonts/CormorantGaramond-Italic-VariableFont_wght.ttf') format('truetype-variations');
    font-weight: 300 700;
    font-style: italic;
}

/* Global Styles & Variables */
:root {
    --pw-light-text: #F0F0F0;
    /* Off-White */
    --pw-dark-bg: #2C2927;
    /* Warm Charcoal */
    --pw-highlight: #F0A500;
    /* Poemware Amber */

    /* Semantic Mappings */
    --pw-body-bg: var(--pw-dark-bg);
    --pw-container-bg: var(--pw-dark-bg);
    --pw-text-main: var(--pw-light-text);
    --pw-nav-bg: #1a1817;
    --pw-nav-bg: #1a1817;
    /* Slightly darker for nav */
    --pw-muted-highlight: #778899;
    /* Desaturated Blue (Complimentary to Amber) */
}

body {
    font-family: 'Cormorant Garamond', serif;
    background-color: var(--pw-body-bg);
    color: var(--pw-text-main);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

h1 {
    /* Make the header use the cleaner sans-serif font */
    font-family: 'Manrope', sans-serif;
    margin: 0;
}

/* Font utility class */
.font-sans-serif {
    font-family: 'Manrope', sans-serif;
}

/* Navbar Overrides */
.navbar {
    background-color: var(--pw-nav-bg) !important;
}

.navbar-brand,
.nav-link {
    color: var(--pw-light-text) !important;
    letter-spacing: 0.02em;
    /* Slight kerning increase */
}

.nav-link.active {
    color: var(--pw-highlight) !important;
}

.navbar-toggler {
    border-color: var(--pw-light-text);
}

.navbar-toggler-icon {
    filter: invert(1);
}

/* Component Overrides for Dark Theme */
.card,
.list-group-item {
    background-color: var(--pw-container-bg);
    color: var(--pw-text-main);
    border-color: var(--pw-highlight);
}

.list-group-item-action:hover,
.list-group-item-action:focus {
    background-color: var(--pw-highlight);
    color: var(--pw-dark-bg);
}

.list-group-item.active {
    background-color: var(--pw-highlight);
    border-color: var(--pw-highlight);
    color: #000000 !important;
    /* Force pure black */
    font-weight: bold;
}

.list-group-item.active small,
.list-group-item.active .text-muted {
    color: #000000 !important;
    /* Override muted text on active item */
    font-weight: normal;
    /* Keep author weight normal, or bold if preferred? Let's keep normal for hierarchy */
}

/* Button Overrides */
.btn-primary {
    background-color: var(--pw-highlight);
    border-color: var(--pw-highlight);
    color: var(--pw-dark-bg);
    font-weight: 700;
}

.btn-primary:hover {
    background-color: #d68b00;
    /* Darker Amber */
    border-color: #d68b00;
    color: var(--pw-dark-bg);
}

/* Utility Overrides */
.text-muted {
    color: rgba(240, 240, 240, 0.6) !important;
}

/* Gallery Image Styles */
.card-header-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
    z-index: 0;
}

/* Gradient Scrim for Contrast */
.card-header-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(44, 41, 39, 0.4), rgba(44, 41, 39, 0.8));
    z-index: 1;
}

.card-overlay-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 100%;
    padding: 1rem;
    z-index: 2;
}

.card-overlay-title,
.card-overlay-author {
    font-family: 'Cormorant Garamond', serif;
    font-weight: bold;
    color: var(--pw-light-text);
    text-shadow: none;
}

/* Publisher Link Style (Shared) */
.publisher-link {
    color: var(--pw-highlight);
    font-weight: bold;
    text-decoration: none;
}

.publisher-link:hover {
    color: #d68b00;
    text-decoration: underline;
}

/* Metadata Block */
.metadata-block {
    padding-left: 2rem;
    text-indent: -2rem;
    font-size: 1.2rem;
}

/* Bio Link Specifics */
.bio-link {
    color: var(--pw-highlight) !important;
    text-decoration: none;
    transition: color 0.3s ease;
}

.bio-link:hover {
    color: #d68b00 !important;
    text-decoration: underline;
}

.bio-link:visited {
    /* Complementary to Amber (#F0A500 - Hue 41) is Blue (Hue 221) */
    /* Desaturated Blue: #6c757d (Muted Slate) or similar */
    /* Let's try a desaturated slate blue: #778899 */
    /* Let's try a desaturated slate blue: #778899 */
    color: var(--pw-muted-highlight) !important;
}