/* ============================================
   Lumina Research — Custom Theme Styles
   Scientific Light Edition (Nature/Academic Style)
   ============================================ */

:root {
    --lumina-bg: #FFFFFF; /* Pure white background - Standard for academic sites */
    --lumina-bg-light: #F9F9F9; /* Off-white for secondary areas */
    --lumina-gold: #D9A441; /* Slightly darker gold for readability on white */
    --lumina-gold-light: rgba(217, 164, 65, 0.1); /* Background tint */
    --lumina-orange: #E68A00;
    --lumina-text: #0B1226; /* Deep Navy text */
    --lumina-text-secondary: #333333; /* Dark gray for body text */
    --lumina-text-muted: #5F6368; /* Muted text */
    --lumina-border: rgba(0,0,0,0.08);
    --lumina-card-bg: #FFFFFF;
    --lumina-card-shadow: 0 2px 8px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.05);
    --lumina-card-shadow-hover: 0 8px 24px rgba(0,0,0,0.12), 0 4px 8px rgba(0,0,0,0.08);
    --lumina-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --lumina-font-headings: 'Lora', 'Georgia', serif;
}

/* ---- Global Overrides ---- */
body {
    font-family: var(--lumina-font) !important;
    background: var(--lumina-bg) !important;
    color: var(--lumina-text) !important;
    font-size: 26px !important;
    line-height: 1.5 !important;
}

.site-content {
    background: var(--lumina-bg);
}

/* ---- Header / Nav ---- */
.gh-head {
    background: #FFFFFF !important;
    border-bottom: 1px solid var(--lumina-border);
    color: var(--lumina-text) !important;
}

.gh-head-logo img {
    max-height: 48px;
}

.gh-head-menu a {
    color: var(--lumina-text-secondary) !important;
    font-size: 1.6rem;
    font-weight: 500;
}

.gh-head-menu a:hover {
    color: var(--lumina-orange) !important;
}

.gh-head-button {
    background: var(--lumina-text) !important;
    color: #FFFFFF !important;
    font-weight: 700;
    border-radius: 4px;
    padding: 12px 28px;
    font-size: 1.4rem;
}

.gh-head-button:hover {
    background: var(--lumina-orange) !important;
    color: #fff !important;
}

/* ---- Hero Banner ---- */
.lumina-hero {
    background: linear-gradient(rgba(11, 18, 38, 0.85), rgba(11, 18, 38, 0.95)), url("../images/hero-bg.png");
    background-size: cover;
    background-position: center;
    padding: 120px 24px;
    text-align: center;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--lumina-border);
}

.lumina-hero-inner {
    max-width: 900px;
    margin: 0 auto;
}

.lumina-hero-title {
    font-family: var(--lumina-font-headings);
    font-size: 5.5rem;
    font-weight: 700;
    color: #FFFFFF;
    margin: 0 0 24px;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.lumina-hero-slogan {
    font-size: 2.4rem;
    color: rgba(255,255,255,0.8);
    margin: 0 0 40px;
    line-height: 1.5;
    font-weight: 300;
}

.lumina-subscribe-btn {
    display: inline-block;
    background: var(--lumina-gold);
    color: #0B1226;
    font-weight: 700;
    font-size: 1.6rem;
    padding: 16px 48px;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s;
}

.lumina-subscribe-btn:hover {
    background: #FFFFFF;
    color: #0B1226;
    transform: translateY(-2px);
}

/* ---- Sections ---- */
.lumina-section {
    padding: 80px 0;
    border-bottom: 1px solid var(--lumina-border);
    background: var(--lumina-bg-light); /* Slight separation for sections */
}

.lumina-section-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--lumina-text);
    margin: 0;
    letter-spacing: -0.01em;
}

.lumina-view-all {
    font-size: 1.4rem;
    color: var(--lumina-orange);
    text-decoration: none;
    font-weight: 600;
}

