/* ============================================================
   OnlineCompilerC Theme — Main Stylesheet
   Design: GitHub Dark header/IDE · Clean light content sections
   ============================================================ */

/* ── 1. CSS Variables ──────────────────────────────────────── */
:root {
    /* Container */
    --container: 1200px;
    --header-h: 64px;

    /* Spacing scale */
    --sp-1: 0.25rem;
    --sp-2: 0.5rem;
    --sp-3: 0.75rem;
    --sp-4: 1rem;
    --sp-5: 1.25rem;
    --sp-6: 1.5rem;
    --sp-8: 2rem;
    --sp-10: 2.5rem;
    --sp-12: 3rem;
    --sp-16: 4rem;
    --sp-20: 5rem;

    /* Dark palette — header, IDE, footer */
    --dark-bg:        #0d1117;
    --dark-surface:   #161b22;
    --dark-toolbar:   #1c2128;
    --dark-border:    #30363d;
    --dark-text:      #e6edf3;
    --dark-muted:     #8b949e;
    --dark-hover-bg:  #21262d;

    /* Light palette — content sections */
    --light-bg:       #ffffff;
    --light-surface:  #f6f8fa;
    --light-border:   #d0d7de;
    --light-text:     #1f2328;
    --light-secondary:#57606a;
    --light-muted:    #848d97;

    /* Accent */
    --accent:         #2563eb;
    --accent-hover:   #1d4ed8;
    --accent-light:   #dbeafe;
    --accent-text:    #1e40af;

    /* Run button */
    --run-bg:         #16a34a;
    --run-hover:      #15803d;

    /* Tool buttons */
    --tool-bg:        #21262d;
    --tool-text:      #c9d1d9;
    --tool-border:    #30363d;
    --tool-hover-bg:  #30363d;

    /* Typography */
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    --font-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;

    /* Border radius */
    --r-sm: 4px;
    --r-md: 8px;
    --r-lg: 12px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,.10);
    --shadow-lg: 0 8px 24px rgba(0,0,0,.12);
}

/* ── 2. Reset & Base ──────────────────────────────────────── */
*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--light-text);
    background: var(--light-bg);
    -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: var(--r-sm);
}

ul, ol { list-style: none; }

button { font-family: inherit; cursor: pointer; }

/* ── 3. Skip Link ──────────────────────────────────────────── */
.occ-skip-link {
    position: absolute;
    left: -9999px;
    top: var(--sp-2);
    padding: var(--sp-2) var(--sp-4);
    background: var(--accent);
    color: #fff;
    border-radius: var(--r-sm);
    font-weight: 600;
    z-index: 9999;
}
.occ-skip-link:focus { left: var(--sp-4); }

/* ── 4. Layout Helpers ─────────────────────────────────────── */
.occ-container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--sp-6);
}

.site-wrapper { display: flex; flex-direction: column; min-height: 100vh; }
.occ-main { flex: 1; }

/* ── 5. Header ─────────────────────────────────────────────── */
.site-header {
    background: var(--dark-bg);
    border-bottom: 1px solid var(--dark-border);
    height: var(--header-h);
    position: sticky;
    top: 0;
    z-index: 200;
}

.header-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-6);
}

/* Brand */
.brand-link {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    color: var(--dark-text);
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: -0.01em;
    text-decoration: none;
    white-space: nowrap;
}
.brand-link:hover { color: #fff; text-decoration: none; }

.brand-icon {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    color: var(--accent);
    font-weight: 700;
}

/* Primary Nav */
.primary-nav { display: flex; align-items: center; }

.nav-menu {
    display: flex;
    align-items: center;
    gap: var(--sp-1);
    list-style: none;
}

.nav-item a {
    display: block;
    padding: var(--sp-2) var(--sp-3);
    color: var(--dark-muted);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--r-sm);
    text-decoration: none;
    transition: color .15s, background .15s;
    white-space: nowrap;
}

.nav-item a:hover,
.nav-item.current a {
    color: var(--dark-text);
    background: var(--dark-hover-bg);
}

.nav-item.current a { color: #fff; }

/* Hamburger */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    padding: var(--sp-2);
    background: transparent;
    border: 1px solid var(--dark-border);
    border-radius: var(--r-sm);
    cursor: pointer;
}

.menu-toggle .bar {
    display: block;
    height: 2px;
    background: var(--dark-muted);
    border-radius: 2px;
    transition: transform .2s, opacity .2s;
}

/* Mobile nav open state */
.primary-nav.is-open {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--dark-surface);
    border-bottom: 1px solid var(--dark-border);
    padding: var(--sp-4) var(--sp-6);
    z-index: 199;
}

.primary-nav.is-open .nav-menu {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    gap: var(--sp-1);
}

.primary-nav.is-open .nav-item a { width: 100%; }

/* ── 6. Compiler Section ───────────────────────────────────── */
.compiler-section {
    background: var(--dark-bg);
    padding: var(--sp-8) 0 var(--sp-10);
    border-bottom: 1px solid var(--dark-border);
}

.compiler-header {
    text-align: center;
    margin-bottom: var(--sp-6);
}

.compiler-header h1 {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 700;
    color: #f0f6fc;
    letter-spacing: -0.025em;
    line-height: 1.2;
    margin-bottom: var(--sp-2);
}

.compiler-header p {
    color: var(--dark-muted);
    font-size: 1rem;
}

/* Panel */
.compiler-panel {
    background: var(--dark-surface);
    border: 1px solid var(--dark-border);
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

/* ── 7. IDE Toolbar ────────────────────────────────────────── */
.ide-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-3);
    padding: var(--sp-3) var(--sp-4);
    background: var(--dark-toolbar);
    border-bottom: 1px solid var(--dark-border);
    flex-wrap: wrap;
}

.ide-toolbar-left,
.ide-toolbar-right { display: flex; align-items: center; gap: var(--sp-3); }

.ide-toolbar-center {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--dark-muted);
    display: flex;
    align-items: center;
    gap: var(--sp-2);
}

.ide-lang-badge {
    background: var(--dark-hover-bg);
    border: 1px solid var(--dark-border);
    border-radius: var(--r-sm);
    padding: 2px 8px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: #79c0ff;
    font-weight: 600;
}

.ide-select {
    background: var(--dark-hover-bg);
    color: var(--dark-text);
    border: 1px solid var(--dark-border);
    border-radius: var(--r-sm);
    padding: var(--sp-2) var(--sp-3);
    font-size: 0.85rem;
    font-family: var(--font-sans);
    cursor: pointer;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%238b949e'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 28px;
    min-width: 130px;
    transition: border-color .15s;
}

