/* ==========================================================================
   kuhn-labs / blog · design tokens
   ========================================================================== */

:root {
    /* Surfaces */
    --bg: #0A0F17;
    --panel: #0E1723;
    --panel-2: #121C2B;
    --panel-hi: #17212F;
    --border: #1E2A3C;
    --border-soft: #141F2E;
    --divider: rgba(232, 237, 243, 0.06);

    /* Type */
    --text: #E8EDF3;
    --text-dim: #8593A3;
    --text-muted: #5A6775;
    --text-faint: #3F4B5A;

    /* Accent + status */
    --accent: #6BA4F8;
    --accent-hi: #8BB8FB;
    --accent-dim: rgba(107, 164, 248, 0.16);
    --accent-line: rgba(107, 164, 248, 0.32);
    --green: #3EE8A4;
    --amber: #F5A623;
    --violet: #A78BFA;
    --red: #F77171;

    /* Category mapping (Tanzu = green, Homelab = violet) */
    --cat-tas: var(--green);
    --cat-tas-bg: rgba(62, 232, 164, 0.10);
    --cat-tas-border: rgba(62, 232, 164, 0.28);
    --cat-homelab: var(--violet);
    --cat-homelab-bg: rgba(167, 139, 250, 0.10);
    --cat-homelab-border: rgba(167, 139, 250, 0.30);

    /* Type stack */
    --font-sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'IBM Plex Mono', 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;

    /* Geometry */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --container-max: 1320px;
    --container-narrow: 760px;
    --header-height: 72px;

    /* Motion */
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --transition: 200ms ease;
}

/* ==========================================================================
   Reset + base
   ========================================================================== */

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

html { scroll-behavior: smooth; }

html, body { background: var(--bg); color: var(--text); min-height: 100%; }

body {
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.55;
    font-feature-settings: "ss01", "cv11";
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

/* Background texture — subtle 48px grid + radial accent glow */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.013) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.013) 1px, transparent 1px);
    background-size: 48px 48px;
    z-index: 0;
}

body::after {
    content: '';
    position: fixed;
    top: -30%;
    left: -10%;
    right: -10%;
    height: 80vh;
    background: radial-gradient(ellipse at 50% 0%, rgba(107, 164, 248, 0.12), transparent 60%);
    pointer-events: none;
    z-index: 0;
}

main { flex: 1; position: relative; z-index: 1; }

a { color: inherit; text-decoration: none; transition: color var(--transition); }

img, svg { display: block; max-width: 100%; }

em, i { font-style: normal; font-weight: 500; }

/* ==========================================================================
   Layout
   ========================================================================== */

.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 36px;
    position: relative;
    z-index: 1;
}

.container-narrow { max-width: var(--container-narrow); }

/* ==========================================================================
   Site header
   ========================================================================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(14px);
    background: rgba(10, 15, 23, 0.72);
    border-bottom: 1px solid var(--border-soft);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
}

.brand-mark {
    width: 38px;
    height: 38px;
    background: url('../images/brand/kuhn-labs-mark.svg') center / contain no-repeat;
    color: transparent;
    border-radius: 10px;
    overflow: hidden;
    text-indent: -9999px;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.08) inset,
        0 10px 24px rgba(107, 164, 248, 0.20),
        0 0 22px rgba(62, 232, 164, 0.10);
}

.brand-name {
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.01em;
}

.brand-name .dim {
    color: var(--text-muted);
    font-weight: 400;
    margin-left: 6px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-left: auto;
}

.main-nav ul {
    display: flex;
    gap: 6px;
    list-style: none;
}

.main-nav a {
    display: inline-block;
    font-size: 13px;
    color: var(--text-dim);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    transition: color var(--transition), background var(--transition);
}

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

.main-nav a.active {
    color: var(--text);
    background: var(--panel-hi);
}

.nav-social-icons {
    display: flex;
    align-items: center;
    gap: 4px;
    padding-left: 16px;
    border-left: 1px solid var(--border-soft);
    margin-left: 4px;
}

.nav-social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    transition: color var(--transition), background var(--transition);
}

.nav-social-icons a:hover {
    color: var(--accent);
    background: var(--panel-hi);
}

.nav-social-icons svg { width: 16px; height: 16px; }

.header-actions { display: flex; align-items: center; gap: 8px; }

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    padding: 8px;
    background: transparent;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.mobile-menu-toggle span {
    display: block;
    width: 100%;
    height: 1.5px;
    background: var(--text-dim);
    border-radius: 2px;
    transition: transform var(--transition), opacity var(--transition);
}

.mobile-menu-toggle.active span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.mobile-menu-toggle.active span:nth-child(2) { opacity: 0; }
.mobile-menu-toggle.active span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ==========================================================================
   Hero (index)
   ========================================================================== */

