/* How it Works + Callout */

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

.api-step {
    background: var(--bg-alt-light);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 1.5rem;
    position: relative;
}

.api-step-number {
    position: absolute;
    top: -10px;
    left: 1rem;
    background: var(--primary);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
}

.api-step h4 {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.api-step code {
    background: var(--bg-dark);
    color: var(--accent);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.75rem;
}

.api-step p {
    font-size: 0.85rem;
    color: var(--text-muted-light);
}

.callout {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 10px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.callout h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    color: var(--warning);
}

.callout-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    font-size: 0.9rem;
}

.callout-col h5 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    color: var(--text-muted-light);
}

.callout-col ul {
    list-style: none;
}

.callout-col li {
    padding: 0.2rem 0;
}

@media (prefers-color-scheme: dark) {
    .api-step p {
        color: var(--text-muted-dark);
    }

    .api-step {
        background: var(--bg-alt-dark);
        border-color: var(--border-dark);
    }

    .api-step code {
        background: #0f0f1a;
    }

    .callout {
        background: rgba(245, 158, 11, 0.15);
        border-color: rgba(245, 158, 11, 0.4);
    }

    .callout-col h5 {
        color: var(--text-muted-dark);
    }

    .callout-col li {
        color: var(--text-dark);
    }
}

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


/* Article Grid */

.articles {
    padding: 0 0 4rem;
}

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

.article-card {
    background: var(--bg-alt-light);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    position: relative;
}

.article-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.article-body h2 a {
    text-decoration: none;
    color: inherit;
}

.article-body h2 a::after {
    content: '';
    position: absolute;
    inset: 0;
}

.article-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, var(--primary), #818cf8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    flex-shrink: 0;
    overflow: hidden;
}

.article-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.8rem;
    color: var(--text-muted-light);
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.75rem;
}

.article-tag {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.75rem;
    text-decoration: none;
    position: relative;
    z-index: 1;
    transition: background 0.15s;
}

.article-tag:hover {
    background: rgba(99, 102, 241, 0.25);
}

.article-body h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    text-align: left;
}

.article-body p {
    font-size: 0.88rem;
    color: var(--text-muted-light);
    line-height: 1.6;
    flex: 1;
}

.article-read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--primary);
}

.article-read-more::after {
    content: "\2192";
    transition: transform 0.2s;
}

.article-card:hover .article-read-more::after {
    transform: translateX(3px);
}

/* Empty state */
.no-articles {
    text-align: center;
    padding: 4rem 0;
    color: var(--text-muted-light);
}

.no-articles p {
    font-size: 1rem;
}

@media (prefers-color-scheme: dark) {
    .article-card {
        background: var(--bg-alt-dark);
        border-color: var(--border-dark);
    }

    .article-card:hover {
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    }

    .article-meta {
        color: var(--text-muted-dark);
    }

    .article-tag {
        background: rgba(99, 102, 241, 0.2);
    }

    .article-tag:hover {
        background: rgba(99, 102, 241, 0.35);
    }

    .article-body h2,
    .article-body h2 a {
        color: var(--text-dark);
    }

    .article-body p {
        color: var(--text-muted-dark);
    }

    .no-articles {
        color: var(--text-muted-dark);
    }
}

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


/* Base: variables, reset, body, container, section, footer */

:root {
    --text-light: #1a1a2e;
    --text-muted-light: #4a4a6a;
    --bg-light: #ffffff;
    --bg-alt-light: #f8f9fc;
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --accent: #10b981;
    --warning: #f59e0b;
    --border-light: #e5e7eb;

    --text-dark: #e5e7eb;
    --text-muted-dark: #b8bcc4;
    --bg-dark: #0f0f1a;
    --bg-alt-dark: #1a1a2e;
    --border-dark: #374151;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

section {
    padding: 4rem 0;
}

section h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: center;
}

section .section-desc {
    text-align: center;
    color: var(--text-muted-light);
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

footer {
    background: var(--bg-alt-light);
    border-top: 1px solid var(--border-light);
    padding: 2rem 0;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted-light);
}

