:root {
    /* CSS Policy Standard Variables */
    --primary-color: #DE2626;
    --background-color: #050505;
    --text-color: #FFFFFF;
    --border-color: #1A1A1A;
    --border-radius: 4px;
    --font-family-base: 'Inter', sans-serif;
    --font-family-mono: 'Source Code Pro', monospace;

    /* Legacy Aliases */
    --accent-color: var(--primary-color);
    --bg-body: var(--background-color);
    --text-main: var(--text-color);
    --radius: var(--border-radius);
    --font-main: var(--font-family-base);

    /* Project Specific */
    --bg-nav: rgba(10, 10, 10, 0.8);
    --bg-card: #0F0F0F;
    --bg-footer: #080808;
    --text-muted: #888888;
    --card-border: #151515;
    --shadow-hover: 0 20px 40px rgba(0,0,0,0.6);
    --container-width: 1200px;
    --code-bg: #0A0A0A;
    --code-text: #E0E0E0;
    --img-placeholder: #111111;
    --social-bg: #121212;
    --social-border: #222222;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--font-main); background-color: var(--bg-body); color: var(--text-main); line-height: 1.6; min-height: 100vh; display: flex; flex-direction: column; font-size: 16px; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1); }
a:hover { color: var(--accent-color); }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

.container { width: 100%; max-width: var(--container-width); margin: 0 auto; padding: 0 30px; }

.site-header { background: var(--bg-nav); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); color: var(--text-main); height: 80px; display: flex; align-items: center; position: sticky; top: 0; z-index: 100; border-bottom: 1px solid var(--border-color); }
.nav-wrap { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.logo { font-weight: 900; font-size: 1.6rem; color: var(--text-main); letter-spacing: -1.5px; text-transform: uppercase; }
.logo span { color: var(--accent-color); }
.nav-menu { display: flex; gap: 20px; align-items: center; }
.nav-menu a { color: var(--text-main); font-weight: 700; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; opacity: 0.7; }
.nav-menu a:hover { opacity: 1; color: var(--accent-color); }

.mobile-menu-toggle { display: none; background: none; border: none; color: var(--text-main); font-size: 2rem; cursor: pointer; line-height: 1; }

.nav-dropdown { position: relative; }
.nav-dropdown .chevron { font-size: 0.6rem; margin-left: 5px; opacity: 0.5; vertical-align: middle; }
.dropdown-content { position: absolute; top: 100%; left: 0; background: var(--bg-card); border: 1px solid var(--border-color); min-width: 220px; box-shadow: var(--shadow-hover); opacity: 0; visibility: hidden; transform: translateY(10px); transition: all 0.3s ease; z-index: 1000; padding: 15px 0; border-radius: var(--radius); }
.nav-dropdown:hover .dropdown-content { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-content li a { display: block; padding: 10px 25px; font-size: 0.8rem; text-transform: none; opacity: 0.8; letter-spacing: 0.5px; }
.dropdown-content li a:hover { background: rgba(222, 38, 38, 0.1); opacity: 1; color: var(--accent-color); padding-left: 30px; }

.main-layout { display: flex; gap: 60px; margin-top: 40px; }
.main-content { flex: 1; min-width: 0; text-align: left; }
.sidebar { width: 320px; flex-shrink: 0; text-align: left; }

/* Collapsible Sidebar Styles */
.sidebar-collapsible { margin-bottom: 30px; border: 1px solid var(--border-color); border-radius: var(--radius); background: var(--bg-card); overflow: hidden; }
.collapse-trigger { width: 100%; padding: 15px 20px; background: none; border: none; color: var(--accent-color); font-weight: 900; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 2px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; transition: background 0.3s; }
.collapse-trigger:hover { background: rgba(222, 38, 38, 0.05); }
.collapse-trigger .chevron { transition: transform 0.3s ease; font-size: 0.6rem; }
.sidebar-collapsible.active .collapse-trigger .chevron { transform: rotate(180deg); }
.collapse-content { max-height: 0; overflow: hidden; transition: max-height 0.4s cubic-bezier(0, 1, 0, 1); background: var(--bg-body); }
.sidebar-collapsible.active .collapse-content { max-height: 1000px; transition: max-height 0.4s cubic-bezier(1, 0, 1, 0); }
.category-list { padding: 10px 0; }
.category-list li a { display: block; padding: 12px 20px; font-weight: 700; font-size: 0.85rem; border-bottom: 1px solid var(--border-color); opacity: 0.8; }
.category-list li:last-child a { border-bottom: none; }
.category-list a:hover { opacity: 1; color: var(--accent-color); background: rgba(255,255,255,0.02); padding-left: 25px; }

.card { background: var(--bg-card); border: 1px solid var(--card-border); border-radius: var(--radius); display: flex; flex-direction: column; transition: all 0.3s ease; height: 100%; overflow: hidden; text-align: left; }
.card:hover { transform: translateY(-8px); border-color: var(--accent-color); box-shadow: var(--shadow-hover); }
.card-img-container { width: 100%; height: 220px; background: var(--img-placeholder); overflow: hidden; position: relative; border-bottom: 1px solid var(--border-color); }
.card-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1); }
.card:hover .card-img { transform: scale(1.08); }
.card-content { padding: 30px; flex: 1; display: flex; flex-direction: column; }
.card-type { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 2px; color: var(--accent-color); font-weight: 900; margin-bottom: 12px; }
.card h3 { margin-bottom: 12px; font-size: 1.4rem; line-height: 1.2; color: var(--text-main); font-weight: 800; }
.card-meta { margin-top: auto; font-size: 0.8rem; color: var(--text-muted); padding-top: 20px; border-top: 1px solid var(--border-color); display: flex; justify-content: space-between; }

