/*
Theme Name: Obsidian Pro
Theme URI: https://example.com/obsidian-pro
Author: Gemini Architect
Description: A premium, 100% dark mode, WCAG compliant theme with Google Consent Mode v2.
Version: 1.0.0
Text Domain: obsidian-pro
*/

:root {
    /* Color Palette - WCAG AA Compliant */
    --bg-body: #0a0a0a;
    --bg-card: #161616;
    --bg-header: #121212;
    --bg-input: #202020;

    --text-main: #e0e0e0;
    --text-muted: #a0a0a0;

    --accent: #8b5cf6; /* Violet */
    --accent-hover: #7c3aed;
    --border: #333333;

    /* Spacing & Layout */
    --container: 1200px;
    --radius: 12px;
    --shadow: 0 4px 20px rgba(0,0,0,0.5);
}

/* --- Reset & Base --- */
* { box-sizing: border-box; }
body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: 'Inter', system-ui, sans-serif;
    line-height: 1.6;
    margin: 0;
}

a { color: var(--text-main); text-decoration: none; transition: 0.2s ease; }
a:hover, a:focus { color: var(--accent); }

/* --- Layout Utilities --- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.grid-layout { display: grid; gap: 30px; grid-template-columns: 1fr 300px; }
.main-content { min-width: 0; }
.mb-5 { margin-bottom: 2rem; }
.section-title { color: #fff; margin-bottom: 25px; }

@media (max-width: 900px) {
    .grid-layout { grid-template-columns: 1fr; }
}

/* --- Header & Nav --- */
.site-header {
    background: var(--bg-header);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}
.header-inner { display: flex; justify-content: space-between; align-items: center; }
.site-logo { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.5px; }

.main-nav ul { display: flex; list-style: none; gap: 20px; margin: 0; padding: 0; }
.main-nav a { font-weight: 500; font-size: 0.95rem; position: relative; }
.main-nav a::after {
    content: ''; position: absolute; bottom: -5px; left: 0; width: 0; height: 2px;
    background: var(--accent); transition: width 0.3s;
}
.main-nav a:hover::after { width: 100%; }

/* Mobile Menu Toggle */
.menu-toggle { display: none; background: none; border: none; color: white; font-size: 1.5rem; cursor: pointer; }
@media (max-width: 768px) {
    .main-nav { display: none; position: absolute; top: 100%; left: 0; width: 100%; background: var(--bg-header); padding: 20px; border-bottom: 1px solid var(--border); }
    .main-nav.active { display: block; }
    .main-nav ul { flex-direction: column; }
    .menu-toggle { display: block; }
}

/* --- Hero Section --- */
.hero-section {
    background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
    padding: 80px 0;
    text-align: center;
    margin-bottom: 40px;
}
.hero-content h1 { font-size: 3rem; margin-bottom: 20px; color: #fff; }
.btn {
    display: inline-block; padding: 12px 24px; background: var(--accent); color: white !important;
    border-radius: var(--radius); font-weight: 600; border: none; cursor: pointer;
}
.btn:hover { background: var(--accent-hover); }

/* --- Cards UI --- */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 25px; }
.post-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex; flex-direction: column;
}
.post-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: var(--accent); }
.card-img { height: 200px; width: 100%; object-fit: cover; background: #222; }
.card-body { padding: 20px; flex-grow: 1; display: flex; flex-direction: column; }
.card-title { margin: 0 0 10px; font-size: 1.25rem; }
.card-excerpt { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 15px; flex-grow: 1; }
.read-more { font-size: 0.85rem; font-weight: 700; color: var(--accent); text-transform: uppercase; }

/* --- Sidebar & Widgets --- */
.sidebar-widget { background: var(--bg-card); padding: 20px; border-radius: var(--radius); margin-bottom: 30px; border: 1px solid var(--border); }
.widget-title { border-bottom: 2px solid var(--accent); padding-bottom: 10px; margin-bottom: 20px; display: inline-block; }

/* --- Single Post --- */
.post-meta { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 20px; }
.entry-content h2, .entry-content h3 { color: #fff; margin-top: 2rem; }
.toc-container { background: var(--bg-card); padding: 20px; border-left: 4px solid var(--accent); margin-bottom: 30px; }
.related-posts { margin-top: 60px; padding-top: 40px; border-top: 1px solid var(--border); }

/* --- Forms --- */
input, textarea {
    width: 100%; background: var(--bg-input); border: 1px solid var(--border);
    padding: 12px; color: white; border-radius: 6px; margin-bottom: 15px;
}
input:focus, textarea:focus { outline: 2px solid var(--accent); border-color: transparent; }

/* --- Cookie Banner --- */
#cookie-banner {
    position: fixed; bottom: 20px; right: 20px; width: 400px;
    background: #1e1b2e; /* Deep purple/dark */
    border: 1px solid #3c3c3c;
    border-radius: var(--radius);
    padding: 20px;
    z-index: 9999;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    display: none; /* JS will toggle */
}
.cookie-buttons { display: flex; gap: 10px; margin-top: 15px; flex-wrap: wrap; }
.btn-outline { background: transparent; border: 1px solid var(--accent); color: var(--accent) !important; }
.cookie-toggles { margin-top: 15px; border-top: 1px solid #333; padding-top: 10px; }
.toggle-row { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 0.9rem; }