footer a {
    color: inherit;
    text-decoration: none;
}

footer a:hover {
    color: var(--primary);
}

.section-desc code,
.faq-item code {
    background: var(--bg-alt-light);
    color: #6366f1;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-size: 0.85em;
    border: 1px solid var(--border-light);
}

@media (prefers-color-scheme: dark) {
    body {
        color: var(--text-dark);
        background: var(--bg-dark);
    }

    .section-desc {
        color: var(--text-muted-dark);
    }

    footer {
        color: var(--text-muted-dark);
        background: var(--bg-alt-dark);
        border-color: var(--border-dark);
    }

    section[style*="background"] {
        background: var(--bg-alt-dark) !important;
    }

    .section-desc code,
    .faq-item code {
        background: var(--bg-alt-dark);
        color: var(--accent);
        border-color: var(--border-dark);
    }
}

@media (max-width: 768px) {
    section {
        padding: 3rem 0;
    }
}


/* Blog Header / Nav */

.blog-header {
    background: var(--bg-alt-light);
    border-bottom: 1px solid var(--border-light);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.blog-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.blog-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.blog-header-left img {
    height: 32px;
}

.blog-header-left a {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.blog-header-left span {
    font-weight: 600;
    font-size: 1.1rem;
}

.blog-header-left .sep {
    color: var(--border-light);
    font-weight: 300;
    font-size: 1.25rem;
}

.blog-header-left .blog-label {
    color: var(--text-muted-light);
    font-weight: 500;
    font-size: 0.95rem;
}

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

.blog-header nav a:hover {
    color: var(--primary);
}

.header-search {
    display: flex;
}

.header-search input {
    padding: 0.4rem 0.75rem;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    font-size: 0.85rem;
    background: var(--bg-alt-light);
    color: inherit;
    outline: none;
    width: 180px;
    transition: border-color 0.15s, width 0.2s;
}

.header-search input:focus {
    border-color: var(--primary);
    width: 240px;
}

@media (prefers-color-scheme: dark) {
    .blog-header {
        background: var(--bg-alt-dark);
        border-color: var(--border-dark);
    }

    .blog-header-left .sep {
        color: var(--border-dark);
    }

    .blog-header-left .blog-label {
        color: var(--text-muted-dark);
    }

    .blog-header-left span {
        color: var(--text-dark);
    }

    .blog-header nav a {
        color: var(--text-muted-dark);
    }

    .header-search input {
        background: var(--bg-alt-dark);
        border-color: var(--border-dark);
        color: var(--text-dark);
    }
}


/* Blog Hero + Tag Filter + Featured Article */

.blog-hero {
    padding: 3rem 0 2rem;
    text-align: center;
}

.blog-hero h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.blog-hero p {
    color: var(--text-muted-light);
    font-size: 1.1rem;
    max-width: 550px;
    margin: 0 auto;
}

.tag-filter {
    padding: 0 0 1.5rem;
}

.tag-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.tag-pill {
    display: inline-block;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid var(--primary);
    color: var(--primary);
    background: transparent;
    transition: background 0.15s, color 0.15s;
}

.tag-pill:hover {
    background: rgba(99, 102, 241, 0.08);
}

.tag-pill.active {
    background: var(--primary);
    color: #fff;
}

.tag-pill.active:hover {
    background: #4f46e5;
}

.tag-pill.clear {
    border-color: var(--text-muted-light);
    color: var(--text-muted-light);
}

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

.article-card.featured {
    grid-column: 1 / -1;
    flex-direction: row;
}

.article-card.featured .article-thumb {
    width: 45%;
    aspect-ratio: auto;
    min-height: 240px;
}

.article-card.featured .article-body {
    padding: 1.75rem;
    justify-content: center;
}

.article-card.featured .article-body h2 {
    font-size: 1.35rem;
}

.article-card.featured .article-body p {
    font-size: 0.95rem;
}

@media (prefers-color-scheme: dark) {
    .blog-hero h1 {
        color: var(--text-dark);
    }

    .blog-hero p {
        color: var(--text-muted-dark);
    }

    .tag-pill.clear {
        border-color: var(--text-muted-dark);
        color: var(--text-muted-dark);
    }
}

@media (max-width: 768px) {
    .blog-hero h1 {
        font-size: 1.5rem;
    }

    .article-card.featured {
        flex-direction: column;
    }

    .article-card.featured .article-thumb {
        width: 100%;
        aspect-ratio: 16 / 9;
        min-height: auto;
    }
}


/* Comparison Table */

.comparison {
    overflow-x: auto;
}

.comparison table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.comparison th, .comparison td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.comparison th {
    background: var(--bg-alt-light);
    font-weight: 600;
}

.comparison .check {
    color: var(--accent);
}

.comparison .partial {
    color: var(--warning);
}

.comparison .cross {
    color: #ef4444;
}

.comparison .highlight {
    background: rgba(99, 102, 241, 0.05);
}

@media (prefers-color-scheme: dark) {
    .comparison th {
        background: var(--bg-alt-dark);
    }

    .comparison th,
    .comparison td {
        border-color: var(--border-dark);
    }

    .comparison .highlight {
        background: rgba(99, 102, 241, 0.15);
    }

    .comparison tbody tr:hover {
        background: rgba(255, 255, 255, 0.02);
    }
}


/* Glossary + Scenarios */

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

.glossary-item {
    padding: 1rem;
    background: var(--bg-alt-light);
    border-radius: 8px;
    border-left: 3px solid var(--primary);
}

.glossary-item dt {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.glossary-item dd {
    font-size: 0.85rem;
    color: var(--text-muted-light);
}

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

.scenario {
    border: 1px solid var(--border-light);
    border-radius: 12px;
    overflow: hidden;
}

.scenario-header {
    background: var(--bg-alt-light);
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-light);
}

.scenario-header h4 {
    font-size: 1rem;
}

.scenario-body {
    padding: 1.25rem;
}

.scenario-body p {
    font-size: 0.9rem;
    color: var(--text-muted-light);
    margin-bottom: 1rem;
}

.scenario-benefit {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 500;
}

@media (prefers-color-scheme: dark) {
    .glossary-item dd,
    .scenario-body p {
        color: var(--text-muted-dark);
    }

    .glossary-item,
    .scenario-header {
        background: var(--bg-alt-dark);
    }

    .scenario,
    .scenario-header {
        border-color: var(--border-dark);
    }

    .glossary-item {
        border-left-color: var(--primary);
    }

    .scenario-body {
        background: var(--bg-dark);
    }
}


/* Error Page */

.error-page {
    padding: 6rem 0;
    text-align: center;
}

.error-page-code {
    font-size: 6rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
    background: linear-gradient(135deg, var(--primary), #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.error-page h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.error-page p {
    color: var(--text-muted-light);
    font-size: 1rem;
    margin-bottom: 2rem;
}

.error-page-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.error-page-link {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    background: var(--primary);
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: background 0.15s;
}

.error-page-link:hover {
    background: #4f46e5;
}

@media (prefers-color-scheme: dark) {
    .error-page h1 {
        color: var(--text-dark);
    }

    .error-page p {
        color: var(--text-muted-dark);
    }
}


/* FAQ */

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid var(--border-light);
    padding: 1.25rem 0;
}

.faq-item summary {
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-item summary::after {
    content: "+";
    font-size: 1.25rem;
    color: var(--text-muted-light);
}

.faq-item[open] summary::after {
    content: "-";
}

.faq-item p {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-muted-light);
}

@media (prefers-color-scheme: dark) {
    .faq-item p,
    .faq-item summary::after {
        color: var(--text-muted-dark);
    }

    .faq-item {
        border-color: var(--border-dark);
    }

    .faq-item summary {
        color: var(--text-dark);
    }
}


/* Hero section + Not-a bar */

.hero {
    padding: 4rem 0 3rem;
    text-align: center;
}

.hero-logo {
    height: 120px;
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.hero .tagline {
    font-size: 1.25rem;
    color: var(--text-muted-light);
    max-width: 650px;
    margin: 0 auto 2rem;
}

.hero-bullets {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.hero-bullet {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: var(--text-muted-light);
}

.hero-bullet .icon {
    color: var(--accent);
    font-weight: bold;
}

.cta-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.cta-primary {
    background: var(--primary);
    color: white;
}

.cta-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.cta-secondary {
    background: transparent;
    color: var(--text-light);
    border: 2px solid var(--border-light);
}

.cta-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.not-a {
    background: var(--bg-alt-light);
    padding: 1.5rem 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}

.not-a-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    font-size: 0.9rem;
    color: var(--text-muted-light);
}

.not-a-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.not-a-item .x {
    color: #ef4444;
    font-weight: bold;
}

.not-a-item .check {
    color: #22c55e;
    font-weight: bold;
}

@media (prefers-color-scheme: dark) {
    .hero .tagline,
    .hero-bullet,
    .not-a-content {
        color: var(--text-muted-dark);
    }

    .cta-secondary {
        color: var(--text-dark);
        border-color: var(--border-dark);
    }

    .cta-secondary:hover {
        border-color: var(--primary);
        color: var(--primary);
    }

    .not-a {
        background: var(--bg-alt-dark);
        border-color: var(--border-dark);
    }

    .hero-logo {
        filter: brightness(1.1);
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 1.75rem;
    }

    .hero-bullets {
        flex-direction: column;
        gap: 0.75rem;
    }
}


/* Modal */

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg-light);
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
}

.modal-header .use-case-icon {
    width: 48px;
    height: 48px;
    font-size: 1.5rem;
}

.modal-header h3 {
    font-size: 1.25rem;
    margin: 0;
}

.modal-close {
    margin-left: auto;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted-light);
    padding: 0.25rem;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-light);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.modal-body h4 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted-light);
    margin: 0 0 0.75rem 0;
}

