@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600;9..144,700&family=JetBrains+Mono:wght@500;700&family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
    --bg: #000000;
    --bg-soft: #050a12;
    --surface: #0d131f;
    --surface-alt: #111a2a;
    --surface-strong: #131f33;
    --text: #ebf0ff;
    --text-soft: #d6def4;
    --muted: #a6b1cc;
    --line: #22314b;
    --accent: var(--ghost-accent-color, #19cb67);
    --card-shadow: 0 24px 64px rgba(3, 6, 12, 0.5);
    --radius-xl: 26px;
    --radius-lg: 18px;
    --radius-md: 14px;
    --container-max: 1180px;
    --container: min(var(--container-max), calc(100vw - 3rem));
    --content-max: 760px;
}

* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--gh-font-body, "Manrope", sans-serif);
    line-height: 1.55;
    overflow-x: clip;
}

a {
    color: inherit;
}

a:hover {
    opacity: 0.9;
}

img,
picture,
video,
canvas,
iframe {
    display: block;
    max-width: 100%;
}

.site-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    width: var(--container);
    margin-inline: auto;
}

.site-header {
    position: relative;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
}

.header-left,
.header-right {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.top-nav .nav {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 1.35rem;
}

.top-nav .nav a {
    color: var(--muted);
    font-weight: 600;
    text-decoration: none;
    transition: color 180ms ease;
}

.top-nav .nav .nav-current a,
.top-nav .nav a:hover {
    color: var(--text);
}

.header-search {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    padding: 0.4rem;
    transition: color 180ms ease;
}

.header-search:hover {
    color: var(--text);
}

.header-signin {
    color: var(--text);
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: color 180ms ease;
}

.header-signin:hover {
    color: var(--accent);
}

.header-subscribe {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.5rem;
    padding: 0 1.25rem;
    border-radius: 999px;
    background: var(--accent);
    color: #000;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    white-space: nowrap;
    transition: opacity 180ms ease;
}

.header-subscribe:hover {
    opacity: 0.85;
}

.header-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text);
    font-family: var(--gh-font-heading, "Fraunces", serif);
    font-size: 1.25rem;
    font-weight: 700;
    white-space: nowrap;
}

.header-logo img {
    height: 1.8rem;
    width: auto;
}

/* Hamburger – hidden on desktop */
.header-burger {
    display: none;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    padding: 0;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    cursor: pointer;
    flex-direction: column;
    gap: 4px;
}

.header-burger span {
    display: block;
    width: 16px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 240ms ease, opacity 180ms ease;
}

.header-burger.is-active span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.header-burger.is-active span:nth-child(2) {
    opacity: 0;
}

.header-burger.is-active span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* Mobile menu overlay – hidden on desktop */
.mobile-menu {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999;
    padding: 5rem 1.5rem 2rem;
    background: rgba(0, 0, 0, 0.96);
    backdrop-filter: blur(12px);
    flex-direction: column;
    gap: 2.5rem;
    overflow-y: auto;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 240ms ease, transform 280ms ease;
}

.mobile-menu.is-open {
    display: flex;
    opacity: 1;
    transform: none;
}

.mobile-menu__nav .nav {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.mobile-menu__nav .nav a {
    display: block;
    padding: 0.7rem 0;
    color: var(--text);
    font-size: 1.3rem;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transition: color 180ms ease;
}

.mobile-menu__nav .nav a:hover,
.mobile-menu__nav .nav .nav-current a {
    color: var(--accent);
}

.mobile-menu__actions {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.mobile-menu__signin {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2.8rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    color: var(--text);
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    transition: border-color 180ms ease;
}

.mobile-menu__signin:hover {
    border-color: var(--accent);
}

.mobile-menu__subscribe {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2.8rem;
    border-radius: 999px;
    background: var(--accent);
    color: #000;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    transition: opacity 180ms ease;
}

.mobile-menu__subscribe:hover {
    opacity: 0.88;
}

.mobile-menu__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.6rem;
    height: 2.6rem;
    padding: 0;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    color: var(--text);
    cursor: pointer;
    transition: border-color 180ms ease, background 180ms ease;
}

.mobile-menu__close:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.06);
}

