/* ==========================================================================
   Variables & Theme Settings
   ========================================================================== */
:root {
    --frost-white: #f4f7f9;
    --glacial-blue: #e3edf4;
    --twilight-blue: #0f1c2e;
    --deep-abyss: #070d16;
    --aurora-violet: #6d42c7;
    --silver-spark: #cbd5e1;
    
    --font-fantasy: 'Cinzel', Georgia, serif;
    --font-romance: 'Lora', serif;
    --font-sans: 'Inter', system-ui, sans-serif;
}

/* Base Reset & Setup */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    background-color: var(--deep-abyss);
    color: var(--frost-white);
    font-family: var(--font-sans);
    line-height: 1.6;
}
a { color: var(--frost-white); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--glacial-blue); }

/* Header Styling */
.site-header {
    background-color: rgba(7, 13, 22, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: sticky; top: 0; z-index: 100;
}
.header-container {
    max-width: 1200px; margin: 0 auto; padding: 20px;
    display: flex; justify-content: space-between; align-items: center;
}
.author-title {
    font-family: var(--font-fantasy); font-size: 1.5rem; letter-spacing: 2px;
}
.site-navigation ul { display: flex; list-style: none; gap: 20px; }

/* ==========================================================================
   Homepage Winter Aesthetics
   ========================================================================== */

/* Hero Section */
.home-hero-section {
    position: relative; background: radial-gradient(circle at center, #162a45 0%, var(--deep-abyss) 100%);
    padding: 80px 20px; border-bottom: 1px solid rgba(109, 66, 199, 0.2);
}
.hero-container { max-width: 1100px; margin: 0 auto; position: relative; z-index: 2; }
.featured-book-flex { display: flex; gap: 50px; align-items: center; }

.featured-book-cover img {
    max-width: 320px; border-radius: 4px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.6), -5px 5px 15px rgba(109, 66, 199, 0.2);
}
.frost-badge {
    display: inline-block; background: rgba(109, 66, 199, 0.2); 
    border: 1px solid var(--aurora-violet); padding: 4px 12px;
    border-radius: 20px; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px;
}
.hero-book-title { font-family: var(--font-fantasy); font-size: 3rem; margin: 15px 0; }
.hero-book-excerpt { font-family: var(--font-romance); font-size: 1.2rem; color: var(--silver-spark); margin-bottom: 30px; }

/* Buttons */
.btn { display: inline-block; padding: 12px 24px; border-radius: 4px; font-weight: 600; margin-right: 15px; }
.btn-primary { background-color: var(--aurora-violet); color: white; }
.btn-primary:hover { background-color: #5b33ab; }
.btn-secondary { border: 1px solid var(--frost-white); }
.btn-secondary:hover { background: rgba(255, 255, 255, 0.1); }

/* Bookshelf Grid */
.section-container { max-width: 1200px; margin: 0 auto; padding: 60px 20px; }
.frost-section-title { font-family: var(--font-fantasy); text-align: center; margin-bottom: 40px; letter-spacing: 2px; position: relative; }
.bookshelf-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 30px; }
.bookshelf-item { text-align: center; }
.bookshelf-item img { max-width: 100%; border-radius: 4px; transition: transform 0.3s; }
.bookshelf-item img:hover { transform: translateY(-5px); }
.bookshelf-item h3 { font-family: var(--font-fantasy); font-size: 1rem; margin-top: 15px; }

/* Blog Cards */
.blog-post-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.blog-card { background: var(--twilight-blue); border-radius: 6px; overflow: hidden; display: flex; flex-direction: column; }
.blog-card-content { padding: 25px; display: flex; flex-direction: column; flex-grow: 1; }
.blog-card-title { font-family: var(--font-fantasy); font-size: 1.3rem; margin: 10px 0; }
.blog-card-excerpt { font-family: var(--font-romance); color: var(--silver-spark); font-size: 0.95rem; margin-bottom: 15px; }

/* Footer */
.site-footer { background-color: #050a11; border-top: 1px solid rgba(255,255,255,0.05); padding: 40px 20px; margin-top: 60px; }
.footer-container { max-width: 1200px; margin: 0 auto; text-align: center; }
.footer-newsletter { max-width: 500px; margin: 0 auto 40px auto; padding: 30px; background: rgba(109, 66, 199, 0.1); border: 1px dashed var(--aurora-violet); border-radius: 4px; }
.footer-newsletter h3 { font-family: var(--font-fantasy); margin-bottom: 10px; }
.footer-subscribe-button { display: inline-block; margin-top: 15px; background: var(--frost-white); color: var(--deep-abyss); padding: 8px 20px; font-weight: bold; border-radius: 4px; }
.footer-bottom { display: flex; justify-content: space-between; border-top: 1px solid rgba(255,255,255,0.05); padding-top: 20px; font-size: 0.9rem; color: var(--silver-spark); }
.footer-links a { margin-left: 15px; }



/* ==========================================================================
   Individual Post & Typography Canvas
   ========================================================================== */

/* Post Hero Header */
.post-hero {
    position: relative;
    padding: 120px 20px 80px 20px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.post-hero-overlay {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to bottom, rgba(7, 13, 22, 0.6) 0%, var(--deep-abyss) 100%);
    z-index: 1;
}
.post-hero-content {
    position: relative; z-index: 2; max-width: 800px; margin: 0 auto;
}
.post-tag-badge {
    display: inline-block; background: var(--aurora-violet); color: white;
    padding: 3px 10px; border-radius: 3px; font-size: 0.75rem;
    text-transform: uppercase; font-weight: 600; margin-bottom: 15px;
}
.post-page-title {
    font-family: var(--font-fantasy); font-size: 2.8rem; line-height: 1.2; margin-bottom: 15px;
}
.post-meta-data {
    font-size: 0.9rem; color: var(--silver-spark); font-family: var(--font-sans);
}

/* Post Typography Layout */
.post-body-container {
    padding: 50px 20px;
}
.post-content-canvas {
    max-width: 700px; margin: 0 auto;
    font-family: var(--font-romance); font-size: 1.2rem; line-height: 1.85;
    color: var(--glacial-blue);
}

/* Beautiful Book-ish Text Formatting */
.post-content-canvas p { margin-bottom: 25px; }
.post-content-canvas h2, .post-content-canvas h3 {
    font-family: var(--font-fantasy); color: var(--frost-white);
    margin: 40px 0 20px 0; letter-spacing: 1px;
}
.post-content-canvas h2 { font-size: 1.8rem; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 5px; }

/* Blockquotes styled like a snippet from a book */
.post-content-canvas blockquote {
    margin: 40px 0; padding: 10px 30px;
    border-left: 3px solid var(--aurora-violet);
    font-style: italic; background: rgba(109, 66, 199, 0.05);
    border-radius: 0 4px 4px 0;
}

/* Author Box */
.post-footer-canvas { max-width: 700px; margin: 40px auto; padding: 30px 0; border-top: 1px solid rgba(255,255,255,0.05); }
.author-profile-box { display: flex; gap: 20px; align-items: center; background: var(--twilight-blue); padding: 25px; border-radius: 6px; }
.author-avatar { width: 70px; height: 70px; border-radius: 50%; object-fit: cover; border: 2px solid var(--aurora-violet); }
.author-bio-text h4 { font-family: var(--font-fantasy); font-size: 1.1rem; margin-bottom: 5px; }
.author-bio-text p { font-size: 0.95rem; color: var(--silver-spark); }

/* Bottom Post Recommendations Navigation */
.post-navigation-recs { border-top: 1px solid rgba(255,255,255,0.05); }
.nav-recs-container { display: flex; min-height: 160px; }
.nav-rec-card {
    flex: 1; position: relative; background-size: cover; background-position: center;
    display: flex; align-items: center; padding: 40px; box-sizing: border-box;
}
.nav-rec-overlay { position: absolute; top:0; left:0; right:0; bottom:0; background: rgba(7, 13, 22, 0.85); transition: background 0.3s; }
.nav-rec-card:hover .nav-rec-overlay { background: rgba(7, 13, 22, 0.7); }
.nav-rec-inner { position: relative; z-index: 2; width: 100%; }
.prev-card { text-align: left; }
.next-card { text-align: right; border-left: 1px solid rgba(255,255,255,0.05); }
.nav-direction { font-size: 0.8rem; text-transform: uppercase; color: var(--aurora-violet); letter-spacing: 1px; font-weight: bold; }
.nav-rec-inner h4 { font-family: var(--font-fantasy); font-size: 1.3rem; color: var(--frost-white); margin-top: 5px; }





/* ==========================================================================
   Static Page Layout Modifications
   ========================================================================== */

/* Page Hero Adjustments */
.page-hero {
    position: relative;
    padding: 140px 20px 90px 20px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    text-align: center;
    border-bottom: 1px solid rgba(109, 66, 199, 0.15);
}
.page-hero-overlay {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to bottom, rgba(7, 13, 22, 0.5) 0%, var(--deep-abyss) 100%);
    z-index: 1;
}
.page-hero-content {
    position: relative; z-index: 2; max-width: 900px; margin: 0 auto;
}
.page-static-title {
    font-family: var(--font-fantasy); font-size: 3.2rem; line-height: 1.1;
    letter-spacing: 2px; color: var(--frost-white);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Page Content Canvas Container */
.page-body-container {
    padding: 60px 20px;
}
.page-content-canvas {
    max-width: 800px; margin: 0 auto;
    font-family: var(--font-romance); font-size: 1.2rem; line-height: 1.85;
    color: var(--glacial-blue);
}

/* Specific formatting layouts for side-by-side content like an Author Bio Image */
.page-content-canvas p { margin-bottom: 25px; }

/* Handling images alignment within the editor seamlessly */
.page-content-canvas .kg-image-card {
    margin: 40px 0;
}
.page-content-canvas .kg-image {
    max-width: 100%; height: auto; border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}





/* Pagination Design */
.pagination-nav-container {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 50px; padding-top: 30px; border-top: 1px solid rgba(255,255,255,0.05);
    font-family: var(--font-sans); font-size: 0.9rem;
}
.pagination-button {
    padding: 8px 16px; border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px; transition: all 0.2s;
}
.pagination-button:not(.disabled-btn):hover {
    background: var(--aurora-violet); border-color: var(--aurora-violet);
}
.disabled-btn { color: rgba(255,255,255,0.2); cursor: not-allowed; }
.page-number-indicator { color: var(--silver-spark); }

/* Koenig Editor Wide and Full Width Image Support */
.kg-width-wide .kg-image {
    max-width: 120%;
    margin-left: -10%;
    border-radius: 6px;
}
.kg-width-full .kg-image {
    max-width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    border-radius: 0;
}
@media (max-width: 800px) {
    .kg-width-wide .kg-image,
    .kg-width-full .kg-image {
        max-width: 100%;
        margin-left: 0;
        left: 0;
    }
}


/* Universal Link Styling */
a {
    color: var(--glacial-blue, #7dd3fc); /* Vibrant ice blue link color */
    font-weight: 700;                    /* Makes all links bold */
    text-decoration: none;
    transition: color 0.2s ease, text-shadow 0.2s ease;
}

/* Hover State */
a:hover {
    color: var(--frost-white, #ffffff);   /* Turns crisp white on hover */
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.5); /* Soft, frosted glow */
}

/* Links inside standard body text (adds an underline for extra accessibility) */
p a, li a {
    text-decoration: underline;
    text-underline-offset: 3px;
}