.modal-body p {
    margin: 0 0 1.5rem 0;
    line-height: 1.7;
}

.modal-body ul {
    margin: 0 0 1.5rem 0;
    padding-left: 1.25rem;
}

.modal-body li {
    margin-bottom: 0.5rem;
    color: var(--text-muted-light);
}

.modal-body .outcome {
    margin-bottom: 0;
}

.editor-modal {
    max-width: 900px;
    height: 80vh;
    display: flex;
    flex-direction: column;
}

.editor-modal .modal-body {
    flex: 1;
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.editor-modal textarea {
    flex: 1;
    width: 100%;
    border: none;
    outline: none;
    resize: none;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Consolas', monospace;
    font-size: 14px;
    line-height: 1.5;
    padding: 1rem;
    background: var(--bg-light);
    color: var(--text-light);
    box-sizing: border-box;
}

.editor-modal textarea::placeholder {
    color: var(--text-muted-light);
}

@media (prefers-color-scheme: dark) {
    .modal {
        background: var(--bg-dark);
    }

    .modal-header {
        border-color: var(--border-dark);
    }

    .modal-header h3 {
        color: var(--text-dark);
    }

    .modal-close {
        color: var(--text-muted-dark);
    }

    .modal-close:hover {
        color: var(--text-dark);
    }

    .modal-body h4 {
        color: var(--text-muted-dark);
    }

    .modal-body p {
        color: var(--text-dark);
    }

    .modal-body li {
        color: var(--text-muted-dark);
    }

    .editor-modal textarea {
        background: var(--bg-dark);
        color: var(--text-dark);
    }
}


/* Post Layout + Content */

.post-hero {
    padding: 3rem 0 1.5rem;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 2rem;
}

.post-hero .container {
    max-width: 720px;
}

.post-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted-light);
}