.post-template .site-header {
    background: transparent;
    backdrop-filter: none;
    border-bottom-color: transparent;
}

.site-main {
    flex: 1;
    padding-bottom: 4rem;
}

.site-main:has(.error-page) {
    display: flex;
    flex-direction: column;
}

.site-footer {
    margin-top: auto;
    padding: 1.8rem 0 2.4rem;
    color: #93a0c5;
    font-size: 0.92rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.hero {
    padding: 4.5rem 0 3.5rem;
}

.hero-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1.4rem;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.hero-title {
    margin: 0;
    font-family: var(--gh-font-heading, "Fraunces", serif);
    font-size: clamp(1.4rem, 3vw, 1.75rem);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text);
}

.hero-description {
    margin: 0.75rem 0 0;
    max-width: 42ch;
    color: var(--muted);
    font-size: clamp(0.95rem, 1.8vw, 1.1rem);
    line-height: 1.55;
}

.hero-social {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 1.4rem;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted);
    text-decoration: none;
    transition: border-color 180ms ease, color 180ms ease, background 180ms ease;
}

.social-icon:hover {
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.08);
}

.subscribe-card {
    margin-top: 4rem;
    padding: clamp(1.6rem, 3vw, 2.8rem);
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 2rem;
    border-radius: var(--radius-xl);
    border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
    background:
        radial-gradient(120% 85% at 100% 0, color-mix(in srgb, var(--accent) 10%, transparent), transparent 58%),
        linear-gradient(165deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0)),
        var(--surface);
    box-shadow: var(--card-shadow);
}

.subscribe-copy h2 {
    margin: 0;
    line-height: 1.08;
    font-size: clamp(1.8rem, 4vw, 3.1rem);
}

.subscribe-copy h2 span {
    display: block;
    font-family: var(--gh-font-heading, "Fraunces", serif);
    font-size: clamp(2.2rem, 5vw, 4rem);
    color: var(--accent);
}

.subscribe-copy p {
    margin: 1rem 0 0;
    max-width: 32ch;
    color: var(--muted);
}

.subscribe-intro {
    margin: 0;
    color: var(--text);
    max-width: 54ch;
    font-size: clamp(1rem, 1.8vw, 1.2rem);
}

.subscribe-form {
    margin-top: 1.2rem;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.8rem;
}

.subscribe-form input {
    min-height: 3.1rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface-alt);
    color: var(--text);
    padding: 0 1.15rem;
    font-size: 0.95rem;
    transition: border-color 180ms ease;
}

.subscribe-form input:focus {
    outline: none;
    border-color: var(--accent);
}

.subscribe-form button {
    min-height: 3.1rem;
    padding: 0 1.4rem;
    border: 0;
    border-radius: 999px;
    font-weight: 700;
    color: #0f1728;
    background: var(--accent);
    cursor: pointer;
    transition: opacity 180ms ease;
}

.subscribe-form button:hover {
    opacity: 0.88;
}

.notice-success,
.notice-error {
    display: none;
    margin: 0.35rem 0 0;
    grid-column: 1 / -1;
    font-size: 0.92rem;
}

.notice-success {
    color: var(--accent);
}

.notice-error {
    color: #ff9e9e;
}

.subscribe-form.success .notice-success {
    display: block;
}

.subscribe-form.error .notice-error {
    display: block;
}

.fine-print {
    margin: 0.75rem 0 0;
    color: #8e98b8;
    font-size: 0.88rem;
}

.latest-posts,
.list-view {
    margin-top: 4rem;
}

.section-head h1,
.section-head h3 {
    margin: 0;
    font-family: var(--gh-font-heading, "Fraunces", serif);
    font-size: clamp(1.55rem, 3vw, 2.2rem);
}

