/* ===== Base Styles – shared across all pages ===== */

:root {
    --brand-purple: #340D82;
    --brand-accent: #667eea;
    --brand-dark: #0f0c29;
    --text-light: #ffffff;
    --text-muted: rgba(255,255,255,0.85);
    --max-content: 1200px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    background: var(--brand-dark);
    color: var(--text-light);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

a { color: var(--brand-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== Navigation ===== */

nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    background: rgba(15,12,41,0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.nav-inner {
    max-width: var(--max-content);
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: var(--text-light);
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 1px;
}

.nav-logo img { width: 32px; height: 32px; }

.nav-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover { color: var(--text-light); }

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
}

.nav-cta {
    background: #4CAF50;
    color: white !important;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-weight: 600;
}

.nav-cta:hover { background: #43a047; }

/* ===== Social Links (in footer) ===== */

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.social-links a {
    color: var(--text-muted);
    font-size: 1.4rem;
    text-decoration: none;
    transition: color 0.2s, transform 0.2s;
}

.social-links a:hover {
    color: var(--text-light);
    transform: translateY(-2px);
    text-decoration: none;
}

/* ===== Footer ===== */

footer {
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 3rem 1.5rem 2rem;
    text-align: center;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--text-light);
    text-decoration: underline;
}

.footer-bottom {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
}

/* ===== Cookie Consent Banner ===== */

.cookie-consent {
    position: fixed;
    bottom: 0; right: 0;
    background: rgba(0,0,0,0.95);
    border-top: 2px solid var(--brand-accent);
    padding: 1.5rem;
    max-width: 400px;
    border-radius: 10px 10px 0 0;
    margin: 1rem;
    box-shadow: -2px -2px 10px rgba(0,0,0,0.3);
    z-index: 9999;
    display: none;
    animation: slideUp 0.3s ease;
}

.cookie-consent.show { display: block; }

@keyframes slideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.cookie-content { display: flex; flex-direction: column; gap: 1rem; }

.cookie-text p { color: #ccc; font-size: 0.9rem; margin: 0; line-height: 1.5; }
.cookie-text p:first-child { color: white; font-weight: bold; margin-bottom: 0.5rem; }

.cookie-buttons { display: flex; gap: 0.75rem; flex-wrap: wrap; }

.cookie-btn {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 5px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.cookie-btn-primary { background: var(--brand-accent); color: white; }
.cookie-btn-primary:hover { background: #5568d3; transform: translateY(-2px); }

.cookie-btn-link {
    background: transparent;
    color: var(--brand-accent);
    border: 1px solid var(--brand-accent);
    font-size: 0.85rem;
}

.cookie-btn-link:hover { background: var(--brand-accent); color: white; }

/* ===== Responsive (Navigation) ===== */

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%; left: 0; right: 0;
        background: rgba(15,12,41,0.95);
        flex-direction: column;
        padding: 1rem 1.5rem;
        gap: 1rem;
        border-bottom: 1px solid rgba(255,255,255,0.08);
    }

    .nav-links.open { display: flex; }
    .nav-toggle { display: block; }
}

/* ===== Blog Post Styles ===== */

.blog-post {
    max-width: 800px;
    margin: 0 auto;
}

.blog-post h1 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    margin-bottom: 0.5rem;
}

.blog-post h2 {
    font-size: 1.4rem;
    margin: 2.5rem 0 1rem;
    color: #d0d0ff;
}

.blog-post h3 {
    font-size: 1.15rem;
    margin: 1.5rem 0 0.75rem;
}

.blog-post p {
    margin-bottom: 1rem;
    color: var(--text-muted);
    line-height: 1.8;
}

.blog-post ul, .blog-post ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
    color: var(--text-muted);
}

.blog-post li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

.blog-post-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.blog-post-header {
    margin-bottom: 2rem;
}

.code-block {
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 1.25rem;
    overflow-x: auto;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #e0e0e0;
    margin: 1.5rem 0;
}

.back-link {
    display: inline-block;
    color: var(--brand-accent);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.back-link:hover {
    text-decoration: underline;
}

/* Related Posts */
.related-posts {
    max-width: 800px;
    margin: 3rem auto;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.related-posts h2 {
    font-size: 1.3rem;
    margin-bottom: 1.25rem;
    text-align: center;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.related-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 1.25rem;
    text-decoration: none;
    color: var(--text-muted);
    transition: transform 0.2s, border-color 0.2s, background 0.2s;
}

.related-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.06);
    color: var(--text-light);
}

.related-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-light);
}

.related-desc {
    font-size: 0.85rem;
    line-height: 1.5;
    opacity: 0.85;
}

/* Blog Index */
.blog-index {
    max-width: var(--max-content);
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.blog-index h1 {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    margin-bottom: 0.5rem;
}

.blog-index .subtitle {
    color: var(--text-muted);
    margin-bottom: 3rem;
    font-size: 1.05rem;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.blog-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 1.5rem;
    transition: transform 0.2s, border-color 0.2s;
}

.blog-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255,255,255,0.18);
}

.blog-card-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.blog-card h2 {
    font-size: 1.15rem;
    margin-bottom: 0.75rem;
}

.blog-card h2 a {
    color: var(--text-light);
    text-decoration: none;
}

.blog-card h2 a:hover {
    color: var(--brand-accent);
}

.blog-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.blog-card-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    display: inline-block;
    background: rgba(102,126,234,0.15);
    color: var(--brand-accent);
    font-size: 0.8rem;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
}