.ide-select:hover,
.ide-select:focus { border-color: var(--accent); }

.ide-select option { background: var(--dark-surface); }

/* ── 8. ACE Editor ─────────────────────────────────────────── */
#editor {
    width: 100%;
    height: 360px;
    font-size: 14px;
    line-height: 1.6;
}

/* ── 9. Compiler Controls ──────────────────────────────────── */
.compiler-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--sp-3);
    padding: var(--sp-3) var(--sp-4);
    background: var(--dark-toolbar);
    border-top: 1px solid var(--dark-border);
}

.controls-left { display: flex; align-items: center; gap: var(--sp-3); }
.controls-right { display: flex; align-items: center; gap: var(--sp-2); }

/* Show Input checkbox */
.show-input-label {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    color: var(--dark-muted);
    font-size: 0.875rem;
    cursor: pointer;
    user-select: none;
}

.show-input-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
    cursor: pointer;
}

/* Tool buttons */
.btn-tool {
    background: var(--tool-bg);
    color: var(--tool-text);
    border: 1px solid var(--tool-border);
    border-radius: var(--r-sm);
    padding: var(--sp-2) var(--sp-4);
    font-size: 0.83rem;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s, border-color .15s;
    display: flex;
    align-items: center;
    gap: var(--sp-2);
}

.btn-tool:hover {
    background: var(--tool-hover-bg);
    border-color: #484f58;
}

/* Run button */
.btn-run {
    background: var(--run-bg);
    color: #fff;
    border: none;
    border-radius: var(--r-sm);
    padding: var(--sp-2) var(--sp-6);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s, transform .1s;
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    letter-spacing: 0.01em;
}

.btn-run:hover:not(:disabled) { background: var(--run-hover); }
.btn-run:active:not(:disabled) { transform: scale(.97); }
.btn-run:disabled { opacity: .6; cursor: not-allowed; }

.btn-run svg { flex-shrink: 0; }

/* ── 10. Input / Output Areas ──────────────────────────────── */
.io-area {
    padding: var(--sp-3) var(--sp-4);
    background: var(--dark-surface);
    border-top: 1px solid var(--dark-border);
}

.io-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--dark-muted);
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: var(--sp-2);
}

.io-textarea {
    width: 100%;
    background: var(--dark-toolbar);
    color: var(--dark-text);
    border: 1px solid var(--dark-border);
    border-radius: var(--r-sm);
    padding: var(--sp-3) var(--sp-4);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.6;
    resize: vertical;
    outline: none;
    transition: border-color .15s;
}

.io-textarea:focus { border-color: var(--accent); }
.io-textarea[disabled] { opacity: .85; cursor: default; }

/* ── 11. Section Common ────────────────────────────────────── */
.occ-section { padding: var(--sp-16) 0; }
.occ-section--alt { background: var(--light-surface); }

.section-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto var(--sp-12);
}

.section-label {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--accent);
    margin-bottom: var(--sp-3);
}

.section-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--light-text);
    letter-spacing: -0.025em;
    line-height: 1.25;
    margin-bottom: var(--sp-4);
}

.section-desc {
    font-size: 1.05rem;
    color: var(--light-secondary);
    line-height: 1.7;
}

/* ── 12. Ad Slots ──────────────────────────────────────────── */
.ad-slot {
    padding: var(--sp-4) 0;
    text-align: center;
    background: var(--light-bg);
    border-top: 1px solid var(--light-border);
    border-bottom: 1px solid var(--light-border);
}

/* ── 13. Features Section ──────────────────────────────────── */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--sp-6);
}

.feature-card {
    background: var(--light-bg);
    border: 1px solid var(--light-border);
    border-radius: var(--r-md);
    padding: var(--sp-6);
    transition: box-shadow .2s, border-color .2s;
}

.feature-card:hover {
    box-shadow: var(--shadow-md);
    border-color: #b0bec5;
}

.feature-icon {
    width: 44px;
    height: 44px;
    background: var(--accent-light);
    border-radius: var(--r-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--sp-4);
    font-size: 1.25rem;
    color: var(--accent-text);
}

.feature-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--light-text);
    margin-bottom: var(--sp-2);
}

.feature-desc {
    font-size: 0.9rem;
    color: var(--light-secondary);
    line-height: 1.6;
}

/* ── 14. How It Works ──────────────────────────────────────── */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--sp-8);
    position: relative;
}

.steps-grid::before {
    content: '';
    position: absolute;
    top: 26px;
    left: calc(16.66% + 26px);
    right: calc(16.66% + 26px);
    height: 2px;
    background: var(--light-border);
    z-index: 0;
}

.step-item { text-align: center; position: relative; z-index: 1; }

.step-number {
    width: 52px;
    height: 52px;
    background: var(--accent);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 800;
    margin: 0 auto var(--sp-4);
    font-family: var(--font-mono);
    box-shadow: 0 0 0 6px var(--light-surface);
}

.step-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--light-text);
    margin-bottom: var(--sp-2);
}

.step-desc {
    font-size: 0.9rem;
    color: var(--light-secondary);
}

/* ── 15. Examples Section ──────────────────────────────────── */
.examples-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--sp-5);
}

.example-card {
    background: var(--light-bg);
    border: 1px solid var(--light-border);
    border-radius: var(--r-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow .2s;
}

.example-card:hover { box-shadow: var(--shadow-md); }

.example-card-header {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    padding: var(--sp-4) var(--sp-5);
    border-bottom: 1px solid var(--light-border);
    background: var(--light-surface);
}

.example-card-icon {
    font-size: 1.4rem;
    line-height: 1;
}

.example-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--light-text);
}

.example-card-body {
    padding: var(--sp-4) var(--sp-5);
    flex: 1;
}

.example-card-desc {
    font-size: 0.875rem;
    color: var(--light-secondary);
    margin-bottom: var(--sp-4);
    line-height: 1.6;
}

.btn-example {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    background: var(--light-surface);
    color: var(--accent);
    border: 1px solid var(--light-border);
    border-radius: var(--r-sm);
    padding: var(--sp-2) var(--sp-4);
    font-size: 0.83rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, border-color .15s;
    text-decoration: none;
}

.btn-example:hover {
    background: var(--accent-light);
    border-color: var(--accent);
    text-decoration: none;
}