.post-grid {
    margin-top: 1.4rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.1rem;
}

.post-card {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    overflow: clip;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0));
    transition: transform 180ms ease, border-color 180ms ease;
}

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

.post-card a {
    display: block;
    color: inherit;
    text-decoration: none;
}

.post-card img,
.post-card__media-placeholder {
    width: 100%;
    aspect-ratio: 16 / 10;
}

.post-card img {
    object-fit: cover;
}

.post-card__media-placeholder {
    background: radial-gradient(85% 120% at 70% 100%, rgba(131, 228, 42, 0.8), rgba(24, 164, 53, 0.65) 45%, rgba(10, 92, 96, 0.72) 76%, rgba(7, 20, 34, 0.92));
}

.post-card__body {
    padding: 0.9rem 1rem 1rem;
}

.post-card__meta {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #97a6cb;
    font-size: 0.76rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
}

.post-card h2,
.post-card h4 {
    margin: 0.62rem 0 0;
    font-size: 1.22rem;
    line-height: 1.2;
    font-family: var(--gh-font-heading, "Fraunces", serif);
}

.post-card p {
    margin: 0.56rem 0 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.page-view {
    margin-top: 0.5rem;
}

.page-hero {
    margin-top: clamp(2.4rem, 4vw, 3.3rem);
    max-width: min(var(--content-max), calc(100vw - 3rem));
}

.page-hero__meta {
    margin: 0;
    color: #99a5c7;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
}

.page-hero__title {
    margin: 0.8rem 0 0;
    font-size: clamp(2.1rem, 5vw, 4rem);
    line-height: 1.03;
    letter-spacing: -0.02em;
}

.page-hero__excerpt {
    margin: 1rem 0 0;
    color: #c2cde8;
    font-size: clamp(1.04rem, 1.8vw, 1.36rem);
    line-height: 1.55;
}

.page-hero__image {
    width: 100%;
    margin-top: 1.45rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.page-content-wrap {
    margin-top: 1.5rem;
}

.page-content {
    max-width: min(var(--content-max), calc(100vw - 3rem));
    margin-inline: auto;
}

.post-full__content {
    color: var(--text-soft);
}

.article-page {
    margin-top: -4.5rem;
    position: relative;
    z-index: 1;
}

.article-hero {
    position: relative;
    width: 100vw;
    margin-left: 50%;
    transform: translateX(-50%);
    min-height: clamp(430px, 78vh, 900px);
    overflow: hidden;
    background: #071822;
}

.article-hero__media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    will-change: filter;
    transition: filter 60ms linear;
}

.article-hero__media--placeholder {
    background: radial-gradient(80% 120% at 60% 100%, rgba(178, 240, 29, 0.92), rgba(30, 208, 36, 0.72) 44%, rgba(10, 120, 117, 0.78) 74%, rgba(7, 44, 52, 0.94));
}

.article-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.18) 20%, rgba(0, 0, 0, 0.15) 38%, rgba(0, 0, 0, 0.55) 62%, rgba(0, 0, 0, 0.88) 80%, rgba(0, 0, 0, 0.96) 92%, #000000 100%);
    z-index: 1;
}

.article-hero__overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background: #000;
    opacity: calc(var(--header-dim, 0) / 100);
    pointer-events: none;
}

.article-hero__inner {
    position: relative;
    z-index: 2;
    padding: clamp(9rem, 42vh, 32rem) 0 2.8rem;
}

.article-hero__meta {
    margin: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.52rem;
    color: #d0d8f0;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.4), 0 1px 40px rgba(0, 0, 0, 0.25);
}

.article-hero__tag {
    color: var(--accent);
}