.hero {
    position: relative;
    z-index: 1;
    padding: 56px 0 48px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 56px;
    align-items: start;
}

.hero-left { min-width: 0; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 500;
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(14, 23, 35, 0.6);
    backdrop-filter: blur(8px);
    margin-bottom: 22px;
}

.eyebrow .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 10px var(--green);
}

.hero-title {
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 44px;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--text);
    margin-bottom: 18px;
}

.hero-title em { color: var(--accent); font-weight: 500; }

.hero-sub {
    font-size: 17px;
    line-height: 1.6;
    color: var(--text-dim);
    max-width: 56ch;
    margin-bottom: 32px;
}

.hero-sub strong { color: var(--text); font-weight: 500; }

.cta-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.btn {
    font-family: inherit;
    font-size: 13px;
    letter-spacing: 0.01em;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-dim);
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    min-height: 42px;
    text-decoration: none;
}

.btn:hover {
    border-color: var(--text-dim);
    color: var(--text);
    background: var(--panel-hi);
}

.btn.primary {
    background: var(--accent);
    color: var(--bg);
    border-color: var(--accent);
    font-weight: 600;
    box-shadow: 0 10px 24px rgba(107, 164, 248, 0.22);
}

.btn.primary:hover {
    background: var(--accent-hi);
    border-color: var(--accent-hi);
    transform: translateY(-1px);
    box-shadow: 0 14px 32px rgba(107, 164, 248, 0.30);
}

.btn .arrow { font-size: 15px; }
.btn.primary .arrow { color: var(--bg); }

.features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.feat {
    font-size: 11px;
    letter-spacing: 0.04em;
    color: var(--text-dim);
    padding: 7px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-soft);
    background: rgba(14, 23, 35, 0.5);
}

.feat .k { color: var(--accent); font-weight: 500; margin-right: 4px; }

/* Hero right — recent log panel */
.hero-right { position: relative; }

.recent-card {
    background:
        linear-gradient(135deg, rgba(107, 164, 248, 0.05), transparent 34%),
        var(--panel);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: 24px 26px;
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(4px);
}

.recent-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--divider);
}

.recent-title {
    font-size: 11.5px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text);
    font-weight: 600;
}

.recent-status {
    font-size: 11.5px;
    color: var(--green);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    letter-spacing: 0.04em;
}

.recent-status::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 10px var(--green);
    animation: pulse 2s infinite;
}

@keyframes pulse { 50% { opacity: 0.4; } }

.recent-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 13px 0;
    border-bottom: 1px solid var(--border-soft);
    text-decoration: none;
    color: inherit;
    transition: padding var(--transition);
}

.recent-row:last-child { border-bottom: none; }
.recent-row:hover { padding-left: 4px; }

.recent-more {
    display: none;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    padding: 11px 0 2px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
}

.recent-num {
    font-family: var(--font-sans);
    font-variant-numeric: tabular-nums;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
    min-width: 22px;
    padding-top: 2px;
}

.recent-body { flex: 1; min-width: 0; }

.recent-meta {
    font-size: 10.5px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 4px;
}

.recent-text {
    font-size: 14px;
    color: var(--text);
    line-height: 1.45;
    transition: color var(--transition);
}

.recent-row:hover .recent-text { color: var(--accent); }