/* ---- Cards ---- */
.lumina-card-report {
    background: var(--lumina-card-bg);
    border: 1px solid var(--lumina-border);
    box-shadow: var(--lumina-card-shadow);
    border-radius: 8px;
}

.lumina-card-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--lumina-text);
    margin: 0 0 12px;
    line-height: 1.3;
}

.lumina-card-excerpt {
    font-size: 1.6rem;
    color: var(--lumina-text-muted);
}

.lumina-card-cta {
    color: var(--lumina-orange);
    font-weight: 600;
    font-size: 1.3rem;
}

/* ---- List Layout ---- */
.lumina-list-item {
    border-bottom: 1px solid var(--lumina-border);
}

.lumina-list-link:hover {
    background: #FFFFFF;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

.lumina-list-title {
    font-size: 2.0rem;
    font-weight: 600;
    color: var(--lumina-text);
}

.lumina-list-excerpt {
    font-size: 1.5rem;
    color: var(--lumina-text-muted);
}

/* ---- Post Layout (Sidebar + Content) ---- */
.lumina-post-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 60px;
    max-width: 1400px;
    margin: 60px auto;
    padding: 0 32px;
    align-items: start;
}

/* Sidebar TOC */
.lumina-toc-sidebar {
    position: sticky;
    top: 100px;
    height: auto;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    padding-right: 20px;
    border-right: 1px solid var(--lumina-border);
}

.lumina-toc-header {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--lumina-text);
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: var(--lumina-font-headings); /* Match content headers */
}

.lumina-toc-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.lumina-toc-nav li {
    margin-bottom: 16px;
}

.lumina-toc-nav a {
    display: block;
    color: var(--lumina-text-muted);
    text-decoration: none;
    font-size: 1.4rem;
    line-height: 1.5;
    transition: color 0.2s;
    border-left: 3px solid transparent;
    padding-left: 16px;
}

.lumina-toc-nav a:hover,
.lumina-toc-nav a.active {
    color: var(--lumina-orange);
    border-left-color: var(--lumina-orange);
    background: rgba(0,0,0,0.02);
}

.lumina-toc-nav .toc-h3 {
    margin-left: 16px;
    font-size: 0.9rem;
}

/* ---- Post Content (Unified & Polished v1.9.0) ---- */
.gh-content {
    font-family: var(--lumina-font) !important; /* Base: Inter */
    font-size: 26px !important;
    line-height: 1.5 !important;
    color: var(--lumina-text-secondary);
    max-width: 900px !important;
    margin: 0 !important;
}

/* Typography Uniformity: All Headers use Serif (Lora) */
.gh-content h1,
.gh-content h2,
.gh-content h3,
.gh-content h4,
.gh-content h5,
.gh-content h6 {
    font-family: var(--lumina-font-headings) !important;
    line-height: 1.25 !important;
    color: var(--lumina-text) !important;
    margin-top: 1.5em !important;
    margin-bottom: 0.6em !important;
    font-weight: 700 !important; /* Unified Weight */
}

/* Specific Header Styles */
.gh-content h1 { font-size: 4.5rem !important; }
.gh-content h2 { font-size: 3.5rem !important; border-bottom: 1px solid var(--lumina-border); padding-bottom: 15px; }
.gh-content h3 { font-size: 2.5rem !important; }
.gh-content h4 { font-size: 2.0rem !important; margin-top: 2em !important; }

/* Body Elements */
.gh-content p, 
.gh-content li,
.gh-content ul, 
.gh-content ol { 
    font-family: var(--lumina-font) !important; /* Ensure Lists/Paras are Sans */
    margin-bottom: 1.0em !important; 
}

.gh-content ul, .gh-content ol { padding-left: 1.2em; }
.gh-content li { margin-bottom: 0.4em !important; }

/* Enhanced Blockquote (Gold Magazine Style) */
.gh-content blockquote {
    font-family: var(--lumina-font-headings) !important; /* Serif for Quotes */
    font-style: italic;
    font-size: 1.2em;
    line-height: 1.6;
    color: var(--lumina-text);
    background: var(--lumina-gold-light); /* Golden Tint */
    border-left: 6px solid var(--lumina-gold);
    padding: 1.5em 2em;
    margin: 2.5em 0 !important;
    border-radius: 0 8px 8px 0;
}

