
:root {
    --bg-color: #0b0f19;
    --text-color: #94a3b8;
    --text-heading: #f8fafc;
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --card-bg: #1e293b;
    --card-border: #334155;
    --nav-bg: rgba(15, 23, 42, 0.85);
    --footer-bg: #0f172a;
    --glass-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    --transition: all 0.3s ease;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.7;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(59, 130, 246, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 40%);
    background-attachment: fixed;
}
a { color: var(--primary-color); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-hover); }

/* Top Bar (Secondary Menu) */
.top-bar {
    background: #0f172a;
    padding: 8px 0;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--card-border);
}
.top-bar .container {
    display: flex;
    justify-content: flex-end;
    gap: 20px;
}
.top-bar a { color: #64748b; }
.top-bar a:hover { color: #f8fafc; }

/* Main Header */
header {
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.navbar { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    height: 70px;
}
.logo { 
    font-size: 1.5rem; 
    font-weight: 700; 
    color: var(--text-heading); 
    display: flex; 
    align-items: center; 
    gap: 12px;
    letter-spacing: -0.5px;
}
.logo:hover { color: var(--primary-color); }
.logo svg { stroke: var(--primary-color); }

/* Primary Menu */
.nav-links { display: flex; gap: 24px; align-items: center; }
.nav-links a { 
    color: var(--text-heading); 
    font-weight: 500; 
    font-size: 0.95rem; 
    position: relative;
}
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px; left: 0;
    width: 0%; height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}
.nav-links a:hover::after { width: 100%; }

/* Mobile Menu Button */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-heading);
    cursor: pointer;
    padding: 5px;
}
.menu-toggle svg { width: 28px; height: 28px; }

/* Hero Section */
.hero { 
    text-align: center; 
    padding: 5rem 20px;
    background: linear-gradient(180deg, rgba(15,23,42,0) 0%, rgba(15,23,42,0.6) 100%);
    border-bottom: 1px solid var(--card-border);
    margin-bottom: 3rem;
}
.hero h1 { 
    font-size: 3.5rem; 
    color: var(--text-heading); 
    margin-bottom: 1.5rem; 
    line-height: 1.1; 
    font-weight: 800;
    letter-spacing: -1px;
}
.hero p { font-size: 1.25rem; color: var(--text-color); max-width: 700px; margin: 0 auto; }

/* Post Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 32px;
    padding: 1rem 0 4rem;
}
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}
.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--glass-shadow);
    border-color: #475569;
}
.card-img-wrapper {
    width: 100%;
    height: 220px;
    overflow: hidden;
}
.card-img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover;
    transition: transform 0.5s ease;
}
.card:hover .card-img {
    transform: scale(1.05);
}
.card-content { padding: 24px; display: flex; flex-direction: column; flex-grow: 1; }
.card-meta { font-size: 0.85rem; color: #64748b; margin-bottom: 12px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.badge { 
    background: rgba(59, 130, 246, 0.15); 
    color: var(--primary-color); 
    padding: 4px 10px; 
    border-radius: 6px; 
    font-size: 0.75rem; 
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.card-title { font-size: 1.35rem; font-weight: 700; color: var(--text-heading); margin-bottom: 12px; line-height: 1.4; }
.card-title a { color: var(--text-heading); }
.card-title a:hover { color: var(--primary-color); }

/* Single Post Layout */
.single-post { max-width: 800px; margin: 3rem auto 5rem; padding: 0 24px; }
.single-meta { color: #64748b; font-size: 0.95rem; margin-bottom: 20px; display: flex; gap: 15px; flex-wrap: wrap; align-items: center; }
.single-title { font-size: 3rem; font-weight: 800; color: var(--text-heading); margin-bottom: 30px; line-height: 1.2; letter-spacing: -0.5px;}
.featured-image { width: 100%; max-height: 450px; object-fit: cover; border-radius: 16px; margin-bottom: 40px; box-shadow: var(--glass-shadow); }

/* Content Formatting */
.post-content { font-size: 1.15rem; color: #cbd5e1; }
.post-content h2 { font-size: 2rem; color: var(--text-heading); margin: 3rem 0 1.5rem; font-weight: 700;}
.post-content h3 { font-size: 1.5rem; color: var(--text-heading); margin: 2.5rem 0 1rem; font-weight: 600;}
.post-content p { margin-bottom: 1.8rem; }
.post-content img { max-width: 100%; height: auto; border-radius: 12px; margin: 2rem 0; box-shadow: var(--glass-shadow); }
.post-content ul, .post-content ol { margin-bottom: 1.8rem; padding-left: 24px; }
.post-content li { margin-bottom: 0.5rem; }
.post-content a { color: var(--primary-color); text-decoration: underline; text-decoration-color: rgba(59,130,246,0.4); text-underline-offset: 4px; }
.post-content a:hover { text-decoration-color: var(--primary-color); }
.post-content blockquote { 
    border-left: 4px solid var(--primary-color); 
    padding: 1rem 1.5rem; 
    margin: 2rem 0; 
    background: rgba(59, 130, 246, 0.05); 
    border-radius: 0 12px 12px 0;
    font-style: italic;
    color: #f8fafc;
}

/* Footer */
footer { 
    background: var(--footer-bg); 
    padding: 4rem 20px 2rem; 
    border-top: 1px solid var(--card-border); 
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto 3rem;
}
.footer-col h4 { color: var(--text-heading); font-size: 1.2rem; margin-bottom: 1.5rem; font-weight: 600; }
.footer-col p { font-size: 0.95rem; margin-bottom: 1rem; }
.footer-links { display: flex; flex-direction: column; gap: 12px; }
.footer-links a { color: #94a3b8; font-size: 0.95rem; }
.footer-links a:hover { color: var(--primary-color); padding-left: 5px; }
.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    font-size: 0.9rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .top-bar .container { justify-content: center; flex-wrap: wrap; gap: 10px; padding: 10px; }
    .hero h1 { font-size: 2.2rem; }
    .hero p { font-size: 1.1rem; }
    .single-title { font-size: 2.2rem; }
    .featured-image { max-height: 250px; }
    
    .menu-toggle { display: block; }
    .nav-links {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: var(--nav-bg);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        flex-direction: column;
        padding: 20px;
        border-bottom: 1px solid var(--card-border);
        box-shadow: var(--glass-shadow);
    }
    .nav-links.active { display: flex; }
    .nav-links a { font-size: 1.1rem; padding: 10px 0; width: 100%; }
}