.post-tag {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.75rem;
}

.post-hero h1 {
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

.post-authors {
    font-size: 0.9rem;
    color: var(--text-muted-light);
}

.post-authors strong {
    color: inherit;
    font-weight: 600;
}

.post-hero-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 12px;
    margin-top: 1.5rem;
}

/* Post Content */
.post-content {
    padding: 0 0 4rem;
}

.post-content .container {
    max-width: 720px;
}

.post-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 2rem 0 0.75rem;
    letter-spacing: -0.01em;
}

.post-content h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 1.75rem 0 0.5rem;
}

.post-content p {
    font-size: 1rem;
    line-height: 1.75;
    margin-bottom: 1.25rem;
    color: var(--text-muted-light);
}

.post-content a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.post-content a:hover {
    text-decoration-thickness: 2px;
}

.post-content ul, .post-content ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

.post-content li {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--text-muted-light);
    margin-bottom: 0.35rem;
}

.post-content blockquote {
    border-left: 3px solid var(--primary);
    margin: 1.5rem 0;
    padding: 0.5rem 1.25rem;
    background: rgba(99, 102, 241, 0.04);
    border-radius: 0 8px 8px 0;
}

.post-content blockquote p {
    margin-bottom: 0;
}

.post-content pre {
    position: relative;
    background: none;
    border: none;
    border-radius: 8px;
    padding: 0;
    overflow-x: auto;
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
    line-height: 1.6;
}