/* Code template hidden elements */
.example-code { display: none; }

/* ── 16. Content Section (existing + new) ──────────────────── */
.content-section { padding: var(--sp-16) 0; }

.content-section h2 {
    font-size: clamp(1.25rem, 2.5vw, 1.6rem);
    font-weight: 700;
    color: var(--light-text);
    letter-spacing: -0.02em;
    line-height: 1.3;
    margin-top: var(--sp-10);
    margin-bottom: var(--sp-4);
}

.content-section h2:first-child { margin-top: 0; }

.content-section h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--light-text);
    margin-top: var(--sp-6);
    margin-bottom: var(--sp-3);
}

.content-section h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--light-text);
    margin-top: var(--sp-5);
    margin-bottom: var(--sp-2);
}

.content-section p {
    color: var(--light-secondary);
    line-height: 1.8;
    margin-bottom: var(--sp-4);
}

.content-section ul,
.content-section ol {
    list-style: none;
    margin-bottom: var(--sp-4);
}

.content-section ul li,
.content-section ol li {
    position: relative;
    padding-left: var(--sp-6);
    color: var(--light-secondary);
    margin-bottom: var(--sp-2);
    line-height: 1.7;
}

.content-section ul li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-size: 0.85em;
}

.content-section ol { counter-reset: item; }
.content-section ol li::before {
    content: counter(item) '.';
    counter-increment: item;
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 700;
    font-size: 0.85em;
}

.content-section pre {
    background: var(--dark-surface);
    border: 1px solid var(--dark-border);
    border-radius: var(--r-md);
    padding: var(--sp-5) var(--sp-6);
    overflow-x: auto;
    margin-bottom: var(--sp-5);
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.65;
    color: #e6edf3;
}

.content-section code {
    font-family: var(--font-mono);
    font-size: 0.875em;
    background: var(--light-surface);
    border: 1px solid var(--light-border);
    border-radius: 3px;
    padding: 1px 5px;
    color: var(--light-text);
}

.content-section pre code {
    background: none;
    border: none;
    padding: 0;
    color: inherit;
    font-size: inherit;
}

.content-section b, .content-section strong {
    font-weight: 700;
    color: var(--light-text);
}

.content-section img {
    border-radius: var(--r-md);
    box-shadow: var(--shadow-md);
    margin: var(--sp-6) 0;
    max-width: 100%;
}

/* Additional content grid */
.additional-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-8);
}

.additional-card {
    padding: var(--sp-6);
    background: var(--light-surface);
    border: 1px solid var(--light-border);
    border-radius: var(--r-md);
    border-left: 4px solid var(--accent);
}

.additional-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--light-text);
    margin-top: 0;
    margin-bottom: var(--sp-3);
}

.additional-card p {
    font-size: 0.9rem;
    color: var(--light-secondary);
    margin-bottom: 0;
    max-width: none;
}

/* ── 17. FAQ Section ───────────────────────────────────────── */
.faq-list { max-width: 780px; margin: 0 auto; }

.faq-item {
    border: 1px solid var(--light-border);
    border-radius: var(--r-md);
    margin-bottom: var(--sp-3);
    overflow: hidden;
}

.faq-question {
    width: 100%;
    background: var(--light-bg);
    border: none;
    text-align: left;
    padding: var(--sp-5) var(--sp-6);
    font-size: 0.975rem;
    font-weight: 600;
    color: var(--light-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-4);
    transition: background .15s;
}

.faq-question:hover { background: var(--light-surface); }

.faq-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    background: var(--light-surface);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--accent);
    transition: transform .2s;
    line-height: 1;
}

.faq-item.is-open .faq-icon { transform: rotate(45deg); }

.faq-answer {
    display: none;
    padding: 0 var(--sp-6) var(--sp-5);
    background: var(--light-bg);
    font-size: 0.9rem;
    color: var(--light-secondary);
    line-height: 1.75;
    border-top: 1px solid var(--light-border);
}

.faq-answer p { margin: var(--sp-3) 0 0; max-width: none; }
.faq-item.is-open .faq-answer { display: block; }

/* ── 18. Related Compilers ─────────────────────────────────── */
.related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--sp-5);
}

.related-card {
    display: block;
    background: var(--light-bg);
    border: 1px solid var(--light-border);
    border-radius: var(--r-md);
    padding: var(--sp-5);
    text-align: center;
    text-decoration: none;
    transition: box-shadow .2s, border-color .2s, transform .15s;
}

.related-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
    transform: translateY(-2px);
    text-decoration: none;
}

.related-card.is-current {
    border-color: var(--accent);
    background: var(--accent-light);
}

.related-card-icon {
    font-size: 2rem;
    margin-bottom: var(--sp-3);
    display: block;
    line-height: 1;
}

.related-card-name {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--light-text);
    margin-bottom: var(--sp-1);
}

.related-card-desc {
    display: block;
    font-size: 0.8rem;
    color: var(--light-secondary);
}

/* ── 19. Page Template ─────────────────────────────────────── */
.page-layout {
    padding: var(--sp-12) 0;
}

.page-layout .page-header {
    margin-bottom: var(--sp-8);
    padding-bottom: var(--sp-6);
    border-bottom: 1px solid var(--light-border);
}

.page-layout .page-title {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 700;
    color: var(--light-text);
    letter-spacing: -0.025em;
    line-height: 1.2;
}

.page-content { font-size: 1rem; color: var(--light-secondary); line-height: 1.8; }
.page-content h2 { font-size: 1.5rem; font-weight: 700; color: var(--light-text); margin: var(--sp-8) 0 var(--sp-3); }
.page-content h3 { font-size: 1.2rem; font-weight: 700; color: var(--light-text); margin: var(--sp-6) 0 var(--sp-3); }
.page-content p { margin-bottom: var(--sp-4); }
.page-content ul, .page-content ol { margin-bottom: var(--sp-4); padding-left: var(--sp-6); }
.page-content ul { list-style: disc; }
.page-content ol { list-style: decimal; }
.page-content li { margin-bottom: var(--sp-2); }
.page-content a { color: var(--accent); }
.page-content a:hover { text-decoration: underline; }
.page-content strong { color: var(--light-text); font-weight: 700; }