.recent-tag {
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 3px 7px;
    border-radius: 4px;
    font-weight: 600;
    white-space: nowrap;
    margin-top: 4px;
    display: inline-block;
}

.recent-tag.tas {
    background: var(--cat-tas-bg);
    color: var(--cat-tas);
    border: 1px solid var(--cat-tas-border);
}

.recent-tag.homelab {
    background: var(--cat-homelab-bg);
    color: var(--cat-homelab);
    border: 1px solid var(--cat-homelab-border);
}

/* ==========================================================================
   Posts section (index)
   ========================================================================== */

.posts-section {
    padding: 16px 0 96px;
    position: relative;
    z-index: 1;
}

#posts-heading {
    scroll-margin-top: 92px;
}

.collection-page {
    padding: 56px 0 96px;
    position: relative;
    z-index: 1;
}

.collection-header {
    max-width: 780px;
    margin-bottom: 34px;
}

.collection-header h1 {
    margin: 0 0 14px;
    font-size: 42px;
    line-height: 1.1;
    font-weight: 500;
    letter-spacing: -0.02em;
}

.collection-header p {
    max-width: 64ch;
    margin: 0 0 22px;
    color: var(--text-dim);
    font-size: 16px;
    line-height: 1.65;
}

.collection-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.collection-grid {
    margin-top: 6px;
}

.section-header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border-soft);
}

.section-header h2 {
    font-size: 22px;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--text);
}

.section-header h2 .count {
    color: var(--text-muted);
    font-weight: 400;
    margin-left: 10px;
    font-variant-numeric: tabular-nums;
}

.posts-section .section-header {
    flex-direction: column;
    align-items: flex-start;
}

.post-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    margin-top: 2px;
}

.post-search {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: min(420px, 100%);
    min-height: 34px;
    padding: 0 11px;
    color: var(--text-dim);
    background: rgba(14, 23, 35, 0.62);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm);
    transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.post-search:focus-within {
    border-color: var(--accent-line);
    background: var(--panel-hi);
    box-shadow: 0 0 0 3px rgba(107, 164, 248, 0.10);
}

.post-search-label {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
}

.post-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 13px;
}

.post-search input::placeholder {
    color: var(--text-muted);
}

.search-status {
    min-height: 18px;
    margin: -8px 0 20px;
    font-size: 12px;
    color: var(--text-muted);
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-weight: 500;
    color: var(--text-dim);
    background: rgba(14, 23, 35, 0.5);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm);
    padding: 7px 12px;
    cursor: pointer;
    transition: all var(--transition);
}

.tag:hover {
    color: var(--text);
    border-color: var(--border);
    background: var(--panel-hi);
}

.tag.active {
    color: var(--accent);
    border-color: var(--accent-line);
    background: var(--accent-dim);
}

.tag .k { color: var(--accent); font-weight: 500; }

/* Posts grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

.post-card {
    background: var(--panel);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    border-color: var(--accent-line);
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.30);
}

.post-card-image {
    aspect-ratio: 16 / 9;
    display: block;
    overflow: hidden;
    background: var(--panel-2);
    border-bottom: 1px solid var(--border-soft);
    position: relative;
}

.post-card-image:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}

.post-card-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(10, 15, 23, 0.55) 100%);
    pointer-events: none;
}

.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 600ms var(--ease-out);
}

.post-card:hover .post-card-image img { transform: scale(1.04); }

.post-card-content {
    padding: 20px 22px 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.post-category {
    align-self: flex-start;
    font-size: 9.5px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 600;
    border: 1px solid var(--cat-tas-border);
    background: var(--cat-tas-bg);
    color: var(--cat-tas);
}

.post-card[data-category="homelab"] .post-category {
    border-color: var(--cat-homelab-border);
    background: var(--cat-homelab-bg);
    color: var(--cat-homelab);
}

.post-card h3 {
    font-size: 17px;
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: var(--text);
}

.post-card h3 a { color: inherit; }
.post-card:hover h3 a { color: var(--accent-hi); }

.post-card p {
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--text-dim);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-meta {
    margin-top: auto;
    padding-top: 8px;
    display: flex;
    gap: 14px;
    align-items: center;
    font-size: 11.5px;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}

.post-meta time::before { content: '· '; opacity: 0; }
.post-meta .read-time::before {
    content: '·';
    margin-right: 10px;
    color: var(--text-faint);
}

/* ==========================================================================
   Single post page
   ========================================================================== */