.post-content pre code {
    display: block;
    border-radius: 8px;
    padding: 1rem 1.25rem;
}

.post-content pre code:not(.hljs) {
    background: var(--bg-alt-light);
    border: 1px solid var(--border-light);
}

.copy-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.6);
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
}

.post-content pre:hover .copy-btn {
    opacity: 1;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
}

.post-content code {
    font-family: "SF Mono", "Fira Code", "Fira Mono", monospace;
    font-size: 0.875em;
}

.post-content p code {
    background: var(--bg-alt-light);
    border: 1px solid var(--border-light);
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}

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

/* Post Back Link */
.post-back {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--primary);
    text-decoration: none;
}

.post-back::before {
    content: "\2190";
}

.post-back:hover {
    text-decoration: underline;
    text-underline-offset: 2px;
}

@media (prefers-color-scheme: dark) {
    .post-hero {
        border-color: var(--border-dark);
    }

    .post-hero h1 {
        color: var(--text-dark);
    }

    .post-meta, .post-authors {
        color: var(--text-muted-dark);
    }

    .post-tag {
        background: rgba(99, 102, 241, 0.2);
    }

    .post-content p, .post-content li {
        color: var(--text-muted-dark);
    }

    .post-content h2, .post-content h3 {
        color: var(--text-dark);
    }

    .post-content pre code:not(.hljs) {
        background: var(--bg-alt-dark);
        border-color: var(--border-dark);
    }

    .post-content p code {
        background: var(--bg-alt-dark);
        border-color: var(--border-dark);
    }

    .post-content blockquote {
        background: rgba(99, 102, 241, 0.08);
    }

    .post-content hr {
        border-color: var(--border-dark);
    }
}

@media (max-width: 768px) {
    .post-hero h1 {
        font-size: 1.6rem;
    }
}


/* Search */

.search-hero {
    padding: 2.5rem 0 1.5rem;
    text-align: center;
}

.search-hero h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.search-form {
    max-width: 480px;
    margin: 0 auto;
    display: flex;
    gap: 0.5rem;
}

.search-form input {
    flex: 1;
    padding: 0.6rem 1rem;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    font-size: 0.95rem;
    background: var(--bg-alt-light);
    color: inherit;
    outline: none;
    transition: border-color 0.15s;
}

.search-form input:focus {
    border-color: var(--primary);
}

.search-form button {
    padding: 0.6rem 1.25rem;
    border: none;
    border-radius: 8px;
    background: var(--primary);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
}

.search-form button:hover {
    background: #4f46e5;
}

.search-meta {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted-light);
}

