/* ============================================================
   blog/style.css — Standalone stylesheet for all blog pages
   ============================================================ */

:root {
    --primary: #06b6d4;
    --secondary: #0891b2;
    --accent: #22d3ee;
    --dark: #164e63;
    --text: #1f2937;
    --text-light: #6b7280;
    --bg: #ffffff;
    --bg-secondary: #f0fdff;
    --border: #e5e7eb;
    --glow: rgba(6, 182, 212, 0.4);
    --gradient: linear-gradient(135deg, #06b6d4 0%, #0891b2 50%, #164e63 100%);
    --gradient-2: linear-gradient(135deg, #22d3ee 0%, #06b6d4 100%);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
}


/* ---- Post Hero ---- */
.post-hero {
    background: var(--gradient);
    color: white;
    padding: 90px 0 60px;
    position: relative;
    overflow: hidden;
}

.post-hero::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 40px;
    background: var(--bg);
    clip-path: ellipse(60% 100% at 50% 100%);
}

.post-hero .container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.post-category-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.35);
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
}

.post-hero h1 {
    font-size: 2.4rem;
    line-height: 1.3;
    margin-bottom: 1.5rem;
    max-width: 800px;
}

.post-meta {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    font-size: 0.9rem;
    opacity: 0.88;
    align-items: center;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* ---- Engagement Bar ---- */
.post-engagement {
    background: white;
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 0;
    position: sticky;
    top: 64px;
    z-index: 90;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.post-engagement .container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.engagement-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: 1.5px solid var(--border);
    border-radius: 24px;
    padding: 0.4rem 1.1rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-light);
    transition: all 0.25s;
    font-family: inherit;
}

.engagement-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(6, 182, 212, 0.06);
}

.engagement-btn.liked {
    border-color: #ef4444;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.06);
}

.engagement-btn.liked i { color: #ef4444; }
.engagement-btn i { font-size: 1rem; }

.view-stat {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

.view-stat i { color: var(--primary); }

/* ---- Main Article ---- */
.post-content {
    max-width: 960px;
    margin: 0 auto;
    padding: 3rem 20px 4rem;
}

.post-body h2 {
    font-size: 1.75rem;
    color: var(--dark);
    margin: 2.5rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent);
}

.post-body h3 {
    font-size: 1.3rem;
    color: var(--text);
    margin: 2rem 0 0.75rem;
}

.post-body p {
    margin-bottom: 1.5rem;
    color: var(--text);
    font-size: 1.05rem;
    line-height: 1.85;
}

.post-body ul, .post-body ol {
    margin: 0 0 1.5rem 1.75rem;
    line-height: 1.85;
}

.post-body li { margin-bottom: 0.5rem; }

.post-body code {
    background: #f1f5f9;
    color: #0891b2;
    padding: 0.15rem 0.45rem;
    border-radius: 5px;
    font-size: 0.88em;
    font-family: 'SFMono-Regular', 'Fira Code', 'Courier New', monospace;
}

.post-body pre {
    background: #0f172a;
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: 10px;
    overflow-x: auto;
    margin: 1.5rem 0;
    border-left: 4px solid var(--primary);
    font-size: 0.9rem;
    line-height: 1.7;
}

.post-body pre code {
    background: none;
    color: #e2e8f0;
    padding: 0;
    font-size: inherit;
}

.post-body blockquote {
    border-left: 4px solid var(--accent);
    padding: 1rem 1.5rem;
    background: var(--bg-secondary);
    border-radius: 0 10px 10px 0;
    margin: 1.5rem 0;
    color: var(--text-light);
    font-style: italic;
}

.info-box {
    background: rgba(6, 182, 212, 0.07);
    border: 1px solid rgba(6, 182, 212, 0.3);
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
}

.info-box strong { color: var(--primary); }

/* ---- Tags ---- */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 2.5rem 0;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.post-tag {
    background: var(--bg-secondary);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 0.35rem 0.9rem;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 500;
    transition: border-color 0.2s, color 0.2s;
}

.post-tag:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* ---- Author Box ---- */
.author-bio,
.author-box {
    background: var(--bg-secondary);
    border-radius: 14px;
    padding: 1.75rem;
    margin: 2.5rem 0;
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    border: 1px solid var(--border);
}

.author-avatar {
    width: 64px;
    height: 64px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.6rem;
    flex-shrink: 0;
}

.author-info h4 {
    color: var(--dark);
    margin-bottom: 0.3rem;
    font-size: 1.1rem;
}

.author-info p {
    color: var(--text-light);
    font-size: 0.92rem;
    line-height: 1.65;
}

.author-info a { color: var(--primary); text-decoration: none; }
.author-info a:hover { text-decoration: underline; }

/* ---- Comments Section ---- */
.comments-section {
    margin-top: 3rem;
    padding-top: 2.5rem;
    border-top: 2px solid var(--border);
}

.comments-section h2 {
    font-size: 1.75rem;
    color: var(--dark);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.comments-section h2 i { color: var(--primary); }

/* ---- Blog Listing Page ---- */
.blog-listing-hero {
    background: var(--gradient);
    color: white;
    padding: 80px 0 60px;
    text-align: center;
}

.blog-listing-hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.blog-listing-hero p {
    font-size: 1.15rem;
    opacity: 0.85;
    max-width: 600px;
    margin: 0 auto;
}

.blog-listing {
    max-width: 960px;
    margin: 0 auto;
    padding: 3rem 20px 4rem;
}

.blog-listing-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 2rem;
    margin-bottom: 2rem;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.blog-listing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 36px var(--glow);
    border-color: var(--primary);
}

.blog-listing-category {
    display: inline-block;
    background: rgba(6, 182, 212, 0.1);
    color: var(--primary);
    padding: 0.2rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.blog-listing-card h2 {
    font-size: 1.4rem;
    color: var(--text);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.blog-listing-card h2 a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s;
}

.blog-listing-card h2 a:hover { color: var(--primary); }

.blog-listing-excerpt {
    color: var(--text-light);
    font-size: 0.96rem;
    line-height: 1.75;
    margin-bottom: 1.25rem;
}

.blog-listing-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.86rem;
    color: var(--text-light);
    flex-wrap: wrap;
}

.blog-listing-meta span {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.blog-listing-meta i { color: var(--primary); }

.blog-listing-read-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 1.25rem;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: gap 0.2s;
}

.blog-listing-read-link:hover { gap: 0.75rem; }

/* ---- Footer ---- */
.blog-footer {
    background: #1f2937;
    color: #d1d5db;
    text-align: center;
    padding: 2.5rem 1rem;
    font-size: 0.9rem;
    line-height: 2.2;
}

.blog-footer a {
    color: var(--accent);
    text-decoration: none;
}

.blog-footer a:hover { text-decoration: underline; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .post-hero h1 { font-size: 1.8rem; }
    .post-meta { gap: 1rem; font-size: 0.84rem; }
    .blog-listing-hero h1 { font-size: 2.2rem; }
    .post-engagement { top: 70px; }
    .blog-listing { padding: 2rem 16px 3rem; }
    .blog-listing-meta { gap: 0.75rem; }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--bg);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }

    .nav-menu.active { left: 0; }

    .hamburger { display: flex; }

    .nav-available-badge { display: none; }
}