/* ── 20. Single Post ───────────────────────────────────────── */
.single-layout { padding: var(--sp-12) 0; }
.post-meta { display: flex; gap: var(--sp-4); flex-wrap: wrap; margin-bottom: var(--sp-6); font-size: 0.875rem; color: var(--light-muted); }
.post-meta a { color: var(--light-muted); }
.post-content { font-size: 1rem; line-height: 1.8; color: var(--light-secondary); }
.post-content h2 { font-size: 1.5rem; font-weight: 700; color: var(--light-text); margin: var(--sp-8) 0 var(--sp-3); }
.post-content h3 { font-size: 1.2rem; font-weight: 700; color: var(--light-text); margin: var(--sp-5) 0 var(--sp-2); }
.post-content p { margin-bottom: var(--sp-5); }
.post-content ul, .post-content ol { padding-left: var(--sp-6); margin-bottom: var(--sp-5); }
.post-content ul { list-style: disc; }
.post-content ol { list-style: decimal; }
.post-content li { margin-bottom: var(--sp-2); }
.post-content a { color: var(--accent); }
.post-content pre { background: var(--dark-surface); border: 1px solid var(--dark-border); border-radius: var(--r-md); padding: var(--sp-5); overflow-x: auto; font-family: var(--font-mono); font-size: 0.875rem; color: #e6edf3; margin-bottom: var(--sp-5); }
.post-content blockquote { border-left: 4px solid var(--accent); padding-left: var(--sp-5); color: var(--light-secondary); font-style: italic; margin: var(--sp-6) 0; }
.post-content img { border-radius: var(--r-md); margin: var(--sp-6) 0; }

/* ── 21. Archive / Category ────────────────────────────────── */
.archive-layout { padding: var(--sp-12) 0; }
.archive-header { margin-bottom: var(--sp-8); }
.archive-title { font-size: 2rem; font-weight: 700; color: var(--light-text); margin-bottom: var(--sp-2); }
.archive-desc { color: var(--light-secondary); }

.posts-grid { display: grid; gap: var(--sp-6); }

.post-card {
    padding: var(--sp-6);
    background: var(--light-bg);
    border: 1px solid var(--light-border);
    border-radius: var(--r-md);
    transition: box-shadow .2s;
}
.post-card:hover { box-shadow: var(--shadow-md); }
.post-card-title { font-size: 1.15rem; font-weight: 700; margin-bottom: var(--sp-2); }
.post-card-title a { color: var(--light-text); text-decoration: none; }
.post-card-title a:hover { color: var(--accent); }
.post-card-meta { font-size: 0.8rem; color: var(--light-muted); margin-bottom: var(--sp-3); }
.post-card-excerpt { font-size: 0.9rem; color: var(--light-secondary); line-height: 1.7; }

/* Pagination */
.occ-pagination { display: flex; gap: var(--sp-2); flex-wrap: wrap; margin-top: var(--sp-10); align-items: center; }
.occ-pagination a, .occ-pagination span {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px;
    border: 1px solid var(--light-border);
    border-radius: var(--r-sm);
    font-size: 0.875rem;
    color: var(--light-text);
    text-decoration: none;
    transition: border-color .15s, background .15s;
}
.occ-pagination a:hover { border-color: var(--accent); color: var(--accent); }
.occ-pagination .current { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ── 22. Search ────────────────────────────────────────────── */
.search-layout { padding: var(--sp-12) 0; }
.search-form-wrap { margin-bottom: var(--sp-8); }

.occ-search-form { display: flex; gap: var(--sp-3); }
.occ-search-input {
    flex: 1;
    padding: var(--sp-3) var(--sp-4);
    border: 1px solid var(--light-border);
    border-radius: var(--r-md);
    font-size: 1rem;
    outline: none;
    font-family: var(--font-sans);
    transition: border-color .15s;
}
.occ-search-input:focus { border-color: var(--accent); }
.occ-search-btn {
    padding: var(--sp-3) var(--sp-6);
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--r-md);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}
.occ-search-btn:hover { background: var(--accent-hover); }

/* ── 23. 404 Page ──────────────────────────────────────────── */
.error-layout {
    padding: var(--sp-20) 0;
    text-align: center;
}

.error-code {
    font-size: clamp(5rem, 15vw, 9rem);
    font-weight: 800;
    color: var(--light-border);
    font-family: var(--font-mono);
    line-height: 1;
    margin-bottom: var(--sp-4);
}

.error-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--light-text);
    margin-bottom: var(--sp-4);
}

.error-desc {
    font-size: 1.05rem;
    color: var(--light-secondary);
    margin-bottom: var(--sp-8);
    max-width: 48ch;
    margin-left: auto;
    margin-right: auto;
}

.error-links { display: flex; gap: var(--sp-3); justify-content: center; flex-wrap: wrap; }

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--r-md);
    padding: var(--sp-3) var(--sp-6);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s;
    cursor: pointer;
}
.btn-primary:hover { background: var(--accent-hover); text-decoration: none; color: #fff; }

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    background: transparent;
    color: var(--light-text);
    border: 1px solid var(--light-border);
    border-radius: var(--r-md);
    padding: var(--sp-3) var(--sp-6);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: border-color .15s, background .15s;
    cursor: pointer;
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* ── 24. Breadcrumbs ───────────────────────────────────────── */
.occ-breadcrumbs {
    padding: var(--sp-3) 0;
    border-bottom: 1px solid var(--light-border);
    margin-bottom: var(--sp-6);
}
.occ-breadcrumbs ol { display: flex; flex-wrap: wrap; gap: var(--sp-2); list-style: none; font-size: 0.85rem; }
.occ-breadcrumbs li { color: var(--light-muted); }
.occ-breadcrumbs li:not(:last-child)::after { content: '/'; margin-left: var(--sp-2); }
.occ-breadcrumbs a { color: var(--light-secondary); text-decoration: none; }
.occ-breadcrumbs a:hover { color: var(--accent); }

/* ── 25. Footer ────────────────────────────────────────────── */
.site-footer {
    background: var(--dark-bg);
    border-top: 1px solid var(--dark-border);
    padding: var(--sp-12) 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--sp-10);
    padding-bottom: var(--sp-10);
    border-bottom: 1px solid var(--dark-border);
}

.footer-brand .brand-link {
    margin-bottom: var(--sp-4);
    display: inline-flex;
}

.footer-tagline {
    font-size: 0.875rem;
    color: var(--dark-muted);
    line-height: 1.7;
    max-width: 28ch;
}

.footer-heading {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--dark-text);
    margin-bottom: var(--sp-4);
}