mark {
    background: rgba(99, 102, 241, 0.15);
    color: inherit;
    padding: 0.05rem 0.15rem;
    border-radius: 2px;
}

@media (prefers-color-scheme: dark) {
    .search-hero h1 {
        color: var(--text-dark);
    }

    .search-form input {
        background: var(--bg-alt-dark);
        border-color: var(--border-dark);
        color: var(--text-dark);
    }

    .search-meta {
        color: var(--text-muted-dark);
    }

    mark {
        background: rgba(99, 102, 241, 0.3);
    }
}

@media (max-width: 768px) {
    .search-hero h1 {
        font-size: 1.25rem;
    }

    .search-form {
        flex-direction: column;
    }
}


/* Security Section */

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

.security-card {
    background: var(--bg-alt-light);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 1.5rem;
}

.security-card h4 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.security-card ul {
    list-style: none;
    font-size: 0.9rem;
    color: var(--text-muted-light);
}

.security-card li {
    padding: 0.3rem 0;
    padding-left: 1.25rem;
    position: relative;
}

.security-card li::before {
    content: ">";
    position: absolute;
    left: 0;
    color: var(--accent);
}

@media (prefers-color-scheme: dark) {
    .security-card ul {
        color: var(--text-muted-dark);
    }

    .security-card {
        background: var(--bg-alt-dark);
        border-color: var(--border-dark);
    }

    .security-card li::before {
        color: var(--accent);
    }
}


/* Shell Demo + Terminal Themes */

.shell-section {
    background: var(--bg-alt-light);
    padding: 3rem 0;
}

.shell-wrapper {
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.shell-header {
    background: #2d2d44;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.shell-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.1s, opacity 0.2s;
}

.shell-dot:hover {
    transform: scale(1.15);
}

.shell-dot.red { background: #ff5f56; }
.shell-dot.yellow { background: #ffbd2e; }
.shell-dot.green { background: #27ca40; }

.shell-title {
    flex: 1;
    text-align: center;
    color: #9ca3af;
    font-size: 0.85rem;
}

.theme-label {
    color: #6b7280;
    font-size: 0.75rem;
    margin-left: 1rem;
}

.theme-selector {
    background: #1a1a2e;
    color: #9ca3af;
    border: 1px solid #374151;
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    cursor: pointer;
    outline: none;
    margin-left: 0.25rem;
}

.theme-selector:hover {
    border-color: #6366f1;
}

.theme-selector:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.theme-selector option {
    background: #1a1a2e;
    color: #e5e7eb;
}

#shell {
    height: 80vh;
    min-height: 400px;
    background: #000;
    overflow: hidden;
}

/* Ensure jsShell fills the container and handles scrolling */
#shell .jsShell {
    height: 100% !important;
    max-height: 100% !important;
    box-sizing: border-box;
    overflow-y: auto !important;
    user-select: text !important;
    -webkit-user-select: text !important;
    cursor: text;
}

.shell-wrapper.maximized {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    border-radius: 0;
    margin: 0;
}

.shell-wrapper.maximized #shell {
    height: calc(100vh - 44px) !important;
    max-height: calc(100vh - 44px) !important;
    min-height: calc(100vh - 44px);
}

.shell-hint {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted-light);
    margin-top: 1rem;
    opacity: 0.7;
}

.shell-hint kbd {
    background: var(--bg-alt-light);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    padding: 0.15rem 0.4rem;
    font-family: inherit;
    font-size: 0.75rem;
}

.shell-reopen {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    background: var(--bg-alt-light);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    text-align: center;
}