.article-hero__title {
    margin: 0.85rem 0 0;
    max-width: 15ch;
    font-family: var(--gh-font-heading, "Manrope", sans-serif);
    font-size: clamp(2.7rem, 6.1vw, 5.4rem);
    line-height: 1.01;
    letter-spacing: -0.026em;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.45), 0 2px 60px rgba(0, 0, 0, 0.3);
}

.article-hero__excerpt {
    margin: 1.2rem 0 0;
    max-width: 56ch;
    color: #dce4de;
    font-size: clamp(1.2rem, 1.9vw, 2rem);
    line-height: 1.35;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35), 0 1px 48px rgba(0, 0, 0, 0.25);
}

.article-hero__author {
    margin: 1.2rem 0 0;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: #d7dff9;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.4), 0 1px 40px rgba(0, 0, 0, 0.25);
}

.article-hero__author img,
.article-hero__author-fallback {
    width: 1.9rem;
    height: 1.9rem;
    border-radius: 50%;
    object-fit: cover;
    display: grid;
    place-items: center;
    background: var(--accent);
    color: #0f1628;
}

.article-layout {
    margin-top: 2.95rem;
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr) 250px;
    gap: 1.2rem 2.4rem;
    align-items: start;
}

.share-rail,
.toc-rail {
    position: sticky;
    top: 1.5rem;
}

.share-rail p,
.toc-rail__title {
    margin: 0 0 0.75rem;
    color: #9ca7c9;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
}

.share-rail a {
    width: 2.45rem;
    height: 2.45rem;
    margin-bottom: 0.55rem;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    color: #edf2ff;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 700;
    transition: color 160ms ease, border-color 160ms ease;
}

.share-rail a:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.article-content {
    max-width: min(var(--content-max), 100%);
}

.article-content__empty {
    margin: 0;
    color: #9facd1;
    font-style: italic;
}

.toc-rail {
    border-left: 1px solid rgba(255, 255, 255, 0.12);
    padding-left: 1rem;
}

.toc-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.toc-list li {
    margin: 0.35rem 0;
}

.toc-list a {
    display: block;
    color: #bcc7e2;
    text-decoration: none;
    font-size: 0.92rem;
    line-height: 1.45;
    padding: 0.2rem 0;
}

.toc-list a:hover,
.toc-list a.active {
    color: var(--accent);
}

.toc-list a.is-sub {
    padding-left: 0.8rem;
    font-size: 0.9rem;
    color: #a8b2d0;
}

.toc-list a.active {
    border-left: 2px solid var(--accent);
    padding-left: 0.55rem;
    margin-left: -0.65rem;
}

.gh-content {
    color: var(--text-soft);
    font-size: clamp(1.05rem, 1.2vw, 1.34rem);
    line-height: 1.72;
    word-break: break-word;
}

.gh-content > * + * {
    margin-top: 1.05em;
}

.gh-content > *:first-child {
    margin-top: 0;
}

.gh-content :is(h1, h2, h3, h4, h5, h6) {
    color: #f3f7ff;
    font-family: var(--gh-font-heading, "Manrope", sans-serif);
    line-height: 1.14;
    letter-spacing: -0.02em;
}

.gh-content h1 {
    font-size: clamp(2rem, 4vw, 3.1rem);
}

.gh-content h2 {
    margin-top: 1.55em;
    font-size: clamp(1.8rem, 3.5vw, 3rem);
}

.gh-content h3 {
    margin-top: 1.45em;
    font-size: clamp(1.42rem, 2.8vw, 2.15rem);
}

.gh-content h4 {
    margin-top: 1.35em;
    font-size: clamp(1.2rem, 2.2vw, 1.7rem);
}

.gh-content a {
    color: var(--accent);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.17em;
}

.gh-content ul,
.gh-content ol {
    padding-left: 1.35em;
}

.gh-content li + li {
    margin-top: 0.45em;
}

.gh-content blockquote {
    margin: 2.2em 0;
    padding: 0.15em 0 0.15em 1rem;
    border-left: 3px solid var(--accent);
    color: #d8e1fa;
}

