/* 1. BRAND VARIABLES - ULTRA DARK CONTRAST */
:root {
    --brand-navy: #020617;        /* Near-Black Midnight */
    --brand-gold: #eab308;        /* Vivid Monetary Gold */
    --brand-gold-muted: rgba(234, 179, 8, 0.15);
    --slate-gray: #0f172a;        /* Deep Slate for panels */
    --text-white: #f8fafc;        /* High-contrast off-white */
    --text-muted: #64748b;        /* Steel gray for secondary text */
    --border-glow: rgba(51, 65, 85, 0.5);
    --glass-bg: rgba(15, 23, 42, 0.85);
}

* {
    box-sizing: border-box;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
    background-color: var(--brand-navy);
}

/* 2. DYNAMIC MIDNIGHT BACKGROUND */
body {
    background: radial-gradient(circle at 50% -20%, #1e293b 0%, #020617 85%);
    background-attachment: fixed;
    /* Professional grain texture for a 'paper' feel */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    background-blend-mode: overlay;
    color: var(--text-white);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    margin: 0;
    line-height: 1.6;
}

/* 3. STICKY GLASS HEADER */
header {
    background: rgba(2, 6, 23, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 30px 20px;
    text-align: center;
    border-bottom: 1px solid var(--brand-gold);
    position: sticky;
    top: 0;
    z-index: 1000;
}

h1 {
    color: var(--brand-gold);
    margin: 0;
    letter-spacing: 5px;
    text-transform: uppercase;
    font-size: 1.6rem;
    filter: drop-shadow(0 0 10px rgba(234, 179, 8, 0.3));
}

/* 4. NAVIGATION */
nav {
    margin-top: 12px;
}

nav a {
    color: var(--text-muted);
    text-decoration: none;
    margin: 0 18px;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

nav a:hover, nav a.active {
    color: var(--brand-gold);
    text-shadow: 0 0 12px var(--brand-gold-muted);
}

/* 5. MAIN CONTENT & GLASS PANELS */
main {
    max-width: 900px;
    margin: 50px auto;
    padding: 0 20px;
}

article, .model-box, .toolkit-table-container, .summary-card {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--brand-gold-muted);
    border-radius: 12px;
    padding: 35px;
    margin-bottom: 40px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
}

/* 6. SCROLL-DRIVEN REVEAL ANIMATIONS */
@keyframes reveal {
    from { 
        opacity: 0; 
        transform: translateY(40px) scale(0.97); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
}

article, .featured-post, tr {
    view-timeline-name: --revealing-item;
    view-timeline-axis: block;
    animation: reveal linear both;
    animation-timeline: --revealing-item;
    animation-range: entry 5% cover 30%;
}

/* 7. INTERACTIVE FEEDBACK */
article:active, tr:active {
    transform: scale(0.99);
}

.summary-card {
    border-left: 6px solid var(--brand-gold);
    background: rgba(234, 179, 8, 0.04);
}

/* 8. TABLE REFINEMENT */
table {
    width: 100%;
    border-collapse: collapse;
}

th {
    color: var(--brand-gold);
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 1.5px;
    padding: 15px;
    border-bottom: 2px solid var(--brand-gold-muted);
}

td {
    padding: 18px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.tag {
    background: var(--brand-navy);
    color: var(--brand-gold);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    border: 1px solid var(--brand-gold);
}

.rating {
    color: var(--brand-gold);
    font-weight: bold;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
}

/* 9. RESPONSIVENESS */
@media (max-width: 768px) {
    main { margin: 30px auto; }
    h1 { font-size: 1.2rem; letter-spacing: 2px; }
    article { padding: 20px; }
}

/* 10. FOOTER */
footer {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
    font-size: 0.7rem;
    letter-spacing: 1px;
    border-top: 1px solid var(--border-glow);
}
