/*
 * Theme Name: JejakPuji
 * File: theme.css (Dynamic Theme Switch Enabled)
 */

:root {
    /* ========================================================
       DEFAULT PALETTE - WARM PAPER (LIGHT MODE BY DEFAULT)
       ======================================================== */
    --color-bg: #fdfbf7;          /* Soft warm paper white */
    --color-surface: #f5f2eb;     /* Slightly darker warm paper */
    --color-surface-hover: #ebe7de;
    --color-border: rgba(179, 128, 89, 0.15); /* Soft warm gold/brown border */
    --color-border-hover: rgba(179, 128, 89, 0.4);
    --color-text: #2d241e;        /* Deep elegant dark charcoal/sepia */
    --color-text-muted: #736257;  /* Muted warm brown */
    --color-heading: #1e1611;     /* Extra dark deep brown */
    
    --color-primary: #b38059;     /* Deepened gold for proper contrast on white */
    --color-primary-rgb: 179, 128, 89;
    --color-accent: #6d28d9;      /* Deep violet */
    --color-accent-teal: #0f766e; /* Deep teal */
    
    /* Dynamic Header Elements */
    --color-header-bg: rgba(253, 251, 247, 0.85);
    --color-header-scrolled: rgba(245, 242, 235, 0.98);
    --color-footer-bg: #eae5db;
    
    /* Gradients */
    --grad-primary: linear-gradient(135deg, #b38059 0%, #85583f 100%);
    --grad-accent: linear-gradient(135deg, #6d28d9 0%, #0f766e 100%);
    --grad-dark: linear-gradient(180deg, #f5f2eb 0%, #fdfbf7 100%);

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Merriweather', serif;
    --font-ui: 'Outfit', sans-serif;

    /* Spacing & Borders */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow: 0 10px 30px rgba(45, 36, 30, 0.05);
    --container-width: 1200px;
    --container-reading: 720px;
}

/* ========================================================
   OVERRIDE FOR DARK THEME - SEPIA NIGHT (DARK MODE)
   ======================================================== */
body.dark-theme {
    --color-bg: #141210;          /* Warm dark charcoal/brown */
    --color-surface: #1e1a17;     /* Lighter warm dark for cards */
    --color-surface-hover: #292420;
    --color-border: rgba(212, 163, 115, 0.12); /* Subtle gold border */
    --color-border-hover: rgba(212, 163, 115, 0.3);
    --color-text: #f0e6df;        /* Comfort cream text */
    --color-text-muted: #bdaea3;  /* Muted warm grey */
    --color-heading: #ffffff;     /* Pure crisp white */
    
    --color-primary: #d4a373;     /* Warm Amber/Gold */
    --color-primary-rgb: 212, 163, 115;
    --color-accent: #8b5cf6;      /* Violet magic */
    --color-accent-teal: #14b8a6; /* Teal focus */
    
    --color-header-bg: rgba(20, 18, 16, 0.85);
    --color-header-scrolled: rgba(10, 9, 8, 0.98);
    --color-footer-bg: #0f0d0c;
    
    --grad-primary: linear-gradient(135deg, #d4a373 0%, #a98467 100%);
    --grad-accent: linear-gradient(135deg, #8b5cf6 0%, #14b8a6 100%);
    --grad-dark: linear-gradient(180deg, #1e1a17 0%, #141210 100%);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 1.1rem;
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: var(--transition);
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.3;
    color: var(--color-heading);
    margin-bottom: 1rem;
    transition: color 0.4s ease;
}

h1 { font-size: 2.8rem; letter-spacing: -0.02em; }
h2 { font-size: 2.2rem; letter-spacing: -0.01em; }
h3 { font-size: 1.6rem; }
h4 { font-size: 1.25rem; }

/* Grid & Layout Containers */
.container {
    width: 90%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 15px;
}

.container-reading {
    width: 90%;
    max-width: var(--container-reading);
    margin: 0 auto;
    padding: 0 15px;
}

.section-padding {
    padding: 100px 0;
    transition: background 0.4s ease;
}

@media (max-width: 768px) {
    .section-padding {
        padding: 60px 0;
    }
}

/* Header & Navigation */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--color-header-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    transition: var(--transition), background-color 0.4s ease;
}

.site-header.scrolled {
    padding: 10px 0;
    background: var(--color-header-scrolled);
    box-shadow: var(--shadow);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    transition: var(--transition);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 32px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.site-header.scrolled .header-container {
    height: 60px;
}

/* Site Branding Logo */
.site-branding {
    display: flex;
    align-items: center;
}

.site-branding .custom-logo-link img {
    max-height: 50px;
    width: auto;
    transition: var(--transition);
}

.site-header.scrolled .site-branding .custom-logo-link img {
    max-height: 40px;
}

.site-title {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    background: var(--grad-accent);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: var(--transition);
}

.site-title:hover {
    opacity: 0.9;
}

.site-description {
    font-size: 0.8rem;
    font-family: var(--font-ui);
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: -4px;
}

/* Navigation Menus */
.main-navigation {
    display: flex;
    align-items: center;
}

.nav-menu-wrapper ul {
    list-style: none;
    display: flex;
    gap: 32px;
}

.nav-menu-wrapper li {
    position: relative;
}

.nav-menu-wrapper a {
    font-family: var(--font-ui);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text-muted);
    padding: 10px 0;
    position: relative;
    transition: var(--transition);
}

.nav-menu-wrapper a:hover,
.nav-menu-wrapper .current-menu-item > a {
    color: var(--color-heading);
}

.nav-menu-wrapper a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--grad-accent);
    transition: var(--transition);
}

.nav-menu-wrapper a:hover::after,
.nav-menu-wrapper .current-menu-item > a::after {
    width: 100%;
}

/* Theme Toggle Button */
.theme-toggle-btn {
    background: none;
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    font-size: 1.05rem;
    cursor: pointer;
    margin-right: 0;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.theme-toggle-btn:hover {
    color: var(--color-heading);
    border-color: var(--color-border-hover);
    background: rgba(var(--color-primary-rgb), 0.08);
}

/* Mobile Menu Toggle Button */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--color-heading);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1010;
}

@media (max-width: 991px) {
    .menu-toggle {
        display: block;
    }

    .nav-menu-wrapper {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--color-surface);
        border-left: 1px solid var(--color-border);
        box-shadow: var(--shadow);
        padding: 100px 40px 40px;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1005;
    }

    .nav-menu-wrapper.active {
        right: 0;
    }

    .nav-menu-wrapper ul {
        flex-direction: column;
        gap: 24px;
    }

    .nav-menu-wrapper a {
        font-size: 1.1rem;
    }
}

/* Hero Section */
.hero-section {
    position: relative;
    padding: 180px 0 100px;
    background: radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.05) 0%, transparent 50%),
                radial-gradient(circle at 10% 80%, rgba(20, 184, 166, 0.04) 0%, transparent 40%);
    border-bottom: 1px solid var(--color-border);
    transition: background 0.4s ease;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 60px;
    align-items: center;
}