.footer-links { list-style: none; display: flex; flex-direction: column; gap: var(--sp-2); }
.footer-links a {
    font-size: 0.875rem;
    color: var(--dark-muted);
    text-decoration: none;
    transition: color .15s;
}
.footer-links a:hover { color: var(--dark-text); }

.footer-bottom {
    padding: var(--sp-5) 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--sp-3);
}

.footer-bottom p { font-size: 0.8rem; color: var(--dark-muted); }
.footer-bottom a { color: var(--dark-muted); text-decoration: none; }
.footer-bottom a:hover { color: var(--dark-text); }

/* ── 26. Utility ───────────────────────────────────────────── */
.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ── 27. Responsive ────────────────────────────────────────── */
@media (max-width: 1024px) {
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .examples-grid { grid-template-columns: repeat(2, 1fr); }
    .related-grid { grid-template-columns: repeat(2, 1fr); }
    .additional-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--sp-8); }
}

@media (max-width: 768px) {
    :root { --header-h: 60px; }

    .occ-container { padding: 0 var(--sp-4); }

    /* Mobile nav */
    .menu-toggle { display: flex; }
    .primary-nav:not(.is-open) { display: none; }

    /* Compiler */
    .ide-toolbar { flex-direction: column; align-items: flex-start; }
    .ide-toolbar-left, .ide-toolbar-right { width: 100%; }
    .ide-select { width: 100%; min-width: unset; }
    #editor { height: 260px; }
    .compiler-controls { flex-direction: column; align-items: flex-start; }
    .controls-right { width: 100%; flex-wrap: wrap; }
    .btn-run { width: 100%; justify-content: center; }

    /* Sections */
    .features-grid { grid-template-columns: 1fr; }
    .steps-grid { grid-template-columns: 1fr; gap: var(--sp-6); }
    .steps-grid::before { display: none; }
    .examples-grid { grid-template-columns: 1fr; }
    .related-grid { grid-template-columns: repeat(2, 1fr); }
    .additional-grid { grid-template-columns: 1fr; }

    /* Footer */
    .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--sp-8); }
    .footer-brand { grid-column: 1 / -1; }
    .footer-bottom { flex-direction: column; align-items: flex-start; }

    /* Sections */
    .occ-section { padding: var(--sp-12) 0; }
    .section-header { margin-bottom: var(--sp-8); }
}

@media (max-width: 480px) {
    .related-grid { grid-template-columns: 1fr 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .steps-grid { gap: var(--sp-4); }
    .error-links { flex-direction: column; align-items: center; }
}

/* ── 28. Print ─────────────────────────────────────────────── */
@media print {
    .site-header, .site-footer, .ad-slot, .menu-toggle { display: none; }
    body { color: #000; background: #fff; }
}

/* ══════════════════════════════════════════════════════════════
   29. Blog System — Hero, Layout, Cards, Sidebar, Single, Archive
   ══════════════════════════════════════════════════════════════ */

/* ── Blog / Archive hero ──────────────────────────────────── */
.blog-hero,
.archive-hero,
.single-hero {
    background: var(--dark-bg);
    border-bottom: 1px solid var(--dark-border);
    padding: var(--sp-10) 0 var(--sp-8);
}

.blog-hero-title,
.archive-hero-title,
.single-hero-title {
    color: var(--dark-text);
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 var(--sp-3);
}

.blog-hero-desc,
.archive-hero-desc {
    color: var(--dark-muted);
    font-size: 1rem;
    max-width: 55ch;
    margin: 0;
}

.archive-hero-type {
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    margin: 0 0 var(--sp-2);
}

/* ── Two-column blog layout ───────────────────────────────── */
.blog-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: var(--sp-10);
    padding: var(--sp-10) 0 var(--sp-16);
    align-items: start;
}

.blog-content { min-width: 0; }

/* ── Post cards (home + archive) ──────────────────────────── */
.blog-posts-list {
    display: flex;
    flex-direction: column;
    gap: var(--sp-6);
}

.blog-post-card {
    background: var(--light-bg);
    border: 1px solid var(--light-border);
    border-radius: var(--r-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow .2s;
}

.blog-post-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,.08); }

.blog-post-card-img {
    display: block;
    aspect-ratio: 16/7;
    overflow: hidden;
    background: var(--light-surface);
}

.blog-post-card-img .blog-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s;
}

.blog-post-card:hover .blog-thumb { transform: scale(1.03); }

.blog-post-card-body {
    padding: var(--sp-6);
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
    flex: 1;
}

/* Category badges */
.post-cats { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.post-cats--hero { margin-bottom: var(--sp-3); }

.cat-badge {
    display: inline-block;
    background: rgba(37,99,235,.12);
    color: var(--accent);
    border: 1px solid rgba(37,99,235,.25);
    border-radius: 999px;
    padding: 2px 10px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    text-decoration: none;
    transition: background .15s;
}

.cat-badge:hover { background: rgba(37,99,235,.22); }

/* Post title */
.blog-post-title {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0;
    color: var(--light-text);
}

.blog-post-title a {
    color: inherit;
    text-decoration: none;
}

.blog-post-title a:hover { color: var(--accent); }

/* Post meta */
.post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--sp-1);
    font-size: 0.8rem;
    color: var(--light-secondary);
}

.post-meta--hero { color: var(--dark-muted); }
.post-meta-sep { opacity: .5; }

/* Excerpt */
.blog-post-excerpt {
    font-size: 0.9rem;
    color: var(--light-secondary);
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Read more */
.read-more-link {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    margin-top: auto;
    transition: gap .15s;
}

.read-more-link:hover { gap: var(--sp-3); }

/* ── Pagination ───────────────────────────────────────────── */
.occ-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-2);
    margin-top: var(--sp-8);
    justify-content: center;
}

.occ-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 var(--sp-3);
    border: 1px solid var(--light-border);
    border-radius: var(--r-md);
    font-size: 0.875rem;
    color: var(--light-text);
    text-decoration: none;
    background: var(--light-bg);
    transition: background .15s, border-color .15s;
}