.gh-content blockquote.kg-blockquote-alt {
    border-left: 0;
    padding-left: 0;
    color: #bac4e3;
    font-style: italic;
}

.gh-content hr {
    margin: 2.4em 0;
    border: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.14);
}

.gh-content :not(pre) > code {
    padding: 0.15em 0.35em;
    border-radius: 0.3em;
    color: var(--accent);
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    font-family: "JetBrains Mono", monospace;
    font-size: inherit;
}

.gh-content pre {
    margin: 2em 0;
    padding: 1rem 1.15rem;
    overflow-x: auto;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #0b111d;
}

.gh-content pre code {
    color: #e1e7fb;
    font-family: "JetBrains Mono", monospace;
    font-size: inherit;
    line-height: 1.65;
}

.gh-content table {
    width: 100%;
    display: block;
    overflow-x: auto;
    border-collapse: collapse;
    border-spacing: 0;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    background: rgba(16, 24, 40, 0.92);
}

.gh-content th,
.gh-content td {
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 0.46rem 0.7rem;
    min-width: 120px;
}

.gh-content th {
    color: #f4f7ff;
    font-size: 0.8rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.04);
}

.gh-content td {
    color: #d4dcf6;
    font-size: 0.92rem;
}

.gh-content figure {
    margin: 2.1em 0;
}

.gh-content .kg-image-card {
    margin: 1.2em 0;
}

.gh-content .kg-image-card img {
    height: auto;
}

.gh-content figcaption {
    margin-top: 0.8rem;
    color: #9eabcf;
    font-size: 0.86rem;
    text-align: center;
}

.gh-content .kg-image-card img,
.gh-content .kg-gallery-card img,
.gh-content .kg-video-card video,
.gh-content .kg-audio-card,
.gh-content .kg-file-card,
.gh-content .kg-bookmark-container,
.gh-content .kg-callout-card,
.gh-content .kg-toggle-card,
.gh-content .kg-product-card {
    border-radius: var(--radius-md);
}

.gh-content .kg-image-card img,
.gh-content .kg-gallery-card img {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.gh-content iframe {
    border-radius: var(--radius-md);
    width: 100%;
}

.gh-content .kg-bookmark-container {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px;
    gap: 0;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.11);
    background: rgba(17, 25, 40, 0.96);
    color: inherit;
    text-decoration: none;
}

.gh-content .kg-bookmark-card a.kg-bookmark-container,
.gh-content .kg-bookmark-card a.kg-bookmark-container:hover {
    background: rgba(17, 25, 40, 0.96);
    color: inherit;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: var(--radius-md);
}

.gh-content .kg-bookmark-content {
    padding: 1rem;
    font-family: var(--gh-font-body, "Manrope", sans-serif);
}

.gh-content .kg-bookmark-title {
    color: #f2f6ff;
    font-weight: 700;
    line-height: 1.3;
    font-size: 1rem;
}

.gh-content .kg-bookmark-description {
    margin-top: 0.45rem;
    color: #b6c2de;
    font-size: 0.95rem;
    opacity: 1;
}

.gh-content .kg-bookmark-metadata {
    margin-top: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    color: #95a5cb;
    font-size: 0.82rem;
}

.gh-content .kg-bookmark-metadata > :not(img) {
    opacity: 1;
}

.gh-content .kg-bookmark-thumbnail {
    min-height: 100%;
}

.gh-content .kg-bookmark-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gh-content .kg-callout-card {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.13);
    background: rgba(14, 22, 35, 0.95);
}

.gh-content .kg-callout-text {
    color: #d3dcf5;
}

.gh-content .kg-toggle-card {
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(12, 19, 30, 0.96);
    border-radius: 12px;
    padding: 0.8rem 1rem;
}

.gh-content .kg-toggle-heading {
    color: #f2f6ff;
}

.gh-content .kg-toggle-content {
    color: #cbd6f2;
}