@media (max-width: 991px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
}

.hero-subtitle {
    font-family: var(--font-ui);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--color-primary);
    margin-bottom: 15px;
    display: inline-block;
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.15;
    margin-bottom: 25px;
}

.hero-title span {
    background: var(--grad-accent);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2.5rem;
    }
}

.hero-description {
    font-size: 1.2rem;
    color: var(--color-text-muted);
    margin-bottom: 35px;
    max-width: 600px;
}

@media (max-width: 991px) {
    .hero-description {
        margin: 0 auto 35px;
    }
}

.hero-cta {
    display: flex;
    gap: 16px;
}

@media (max-width: 991px) {
    .hero-cta {
        justify-content: center;
    }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-ui);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 14px 28px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    cursor: pointer;
}

.btn-primary {
    background: var(--grad-accent);
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(139, 92, 246, 0.3);
    color: #ffffff;
}

.btn-secondary {
    background: rgba(var(--color-primary-rgb), 0.05);
    border: 1px solid var(--color-border);
    color: var(--color-text);
}

.btn-secondary:hover {
    background: rgba(var(--color-primary-rgb), 0.1);
    border-color: var(--color-border-hover);
    color: var(--color-heading);
}

/* Author Avatar / Art */
.hero-visual {
    display: flex;
    justify-content: center;
    position: relative;
}

.author-image-wrapper {
    position: relative;
    width: 320px;
    height: 320px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--color-border);
    background: var(--color-surface);
}

.author-image-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 60%, rgba(var(--color-primary-rgb), 0.15));
    z-index: 1;
}