.occ-pagination .page-numbers:hover,
.occ-pagination .page-numbers.current {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.occ-pagination .page-numbers.dots {
    background: transparent;
    border-color: transparent;
    cursor: default;
}

.occ-pagination .page-numbers.prev,
.occ-pagination .page-numbers.next {
    white-space: nowrap;
    min-width: auto;
    padding: 0 var(--sp-4);
}

/* No posts state */
.no-posts {
    text-align: center;
    padding: var(--sp-16) 0;
    color: var(--light-secondary);
}

.no-posts p { margin-bottom: var(--sp-5); font-size: 1rem; }

/* ── Sidebar ──────────────────────────────────────────────── */
.blog-sidebar {
    position: sticky;
    top: calc(var(--header-h) + var(--sp-6));
    display: flex;
    flex-direction: column;
    gap: var(--sp-5);
}

.widget {
    background: var(--light-bg);
    border: 1px solid var(--light-border);
    border-radius: var(--r-lg);
    padding: var(--sp-5);
}

.widget-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--light-text);
    margin: 0 0 var(--sp-4);
    padding-bottom: var(--sp-3);
    border-bottom: 1px solid var(--light-border);
}

/* Compiler CTA widget */
.widget-compiler-cta {
    background: var(--dark-surface);
    border-color: var(--dark-border);
}

.widget-cta-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--accent);
    margin: 0 0 var(--sp-2);
}

.widget-cta-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark-text);
    margin: 0 0 var(--sp-2);
}

.widget-cta-desc {
    font-size: 0.825rem;
    color: var(--dark-muted);
    line-height: 1.55;
    margin: 0 0 var(--sp-4);
}

.widget-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    background: var(--run-bg);
    color: #fff;
    padding: var(--sp-2) var(--sp-4);
    border-radius: var(--r-md);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s;
}

.widget-cta-btn:hover { background: var(--run-hover); }

/* Recent posts list */
.recent-posts-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-3); }

.recent-post-item { display: flex; flex-direction: column; gap: 2px; }

.recent-post-item a {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--light-text);
    text-decoration: none;
    line-height: 1.4;
    transition: color .15s;
}

.recent-post-item a:hover { color: var(--accent); }

.recent-post-date {
    font-size: 0.72rem;
    color: var(--light-secondary);
}

/* Category list */
.cat-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-2); }

.cat-list li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: var(--light-text);
    text-decoration: none;
    padding: var(--sp-1) 0;
    transition: color .15s;
}

.cat-list li a:hover { color: var(--accent); }

.cat-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--light-surface);
    border: 1px solid var(--light-border);
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    min-width: 22px;
    padding: 1px 6px;
    color: var(--light-secondary);
}

/* Sidebar links */
.sidebar-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-2); }

.sidebar-links a {
    display: block;
    font-size: 0.875rem;
    color: var(--light-text);
    text-decoration: none;
    padding: var(--sp-1) 0;
    transition: color .15s;
}

.sidebar-links a:hover { color: var(--accent); }

/* Tag cloud */
.tag-cloud { display: flex; flex-wrap: wrap; gap: var(--sp-2); }

.tag-pill {
    display: inline-block;
    background: var(--light-surface);
    border: 1px solid var(--light-border);
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 0.78rem;
    color: var(--light-secondary);
    text-decoration: none;
    transition: background .15s, border-color .15s, color .15s;
}

.tag-pill:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* ── Single post ──────────────────────────────────────────── */
.single-article { background: var(--light-bg); }

.single-featured-img {
    margin: 0 0 var(--sp-8);
    border-radius: var(--r-lg);
    overflow: hidden;
    aspect-ratio: 16/7;
}

.single-featured-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Post content typography */
.post-content {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--light-text);
}

.post-content h2,
.post-content h3,
.post-content h4 {
    color: var(--light-text);
    font-weight: 700;
    margin: 2em 0 .75em;
    line-height: 1.3;
}

.post-content h2 { font-size: 1.4rem; }
.post-content h3 { font-size: 1.15rem; }
.post-content h4 { font-size: 1rem; }

.post-content p { margin: 0 0 1.25em; }

.post-content a { color: var(--accent); }
.post-content a:hover { text-decoration: underline; }

.post-content ul,
.post-content ol { margin: 0 0 1.25em 1.5em; }

.post-content li { margin-bottom: .4em; }

.post-content blockquote {
    border-left: 3px solid var(--accent);
    margin: 1.5em 0;
    padding: var(--sp-3) var(--sp-5);
    background: var(--light-surface);
    border-radius: 0 var(--r-md) var(--r-md) 0;
    color: var(--light-secondary);
    font-style: italic;
}

.post-content code {
    background: var(--dark-surface);
    color: #79c0ff;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: .875em;
}

.post-content pre {
    background: var(--dark-bg);
    border: 1px solid var(--dark-border);
    border-radius: var(--r-md);
    padding: var(--sp-5);
    overflow-x: auto;
    margin: 1.5em 0;
}

.post-content pre code {
    background: transparent;
    color: var(--dark-text);
    padding: 0;
    border-radius: 0;
    font-size: 0.875rem;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--r-md);
    display: block;
    margin: 1.5em auto;
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    font-size: 0.9rem;
}

.post-content th,
.post-content td {
    border: 1px solid var(--light-border);
    padding: var(--sp-2) var(--sp-3);
    text-align: left;
}

.post-content th {
    background: var(--light-surface);
    font-weight: 700;
}

.post-content hr {
    border: none;
    border-top: 1px solid var(--light-border);
    margin: 2em 0;
}

/* Post tags row */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--sp-2);
    margin-top: var(--sp-8);
    padding-top: var(--sp-6);
    border-top: 1px solid var(--light-border);
}

.post-tags-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--light-secondary);
    margin: 0;
}

/* Post navigation */
.post-nav {
    display: flex;
    gap: var(--sp-4);
    margin-top: var(--sp-8);
    padding-top: var(--sp-6);
    border-top: 1px solid var(--light-border);
}

.post-nav-link {
    display: flex;
    flex-direction: column;
    gap: var(--sp-1);
    flex: 1;
    text-decoration: none;
    padding: var(--sp-4);
    background: var(--light-surface);
    border: 1px solid var(--light-border);
    border-radius: var(--r-md);
    transition: border-color .15s, background .15s;
}

.post-nav-link:hover { border-color: var(--accent); background: rgba(37,99,235,.04); }
.post-nav-next { text-align: right; }

.post-nav-dir {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--accent);
}

.post-nav-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--light-text);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Single compiler CTA */
.single-compiler-cta {
    margin-top: var(--sp-8);
    background: var(--dark-surface);
    border: 1px solid var(--dark-border);
    border-radius: var(--r-lg);
    padding: var(--sp-8);
    text-align: center;
}

.cta-eyebrow {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--accent);
    margin: 0 0 var(--sp-2);
}