.gh-content .kg-file-card {
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(13, 20, 31, 0.96);
}

.gh-content .kg-file-card-container {
    color: inherit;
}

.gh-content .kg-file-card-title {
    color: #f2f7ff;
}

.gh-content .kg-file-card-caption,
.gh-content .kg-file-card-metadata {
    color: #aab6d4;
}

.gh-content .kg-button-card .kg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1.3rem;
    border: 0;
    border-radius: 999px;
    color: #122033;
    background: var(--accent);
    font-weight: 700;
    text-decoration: none;
}

.gh-content .kg-signup-card,
.gh-content .kg-product-card {
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.gh-content .kg-width-wide {
    width: 100%;
    max-width: 100%;
}

.gh-content .kg-width-full {
    width: 100%;
    max-width: 100%;
}

.gh-content .kg-width-full :is(img, video, iframe) {
    border-radius: var(--radius-md);
}

/* ── Tables ── */
.gh-content table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    overflow: hidden;
    font-size: 0.95rem;
}

.gh-content th,
.gh-content td {
    padding: 0.75rem 1rem;
    text-align: left;
}

.gh-content th {
    color: var(--text);
    font-weight: 700;
    font-size: 0.88rem;
    letter-spacing: 0.02em;
    background: var(--surface);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.gh-content td {
    color: var(--muted);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

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

.gh-content tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

/* ── Code blocks ── */
.gh-content code {
    padding: 0.15em 0.4em;
    border-radius: 5px;
    background: var(--surface);
    color: var(--text-soft);
    font-family: 'JetBrains Mono', monospace;
    font-size: inherit;
}

.gh-content pre {
    overflow-x: auto;
    padding: 1.25rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    background: var(--surface);
    font-size: inherit;
    line-height: 1.6;
}

.gh-content pre code {
    padding: 0;
    border-radius: 0;
    background: none;
    color: var(--text-soft);
    font-size: inherit;
}

.gh-content .kg-card.kg-code-card {
    position: relative;
}

.gh-content .kg-code-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: none;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    background: var(--surface-alt);
    color: var(--muted);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    font-weight: 500;
}

.gh-content .kg-code-card-header + pre {
    border-top: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.gh-content .kg-code-card-copy {
    border: none;
    background: none;
    color: var(--muted);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    transition: color 160ms ease;
}

.gh-content .kg-code-card-copy:hover {
    color: var(--accent);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 480ms ease, transform 540ms ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: none;
}

@media (max-width: 1300px) {
    .article-layout {
        grid-template-columns: 84px minmax(0, 1fr);
    }

    .toc-rail {
        display: none;
    }
}

@media (max-width: 1050px) {
    .site-header {
        grid-template-columns: 1fr auto;
    }

    .top-nav {
        order: 3;
        grid-column: 1 / -1;
    }

    .hero {
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 1.6rem;
    }

    .hero-art {
        width: min(420px, 100%);
    }

    .hero-copy {
        text-align: center;
    }

    .hero-copy p {
        margin-inline: auto;
    }

    .subscribe-card {
        grid-template-columns: 1fr;
    }

    .article-layout {
        grid-template-columns: 1fr;
    }

    .share-rail {
        display: none;
    }

    .article-hero__inner {
        padding-top: clamp(6.2rem, 32vh, 24rem);
    }
}

@media (max-width: 760px) {
    :root {
        --container: min(var(--container-max), calc(100vw - 1.5rem));
    }

    .site-header {
        padding: 0.8rem 0;
    }

    .top-nav,
    .header-signin,
    .header-subscribe {
        display: none;
    }

    .header-burger {
        display: flex;
    }

    .hero {
        margin-top: 1rem;
    }

    .subscribe-form {
        grid-template-columns: 1fr;
    }

    .post-grid {
        grid-template-columns: 1fr;
    }

    .article-hero {
        min-height: 400px;
    }

    .article-hero__title {
        max-width: 100%;
        font-size: clamp(2rem, 10vw, 3.2rem);
    }

    .article-hero__excerpt {
        max-width: 100%;
        font-size: clamp(1.05rem, 4.4vw, 1.42rem);
    }

    .gh-content {
        font-size: 1.02rem;
    }

    .gh-content .kg-bookmark-container {
        grid-template-columns: 1fr;
    }

    .gh-content .kg-width-wide {
        width: calc(100vw - 1.5rem);
    }
}

/* ── Paid-post paywall CTA (Ghost-injected – hidden, using theme CTA instead) ── */
.gh-post-upgrade-cta {
    display: none !important;
}

/* ── Theme paywall CTA ── */
.paywall-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-top: 2.5rem;
    padding: clamp(2rem, 4vw, 3rem) clamp(1.5rem, 4vw, 3rem);
    border-radius: var(--radius-xl);
    border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
    background:
        radial-gradient(120% 85% at 100% 0, color-mix(in srgb, var(--accent) 10%, transparent), transparent 58%),
        linear-gradient(165deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0)),
        var(--surface);
    box-shadow: var(--card-shadow);
}

