/* 1. THEME VARIABLES */
:root {
    --primary: #6366f1;
    --dark: #111827;
    --slate-800: #1f2937;
    --border: #e2e8f0;
    --bg-light: #f8fafc;
}

/* 2. CORE RESET */
* { box-sizing: border-box; }
body { 
    font-family: 'Segoe UI', system-ui, sans-serif; 
    margin: 0; 
    background-color: var(--bg-light); 
    color: #333; 
    line-height: 1.6;
}

/* 3. NEW HEADER DESIGN */
.main-site-header { background: var(--dark); color: white; }
.header-top-bar { display: flex; justify-content: space-between; padding: 15px 5%; align-items: center; }
.site-logo { color: white; text-decoration: none; font-size: 1.4rem; font-weight: bold; }
.site-logo strong { color: var(--primary); }
.top-nav-links a { color: #9ca3af; text-decoration: none; margin-left: 20px; font-weight: 500; }
.top-nav-links a:hover { color: white; }

.subject-menu-bar { background: var(--slate-800); padding: 0 5%; display: flex; overflow-x: auto; gap: 20px; border-top: 1px solid #374151; }
.subject-menu-bar a { color: #9ca3af; text-decoration: none; padding: 12px 0; font-size: 0.85rem; white-space: nowrap; }
.subject-menu-bar a:hover { color: var(--primary); }

/* 4. THE 3-COLUMN LAYOUT */
.container { 
    display: flex; 
    max-width: 1400px; 
    margin: 30px auto; 
    gap: 25px; 
    padding: 0 20px; 
    align-items: flex-start; 
}

.left-bar, .sticky-sidebar { flex: 0 0 240px; background: white; border: 1px solid var(--border); border-radius: 12px; padding: 20px; position: sticky; top: 20px; }
.main-content { flex: 1; background: white; padding: 30px; border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }

/* 5. COMPONENTS (Code, Keywords, Buttons) */
.keyword-tag { background: #eef2ff; color: var(--primary); padding: 5px 12px; border-radius: 20px; text-decoration: none; font-size: 0.8rem; margin-right: 5px; }
.academic-tools-card { border: 1px solid var(--border); border-radius: 12px; padding: 15px; margin-bottom: 20px; }
.tool-btn { width: 100%; padding: 10px; margin-bottom: 8px; border-radius: 6px; cursor: pointer; font-weight: bold; display: flex; align-items: center; justify-content: center; gap: 8px; }
.pdf-btn { background: var(--primary); color: white; border: none; }
.cite-btn { background: white; color: var(--primary); border: 1px solid var(--primary); }

/* 6. YOUR ORIGINAL FUNCTIONAL STYLES (Keep these for your slider) */
.slide { display: none !important; }
.slide.active { display: block !important; }
.code-wrapper { position: relative; margin: 20px 0; background: #f6f8fa; border-radius: 6px; border: 1px solid var(--border); }
pre { padding: 15px; overflow-x: auto; margin: 0; }

/* 7. MODERN FOOTER */

/* Content Container Styling */
.resource-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    margin-bottom: 25px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.resource-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.card-title a {
    color: #111827;
    text-decoration: none;
    font-size: 1.4rem;
    font-weight: 700;
}

.card-title a:hover { color: #6366f1; }

.card-meta { display: flex; justify-content: space-between; margin-bottom: 15px; }

.read-more {
    color: #6366f1;
    font-weight: 700;
    text-decoration: none;
    font-size: 0.9rem;
}

/* Blog View Styling */
.blog-view .blog-main-title { font-size: 2.2rem; color: #111827; margin: 15px 0; line-height: 1.2; }
.blog-meta-bar { display: flex; gap: 20px; color: #6b7280; font-size: 0.9rem; margin-bottom: 30px; padding-bottom: 15px; border-bottom: 1px solid #f1f5f9; }
.blog-body-content { font-size: 1.1rem; color: #374151; line-height: 1.8; }

/* Modern Button Styling */
.nav-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #e2e8f0;
    background: white;
    color: #475569;
}

.nav-btn:hover:not(:disabled) {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.nav-btn.primary {
    background: #6366f1;
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.nav-btn.primary:hover:not(:disabled) {
    background: #4f46e5;
    transform: translateY(-1px);
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Slide Transition Animation */
@keyframes slideUpFade {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide.active {
    display: block !important;
    animation: slideUpFade 0.4s ease-out forwards;
}

/* Ensure the container behaves as a 3-column row */
.container { 
    display: flex; 
    flex-direction: row; /* Force side-by-side */
    justify-content: center;
    max-width: 1450px; 
    margin: 30px auto; 
    gap: 25px; 
    width: 100%;
}

/* Fix widths so they don't overlap */
.left-bar { flex: 0 0 250px; }
.main-content { flex: 1; min-width: 0; }
.sticky-sidebar { flex: 0 0 280px; }

/* Keep sidebars stuck while scrolling */
.left-bar, .sticky-sidebar {
    position: sticky;
    top: 20px;
    height: fit-content;
}

/* Slider Controls Styling */
.slider-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
}


/* FORCE UPDATE: LEFT BAR INDIGO THEME */
aside.left-bar {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 20px !important;
}

aside.left-bar h3 {
    border-bottom: none !important; /* Removes the old blue line */
    color: #94a3b8 !important;
    font-size: 0.75rem !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
}

.toc-list li a {
    color: #64748b !important;
    text-decoration: none !important;
    display: block !important;
    padding: 8px 0 !important;
    transition: 0.2s !important;
}

.toc-list li a:hover {
    color: #6366f1 !important;
}

/* FORCE UPDATE: CODE COPY BUTTON */
.code-wrapper .copy-btn {
    background: #ffffff !important;
    color: #6366f1 !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 6px !important;
    padding: 5px 12px !important;
    font-size: 0.7rem !important;
    font-weight: 700 !important;
    top: 10px !important;
    right: 10px !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05) !important;
}

.code-wrapper .copy-btn:hover {
    background: #6366f1 !important;
    color: #ffffff !important;
    border-color: #6366f1 !important;
}


/* Author & Level Components */
.card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }

.level-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 4px;
    text-transform: uppercase;
}
.level-badge.beginner { background: #dcfce7; color: #166534; }
.level-badge.intermediate { background: #fef9c3; color: #854d0e; }
.level-badge.advanced { background: #fee2e2; color: #991b1b; }

.card-middle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #f1f5f9;
}

.author-info { display: flex; align-items: center; gap: 10px; }

.author-thumb {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.author-details { display: flex; flex-direction: column; }
.author-name { font-size: 0.85rem; font-weight: 700; color: #1e293b; }
.post-date { font-size: 0.75rem; color: #64748b; }

.rating-box { text-align: right; }
.stars { color: #f59e0b; font-size: 0.75rem; margin-bottom: 2px; }
.rating-num { font-size: 0.8rem; font-weight: 700; color: #475569; }