.cta-heading {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--dark-text);
    margin: 0 0 var(--sp-2);
}

.cta-desc {
    font-size: 0.9rem;
    color: var(--dark-muted);
    margin: 0 0 var(--sp-5);
}

/* ── Author Bio ───────────────────────────────────────────── */
.author-bio {
    display: flex;
    gap: var(--sp-5);
    align-items: flex-start;
    margin-top: var(--sp-8);
    padding: var(--sp-6);
    background: var(--light-surface);
    border: 1px solid var(--light-border);
    border-radius: var(--r-lg);
}

.author-bio-avatar {
    flex-shrink: 0;
}

.author-bio-img {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.author-bio-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--light-muted);
    margin: 0 0 var(--sp-1);
}

.author-bio-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--light-text);
    margin: 0 0 var(--sp-2);
}

.author-bio-desc {
    font-size: 0.88rem;
    color: var(--light-secondary);
    line-height: 1.6;
    margin: 0;
}

/* ── Blog category tabs ───────────────────────────────────── */
.blog-cat-nav {
    background: var(--light-surface);
    border-bottom: 1px solid var(--light-border);
    padding: var(--sp-4) 0 0;
}

.blog-cat-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.blog-cat-tabs::-webkit-scrollbar { display: none; }

.cat-tab {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    padding: var(--sp-3) var(--sp-5);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--light-secondary);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    transition: color .15s, border-color .15s;
}

.cat-tab:hover {
    color: var(--accent);
    border-bottom-color: var(--accent-light);
}

.cat-tab--active {
    color: var(--accent);
    border-bottom-color: var(--accent);
    font-weight: 600;
}

.cat-tab-count {
    font-size: 0.72rem;
    font-weight: 600;
    background: var(--accent-light);
    color: var(--accent-text);
    padding: 0 var(--sp-2);
    border-radius: 10px;
    line-height: 1.6;
}

/* ── Blog responsive ──────────────────────────────────────── */
@media (max-width: 1024px) {
    .blog-layout { grid-template-columns: 1fr 260px; gap: var(--sp-8); }
}

@media (max-width: 768px) {
    .blog-layout { grid-template-columns: 1fr; }

    .blog-sidebar {
        position: static;
        border-top: 1px solid var(--light-border);
        padding-top: var(--sp-8);
    }

    .blog-hero,
    .archive-hero,
    .single-hero { padding: var(--sp-8) 0 var(--sp-6); }

    .blog-layout { padding: var(--sp-8) 0 var(--sp-12); }

    .post-nav { flex-direction: column; }
    .post-nav-next { text-align: left; }

    .single-featured-img { aspect-ratio: 16/9; }

    .author-bio { flex-direction: column; align-items: center; text-align: center; }
}

/* ══════════════════════════════════════════════════════════════
   30. Audience Section
   ══════════════════════════════════════════════════════════════ */

.audience-section {
    background: var(--dark-bg);
    padding-left: var(--sp-4);
    padding-right: var(--sp-4);
}
.audience-section .section-title,
.audience-section .section-subtitle { color: var(--dark-text); }
.audience-section .section-subtitle { color: var(--dark-muted); }

.audience-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--sp-6);
}

.audience-card {
    background: var(--dark-surface);
    border: 1px solid var(--dark-border);
    border-radius: var(--r-lg);
    padding: var(--sp-8);
    display: flex;
    flex-direction: column;
    gap: var(--sp-4);
    transition: border-color .2s, transform .2s;
}

.audience-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.audience-card--featured {
    border-color: var(--accent);
    background: linear-gradient(135deg, var(--dark-surface) 0%, rgba(37,99,235,.08) 100%);
}

.audience-icon {
    width: 52px;
    height: 52px;
    background: rgba(37,99,235,.12);
    border: 1px solid rgba(37,99,235,.25);
    border-radius: var(--r-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
}

.audience-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark-text);
    margin: 0;
}

.audience-card-desc {
    font-size: 0.9rem;
    color: var(--dark-muted);
    line-height: 1.65;
    margin: 0;
}

.audience-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
    margin-top: auto;
    padding-top: var(--sp-4);
    border-top: 1px solid var(--dark-border);
}

.audience-list li {
    font-size: 0.82rem;
    color: var(--dark-muted);
    padding-left: var(--sp-5);
    position: relative;
}

.audience-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--run-bg);
    font-weight: 700;
}

@media (max-width: 1024px) { .audience-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px)  { .audience-grid { grid-template-columns: 1fr; } }
@media (max-width: 768px)  {
    .audience-section { padding-left: 0; padding-right: 0; }
    .audience-card { padding: var(--sp-6); }
}

/* ══════════════════════════════════════════════════════════════
   31. Project Ideas Section
   ══════════════════════════════════════════════════════════════ */

.projects-section { background: var(--light-bg); }

.projects-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--sp-5);
    margin-bottom: var(--sp-8);
}

.project-card {
    background: var(--light-bg);
    border: 1px solid var(--light-border);
    border-radius: var(--r-lg);
    padding: var(--sp-5);
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
    transition: box-shadow .2s, border-color .2s;
}

.project-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,.07);
    border-color: var(--accent);
}

.project-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-2);
}

/* Difficulty badges */
.difficulty {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
}