.article-header { margin-bottom: 50px; }
.article-title { font-size: clamp(2.5rem, 6vw, 4rem); line-height: 1; margin-bottom: 20px; color: var(--text-main); font-weight: 900; letter-spacing: -2px; }
.article-meta { color: var(--accent-color); font-size: 0.85rem; font-weight: 800; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 15px; display: block; }
.article-body { font-size: 1.2rem; line-height: 1.8; color: rgba(255,255,255,0.9); }
.article-body h2 { margin-top: 60px; margin-bottom: 25px; font-size: 2.2rem; font-weight: 900; color: #FFF; letter-spacing: -1px; }
.article-body p { margin-bottom: 30px; }

.sidebar-widget { margin-bottom: 50px; }
.widget-title { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 3px; color: var(--accent-color); font-weight: 900; margin-bottom: 25px; display: flex; align-items: center; gap: 15px; }
.widget-title::after { content: ""; height: 1px; background: var(--border-color); flex: 1; }
.category-list li { margin-bottom: 12px; }
.category-list a { display: block; padding: 10px 15px; background: var(--bg-card); border: 1px solid var(--border-color); font-weight: 700; font-size: 0.9rem; border-radius: var(--radius); }
.category-list a:hover { background: var(--accent-color); border-color: var(--accent-color); color: white; transform: translateX(5px); }

.site-footer { background: var(--bg-footer); color: var(--text-muted); padding: 80px 0; border-top: 1px solid var(--border-color); margin-top: auto; }
.footer-content { display: flex; justify-content: space-between; align-items: center; }
.copyright strong { color: var(--text-main); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); gap: 40px; }

@media (max-width: 1024px) {
    .main-layout { flex-direction: column; }
    .sidebar { width: 100%; order: 2; }
    .mobile-menu-toggle { display: block; }
    .nav-menu { 
        display: none !important; 
        flex-direction: column; 
        position: absolute; 
        top: 80px; 
        left: 0; 
        right: 0; 
        background: var(--bg-card); 
        padding: 30px; 
        gap: 20px;
        align-items: flex-start;
        border-bottom: 1px solid var(--border-color);
        box-shadow: var(--shadow-hover);
        z-index: 1001;
        max-height: calc(100vh - 80px);
        overflow-y: auto;
    }
    .nav-menu.active { display: flex !important; }
    .nav-dropdown .dropdown-content { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; padding-left: 20px; display: none; }
    .nav-dropdown:hover .dropdown-content { display: block; }
    .logo { font-size: 1.2rem; }
    .container { padding: 0 20px; }
}

@media (max-width: 768px) {
    .mobile-menu-toggle { display: block; }
    .nav-menu { 
        display: none !important; 
        flex-direction: column; 
        position: absolute; 
        top: 80px; 
        left: 0; 
        right: 0; 
        background: var(--bg-card); 
        padding: 30px; 
        gap: 20px;
        align-items: flex-start;
        border-bottom: 1px solid var(--border-color);
        box-shadow: var(--shadow-hover);
        z-index: 1001;
        max-height: calc(100vh - 80px);
        overflow-y: auto;
    }
    .nav-menu.active { display: flex !important; }
    .nav-dropdown .dropdown-content { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; padding-left: 20px; display: none; }
    .nav-dropdown:hover .dropdown-content { display: block; }
    .logo { font-size: 1.2rem; }
    .container { padding: 0 20px; }
}