/* Links */
.gh-content a {
    color: #0056b3;
    text-decoration: underline;
    text-decoration-color: rgba(0, 86, 179, 0.3);
    text-underline-offset: 3px;
}

.gh-content a:hover {
    color: var(--lumina-orange);
    text-decoration-color: var(--lumina-orange);
}

.gh-content strong {
    color: var(--lumina-text);
    font-weight: 700;
}

/* List Container (Safety Wrapper) */
.list-container {
    margin-bottom: 1.5em;
    clear: both; /* Ensure no floating issues */
}

/* Responsive adjustments */
@media (max-width: 1100px) {
    .lumina-post-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .lumina-toc-sidebar {
        position: relative;
        top: 0;
        border-right: none;
        border-bottom: 1px solid var(--lumina-border);
        padding-bottom: 24px;
        max-height: none;
    }
}

/* Footer */
.site-footer {
    background: #FFFFFF !important;
    border-top: 1px solid var(--lumina-border);
    color: var(--lumina-text-muted) !important;
}

/* Custom fix for Lumina Research theme - Content Publisher (V2) */
/* Ensure specific inline texts (like side notes) do not float right */
.gh-content .post-content-body strong + span,
.gh-content .post-content-body h3 + span,
.gh-content .post-content-body h2 + span,
.gh-content .post-content-body .sidenote, /* Common Ghost sidenote class */
.gh-content .post-content-body .footnote-ref-text, /* Common Ghost footnote text class */
.gh-content .post-content-body .footnote-item { /* Common Ghost footnote item class */
    float: none !important;
    position: static !important;
    display: inline !important; /* 或者 block !important; 取决于具体元素是希望内联还是独占一行 */
    text-align: left !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    width: auto !important; /* 确保不被强制限制宽度 */
    box-sizing: border-box !important;
    writing-mode: horizontal-tb !important; /* 确保文本水平排版 */
}

/* 修复“参考文献”标题和列表项的排版问题 */
/* 假设“参考文献”最终会被渲染成 h2 标题或一个 strong 标签 */
.gh-content .post-content-body h2.kg-header-card-header:last-of-type, /* 尝试匹配最后的H2 */
.gh-content .post-content-body h2:last-of-type, /* 尝试匹配最后的H2 */
.gh-content .post-content-body strong:last-of-type, /* 尝试匹配最后的strong */
.gh-content .post-content-body ol:last-of-type, /* 尝试匹配最后的有序列表 */
.gh-content .post-content-body ul:last-of-type { /* 尝试匹配最后的无序列表 */
    text-align: left !important;
    float: none !important;
    position: static !important;
    clear: both !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
    width: 100% !important; /* 确保占据完整宽度 */
    max-width: none !important; /* 取消最大宽度限制 */
    box-sizing: border-box !important;
    writing-mode: horizontal-tb !important; /* 确保文本水平排版 */
}

/* 确保所有列表项都正常左对齐，尤其是参考文献 */
.gh-content .post-content-body ol li,
.gh-content .post-content-body ul li {
    text-align: left !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
    width: auto !important;
    max-width: none !important;
    box-sizing: border-box !important;
    writing-mode: horizontal-tb !important; /* 确保文本水平排版 */
}

/* 针对 Ghost 自动生成的脚注/旁注容器（如果存在） */
.gh-content .post-content-body .footnote-container,
.gh-content .post-content-body .sidenote-container {
    float: none !important;
    position: static !important;
    width: 100% !important;
    max-width: none !important;
    text-align: left !important;
    clear: both !important;
}

/* 确保所有直接文本和段落的水平排版 */
.gh-content .post-content-body p,
.gh-content .post-content-body div,
.gh-content .post-content-body span {
    writing-mode: horizontal-tb !important;
}