.author-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.author-image-wrapper:hover img {
    transform: scale(1.05);
}

/* Section Header */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-subtitle {
    font-family: var(--font-ui);
    font-size: 0.85rem;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 3px;
    display: block;
    margin-bottom: 12px;
}

.section-title {
    font-size: 2.2rem;
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--grad-accent);
    border-radius: 2px;
}

/* Dynamic Books Grid (Showcase) */
.books-showcase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
}

.book-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.book-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--grad-primary);
    opacity: 0;
    transition: var(--transition);
}

.book-card:hover {
    transform: translateY(-5px);
    border-color: var(--color-border-hover);
    box-shadow: var(--shadow);
    background: var(--color-surface-hover);
}

.book-card:hover::before {
    opacity: 1;
}

.book-cover {
    width: 160px;
    height: 240px;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
    margin-bottom: 25px;
    position: relative;
    transition: var(--transition);
    background: #000;
}

body.dark-theme .book-cover {
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.6);
}

.book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.book-card:hover .book-cover {
    transform: scale(1.03) translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

body.dark-theme .book-card:hover .book-cover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
}

.book-tag {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(var(--color-primary-rgb), 0.15);
    color: var(--color-primary);
    padding: 4px 12px;
    border-radius: 12px;
    margin-bottom: 12px;
}