.difficulty--easy   { background: rgba(22,163,74,.1);  color: #16a34a; border: 1px solid rgba(22,163,74,.25); }
.difficulty--medium { background: rgba(234,179,8,.1);  color: #a16207; border: 1px solid rgba(234,179,8,.25); }
.difficulty--hard   { background: rgba(220,38,38,.1);  color: #dc2626; border: 1px solid rgba(220,38,38,.25); }

.project-concept {
    font-size: 0.7rem;
    color: var(--light-secondary);
    font-style: italic;
}

.project-card-title {
    font-size: 0.975rem;
    font-weight: 700;
    color: var(--light-text);
    margin: 0;
    line-height: 1.3;
}

.project-card-desc {
    font-size: 0.825rem;
    color: var(--light-secondary);
    line-height: 1.6;
    margin: 0;
    flex: 1;
}

.project-card-desc code {
    background: var(--light-surface);
    border: 1px solid var(--light-border);
    border-radius: 3px;
    padding: 1px 5px;
    font-size: .82em;
    color: var(--light-text);
}

.project-skills {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-1);
    padding-top: var(--sp-3);
    border-top: 1px solid var(--light-border);
}

.project-skills span {
    display: inline-block;
    background: var(--light-surface);
    border: 1px solid var(--light-border);
    border-radius: 4px;
    padding: 2px 7px;
    font-size: 0.68rem;
    color: var(--light-secondary);
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

.btn-project-run {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    background: var(--run-bg);
    color: #fff;
    border: none;
    border-radius: var(--r-md);
    padding: var(--sp-2) var(--sp-4);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: auto;
    transition: background .15s;
    width: 100%;
    justify-content: center;
}

.btn-project-run:hover { background: var(--run-hover); }

.projects-note {
    text-align: center;
    font-size: 0.875rem;
    color: var(--light-secondary);
}

.projects-note a { color: var(--accent); font-weight: 600; }

@media (max-width: 1200px) { .projects-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px)  { .projects-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px)  { .projects-grid { grid-template-columns: 1fr; } }

/* ══════════════════════════════════════════════════════════════
   32. C vs C++ Section
   ══════════════════════════════════════════════════════════════ */

.cvcpp-section {
    background: var(--dark-bg);
    padding-left: var(--sp-4);
    padding-right: var(--sp-4);
}

.cvcpp-section .section-title  { color: #e6edf3; }
.cvcpp-section .section-subtitle { color: #8b949e; }

.cvcpp-layout {
    display: flex;
    flex-direction: column;
    gap: var(--sp-8);
}

/* ── Comparison table ────────────────────────────────────── */
.cvcpp-table-wrap {
    overflow-x: auto;
    border-radius: var(--r-lg);
    border: 1px solid #30363d;
}

.cvcpp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    background: #161b22;
}

.cvcpp-table thead tr { background: #1c2128; }

.cvcpp-table th {
    padding: var(--sp-3) var(--sp-5);
    text-align: left;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #8b949e;
    border-bottom: 1px solid #30363d;
    white-space: nowrap;
}

.cvcpp-table th:nth-child(2) { color: #58a6ff; }
.cvcpp-table th:nth-child(3) { color: #bc8cff; }

.cvcpp-table td {
    padding: var(--sp-3) var(--sp-5);
    border-bottom: 1px solid #21262d;
    color: #c9d1d9;
    vertical-align: middle;
}

.cvcpp-table tr:last-child td { border-bottom: none; }
.cvcpp-table tr:hover td     { background: #1c2128; }
.cvcpp-table td:first-child  { color: #8b949e; font-weight: 600; }

.cvcpp-yes { color: #3fb950; font-weight: 700; }
.cvcpp-no  { color: #f85149; font-weight: 700; }

/* ── Language cards ──────────────────────────────────────── */
.cvcpp-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-6);
}

.cvcpp-lang-card {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: var(--r-lg);
    padding: var(--sp-8);
    display: flex;
    flex-direction: column;
    gap: var(--sp-4);
    transition: border-color .2s;
}

.cvcpp-lang-card:hover { border-color: #58a6ff; }

.cvcpp-lang-card--c   { border-top: 3px solid #58a6ff; }
.cvcpp-lang-card--cpp { border-top: 3px solid #bc8cff; }

.cvcpp-lang-header {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
}

.cvcpp-lang-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: rgba(88,166,255,.15);
    border: 1px solid rgba(88,166,255,.3);
    color: #58a6ff;
    border-radius: var(--r-md);
    font-size: 0.8rem;
    font-weight: 800;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    flex-shrink: 0;
}

.cvcpp-lang-badge--cpp {
    background: rgba(188,140,255,.15);
    border-color: rgba(188,140,255,.3);
    color: #bc8cff;
}

.cvcpp-lang-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #e6edf3;
    margin: 0;
}

.cvcpp-lang-card p {
    font-size: 0.9rem !important;
    color: #8b949e !important;
    line-height: 1.7 !important;
    margin: 0 !important;
}

.cvcpp-try-link {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 700;
    color: #58a6ff;
    text-decoration: none;
    margin-top: auto;
    padding-top: var(--sp-4);
    border-top: 1px solid #30363d;
    transition: color .15s;
}

.cvcpp-try-link:hover { color: #e6edf3; }

/* ── Note box ────────────────────────────────────────────── */
.cvcpp-note {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: var(--r-md);
    padding: var(--sp-6) var(--sp-8);
    text-align: center;
    margin-top: var(--sp-6);
}

.cvcpp-note p {
    font-size: 0.9rem;
    color: #8b949e;
    margin: 0;
}

.cvcpp-note strong { color: #e6edf3; }

@media (max-width: 768px) {
    .cvcpp-cards { grid-template-columns: 1fr; }
    .cvcpp-section { padding-left: 0; padding-right: 0; }
    .cvcpp-lang-card { padding: var(--sp-6); }
    .cvcpp-table { font-size: 0.78rem; }
    .cvcpp-table th,
    .cvcpp-table td { padding: var(--sp-2) var(--sp-3); }
}

@media (max-width: 480px) {
    .audience-section { padding-left: 0; padding-right: 0; }
    .cvcpp-section    { padding-left: 0; padding-right: 0; }
    .cvcpp-table th:nth-child(1) { display: none; }
}

/* ══════════════════════════════════════════════════════════════
   33. Learning Resources Section
   ══════════════════════════════════════════════════════════════ */

.resources-section { background: var(--light-bg); }

.resources-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--sp-5);
}

.resource-card {
    display: flex;
    gap: var(--sp-4);
    background: var(--light-bg);
    border: 1px solid var(--light-border);
    border-radius: var(--r-lg);
    padding: var(--sp-5);
    text-decoration: none;
    transition: box-shadow .2s, border-color .2s, transform .2s;
    align-items: flex-start;
}

.resource-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,.07);
    border-color: var(--accent);
    transform: translateY(-2px);
}

.resource-card-icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    background: rgba(37,99,235,.08);
    border: 1px solid rgba(37,99,235,.15);
    border-radius: var(--r-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
}

.resource-card-body {
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
    flex: 1;
    min-width: 0;
}

.resource-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--light-text);
    margin: 0;
    line-height: 1.3;
}

.resource-card-desc {
    font-size: 0.815rem;
    color: var(--light-secondary);
    line-height: 1.6;
    margin: 0;
}

.resource-card-type {
    display: inline-block;
    background: var(--light-surface);
    border: 1px solid var(--light-border);
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--light-secondary);
    align-self: flex-start;
    margin-top: var(--sp-1);
}

@media (max-width: 1024px) { .resources-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .resources-grid { grid-template-columns: 1fr; } }