.post {
    padding: 56px 0 80px;
    position: relative;
    z-index: 1;
}

.post .container { max-width: var(--container-narrow); }

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 28px;
    transition: color var(--transition);
}

.back-link:hover { color: var(--accent); }

.post-header { margin-bottom: 32px; }

.post-meta-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
    font-size: 11.5px;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.post-meta-top .post-category {
    font-size: 9.5px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.post-header h1 {
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 42px;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--text);
    margin-bottom: 18px;
}

.post-excerpt {
    font-size: 17px;
    line-height: 1.55;
    color: var(--text-dim);
    max-width: 64ch;
}

.post-featured-image {
    margin: 32px 0 36px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-soft);
    background: var(--panel);
    aspect-ratio: 16 / 9;
}

.post-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-embed {
    margin: 28px 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-soft);
}

.video-embed iframe {
    width: 100%;
    min-height: 420px;
    border: none;
    display: block;
}

/* Post body typography */
.post-content {
    font-size: 16.5px;
    line-height: 1.75;
    color: var(--text);
}

.post-content p {
    margin: 0 0 22px;
    color: var(--text);
}

.post-content p strong { color: var(--text); font-weight: 600; }
.post-content em { color: var(--accent); font-style: normal; font-weight: 500; }
.post-content a { color: var(--accent); border-bottom: 1px solid var(--accent-line); }
.post-content a:hover { color: var(--accent-hi); border-bottom-color: var(--accent-hi); }

.post-toc,
.post-callout {
    margin: 28px 0;
    padding: 18px 20px;
    border: 1px solid rgba(107, 164, 248, 0.22);
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, rgba(18, 28, 43, 0.78), rgba(11, 18, 29, 0.72));
}

.post-toc-title,
.post-callout-title {
    margin: 0 0 10px;
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.post-toc ol {
    margin: 0;
    padding-left: 22px;
}

.post-toc li {
    margin-bottom: 6px;
    color: var(--text-muted);
}

.post-toc a {
    border-bottom: none;
}

.post-callout p:last-child,
.post-toc li:last-child {
    margin-bottom: 0;
}

.mcp-extension-grid,
.client-flow-grid,
.demo-use-case-grid {
    display: grid;
    gap: 12px;
    margin: 22px 0 28px;
}

.mcp-extension-grid,
.client-flow-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.demo-use-case-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mcp-extension-card,
.client-flow-card,
.demo-use-case-card {
    padding: 14px 16px;
    border: 1px solid rgba(107, 164, 248, 0.20);
    border-radius: var(--radius-sm);
    background: rgba(14, 23, 35, 0.72);
}

.mcp-extension-card strong,
.client-flow-card strong,
.demo-use-case-card strong {
    display: block;
    margin-bottom: 6px;
    color: var(--text);
    font-size: 13px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.mcp-extension-card span,
.client-flow-card span,
.demo-use-case-card span {
    display: block;
    color: var(--text-dim);
    font-size: 13px;
    line-height: 1.5;
}

.post-content h2 {
    margin: 48px 0 16px;
    font-size: 26px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.015em;
    color: var(--text);
    padding-top: 8px;
}

.post-content h3 {
    margin: 32px 0 12px;
    font-size: 19px;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--text);
}

.post-content h3.tool-connect-heading {
    margin-top: 36px;
    padding: 14px 16px;
    border: 1px solid rgba(107, 164, 248, 0.22);
    border-radius: var(--radius-sm);
    background: rgba(18, 28, 43, 0.54);
    font-size: 20px;
}

.post-content ul,
.post-content ol {
    margin: 18px 0 24px;
    padding-left: 22px;
    color: var(--text);
}

.post-content li {
    margin-bottom: 10px;
    padding-left: 4px;
}

.post-content ul li::marker { color: var(--accent); content: '— '; }

.post-content blockquote {
    margin: 24px 0;
    padding: 14px 22px;
    border-left: 3px solid var(--accent);
    background: var(--panel);
    color: var(--text-dim);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

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

/* Code */
.post-content pre {
    position: relative;
    background:
        linear-gradient(180deg, rgba(18, 28, 43, 0.98) 0 34px, rgba(8, 13, 22, 0.98) 34px),
        var(--panel);
    border: 1px solid rgba(107, 164, 248, 0.22);
    border-radius: var(--radius-md);
    padding: 50px 22px 20px;
    overflow-x: auto;
    margin: 28px 0;
    font-size: 14px;
    line-height: 1.72;
    box-shadow:
        0 18px 48px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.035);
    scrollbar-color: rgba(107, 164, 248, 0.42) rgba(255, 255, 255, 0.04);
    scrollbar-width: thin;
}

.post-content pre::before {
    content: '';
    position: absolute;
    top: 13px;
    left: 18px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--red);
    box-shadow: 18px 0 0 var(--amber), 36px 0 0 var(--green);
}