@media (max-width: 480px) {
    .post-hero { padding: 70px 0 40px; }
    .post-hero h1 { font-size: 1.5rem; }
    .blog-listing-card { padding: 1.25rem; }
    .blog-listing-hero { padding: 60px 0 45px; }
    .blog-listing-hero h1 { font-size: 1.75rem; }
    .blog-listing-hero p { font-size: 1rem; }
    .author-bio,
    .author-box { flex-direction: column; align-items: center; text-align: center; }
    .author-avatar { margin-bottom: 0.75rem; }
}


/* ---- Dark Mode Variables & Overrides ---- */
[data-theme="dark"] {
    --text:         #e2e8f0;
    --text-light:   #94a3b8;
    --bg:           #0a0f1e;
    --bg-secondary: #111827;
    --border:       #1e293b;
    --dark:         #67e8f9;
}

[data-theme="dark"] body {
    background: var(--bg);
    color: var(--text);
}

[data-theme="dark"] .navbar {
    background: #0a0f1e;
    border-bottom: 1px solid #1e293b;
    box-shadow: none;
}

[data-theme="dark"] .logo-ops { color: #e2e8f0; }
[data-theme="dark"] .nav-link { color: var(--text-light); }

[data-theme="dark"] .dark-toggle {
    border-color: #1e293b;
    color: var(--text-light);
}

[data-theme="dark"] .post-hero::after { background: var(--bg); }

[data-theme="dark"] .post-engagement {
    background: #0a0f1e;
    border-color: #1e293b;
}

[data-theme="dark"] .post-body h2 { color: var(--dark); }
[data-theme="dark"] .post-body h3 { color: var(--text); }
[data-theme="dark"] .post-body p,
[data-theme="dark"] .post-body li { color: var(--text); }

[data-theme="dark"] .post-body code {
    background: #1e293b;
    color: #22d3ee;
}

[data-theme="dark"] .post-body blockquote,
[data-theme="dark"] .author-bio,
[data-theme="dark"] .author-box {
    background: #141d2e;
    border-color: #1e293b;
}

[data-theme="dark"] .author-info h4 { color: var(--dark); }

[data-theme="dark"] .post-tag {
    background: #1e293b;
    border-color: #334155;
    color: var(--text-light);
}

[data-theme="dark"] .blog-listing-card {
    background: #141d2e;
    border-color: #1e293b;
}

[data-theme="dark"] .blog-listing-card h2 { color: var(--text); }

[data-theme="dark"] .comments-section h2 { color: var(--text); }

[data-theme="dark"] .blog-footer {
    background: #060c18;
    color: #94a3b8;
}