.shell-reopen p {
    color: var(--text-muted-light);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.shell-reopen button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.shell-reopen button:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

/* Shell page header */
.shell-page-header {
    background: var(--bg-alt-light);
    border-bottom: 1px solid var(--border-light);
    padding: 1rem 0;
}

.shell-page-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.shell-page-header a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.shell-page-header a:hover {
    text-decoration: underline;
}

.shell-page-header h1 {
    font-size: 1.25rem;
    font-weight: 600;
}

/* Terminal Color Themes */
.jsShell {
    --terminal-bg: #000000;
    --terminal-fg: #ffffff;
    --terminal-cursor: #ffffff;
    background: var(--terminal-bg) !important;
    color: var(--terminal-fg) !important;
}

.jsShell .cursor {
    background: var(--terminal-cursor) !important;
    color: var(--terminal-cursor) !important;
}

.jsShell input {
    caret-color: var(--terminal-cursor) !important;
}

/* Theme: Default */
.jsShell.theme-default {
    --terminal-bg: #000000;
    --terminal-fg: #ffffff;
    --terminal-cursor: #ffffff;
}

/* Theme: Dracula */
.jsShell.theme-dracula {
    --terminal-bg: #282a36;
    --terminal-fg: #f8f8f2;
    --terminal-cursor: #f8f8f2;
}

/* Theme: Solarized Dark */
.jsShell.theme-solarized-dark {
    --terminal-bg: #002b36;
    --terminal-fg: #839496;
    --terminal-cursor: #839496;
}

/* Theme: Solarized Light */
.jsShell.theme-solarized-light {
    --terminal-bg: #fdf6e3;
    --terminal-fg: #657b83;
    --terminal-cursor: #657b83;
}

/* Theme: Monokai */
.jsShell.theme-monokai {
    --terminal-bg: #272822;
    --terminal-fg: #f8f8f2;
    --terminal-cursor: #f8f8f0;
}

/* Theme: Nord */
.jsShell.theme-nord {
    --terminal-bg: #2e3440;
    --terminal-fg: #d8dee9;
    --terminal-cursor: #d8dee9;
}

/* Theme: Gruvbox Dark */
.jsShell.theme-gruvbox-dark {
    --terminal-bg: #282828;
    --terminal-fg: #ebdbb2;
    --terminal-cursor: #ebdbb2;
}

/* Theme: One Dark */
.jsShell.theme-one-dark {
    --terminal-bg: #282c34;
    --terminal-fg: #abb2bf;
    --terminal-cursor: #528bff;
}

/* Theme: Tokyo Night */
.jsShell.theme-tokyo-night {
    --terminal-bg: #1a1b26;
    --terminal-fg: #a9b1d6;
    --terminal-cursor: #c0caf5;
}

/* Theme: Catppuccin Mocha */
.jsShell.theme-catppuccin {
    --terminal-bg: #1e1e2e;
    --terminal-fg: #cdd6f4;
    --terminal-cursor: #f5e0dc;
}

@media (prefers-color-scheme: dark) {
    .shell-section,
    .shell-reopen,
    .shell-page-header {
        background: var(--bg-alt-dark);
    }

    .shell-reopen,
    .shell-page-header {
        border-color: var(--border-dark);
    }

    .shell-hint {
        color: var(--text-muted-dark);
    }

    .shell-hint kbd {
        background: var(--bg-alt-dark);
        border-color: var(--border-dark);
        color: var(--text-dark);
    }

    .shell-reopen p {
        color: var(--text-muted-dark);
    }

    .shell-page-header h1 {
        color: var(--text-dark);
    }
}


/* Use Cases Grid */

.use-cases {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.use-case {
    background: var(--bg-alt-light);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 1.75rem;
}

.use-case-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.use-case-icon {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.use-case h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.use-case .problem {
    color: var(--text-muted-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.use-case .outcome {
    background: rgba(16, 185, 129, 0.1);
    border-left: 3px solid var(--accent);
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    border-radius: 0 6px 6px 0;
}

.use-case .problem a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.use-case .problem a:hover {
    text-decoration: underline;
}

@media (prefers-color-scheme: dark) {
    .use-case .problem {
        color: var(--text-muted-dark);
    }

    .use-case {
        background: var(--bg-alt-dark);
        border-color: var(--border-dark);
    }

    .use-case .outcome {
        background: rgba(16, 185, 129, 0.15);
    }
}