.post-content pre code {
    font-family: var(--font-mono);
    color: #F1F6FC;
    background: transparent;
    padding: 0;
    border-radius: 0;
    font-size: 1em;
}

.code-copy {
    position: absolute;
    top: 8px;
    right: 10px;
    z-index: 1;
    min-width: 58px;
    height: 26px;
    padding: 0 9px;
    border: 1px solid rgba(107, 164, 248, 0.25);
    border-radius: 5px;
    background: rgba(8, 13, 22, 0.72);
    color: var(--text-dim);
    font: 500 11px/1 var(--font-mono);
    cursor: pointer;
    transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.code-copy:hover,
.code-copy:focus-visible {
    color: var(--text);
    border-color: var(--accent-line);
    background: rgba(18, 28, 43, 0.95);
}

.code-disclosure {
    margin: 28px 0;
    border: 1px solid rgba(107, 164, 248, 0.22);
    border-radius: var(--radius-md);
    background: rgba(14, 23, 35, 0.52);
    overflow: hidden;
}

.code-disclosure summary {
    padding: 14px 18px;
    color: var(--accent);
    font: 500 13px/1.4 var(--font-mono);
    cursor: pointer;
}

.code-disclosure[open] summary {
    border-bottom: 1px solid var(--border-soft);
}

.code-disclosure pre {
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.post-content code {
    font-family: var(--font-mono);
    font-size: 0.86em;
}

.post-content :not(pre) > code {
    background: var(--panel-hi);
    color: var(--accent-hi);
    padding: 1px 7px;
    border-radius: 4px;
    border: 1px solid var(--border-soft);
}

.post-content figure {
    margin: 28px 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-soft);
    background: var(--panel);
}

.post-content figure img,
.post-content figure svg {
    width: 100%;
    height: auto;
    display: block;
}

.post-content figcaption {
    padding: 10px 16px;
    font-size: 12px;
    color: var(--text-muted);
    border-top: 1px solid var(--border-soft);
    background: var(--panel);
}

.post-content hr {
    margin: 36px 0;
    border: none;
    height: 1px;
    background: var(--border-soft);
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 22px 0;
    font-size: 14px;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.post-content th,
.post-content td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border-soft);
}

.post-content th {
    background: var(--panel-hi);
    font-weight: 600;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-dim);
}

.post-content tr:last-child td { border-bottom: none; }

/* Post footer */
.post-footer {
    margin-top: 56px;
    padding-top: 28px;
    border-top: 1px solid var(--border-soft);
}

.related-posts {
    margin-top: 54px;
    padding: 24px;
    border: 1px solid rgba(107, 164, 248, 0.20);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(135deg, rgba(107, 164, 248, 0.08), transparent 36%),
        rgba(14, 23, 35, 0.68);
}

.related-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
}