.book-title {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.book-meta {
    font-family: var(--font-ui);
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: 15px;
}

.book-description {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Post/Cerpen Card Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 30px;
}

@media (max-width: 576px) {
    .posts-grid {
        grid-template-columns: 1fr;
    }
}

.post-card {
    background: rgba(var(--color-primary-rgb), 0.03);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.post-card:hover {
    background: var(--color-surface);
    transform: translateY(-5px);
    border-color: var(--color-border-hover);
    box-shadow: var(--shadow);
}

.post-card-image {
    height: 200px;
    position: relative;
    overflow: hidden;
    background: var(--color-surface);
}

.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.post-card:hover .post-card-image img {
    transform: scale(1.05);
}

.post-card-content {
    padding: 30px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.post-card-meta {
    font-family: var(--font-ui);
    font-size: 0.8rem;
    color: var(--color-primary);
    display: flex;
    gap: 16px;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.post-card-title {
    font-size: 1.4rem;
    margin-bottom: 12px;
    line-height: 1.4;
}

.post-card-title a {
    color: var(--color-heading);
}

.post-card-title a:hover {
    color: var(--color-primary);
}

.post-card-excerpt {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    margin-bottom: 20px;
    flex-grow: 1;
    line-height: 1.7;
}

.post-card-link {
    font-family: var(--font-ui);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-primary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.post-card-link i {
    font-size: 0.8rem;
    transition: var(--transition);
}

.post-card:hover .post-card-link i {
    transform: translateX(4px);
}

/* Single Post Reading Page */
.reading-header {
    padding: 160px 0 60px;
    text-align: center;
    border-bottom: 1px solid var(--color-border);
    background: linear-gradient(180deg, rgba(var(--color-primary-rgb), 0.05) 0%, transparent 100%);
    transition: background 0.4s ease;
}

.reading-meta {
    font-family: var(--font-ui);
    font-size: 0.9rem;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.reading-title {
    font-size: 3.2rem;
    line-height: 1.25;
    margin-bottom: 25px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 768px) {
    .reading-title {
        font-size: 2.2rem;
    }
}

.reading-featured-image {
    max-width: 800px;
    margin: 40px auto 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--color-border);
}

.reading-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.reading-body {
    padding: 60px 0 100px;
}

.reading-content {
    font-size: 1.15rem;
    line-height: 2.0;
    color: var(--color-text);
}

.reading-content p {
    margin-bottom: 30px;
}

.reading-content h2,
.reading-content h3 {
    margin-top: 50px;
    margin-bottom: 20px;
}

.reading-content blockquote {
    border-left: 4px solid var(--color-primary);
    padding: 10px 0 10px 30px;
    margin: 40px 0;
    font-style: italic;
    color: var(--color-text-muted);
}

/* Post Navigation (Prev/Next) */
.post-navigation {
    display: flex;
    justify-content: space-between;
    padding: 40px 0;
    border-top: 1px solid var(--color-border);
    margin-top: 60px;
}

.post-nav-link {
    max-width: 48%;
}

.post-nav-label {
    font-family: var(--font-ui);
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--color-primary);
    display: block;
    margin-bottom: 5px;
}

.post-nav-title {
    font-weight: 600;
    color: var(--color-heading);
    font-size: 1.05rem;
}

.post-nav-link:hover .post-nav-title {
    color: var(--color-primary);
}

/* Page Layout */
.page-header {
    padding: 160px 0 60px;
    text-align: center;
    border-bottom: 1px solid var(--color-border);
}

.page-title {
    font-size: 3rem;
}

.page-body {
    padding: 80px 0 120px;
}

/* Footer Section */
.site-footer {
    background: var(--color-footer-bg);
    border-top: 1px solid var(--color-border);
    padding: 80px 0 40px;
    transition: background 0.4s ease;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

.footer-widget-col {
    display: flex;
    flex-direction: column;
}

.widget-title {
    font-size: 1.25rem;
    color: var(--color-heading);
    margin-bottom: 25px;
    font-family: var(--font-heading);
    position: relative;
    display: inline-block;
}

.footer-widget-col ul {
    list-style: none;
}

.footer-widget-col li {
    margin-bottom: 12px;
}

.footer-widget-col a {
    color: var(--color-text-muted);
}

.footer-widget-col a:hover {
    color: var(--color-heading);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.social-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(var(--color-primary-rgb), 0.04);
    border: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    font-size: 1.1rem;
    transition: var(--transition);
}

.social-btn:hover {
    background: var(--grad-accent);
    color: #ffffff;
    border-color: transparent;
    transform: translateY(-3px);
}

/* Footer Bottom */
.footer-bottom {
    border-top: 1px solid var(--color-border);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-ui);
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

@media (max-width: 768px) {
    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}

.footer-nav ul {
    list-style: none;
    display: flex;
    gap: 24px;
}

.footer-nav a {
    color: var(--color-text-muted);
}

.footer-nav a:hover {
    color: var(--color-heading);
}

/* ========================================================
   POST NAVIGATION (PREV/NEXT CARDS)
   ======================================================== */
.post-navigation {
    margin-top: 60px;
    border-top: 1px solid var(--color-border);
    padding-top: 40px;
}

.post-navigation .nav-links {
    display: flex;
    gap: 20px;
    justify-content: space-between;
}

.post-nav-link {
    flex: 1;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    text-decoration: none;
    box-shadow: var(--shadow);
}

.post-nav-link:hover {
    border-color: var(--color-border-hover);
    background: var(--color-surface-hover);
    transform: translateY(-3px);
}

.post-nav-link.prev {
    align-items: flex-start;
    text-align: left;
}

.post-nav-link.next {
    align-items: flex-end;
    text-align: right;
}

.post-nav-label {
    font-family: var(--font-ui);
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--color-primary);
    display: block;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.post-nav-title {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-heading);
    font-size: 1.1rem;
    line-height: 1.4;
    transition: var(--transition);
}

.post-nav-link:hover .post-nav-title {
    color: var(--color-primary);
}

@media (max-width: 768px) {
    .post-navigation .nav-links {
        flex-direction: column;
        gap: 15px;
    }
    .post-nav-link {
        width: 100%;
    }
}

/* ========================================================
   COMMENTS SECTION STYLING (PREMIUM SCRIPT)
   ======================================================== */
.comments-area {
    margin-top: 60px;
    border-top: 1px solid var(--color-border);
    padding-top: 40px;
}

.comments-title {
    font-size: 1.6rem;
    margin-bottom: 30px;
    font-family: var(--font-heading);
}

/* Comment Form Responses */
.comment-respond {
    background: rgba(var(--color-primary-rgb), 0.02);
    border: 1px solid var(--color-border);
    padding: 40px;
    border-radius: var(--radius-md);
    margin-top: 40px;
    box-shadow: var(--shadow);
}

.comment-reply-title {
    font-size: 1.4rem;
    margin-bottom: 25px;
    font-family: var(--font-heading);
    color: var(--color-heading);
}

.comment-form p {
    margin-bottom: 20px;
}

.comment-form label {
    font-family: var(--font-ui);
    font-size: 0.9rem;
    display: block;
    margin-bottom: 8px;
    color: var(--color-text-muted);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition);
}

.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form input[type="url"]:focus,
.comment-form textarea:focus {
    border-color: var(--color-border-hover);
    outline: none;
    box-shadow: 0 0 10px rgba(var(--color-primary-rgb), 0.1);
}

.comment-form textarea {
    min-height: 150px;
    resize: vertical;
}

.comment-form .form-submit {
    margin-bottom: 0;
}

.comment-form input[type="submit"] {
    background: var(--grad-accent);
    color: #ffffff;
    font-family: var(--font-ui);
    font-weight: 600;
    border: none;
    padding: 14px 32px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.2);
}

.comment-form input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.35);
}