.paywall-cta__badge {
    display: inline-block;
    margin-bottom: 0.8rem;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.paywall-cta__badge--paid {
    background: color-mix(in srgb, var(--accent) 15%, transparent);
    color: var(--accent);
    border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}

.paywall-cta__badge--members {
    background: rgba(255, 255, 255, 0.06);
    color: var(--muted);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.paywall-cta h2 {
    margin: 0;
    color: var(--text);
    font-family: var(--gh-font-heading, "Fraunces", serif);
    font-size: clamp(1.4rem, 3vw, 1.9rem);
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.paywall-cta p {
    margin: 1rem 0 0;
    color: var(--muted);
    font-size: clamp(0.95rem, 1.6vw, 1.08rem);
    max-width: 48ch;
}

.paywall-cta__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 1.4rem;
    padding: 0.65rem 1.6rem;
    border-radius: 999px;
    background: var(--accent);
    color: #000 !important;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    transition: opacity 180ms ease;
}

.paywall-cta__btn:hover {
    opacity: 0.88;
    color: #000 !important;
}

.paywall-cta__signin {
    margin: 1rem 0 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.paywall-cta__signin a {
    color: var(--text);
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.paywall-cta__signin a:hover {
    color: var(--accent);
}

/* ── Load more button ── */
.load-more-wrap {
    display: flex;
    justify-content: center;
    margin-top: 2.4rem;
}

.load-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.8rem;
    padding: 0 2rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font-family: var(--gh-font-body, "Manrope", sans-serif);
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: color 180ms ease, border-color 180ms ease;
}

.load-more-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.load-more-btn.is-loading {
    pointer-events: none;
    opacity: 0.6;
}

/* ── Lightbox ── */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(6px);
    cursor: zoom-out;
    opacity: 0;
    transition: opacity 240ms ease;
    padding: 2rem;
}

.lightbox-overlay.is-active {
    opacity: 1;
}

.lightbox-overlay img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--radius-md);
    transform: scale(0.92);
    transition: transform 280ms ease;
}

.lightbox-overlay.is-active img {
    transform: scale(1);
}

.gh-content img {
    cursor: zoom-in;
}

/* ── Error page ── */
.error-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex: 1;
    padding: 4rem 1.5rem;
}

.error-code {
    margin: 0;
    font-family: 'Fraunces', serif;
    font-size: clamp(6rem, 18vw, 12rem);
    font-weight: 700;
    line-height: 1;
    color: var(--text);
    letter-spacing: -0.03em;
}

.error-message {
    margin: 0.5rem 0 2.5rem;
    font-size: 1.15rem;
    color: var(--muted);
}

.error-link {
    display: inline-block;
    padding: 0.75rem 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    transition: color 160ms ease, border-color 160ms ease;
}

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