.related-head h2 {
    margin: 0;
    padding: 0;
    font-size: 20px;
}

.related-head p {
    margin: 0;
    color: var(--text-muted);
    font-size: 13px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.related-card {
    display: flex;
    min-height: 156px;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    background: rgba(8, 13, 22, 0.50);
    color: var(--text);
    transition: border-color var(--transition), transform var(--transition), background var(--transition);
}

.related-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent-line);
    background: var(--panel-hi);
}

.related-kicker {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--accent);
}

.related-card strong {
    color: var(--text);
    font-size: 15px;
    line-height: 1.25;
}

.related-card span:last-child {
    color: var(--text-dim);
    font-size: 13px;
    line-height: 1.48;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.post-tags .tag { cursor: pointer; }

.post-series-nav {
    margin-top: 48px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.post-series-nav.single-next {
    grid-template-columns: minmax(0, 1fr);
}

.series-link {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 112px;
    padding: 18px;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(17, 27, 44, 0.92), rgba(9, 14, 24, 0.82));
    color: var(--text-main);
    text-decoration: none;
    box-shadow: var(--shadow-soft);
    transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.series-link:hover {
    transform: translateY(-2px);
    border-color: var(--accent-cyan);
    background: linear-gradient(135deg, rgba(20, 35, 58, 0.96), rgba(10, 17, 29, 0.9));
}

.series-link.prev { text-align: left; }

.series-link.next {
    text-align: right;
    align-items: flex-end;
}

.series-kicker {
    font-family: var(--font-mono);
    font-size: 11px;
    line-height: 1.3;
    color: var(--accent-cyan);
    text-transform: uppercase;
}

.series-title {
    font-size: 18px;
    line-height: 1.25;
    font-weight: 650;
}

.series-summary {
    max-width: 34rem;
    font-size: 14px;
    line-height: 1.45;
    color: var(--text-muted);
}

.post-share {
    font-size: 12px;
    color: var(--text-muted);
}

@media (max-width: 640px) {
    .post-series-nav {
        grid-template-columns: 1fr;
    }

    .series-link.next {
        text-align: left;
        align-items: flex-start;
    }
}

/* ==========================================================================
   About page
   ========================================================================== */

.about-page {
    padding: 56px 0 80px;
    position: relative;
    z-index: 1;
}

.about-page .container { max-width: 920px; }

.page-header { margin-bottom: 36px; }

.page-header h1 {
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 42px;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--text);
}

.about-card {
    background: var(--panel);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: 36px;
    margin-bottom: 28px;
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.30);
}

.about-intro {
    display: flex;
    gap: 28px;
    align-items: center;
    margin-bottom: 28px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--divider);
}

.about-avatar img {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border-soft);
    background: var(--panel-2);
}

.about-id .name {
    font-size: 22px;
    font-weight: 500;
    letter-spacing: -0.01em;
    margin-bottom: 4px;
}

.about-id .role {
    font-size: 12px;
    color: var(--accent);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-weight: 500;
    margin-bottom: 8px;
}

.about-id .id-meta {
    font-size: 11px;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.about-bio {
    font-size: 15.5px;
    line-height: 1.7;
    color: var(--text-dim);
}

.about-bio strong { color: var(--text); font-weight: 500; }
.about-bio em { color: var(--accent); }

.about-section { margin-top: 28px; }

.about-section h3 {
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 12px;
}

.about-section p {
    font-size: 14.5px;
    line-height: 1.7;
    color: var(--text-dim);
}

.about-section p strong { color: var(--text); }
.about-section a { color: var(--accent); border-bottom: 1px solid var(--accent-line); }
.about-section a:hover { color: var(--accent-hi); border-bottom-color: var(--accent-hi); }

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    background: rgba(14, 23, 35, 0.5);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm);
    font-size: 12px;
    letter-spacing: 0.02em;
    color: var(--text-dim);
    transition: all var(--transition);
}

.social-link:hover {
    border-color: var(--accent-line);
    background: var(--accent-dim);
    color: var(--accent);
}