/* Comments List */
.comment-list {
    list-style: none;
    margin-bottom: 40px;
}

.comment-list li {
    margin-bottom: 25px;
}

.comment-body {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    padding: 24px;
    border-radius: var(--radius-md);
    position: relative;
    box-shadow: var(--shadow);
}

.comment-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    font-family: var(--font-ui);
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.comment-author img.avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--color-border);
    object-fit: cover;
}

.comment-author .fn {
    font-weight: 600;
    color: var(--color-heading);
    font-style: normal;
}

.comment-metadata a {
    color: var(--color-text-muted);
}

.comment-metadata a:hover {
    color: var(--color-primary);
}

.comment-content {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--color-text);
    margin-bottom: 15px;
}

.comment-body .reply {
    font-family: var(--font-ui);
    font-size: 0.85rem;
    font-weight: 600;
}

.comment-body .reply a {
    color: var(--color-primary);
    background: rgba(var(--color-primary-rgb), 0.08);
    padding: 6px 16px;
    border-radius: 20px;
    display: inline-block;
    border: 1px solid var(--color-border);
}

.comment-body .reply a:hover {
    background: var(--color-primary);
    color: #ffffff;
    border-color: transparent;
}

/* Nested replies spacing */
.comment-list .children {
    list-style: none;
    padding-left: 40px;
    margin-top: 15px;
}

@media (max-width: 576px) {
    .comment-list .children {
        padding-left: 20px;
    }
    .comment-respond {
        padding: 24px;
    }
}

/* ========================================================
   ADDITIONAL MOBILE FRIENDLY TWEAKS
   ======================================================= */
@media (max-width: 991px) {
    .site-branding .custom-logo-link img {
        max-height: 40px !important;
    }
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }
    .hero-section {
        padding: 120px 0 60px;
    }
}

@media (max-width: 480px) {
    .container {
        width: 95%;
        padding: 0 10px;
    }
    .post-card-content {
        padding: 20px;
    }
}

@media (max-width: 850px) {
    .reading-layout-grid {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }
    .reading-sidebar-column {
        margin-top: 40px;
    }
}

/* ========================================================
   SLEEK SEARCH OVERLAY STYLING
   ======================================================== */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(253, 251, 247, 0.96); /* default light theme backdrop */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.03);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.dark-theme .search-overlay {
    background: rgba(20, 18, 16, 0.96);
}

.search-overlay.active {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.search-close-btn {
    position: absolute;
    top: 30px;
    right: 40px;
    background: none;
    border: none;
    color: var(--color-heading);
    font-size: 2rem;
    cursor: pointer;
    transition: var(--transition);
}

.search-close-btn:hover {
    color: var(--color-primary);
    transform: rotate(90deg);
}

.search-overlay-content {
    width: 90%;
    max-width: 650px;
    text-align: center;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.1s;
}

.search-overlay.active .search-overlay-content {
    transform: translateY(0);
}

.search-form-overlay {
    width: 100%;
    margin-bottom: 20px;
}

.search-field-overlay {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 3px solid var(--color-border);
    color: var(--color-heading);
    padding: 15px 50px 15px 0;
    font-size: 1.8rem;
    font-family: var(--font-heading);
    font-weight: 600;
    transition: var(--transition);
}

.search-field-overlay:focus {
    outline: none;
    border-color: var(--color-primary);
}

.search-field-overlay::placeholder {
    color: var(--color-text-muted);
    opacity: 0.6;
}

.search-submit-overlay {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    color: var(--color-heading);
    font-size: 1.6rem;
    cursor: pointer;
    transition: var(--transition);
}

.search-submit-overlay:hover {
    color: var(--color-primary);
    transform: scale(1.1);
}