.social-link svg { width: 14px; height: 14px; }

/* ==========================================================================
   Site footer
   ========================================================================== */

.site-footer {
    border-top: 1px solid var(--border-soft);
    padding: 24px 0 32px;
    position: relative;
    z-index: 1;
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 18px;
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 0.04em;
}

.footer-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.footer-info .brand-mark { width: 22px; height: 22px; font-size: 12px; border-radius: 5px; }

.footer-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
}

.footer-status .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 10px var(--green);
}

.footer-trust {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-trust a {
    color: var(--text-muted);
    transition: color var(--transition);
}

.footer-trust a:hover { color: var(--accent); }

.footer-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.footer-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    transition: color var(--transition), background var(--transition);
}

.footer-links a:hover {
    color: var(--accent);
    background: var(--panel-hi);
}

.footer-links svg { width: 15px; height: 15px; }

/* ==========================================================================
   Entry animations
   ========================================================================== */

.fade-up {
    opacity: 0;
    transform: translateY(14px);
    animation: fadeUp 0.7s var(--ease-out) forwards;
}

@keyframes fadeUp {
    to { opacity: 1; transform: translateY(0); }
}

.d1 { animation-delay: 0.04s; }
.d2 { animation-delay: 0.12s; }
.d3 { animation-delay: 0.20s; }
.d4 { animation-delay: 0.28s; }
.d5 { animation-delay: 0.36s; }
.d6 { animation-delay: 0.44s; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 980px) {
    .hero { padding: 40px 0 32px; }
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }
    .hero-title { font-size: 36px; }
    .container { padding: 0 24px; }
    .related-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .header-content { gap: 12px; }

    .main-nav {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        background: var(--bg);
        border-bottom: 1px solid var(--border-soft);
        padding: 18px 24px 24px;
        gap: 14px;
        margin-left: 0;
        transform: translateY(-110%);
        opacity: 0;
        visibility: hidden;
        transition: transform var(--transition), opacity var(--transition), visibility var(--transition);
    }

    .main-nav.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .main-nav ul {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
    }

    .main-nav a {
        padding: 10px 12px;
        font-size: 14px;
    }

    .nav-social-icons {
        padding-left: 0;
        border-left: none;
        padding-top: 14px;
        border-top: 1px solid var(--border-soft);
        margin-left: 0;
    }

    .mobile-menu-toggle { display: flex; }

    .hero-title { font-size: 30px; }
    .hero-sub { font-size: 14.5px; }
    .post-header h1 { font-size: 32px; }
    .page-header h1 { font-size: 32px; }
    .collection-header h1 { font-size: 32px; }

    .posts-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .section-header { flex-direction: column; align-items: flex-start; gap: 14px; }

    .post-controls {
        width: 100%;
        align-items: stretch;
        justify-content: flex-start;
    }

    .post-search {
        width: 100%;
    }

    .about-intro {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .about-card { padding: 24px; }

    .footer-content { flex-direction: column; align-items: flex-start; }

    .post-content { font-size: 15.5px; }
    .post-content h2 { font-size: 22px; margin-top: 36px; }
    .post-content h3 { font-size: 17px; }
    .mcp-extension-grid,
    .client-flow-grid,
    .demo-use-case-grid {
        grid-template-columns: 1fr;
    }

    .recent-card { padding: 20px 18px; }
    .recent-row:nth-of-type(n+4) { display: none; }
    .recent-more { display: flex; }
    .related-head {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (max-width: 480px) {
    .container { padding: 0 18px; }
    .hero { padding: 28px 0 24px; }
    .hero-title { font-size: 26px; }
    .post-header h1 { font-size: 26px; }
    .page-header h1 { font-size: 26px; }
    .collection-header h1 { font-size: 26px; }
    .cta-row { flex-direction: column; align-items: stretch; }
    .cta-row .btn { justify-content: center; width: 100%; }
    .brand-name .dim { display: none; }
    .nav-social-icons a { width: 36px; height: 36px; }
    .nav-social-icons svg { width: 18px; height: 18px; }
}
