/* =============================================
   CYBERWAVE GHOST THEME — screen.css
   Editorial / Clean Light Edition
   ============================================= */

/* ---- CSS Custom Properties ---- */
:root {
    --bg:          #ffffff;
    --surface:     #f4f4f5;
    --surface-2:   #e4e4e7;
    --border:      #e4e4e7;
    --border-light:#f4f4f5;

    --text:        #27272a;
    --text-heading:#09090b;
    --text-muted:  #71717a;
    --text-subtle: #a1a1aa;

    --accent:      var(--ghost-accent-color, #2448bf);
    --accent-dim:  color-mix(in srgb, var(--ghost-accent-color, #2448bf) 10%, transparent);
    --accent-contrast: #ffffff;

    --footer-bg:   #09090b;
    --footer-surface:#18181b;
    --footer-text: #fafafa;
    --footer-muted:#a1a1aa;

    --font-display: 'Bricolage Grotesque', 'DM Sans', ui-sans-serif, system-ui, sans-serif;
    --font-body:    'Bricolage Grotesque', 'DM Sans', ui-sans-serif, system-ui, sans-serif;
    --font-mono:    ui-monospace, 'Cascadia Code', 'Fira Code', monospace;

    --radius-sm:   8px;
    --radius:      12px;
    --radius-lg:   16px;
    --radius-xl:   24px;

    --container:   1180px;
    --content-width: 760px;

    --transition:  200ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    font-size: 17px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

#main { flex: 1; }

a {
    color: var(--accent);
    text-decoration: none;
    transition: opacity var(--transition);
}
a:hover { opacity: .75; }

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-heading);
    letter-spacing: -.02em;
}

code, kbd, samp, pre {
    font-family: var(--font-mono);
    font-size: .875em;
}

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

::selection { background: color-mix(in srgb, var(--ghost-accent-color, #2448bf) 18%, transparent); }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-subtle); }

/* =============================================
   HEADER — dark also in light mode
   ============================================= */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(18, 18, 23, .88);
    border-bottom: 1px solid rgba(255,255,255,.08);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

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

.site-logo-link {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    color: #f1f3f7;
    opacity: 1;
}
.site-logo-link:hover { opacity: .8; }

.site-logo {
    height: 32px;
    width: auto;
}

.site-logo-text {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    color: #f1f3f7;
    letter-spacing: -.025em;
}

.site-nav .nav,
.site-nav ul {
    display: flex;
    align-items: center;
    gap: 2px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-nav .nav li,
.site-nav ul li {
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-nav .nav li a,
.site-nav ul li a {
    display: block;
    color: #8b90a0;
    font-size: .9rem;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 999px;
    transition: color var(--transition), background var(--transition);
    white-space: nowrap;
    opacity: 1;
}

.site-nav .nav li a:hover,
.site-nav ul li a:hover,
.site-nav .nav li.nav-current a,
.site-nav ul li.nav-current a {
    color: #f1f3f7;
    background: rgba(255,255,255,.06);
    opacity: 1;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.header-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    color: #8b90a0;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
    transition: all var(--transition);
    opacity: 1;
}

.header-icon:hover {
    color: #f1f3f7;
    background: rgba(255,255,255,.08);
    border-color: rgba(255,255,255,.12);
    opacity: 1;
}

.header-link {
    font-size: .9rem;
    font-weight: 500;
    color: #8b90a0;
    padding: 6px 14px;
    border-radius: 999px;
    transition: all var(--transition);
    opacity: 1;
}

.header-link:hover {
    color: #f1f3f7;
    background: rgba(255,255,255,.06);
    opacity: 1;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-body);
    font-size: .9rem;
    font-weight: 600;
    border-radius: 999px;
    transition: opacity var(--transition);
    cursor: pointer;
    text-decoration: none;
    opacity: 1;
}

.btn-subscribe {
    background: var(--ghost-accent-color, #2448bf);
    color: #ffffff;
    padding: 8px 18px;
    box-shadow: 0 1px 3px rgba(0,0,0,.24);
}

.btn-subscribe:hover {
    opacity: .85;
    color: #ffffff;
}

.btn-account {
    background: transparent;
    color: #d4d8e4;
    padding: 8px 18px;
    border: 1px solid rgba(255,255,255,.10);
}

.btn-account:hover {
    background: rgba(255,255,255,.06);
    color: #f1f3f7;
    opacity: 1;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle-bar {
    width: 22px;
    height: 2px;
    background: #f1f3f7;
    border-radius: 2px;
    transition: all var(--transition);
}

.mobile-nav {
    display: none;
    background: #121217;
    border-top: 1px solid rgba(255,255,255,.08);
    padding: 16px 24px 20px;
}

.mobile-nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mobile-nav-list li a {
    display: block;
    color: #d4d8e4;
    font-size: .95rem;
    padding: 8px 0;
    opacity: 1;
}

/* =============================================
   HERO
   ============================================= */
.hero-section {
    padding: 80px 0 64px;
    border-bottom: 1px solid var(--border);
    position: relative;
}

.hero-inner {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 64px;
    align-items: center;
}

.hero-content { max-width: 560px; }

.hero-center .hero-content { max-width: 720px; margin: 0 auto; text-align: center; }
.hero-center .hero-inner { grid-template-columns: 1fr; }
.hero-center .hero-image-wrap { display: none; }

.hero-tag {
    display: inline-block;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--ghost-accent-color, #2448bf);
    background: color-mix(in srgb, var(--ghost-accent-color, #2448bf) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--ghost-accent-color, #2448bf) 25%, transparent);
    padding: 5px 12px;
    border-radius: 999px;
    margin-bottom: 20px;
    opacity: 1;
}
.hero-tag:hover { opacity: .8; }

.hero-title {
    font-size: clamp(2.2rem, 4.4vw, 3.5rem);
    line-height: 1.08;
    margin-bottom: 18px;
    color: var(--text-heading);
}
.hero-title a { color: inherit; opacity: 1; }
.hero-title a:hover { opacity: .82; }

.hero-excerpt {
    font-size: 1.08rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 28px;
    max-width: 480px;
}
.hero-center .hero-excerpt { margin-left: auto; margin-right: auto; max-width: 600px; }

.hero-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .9rem;
    color: var(--text-muted);
    margin-bottom: 28px;
}

.hero-form {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.hero-input {
    width: min(300px, 100%);
    height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: .95rem;
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.hero-input::placeholder { color: var(--text-subtle); }
.hero-input:focus {
    border-color: color-mix(in srgb, var(--ghost-accent-color, #2448bf) 60%, transparent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ghost-accent-color, #2448bf) 12%, transparent);
}

.hero-image-wrap {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    aspect-ratio: 4/3;
    box-shadow: 0 8px 32px rgba(0,0,0,.07);
    background: var(--surface);
}
.hero-image { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.hero-image-wrap:hover .hero-image { transform: scale(1.025); }

/* =============================================
   RECENT STRIP
   ============================================= */
.recent-strip {
    padding: 32px 0;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.recent-strip-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
}

.strip-card {
    background: var(--bg);
    padding: 20px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    transition: background var(--transition);
}
.strip-card:hover { background: var(--surface); }

.strip-card-image-link {
    flex-shrink: 0;
    width: 58px;
    height: 58px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--surface-2);
}
.strip-card-image { width: 100%; height: 100%; object-fit: cover; }

.strip-card-tag {
    display: block;
    font-size: .65rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--ghost-accent-color, #2448bf);
    margin-bottom: 5px;
    opacity: 1;
}
.strip-card-tag:hover { opacity: .75; }

.strip-card-title { font-size: .88rem; font-weight: 600; line-height: 1.35; color: var(--text-heading); }
.strip-card-title a { color: inherit; opacity: 1; }
.strip-card-title a:hover { opacity: .8; }

/* =============================================
   SUBSCRIBE SECTION
   ============================================= */
.subscribe-section {
    padding: 72px 0;
    background: var(--surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    position: relative;
}

.subscribe-inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: center;
    text-align: center;
    justify-items: center;
}

.subscribe-content { max-width: 600px; }

.subscribe-badge {
    display: inline-block;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--ghost-accent-color, #2448bf);
    background: color-mix(in srgb, var(--ghost-accent-color, #2448bf) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--ghost-accent-color, #2448bf) 25%, transparent);
    padding: 5px 12px;
    border-radius: 999px;
    margin-bottom: 20px;
}

.subscribe-title { font-size: clamp(1.7rem, 2.8vw, 2.4rem); margin-bottom: 14px; color: var(--text-heading); }
.subscribe-description { color: var(--text-muted); font-size: 1rem; line-height: 1.7; margin-bottom: 28px; max-width: 480px; }
.subscribe-terminal { display: none; }

/* =============================================
   FEATURE GRID
   ============================================= */
.feature-grid-section { padding: 48px 0 16px; }

.feature-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; align-items: start; }

.feature-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
    transition: box-shadow var(--transition), border-color var(--transition);
}
.feature-card:hover { box-shadow: 0 6px 24px rgba(0,0,0,.09); border-color: var(--surface-2); }

.feature-card--main { display: flex; flex-direction: column; }

.feature-image-link { display: block; aspect-ratio: 16/9; overflow: hidden; background: var(--surface); }
.feature-image { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.feature-card--main:hover .feature-image { transform: scale(1.025); }

.feature-content { padding: 22px 24px; }

.feature-tag {
    display: inline-block;
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--ghost-accent-color, #2448bf);
    background: color-mix(in srgb, var(--ghost-accent-color, #2448bf) 10%, transparent);
    padding: 4px 10px;
    border-radius: 999px;
    margin-bottom: 10px;
    opacity: 1;
}

.feature-title { font-size: 1.3rem; font-weight: 600; line-height: 1.25; color: var(--text-heading); margin-bottom: 8px; }
.feature-title a { color: inherit; opacity: 1; }
.feature-title a:hover { opacity: .82; }

.feature-excerpt { font-size: .92rem; color: var(--text-muted); line-height: 1.6; }

.feature-card--mini {
    display: grid;
    grid-template-columns: 88px 1fr;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border-radius: var(--radius);
    background: var(--bg);
    border: 1px solid var(--border);
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
    transition: box-shadow var(--transition), border-color var(--transition);
}
.feature-card--mini:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); border-color: var(--surface-2); }
.feature-card--mini .feature-tag { margin-bottom: 5px; }

.feature-mini-thumb { width: 88px; height: 66px; border-radius: 10px; overflow: hidden; background: var(--surface); }
.feature-mini-thumb img { width: 100%; height: 100%; object-fit: cover; }

.feature-mini-title { font-size: .95rem; font-weight: 600; color: var(--text-heading); line-height: 1.3; }
.feature-mini-title a { color: inherit; opacity: 1; }
.feature-mini-title a:hover { opacity: .82; }

/* Hide all terminal/cyber decorations */
.terminal-header, .terminal-dot, .terminal-title, .terminal-body,
.terminal-line, .t-prompt, .t-comment, .t-success, .t-error, .t-cursor,
.blink, .code-decoration { display: none; }

/* =============================================
   POSTS SECTION
   ============================================= */
.posts-section { padding: 56px 0; }

.section-title {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--text-subtle);
    margin-bottom: 36px;
}
.section-title span:first-child { color: var(--ghost-accent-color, #2448bf); }
.section-title-line { flex: 1; height: 1px; background: var(--border); }

/* =============================================
   POST GRID & CARDS
   ============================================= */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

.post-grid .post-card:first-child {
    grid-column: 1 / -1;
    flex-direction: row;
    min-height: 320px;
}
.post-grid .post-card:first-child .post-card-image-link,
.post-grid .post-card:first-child .post-card-no-image {
    flex: 0 0 50%;
    aspect-ratio: unset;
    min-height: 100%;
    width: 50%;
}
.post-grid .post-card:first-child .post-card-content { padding: 32px 36px; justify-content: center; }
.post-grid .post-card:first-child .post-card-title { font-size: 1.55rem; line-height: 1.2; margin-bottom: 12px; }
.post-grid .post-card:first-child .post-card-excerpt {
    font-size: .95rem;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition);
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
}
.post-card:hover { border-color: var(--surface-2); transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0,0,0,.09); }

.post-card.has-image .post-card-image-link { display: block; aspect-ratio: 16/9; overflow: hidden; background: var(--surface); }
.post-card-image { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.post-card:hover .post-card-image { transform: scale(1.03); }

.post-card-no-image {
    aspect-ratio: 16/9;
    min-height: 160px;
    background: var(--surface);
    display: flex;
    align-items: flex-end;
    padding: 20px;
    position: relative;
}
.post-card-no-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, color-mix(in srgb, var(--ghost-accent-color, #2448bf) 8%, transparent), transparent 60%);
}

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

.post-card-meta { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }

.post-card-tag {
    font-size: .67rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--ghost-accent-color, #2448bf);
    background: color-mix(in srgb, var(--ghost-accent-color, #2448bf) 10%, transparent);
    padding: 3px 9px;
    border-radius: 999px;
    opacity: 1;
}
.post-card-tag:hover { opacity: .8; }

.post-card-reading-time { font-size: .72rem; color: var(--text-subtle); }
.post-card-title { font-size: 1.05rem; font-weight: 600; line-height: 1.3; margin-bottom: 8px; color: var(--text-heading); }
.post-card-title a { color: inherit; opacity: 1; }
.post-card-title a:hover { opacity: .82; }

.post-card-excerpt { font-size: .875rem; color: var(--text-muted); line-height: 1.6; flex: 1; margin-bottom: 14px; }
.post-card-footer { margin-top: auto; }
.post-card-date { font-size: .75rem; color: var(--text-subtle); }

/* =============================================
   POST PAGE
   ============================================= */
.post-header { padding: 48px 0 40px; border-bottom: 1px solid var(--border); }
.post-header-inner { max-width: calc(var(--content-width) + 48px); }
.post-header-meta { display: flex; align-items: center; gap: 14px; margin-top: 18px; }

.post-tag {
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--ghost-accent-color, #2448bf);
    background: color-mix(in srgb, var(--ghost-accent-color, #2448bf) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--ghost-accent-color, #2448bf) 25%, transparent);
    padding: 5px 12px;
    border-radius: 999px;
    opacity: 1;
}

.post-reading-time { font-size: .85rem; color: var(--text-subtle); }
.post-title { font-size: clamp(1.8rem, 4vw, 2.9rem); line-height: 1.1; margin-bottom: 16px; color: var(--text-heading); }
.post-subtitle { font-size: 1.12rem; color: var(--text-muted); line-height: 1.65; margin-bottom: 28px; }
.post-byline { display: flex; align-items: center; gap: 12px; }
.author-avatar-link { display: block; flex-shrink: 0; opacity: 1; }
.author-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); background: var(--surface); }
.author-avatar--placeholder { display: flex; align-items: center; justify-content: center; background: var(--surface); font-weight: 700; font-size: 1rem; color: var(--ghost-accent-color, #2448bf); border: 2px solid var(--border); }
.post-byline-author { display: block; font-size: .9rem; font-weight: 600; color: var(--text-heading); }
.post-byline-author a { color: inherit; opacity: 1; }
.post-byline-author a:hover { opacity: .75; }
.post-byline-date { display: block; font-size: .85rem; color: var(--text-subtle); margin-top: 2px; }

.post-feature-image-wrap { max-width: var(--content-width); margin: 0 auto; padding: 0 24px; padding-top: 36px; }
.post-feature-image { width: 100%; height: auto; max-height: 480px; object-fit: cover; border-radius: var(--radius-lg); border: 1px solid var(--border); display: block; background: var(--surface); }
.post-feature-image-wrap figcaption { font-size: .78rem; color: var(--text-subtle); text-align: center; padding: 10px 24px; }

.post-content-wrap { padding: 48px 0; }
.post-content { max-width: var(--content-width); margin: 0 auto; padding: 0 24px; }

.gh-content > * + * { margin-top: 1.5em; }
.gh-content h2 { font-size: 1.65rem; margin-top: 2.5em; margin-bottom: .4em; padding-top: .8em; border-top: 1px solid var(--border); }
.gh-content h3 { font-size: 1.3rem; margin-top: 2em; margin-bottom: .4em; }
.gh-content h4 { font-size: 1.1rem; margin-top: 1.8em; }
.gh-content p { color: var(--text); font-size: 1.05rem; line-height: 1.8; }
.gh-content strong { color: var(--text-heading); font-weight: 700; }
.gh-content a { color: var(--ghost-accent-color, #2448bf); text-decoration: underline; text-underline-offset: 3px; opacity: 1; }
.gh-content a:hover { opacity: .75; }
.gh-content ul, .gh-content ol { padding-left: 1.5em; color: var(--text); font-size: 1.05rem; line-height: 1.8; }
.gh-content li + li { margin-top: .4em; }
.gh-content blockquote { border-left: 3px solid var(--ghost-accent-color, #2448bf); margin-left: 0; padding: 10px 0 10px 22px; color: var(--text-muted); font-size: 1.05rem; font-style: italic; }
/* code blocks: see CODE BLOCKS section below */
.gh-content hr { border: none; border-top: 1px solid var(--border); margin: 3em 0; }
.gh-content figure { margin: 2em 0; }
.gh-content figure img { border-radius: var(--radius); border: 1px solid var(--border); width: 100%; background: var(--surface); }
.gh-content figcaption { font-size: .82rem; color: var(--text-subtle); text-align: center; margin-top: 10px; }

/* =============================================
   POST TAGS & AUTHOR
   ============================================= */
.post-tags-wrap { padding-bottom: 36px; border-bottom: 1px solid var(--border); margin-bottom: 36px; }
.post-tags { display: flex; flex-wrap: wrap; gap: 8px; max-width: var(--content-width); margin: 0 auto; }
.post-tag-item {
    font-size: .7rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
    color: var(--text-muted); background: var(--surface); border: 1px solid var(--border);
    padding: 5px 14px; border-radius: 999px; transition: all var(--transition); opacity: 1;
}
.post-tag-item:hover { color: var(--ghost-accent-color, #2448bf); border-color: color-mix(in srgb, var(--ghost-accent-color, #2448bf) 40%, transparent); background: color-mix(in srgb, var(--ghost-accent-color, #2448bf) 8%, transparent); opacity: 1; }

.author-card-wrap { padding-bottom: 48px; }
.author-card { display: flex; gap: 18px; max-width: var(--content-width); margin: 0 auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; }
.author-card-avatar { flex-shrink: 0; width: 58px; height: 58px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); background: var(--surface-2); }
.author-card-avatar--placeholder { display: flex; align-items: center; justify-content: center; background: var(--surface-2); font-weight: 700; font-size: 1.4rem; color: var(--ghost-accent-color, #2448bf); }
.author-card-name { font-size: 1rem; margin-bottom: 6px; }
.author-card-name a { color: var(--text-heading); opacity: 1; }
.author-card-name a:hover { opacity: .75; }
.author-card-bio { font-size: .9rem; color: var(--text-muted); line-height: 1.6; }

/* =============================================
   RELATED POSTS
   ============================================= */
.related-posts-section { padding: 48px 0; background: var(--surface); border-top: 1px solid var(--border); }
.related-posts-title { font-size: .78rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--text-subtle); margin-bottom: 28px; }
.related-posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

/* =============================================
   ARCHIVE HEADERS
   ============================================= */
.archive-header { padding: 48px 0 40px; border-bottom: 1px solid var(--border); }
.archive-header-inner { max-width: 600px; }
.archive-label { display: inline-block; font-size: .7rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ghost-accent-color, #2448bf); margin-bottom: 10px; }
.archive-title { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 10px; color: var(--text-heading); }
.archive-description { font-size: 1rem; color: var(--text-muted); line-height: 1.7; margin-bottom: 10px; }
.archive-count { font-size: .85rem; color: var(--text-subtle); }
.author-profile { display: flex; gap: 22px; align-items: flex-start; }
.author-profile-avatar { flex-shrink: 0; width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); background: var(--surface); }
.author-profile-avatar--placeholder { display: flex; align-items: center; justify-content: center; background: var(--surface); font-weight: 700; font-size: 2rem; color: var(--ghost-accent-color, #2448bf); }
.author-website { font-size: .85rem; color: var(--text-subtle); margin-top: 8px; }

/* =============================================
   PAGE
   ============================================= */
.page-header { padding: 48px 0 40px; border-bottom: 1px solid var(--border); }
.page-header-inner { max-width: calc(var(--content-width) + 48px); }
.page-title { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 14px; color: var(--text-heading); }
.page-subtitle { font-size: 1.12rem; color: var(--text-muted); line-height: 1.65; }

/* =============================================
   PAGINATION
   ============================================= */
.pagination { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 40px 0 0; font-size: .85rem; }
.pagination .older-posts,
.pagination .newer-posts { background: var(--bg); border: 1px solid var(--border); color: var(--text); padding: 8px 20px; border-radius: 999px; transition: all var(--transition); opacity: 1; }
.pagination .older-posts:hover,
.pagination .newer-posts:hover { border-color: color-mix(in srgb, var(--ghost-accent-color, #2448bf) 50%, transparent); color: var(--ghost-accent-color, #2448bf); opacity: 1; }
.pagination .page-number { color: var(--text-subtle); }

/* =============================================
   ERROR 404
   ============================================= */
.error-page { padding: 80px 0; }
.error-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.error-code { font-size: 7rem; font-weight: 800; color: transparent; background: linear-gradient(135deg, var(--ghost-accent-color, #2448bf), color-mix(in srgb, var(--ghost-accent-color, #2448bf) 60%, #ec4899)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; line-height: 1; margin-bottom: 16px; }
.error-title { font-size: 2rem; margin-bottom: 10px; color: var(--text-heading); }
.error-description { font-size: 1rem; color: var(--text-muted); margin-bottom: 28px; line-height: 1.7; }

/* =============================================
   FOOTER
   ============================================= */
.site-footer { background: var(--footer-bg); border-top: 1px solid rgba(255,255,255,.06); margin-top: auto; color: var(--footer-text); }

.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 48px; padding: 52px 0; }
.footer-brand .site-logo-link { color: var(--footer-text); }
.footer-brand .site-logo-text { color: var(--footer-text); }
.footer-description { font-size: .9rem; color: var(--footer-muted); line-height: 1.65; margin-top: 12px; max-width: 280px; }
.footer-nav-title { font-size: .7rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--footer-muted); margin-bottom: 14px; }
.footer-nav-list, .footer-nav-list .nav, .footer-nav-list ul { list-style: none; display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; }
.footer-nav-list li, .footer-nav-list .nav li { list-style: none; }
.footer-nav-list li a, .footer-nav-list .nav li a { font-size: .9rem; color: var(--footer-muted); transition: color var(--transition); opacity: 1; }
.footer-nav-list li a:hover, .footer-nav-list .nav li a:hover { color: var(--footer-text); opacity: 1; }
.footer-subscribe-text { font-size: .875rem; color: var(--footer-muted); line-height: 1.65; margin-bottom: 14px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.07); }
.footer-bottom-inner { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; }
.footer-copyright, .footer-powered { font-size: .82rem; color: var(--footer-muted); }
.footer-powered a { color: var(--footer-muted); opacity: 1; }
.footer-powered a:hover { color: var(--footer-text); opacity: 1; }
.footer-logo { height: 26px; width: auto; }

/* =============================================
   MOTION
   ============================================= */
@keyframes rise-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
.hero-content, .hero-image-wrap, .subscribe-content { animation: rise-in 0.6s ease both; }
.post-card { animation: rise-in 0.6s ease both; animation-delay: 0.04s; }
.post-card:nth-child(2) { animation-delay: 0.08s; }
.post-card:nth-child(3) { animation-delay: 0.12s; }
.post-card:nth-child(4) { animation-delay: 0.16s; }
.post-card:nth-child(5) { animation-delay: 0.2s; }
.post-card:nth-child(6) { animation-delay: 0.24s; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
    .hero-inner { grid-template-columns: 1fr; gap: 36px; }
    .hero-image-wrap { aspect-ratio: 16/7; }
    .feature-grid { grid-template-columns: 1fr; }
    .recent-strip-grid { grid-template-columns: repeat(2, 1fr); }
    .post-grid { grid-template-columns: repeat(2, 1fr); }
    .post-grid .post-card:first-child { grid-column: 1 / -1; flex-direction: row; min-height: 240px; }
    .post-grid .post-card:first-child .post-card-image-link { flex: 0 0 44%; }
    .post-grid .post-card:first-child .post-card-content { padding: 22px 26px; }
    .post-grid .post-card:first-child .post-card-title { font-size: 1.2rem; }
    .subscribe-inner { grid-template-columns: 1fr; gap: 36px; }
    .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
    .footer-brand { grid-column: 1 / -1; }
    .related-posts-grid { grid-template-columns: repeat(2, 1fr); }
    .error-inner { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    html { font-size: 16px; }
    .site-nav { display: none; }
    .nav-toggle { display: flex; }
    .recent-strip-grid { grid-template-columns: 1fr; }
    .post-grid { grid-template-columns: 1fr; }
    .post-grid .post-card:first-child { flex-direction: column; min-height: unset; }
    .post-grid .post-card:first-child .post-card-image-link { flex: unset; aspect-ratio: 16/9; width: 100%; }
    .post-grid .post-card:first-child .post-card-content { padding: 20px 22px; }
    .post-grid .post-card:first-child .post-card-title { font-size: 1.25rem; }
    .related-posts-grid { grid-template-columns: 1fr; }
    .author-profile { flex-direction: column; }
    .footer-inner { grid-template-columns: 1fr; gap: 28px; padding: 36px 0; }
    .footer-bottom-inner { flex-direction: column; gap: 8px; text-align: center; }
    .post-header { padding: 32px 0 28px; }
    .posts-section { padding: 36px 0; }
    .subscribe-section { padding: 48px 0; }
    .feature-grid-section { padding: 32px 0 8px; }
    .mobile-nav.is-open { display: block; }
    .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
    .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* =============================================
   KOENIG CARD STYLES
   ============================================= */
.kg-width-wide { position: relative; width: 85vw; min-width: 100%; margin: 2em auto; transform: translateX(calc(50% - 42.5vw)); }
.kg-width-full { position: relative; width: 100vw; left: 50%; right: 50%; margin-left: -50vw; margin-right: -50vw; }

.kg-image-card { margin: 2em 0; }
.kg-image-card img { border-radius: var(--radius); border: 1px solid var(--border); width: 100%; background: var(--surface); }
.kg-image-card figcaption { font-size: .82rem; color: var(--text-subtle); text-align: center; margin-top: 10px; }

.kg-gallery-card { margin: 2em 0; }
.kg-gallery-container { display: flex; flex-direction: column; gap: 6px; }
.kg-gallery-row { display: flex; gap: 6px; }
.kg-gallery-image { flex: 1; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.kg-gallery-card figcaption { font-size: .82rem; color: var(--text-subtle); text-align: center; margin-top: 10px; }

.kg-bookmark-card { margin: 2em 0; }
.kg-bookmark-container { display: flex; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; text-decoration: none; transition: border-color var(--transition); opacity: 1; }
.kg-bookmark-container:hover { border-color: color-mix(in srgb, var(--ghost-accent-color, #2448bf) 50%, transparent); opacity: 1; }
.kg-bookmark-content { padding: 20px 24px; flex: 1; min-width: 0; }
.kg-bookmark-title { font-size: 1rem; font-weight: 600; color: var(--text-heading); margin-bottom: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kg-bookmark-description { font-size: .875rem; color: var(--text-muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 12px; }
.kg-bookmark-metadata { display: flex; align-items: center; gap: 8px; font-size: .75rem; color: var(--text-subtle); }
.kg-bookmark-icon { width: 16px; height: 16px; border-radius: 2px; }
.kg-bookmark-thumbnail { flex-shrink: 0; width: 160px; }
.kg-bookmark-thumbnail img { width: 100%; height: 100%; object-fit: cover; }

.kg-callout-card { display: flex; gap: 14px; padding: 18px 22px; background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--ghost-accent-color, #2448bf); border-radius: var(--radius); margin: 2em 0; }
.kg-callout-emoji { font-size: 1.2rem; flex-shrink: 0; margin-top: 2px; }
.kg-callout-text { font-size: 1rem; color: var(--text); line-height: 1.7; }

.kg-toggle-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin: 2em 0; overflow: hidden; }
.kg-toggle-heading { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; cursor: pointer; user-select: none; }
.kg-toggle-heading-text { font-weight: 600; color: var(--text-heading); font-size: 1rem; }
.kg-toggle-card-icon { color: var(--text-muted); transition: transform var(--transition); }
.kg-toggle-card[open] .kg-toggle-card-icon { transform: rotate(180deg); }
.kg-toggle-content { padding: 0 18px 14px; color: var(--text-muted); font-size: .95rem; line-height: 1.7; border-top: 1px solid var(--border); }

.kg-video-card { margin: 2em 0; }
.kg-video-card video { width: 100%; border-radius: var(--radius); border: 1px solid var(--border); }

.kg-audio-card { display: flex; align-items: center; gap: 14px; padding: 14px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin: 2em 0; }
.kg-audio-thumbnail { width: 48px; height: 48px; border-radius: var(--radius-sm); object-fit: cover; flex-shrink: 0; background: var(--surface-2); }
.kg-audio-title { font-size: .95rem; font-weight: 600; color: var(--text-heading); }
.kg-audio-player { flex: 1; }
.kg-audio-player audio { width: 100%; accent-color: var(--ghost-accent-color, #2448bf); }

.kg-product-card { display: flex; gap: 20px; padding: 22px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin: 2em 0; align-items: flex-start; }
.kg-product-card-image { width: 80px; height: 80px; border-radius: var(--radius-sm); object-fit: cover; flex-shrink: 0; }
.kg-product-card-title { font-size: 1.1rem; font-weight: 600; color: var(--text-heading); margin-bottom: 6px; }
.kg-product-card-description { font-size: .9rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 12px; }
.kg-product-card-button { display: inline-flex; align-items: center; background: var(--ghost-accent-color, #2448bf); color: #ffffff; font-size: .85rem; font-weight: 600; padding: 8px 18px; border-radius: 999px; text-decoration: none; opacity: 1; }
.kg-product-card-button:hover { opacity: .85; }

.kg-header-card { padding: 44px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); margin: 2em 0; text-align: center; }
.kg-header-card h2 { font-size: 2rem; color: var(--text-heading); margin-bottom: 12px; }
.kg-header-card p { font-size: 1rem; color: var(--text-muted); margin-bottom: 22px; }
.kg-header-card-button { display: inline-flex; align-items: center; background: var(--ghost-accent-color, #2448bf); color: #ffffff; font-size: .9rem; font-weight: 600; padding: 10px 24px; border-radius: 999px; text-decoration: none; opacity: 1; }

.kg-file-card { display: flex; align-items: center; gap: 14px; padding: 14px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin: 2em 0; text-decoration: none; transition: border-color var(--transition); opacity: 1; }
.kg-file-card:hover { border-color: color-mix(in srgb, var(--ghost-accent-color, #2448bf) 50%, transparent); opacity: 1; }
.kg-file-card-contents { flex: 1; min-width: 0; }
.kg-file-card-title { font-size: .95rem; font-weight: 600; color: var(--text-heading); }
.kg-file-card-caption { font-size: .8rem; color: var(--text-muted); margin-top: 2px; }
.kg-file-card-metadata { font-size: .72rem; color: var(--text-subtle); margin-top: 4px; }
.kg-file-card-icon { color: var(--ghost-accent-color, #2448bf); flex-shrink: 0; }

.kg-embed-card { margin: 2em 0; }
.kg-embed-card iframe { border-radius: var(--radius); border: 1px solid var(--border); width: 100%; }

.kg-code-card { margin: 2em 0; }
.kg-code-card pre { background: var(--surface) !important; border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; overflow-x: auto; font-family: var(--font-mono); font-size: .85rem; line-height: 1.7; color: var(--text); }

.kg-hr-card { margin: 3em 0; border: none; border-top: 1px solid var(--border); }

.kg-button-card { margin: 2em 0; text-align: center; }
.kg-button-card .kg-btn { display: inline-flex; align-items: center; background: var(--ghost-accent-color, #2448bf); color: #ffffff; font-size: .95rem; font-weight: 600; padding: 12px 28px; border-radius: 999px; text-decoration: none; transition: opacity var(--transition); opacity: 1; }
.kg-button-card .kg-btn:hover { opacity: .85; }
.kg-button-card .kg-btn-accent { background: var(--ghost-accent-color, #2448bf); }

.gh-post-upgrade-cta,
.gh-post-upgrade-cta-content { background: var(--surface) !important; border: 1px solid var(--border) !important; border-radius: var(--radius-lg) !important; }

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

/* =============================================
   DARK MODE
   ============================================= */

/* Toggle button icons */
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
html.dark .theme-toggle .icon-sun { display: block; }
html.dark .theme-toggle .icon-moon { display: none; }

/* Dark palette */
html.dark {
    --bg:           #121217;
    --surface:      #1a1b20;
    --surface-2:    #21222a;
    --border:       #2a2b33;
    --border-light: #34353f;

    --text:         #d4d8e4;
    --text-heading: #f1f3f7;
    --text-muted:   #8b90a0;
    --text-subtle:  #5c6070;

    --footer-bg:    #0c0c10;
    --footer-surface: #16161c;
    --footer-text:  #e8eaf0;
    --footer-muted: #6b7080;
}

html.dark body {
    background:
        radial-gradient(900px 520px at 12% -10%, rgba(36,72,191,.12), transparent 60%),
        radial-gradient(700px 520px at 90% 0%, rgba(36,72,191,.08), transparent 55%),
        var(--bg);
}

/* Header */
html.dark .site-header {
    background: rgba(18, 18, 23, .88);
    border-bottom-color: var(--border);
}

/* Logo text */
html.dark .site-logo-text { color: var(--text-heading); }

/* Nav links */
html.dark .site-nav .nav li a,
html.dark .site-nav ul li a { color: var(--text-muted); }
html.dark .site-nav .nav li a:hover,
html.dark .site-nav ul li a:hover,
html.dark .site-nav .nav li.nav-current a,
html.dark .site-nav ul li.nav-current a {
    color: var(--text-heading);
    background: var(--surface-2);
}

html.dark .header-link { color: var(--text-muted); }
html.dark .header-link:hover { color: var(--text-heading); background: var(--surface-2); }

html.dark .header-icon {
    color: var(--text-muted);
    background: var(--surface);
    border-color: var(--border);
}
html.dark .header-icon:hover { color: var(--text-heading); background: var(--surface-2); }

/* Account button */
html.dark .btn-account { color: var(--text); border-color: var(--border); }
html.dark .btn-account:hover { background: var(--surface-2); }

/* Mobile nav */
html.dark .mobile-nav { background: var(--bg); border-top-color: var(--border); }
html.dark .mobile-nav-list li a { color: var(--text); }

/* Hero */
html.dark .hero-section { border-bottom-color: var(--border); }
html.dark .hero-title { color: var(--text-heading); }
html.dark .hero-excerpt { color: var(--text-muted); }
html.dark .hero-input {
    background: var(--surface);
    border-color: var(--border);
    color: var(--text);
}
html.dark .hero-input::placeholder { color: var(--text-subtle); }
html.dark .hero-image-wrap { border-color: var(--border); background: var(--surface); }

/* Recent strip */
html.dark .recent-strip { background: var(--surface); border-bottom-color: var(--border); }
html.dark .recent-strip-grid { background: var(--border); border-color: var(--border); }
html.dark .strip-card { background: var(--bg); }
html.dark .strip-card:hover { background: var(--surface-2); }
html.dark .strip-card-title { color: var(--text-heading); }

/* Subscribe */
html.dark .subscribe-section { background: var(--surface); border-color: var(--border); }
html.dark .subscribe-title { color: var(--text-heading); }
html.dark .subscribe-description { color: var(--text-muted); }

/* Feature grid */
html.dark .feature-grid-section { background: transparent; }
html.dark .feature-card {
    background: var(--surface);
    border-color: var(--border);
    box-shadow: 0 4px 16px rgba(0,0,0,.25);
}
html.dark .feature-card:hover { border-color: var(--border-light); box-shadow: 0 8px 28px rgba(0,0,0,.35); }
html.dark .feature-image-link { background: var(--surface-2); }
html.dark .feature-title { color: var(--text-heading); }
html.dark .feature-excerpt { color: var(--text-muted); }
html.dark .feature-card--mini { background: var(--surface); border-color: var(--border); }
html.dark .feature-mini-thumb { background: var(--surface-2); }
html.dark .feature-mini-title { color: var(--text-heading); }

/* Section title */
html.dark .section-title { color: var(--text-subtle); }
html.dark .section-title-line { background: var(--border); }

/* Post cards */
html.dark .post-card {
    background: var(--surface);
    border-color: var(--border);
    box-shadow: 0 4px 16px rgba(0,0,0,.25);
}
html.dark .post-card:hover { border-color: var(--border-light); box-shadow: 0 10px 30px rgba(0,0,0,.35); }
html.dark .post-card.has-image .post-card-image-link { background: var(--surface-2); }
html.dark .post-card-no-image { background: var(--surface-2); }
html.dark .post-card-title { color: var(--text-heading); }
html.dark .post-card-excerpt { color: var(--text-muted); }
html.dark .post-card-reading-time { color: var(--text-subtle); }
html.dark .post-card-date { color: var(--text-subtle); }

/* Post page */
html.dark .post-header { border-bottom-color: var(--border); }
html.dark .post-title { color: var(--text-heading); }
html.dark .post-subtitle { color: var(--text-muted); }
html.dark .post-reading-time { color: var(--text-subtle); }
html.dark .post-byline-author { color: var(--text-heading); }
html.dark .post-byline-date { color: var(--text-subtle); }
html.dark .author-avatar { border-color: var(--border); background: var(--surface-2); }
html.dark .post-feature-image { border-color: var(--border); background: var(--surface-2); }
html.dark .post-feature-image-wrap figcaption { color: var(--text-subtle); }

/* GH content */
html.dark .gh-content h2 { border-top-color: var(--border); }
html.dark .gh-content p { color: var(--text); }
html.dark .gh-content strong { color: var(--text-heading); }
html.dark .gh-content ul, html.dark .gh-content ol { color: var(--text); }
html.dark .gh-content blockquote { color: var(--text-muted); }
html.dark .gh-content hr { border-top-color: var(--border); }
html.dark .gh-content figure img { border-color: var(--border); background: var(--surface-2); }
html.dark .gh-content figcaption { color: var(--text-subtle); }
/* dark code: see CODE BLOCKS section */

/* Post tags */
html.dark .post-tags-wrap { border-bottom-color: var(--border); }
html.dark .post-tag-item { color: var(--text-muted); background: var(--surface-2); border-color: var(--border); }
html.dark .post-tag-item:hover { background: var(--surface-2); }

/* Author card */
html.dark .author-card { background: var(--surface-2); border-color: var(--border); }
html.dark .author-card-avatar { border-color: var(--border); background: var(--surface); }
html.dark .author-card-name a { color: var(--text-heading); }
html.dark .author-card-bio { color: var(--text-muted); }

/* Related posts */
html.dark .related-posts-section { background: var(--surface); border-top-color: var(--border); }
html.dark .related-posts-title { color: var(--text-subtle); }

/* Archive */
html.dark .archive-header { border-bottom-color: var(--border); }
html.dark .archive-title { color: var(--text-heading); }
html.dark .archive-description { color: var(--text-muted); }
html.dark .archive-count { color: var(--text-subtle); }

/* Page */
html.dark .page-header { border-bottom-color: var(--border); }
html.dark .page-title { color: var(--text-heading); }
html.dark .page-subtitle { color: var(--text-muted); }

/* Pagination */
html.dark .pagination .older-posts,
html.dark .pagination .newer-posts { background: var(--surface); border-color: var(--border); color: var(--text); }
html.dark .pagination .page-number { color: var(--text-subtle); }

/* Koenig cards */
html.dark .kg-bookmark-container { background: var(--surface-2); border-color: var(--border); }
html.dark .kg-bookmark-title { color: var(--text-heading); }
html.dark .kg-bookmark-description { color: var(--text-muted); }
html.dark .kg-callout-card { background: var(--surface-2); border-color: var(--border); }
html.dark .kg-callout-text { color: var(--text); }
html.dark .kg-toggle-card { background: var(--surface-2); border-color: var(--border); }
html.dark .kg-toggle-heading-text { color: var(--text-heading); }
html.dark .kg-toggle-content { color: var(--text-muted); border-top-color: var(--border); }
html.dark .kg-audio-card { background: var(--surface-2); border-color: var(--border); }
html.dark .kg-audio-title { color: var(--text-heading); }
html.dark .kg-file-card { background: var(--surface-2); border-color: var(--border); }
html.dark .kg-file-card-title { color: var(--text-heading); }
html.dark .kg-header-card { background: var(--surface-2); border-color: var(--border); }
html.dark .kg-header-card h2 { color: var(--text-heading); }
html.dark .kg-header-card p { color: var(--text-muted); }
html.dark .kg-code-card pre { background: var(--surface-2) !important; border-color: var(--border); color: var(--text); }
html.dark .kg-image-card img { border-color: var(--border); background: var(--surface-2); }
html.dark .kg-product-card { background: var(--surface-2); border-color: var(--border); }
html.dark .kg-product-card-title { color: var(--text-heading); }
html.dark .kg-product-card-description { color: var(--text-muted); }

/* dark tokens: see CODE BLOCKS section */

/* =============================================
   POST FOOTER — Tags + Share
   ============================================= */
.post-footer-wrap {
    padding: 40px 0;
    border-top: 1px solid var(--border);
    max-width: var(--content-width);
    margin: 0 auto;
}

.post-footer-row {
    display: flex;
    gap: 48px;
    flex-wrap: wrap;
}

.post-footer-col {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.post-footer-label {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-heading);
    letter-spacing: -.01em;
}

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

.post-tags-list .post-tag-item {
    font-size: .78rem;
    font-weight: 500;
    letter-spacing: .04em;
    text-transform: none;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 6px 16px;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    opacity: 1;
}
.post-tags-list .post-tag-item:hover {
    color: var(--text-heading);
    border-color: var(--surface-2);
    background: var(--surface-2);
    opacity: 1;
}

/* Share buttons */
.post-share-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.post-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    opacity: 1;
    font-family: inherit;
    font-size: 1rem;
    flex-shrink: 0;
}
.post-share-btn:hover {
    color: var(--text-heading);
    background: var(--surface-2);
    border-color: var(--surface-2);
    opacity: 1;
}
.post-share-copy { position: relative; }
.post-share-copy .icon-check { display: none; }
.post-share-copy.copied .icon-share { display: none; }
.post-share-copy.copied .icon-check { display: block; color: #22c55e; }

/* Dark mode overrides */
html.dark .post-footer-wrap { border-top-color: var(--border); }
html.dark .post-footer-label { color: var(--text-heading); }
html.dark .post-tags-list .post-tag-item { color: var(--text); background: var(--surface-2); border-color: var(--border); }
html.dark .post-tags-list .post-tag-item:hover { color: var(--text-heading); background: var(--surface); border-color: var(--border-light); }
html.dark .post-share-btn { color: var(--text-muted); background: var(--surface-2); border-color: var(--border); }
html.dark .post-share-btn:hover { color: var(--text-heading); background: var(--surface); border-color: var(--border-light); }

/* =============================================
   YOU MIGHT ALSO LIKE
   ============================================= */
.you-might-like {
    padding: 48px 0 64px;
    border-top: 1px solid var(--border);
    margin-top: 0;
}

.you-might-like-title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-heading);
    letter-spacing: -.015em;
    margin-bottom: 28px;
}

.you-might-like-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.ymal-card {
    display: flex;
    flex-direction: column;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg);
    border: 1px solid var(--border);
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
    transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition);
}
.ymal-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(0,0,0,.09);
    border-color: var(--surface-2);
}

.ymal-card-image-link {
    display: block;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--surface);
    flex-shrink: 0;
}
.ymal-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}
.ymal-card:hover .ymal-card-image { transform: scale(1.04); }

.ymal-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 8px;
}

.ymal-card-tag {
    display: inline-block;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--ghost-accent-color, #2448bf);
    opacity: 1;
    width: fit-content;
}
.ymal-card-tag:hover { opacity: .75; }

.ymal-card-title {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-heading);
    letter-spacing: -.01em;
}
.ymal-card-title a { color: inherit; opacity: 1; }
.ymal-card-title a:hover { opacity: .82; }

.ymal-card-excerpt {
    font-size: .875rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Dark mode */
html.dark .you-might-like { border-top-color: var(--border); }
html.dark .you-might-like-title { color: var(--text-heading); }
html.dark .ymal-card { background: var(--surface); border-color: var(--border); box-shadow: 0 4px 16px rgba(0,0,0,.25); }
html.dark .ymal-card:hover { border-color: var(--border-light); box-shadow: 0 10px 30px rgba(0,0,0,.35); }
html.dark .ymal-card-image-link { background: var(--surface-2); }
html.dark .ymal-card-title { color: var(--text-heading); }
html.dark .ymal-card-excerpt { color: var(--text-muted); }

@media (max-width: 1024px) { .you-might-like-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) {
    .you-might-like-grid { grid-template-columns: 1fr; }
    .post-footer-row { gap: 28px; }
}

/* =============================================
   GHOST SEARCH MODAL — theme-coherent overrides
   ============================================= */

/* Light mode search */
#sodo-search-root {
    --sodo-search-bg: #ffffff;
    --sodo-search-text: #27272a;
    --sodo-search-heading: #09090b;
    --sodo-search-border: #e4e4e7;
    --sodo-search-surface: #f4f4f5;
    --sodo-search-muted: #71717a;
    --sodo-search-accent: var(--ghost-accent-color, #2448bf);
    --sodo-search-overlay: rgba(0,0,0,.35);
}

/* Override the search overlay backdrop */
.gh-search-overlay {
    background: rgba(0, 0, 0, .35) !important;
    backdrop-filter: blur(4px) !important;
}

/* Search container */
.gh-search-container {
    background: #ffffff !important;
    border: 1px solid #e4e4e7 !important;
    border-radius: 16px !important;
    box-shadow: 0 20px 60px rgba(0,0,0,.12), 0 4px 16px rgba(0,0,0,.08) !important;
    color: #27272a !important;
}

/* Search input */
.gh-search-input {
    background: transparent !important;
    color: #09090b !important;
    border-bottom: 1px solid #e4e4e7 !important;
}
.gh-search-input::placeholder { color: #a1a1aa !important; }

/* Close/clear button */
.gh-search-btn-close svg,
.gh-search-btn-clear svg { color: #71717a !important; stroke: #71717a !important; fill: #71717a !important; }

/* Section labels */
.gh-search-result-heading { color: #a1a1aa !important; font-size: .72rem !important; letter-spacing: .1em !important; text-transform: uppercase !important; }

/* Result items */
.gh-search-result { border-bottom: 1px solid #f4f4f5 !important; }
.gh-search-result:hover, .gh-search-result:focus { background: #f4f4f5 !important; }
.gh-search-result-title { color: #09090b !important; font-weight: 600 !important; }
.gh-search-result-description { color: #71717a !important; }
.gh-search-result-url { color: #a1a1aa !important; }

/* Show more */
.gh-search-more { color: #27272a !important; border-top: 1px solid #e4e4e7 !important; }
.gh-search-more:hover { background: #f4f4f5 !important; }

/* ---- Dark mode search overrides ---- */
html.dark .gh-search-overlay { background: rgba(0,0,0,.65) !important; }

html.dark .gh-search-container {
    background: #1a1b20 !important;
    border-color: #2a2b33 !important;
    color: #d4d8e4 !important;
    box-shadow: 0 20px 60px rgba(0,0,0,.5), 0 4px 16px rgba(0,0,0,.35) !important;
}

html.dark .gh-search-input {
    color: #f1f3f7 !important;
    border-bottom-color: #2a2b33 !important;
}
html.dark .gh-search-input::placeholder { color: #5c6070 !important; }

html.dark .gh-search-btn-close svg,
html.dark .gh-search-btn-clear svg { color: #8b90a0 !important; stroke: #8b90a0 !important; fill: #8b90a0 !important; }

html.dark .gh-search-result-heading { color: #5c6070 !important; }
html.dark .gh-search-result { border-bottom-color: #21222a !important; }
html.dark .gh-search-result:hover, html.dark .gh-search-result:focus { background: #21222a !important; }
html.dark .gh-search-result-title { color: #f1f3f7 !important; }
html.dark .gh-search-result-description { color: #8b90a0 !important; }
html.dark .gh-search-result-url { color: #5c6070 !important; }
html.dark .gh-search-more { color: #d4d8e4 !important; border-top-color: #2a2b33 !important; }
html.dark .gh-search-more:hover { background: #21222a !important; }

/* =============================================
   CODE BLOCKS — clean ground-up implementation
   No Prism theme is loaded; we own everything.
   ============================================= */

/* Kill ALL Prism frame/shadow/coy artifacts */
pre[class*="language-"],
code[class*="language-"],
pre[class*="language-"] > code {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
    outline: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
}

/* Also nuke the coy/tomorrow "monitor" pseudo-element */
pre[class*="language-"]::before,
pre[class*="language-"]::after,
code[class*="language-"]::before,
code[class*="language-"]::after {
    display: none !important;
    content: none !important;
    box-shadow: none !important;
}

/* ---- Block code ---- */
.gh-content pre {
    background: #f6f7fb;
    color: #2d3045;
    border: 1px solid #dde0e8;
    border-radius: var(--radius);
    font-family: var(--font-mono);
    font-size: .84rem;
    line-height: 1.78;
    padding: 22px 24px;
    overflow-x: auto;
    margin: 2em 0;
    -webkit-overflow-scrolling: touch;
    /* scrollbar */
    scrollbar-width: thin;
    scrollbar-color: #c8ccd8 transparent;
}
.gh-content pre::-webkit-scrollbar { height: 5px; }
.gh-content pre::-webkit-scrollbar-track { background: transparent; }
.gh-content pre::-webkit-scrollbar-thumb { background: #c8ccd8; border-radius: 4px; }

.gh-content pre code {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    font-size: inherit !important;
    color: inherit !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* ---- Inline code ---- */
.gh-content :not(pre) > code {
    background: #eef0f8 !important;
    color: #2d3045 !important;
    border: 1px solid #dde0e8 !important;
    border-radius: 5px !important;
    padding: 2px 7px !important;
    font-size: .84em !important;
    font-family: var(--font-mono) !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

/* ---- Light token colours ---- */
.gh-content .token.comment,
.gh-content .token.prolog,
.gh-content .token.doctype,
.gh-content .token.cdata    { color: #8b949e; font-style: italic; }
.gh-content .token.keyword,
.gh-content .token.rule,
.gh-content .token.important { color: #8b5cf6; font-weight: 600; }
.gh-content .token.string,
.gh-content .token.char,
.gh-content .token.attr-value,
.gh-content .token.regex    { color: #0891b2; }
.gh-content .token.function { color: #2563eb; }
.gh-content .token.number,
.gh-content .token.boolean,
.gh-content .token.constant { color: #e11d48; }
.gh-content .token.operator { color: #059669; }
.gh-content .token.class-name,
.gh-content .token.builtin  { color: #d97706; }
.gh-content .token.property { color: #0284c7; }
.gh-content .token.punctuation { color: #64748b; }
.gh-content .token.tag      { color: #9333ea; }
.gh-content .token.attr-name { color: #16a34a; }
.gh-content .token.selector { color: #2563eb; }
.gh-content .token.namespace { color: #c2410c; }
.gh-content .token.variable { color: #db2777; }
.gh-content .token.inserted { color: #16a34a; background: #dcfce7; }
.gh-content .token.deleted  { color: #e11d48; background: #ffe4e6; }

/* ---- DARK MODE — block code ---- */
html.dark .gh-content pre {
    background: #13141b !important;
    color: #cdd1e0 !important;
    border-color: #252630 !important;
    scrollbar-color: #32333f transparent;
}
html.dark .gh-content pre::-webkit-scrollbar-thumb { background: #32333f; }

/* ---- DARK MODE — inline code ---- */
html.dark .gh-content :not(pre) > code {
    background: #1c1d27 !important;
    color: #d4d8e8 !important;
    border-color: #2c2d3a !important;
}

/* ---- Dark token colours ---- */
html.dark .gh-content .token.comment,
html.dark .gh-content .token.prolog,
html.dark .gh-content .token.doctype,
html.dark .gh-content .token.cdata    { color: #6b7280; font-style: italic; }
html.dark .gh-content .token.keyword,
html.dark .gh-content .token.rule,
html.dark .gh-content .token.important { color: #bf80ff; font-weight: 600; }
html.dark .gh-content .token.string,
html.dark .gh-content .token.char,
html.dark .gh-content .token.attr-value,
html.dark .gh-content .token.regex    { color: #ff79c6; }
html.dark .gh-content .token.function { color: #80d4ff; }
html.dark .gh-content .token.number,
html.dark .gh-content .token.boolean,
html.dark .gh-content .token.constant { color: #ff6e6e; }
html.dark .gh-content .token.operator { color: #50fa7b; }
html.dark .gh-content .token.class-name,
html.dark .gh-content .token.builtin  { color: #ffda6a; }
html.dark .gh-content .token.property { color: #6fcfff; }
html.dark .gh-content .token.punctuation { color: #7c8899; }
html.dark .gh-content .token.tag      { color: #bf80ff; }
html.dark .gh-content .token.attr-name { color: #50fa7b; }
html.dark .gh-content .token.selector { color: #80d4ff; }
html.dark .gh-content .token.namespace { color: #ffda6a; }
html.dark .gh-content .token.variable { color: #ff79c6; }
html.dark .gh-content .token.inserted { color: #50fa7b; background: rgba(80,250,123,.08); }
html.dark .gh-content .token.deleted  { color: #ff6e6e; background: rgba(255,110,110,.08); }

/* =============================================
   INFINITE SCROLL — loader, sentinel, end msg
   ============================================= */

#infinite-sentinel {
    height: 1px;
    visibility: hidden;
}

/* loader removed */

/* End of posts message */
.infinite-end {
    text-align: center;
    font-size: .82rem;
    color: var(--text-subtle);
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: 28px 0 8px;
}
html.dark .infinite-end { color: var(--text-subtle); }

/* =============================================
   CARD ENTRANCE ANIMATION
   (replaces the old CSS @keyframes approach)
   ============================================= */
.card-hidden {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.45s ease, transform 0.45s ease;
}
.card-visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Copy button inside code blocks */
.cw-copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: .7rem;
    padding: 4px 10px;
    cursor: pointer;
    opacity: 0;
    transition: opacity .2s, background .15s, color .15s;
    line-height: 1.4;
}
.cw-copy-btn:hover { background: var(--surface); color: var(--text-heading); }
.cw-copy-btn.copied { color: #22c55e; opacity: 1 !important; }
html.dark .cw-copy-btn { background: var(--surface-2); border-color: var(--border); color: var(--text-muted); }
html.dark .cw-copy-btn:hover { background: var(--surface); color: var(--text-heading); }

/* ── Author Social Links ───────────────────────────────────────── */
.author-social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.author-social-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid currentColor;
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  transition: opacity 0.2s ease;
  opacity: 0.8;
}

.author-social-link:hover {
  opacity: 1;
}

.author-social-link svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
  flex-shrink: 0;
}

/* Per-network accent colours (optional) */
.author-social-link--x        { color: #000; }
.author-social-link--facebook { color: #1877F2; }
.author-social-link--linkedin { color: #0A66C2; }
.author-social-link--bluesky  { color: #0085FF; }
.author-social-link--threads  { color: #000; }
.author-social-link--mastodon { color: #6364FF; }
.author-social-link--tiktok   { color: #000; }
.author-social-link--youtube  { color: #FF0000; }
.author-social-link--instagram{ color: #E1306C; }


/* =============================================
   HERO SIGNAL — v6 (layered nebula system)
   ============================================= */

/* ---- Base (light mode default) ---- */
.hero-signal {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #fafafa;
}

.hsg-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* ---- Central radial pulse (CSS — light mode) ---- */
.hsg-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 1;
}

.hsg-pulse-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 50%;
    border: 1px solid;
    transform: translate(-50%, -50%) scale(0.5);
    opacity: 0;
}

/* Light mode pulse rings */
.hsg-pulse-ring--1 {
    width: 280px; height: 280px;
    border-color: rgba(249, 115, 22, 0.22);
    animation: hsg-pulse-out 5s ease-out infinite;
}
.hsg-pulse-ring--2 {
    width: 280px; height: 280px;
    border-color: rgba(14, 165, 233, 0.18);
    animation: hsg-pulse-out 5s ease-out 1.65s infinite;
}
.hsg-pulse-ring--3 {
    width: 280px; height: 280px;
    border-color: rgba(249, 115, 22, 0.12);
    animation: hsg-pulse-out 5s ease-out 3.3s infinite;
}

@keyframes hsg-pulse-out {
    0%   { transform: translate(-50%, -50%) scale(0.35); opacity: 0.85; }
    100% { transform: translate(-50%, -50%) scale(3.2);  opacity: 0; }
}

/* ---- Slow outer orbit rings ---- */
.hsg-reticle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 1;
}

.hsg-reticle-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 50%;
    border: 1px solid;
    transform: translate(-50%, -50%);
}

/* Light mode orbit rings */
.hsg-reticle-ring--1 {
    width: 420px; height: 420px;
    border-color: rgba(249, 115, 22, 0.08);
    animation: hsg-reticle-spin 90s linear infinite;
}
.hsg-reticle-ring--2 {
    width: 740px; height: 740px;
    border-color: rgba(14, 165, 233, 0.055);
    animation: hsg-reticle-spin 130s linear infinite reverse;
}
.hsg-reticle-ring--3 {
    width: 1060px; height: 1060px;
    border-color: rgba(0, 0, 0, 0.03);
    animation: hsg-reticle-spin 170s linear infinite;
}

@keyframes hsg-reticle-spin {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to   { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ---- Content ---- */
.hsg-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 24px;
    max-width: 820px;
    width: 100%;
}

/* ---- Headline ---- */
.hsg-title {
    font-family: 'Bricolage Grotesque', 'DM Sans', ui-sans-serif, system-ui, sans-serif;
    font-size: clamp(3rem, 7.5vw, 6rem);
    font-weight: 600;
    line-height: 1.04;
    letter-spacing: -0.022em;
    margin-bottom: 32px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hsg-title-row { display: block; }

/* Light mode: near-black heading */
.hsg-title-row--1 {
    color: #09090b;
    animation: hsg-slide-up 1s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
}

.hsg-title-row--2 {
    background: linear-gradient(108deg,
        #ea580c  0%,
        #f97316 30%,
        #fbbf24 62%,
        #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 220% 100%;
    animation:
        hsg-slide-up 1s cubic-bezier(0.16, 1, 0.3, 1) 0.28s both,
        hsg-gradient-shift 5s ease-in-out 1.4s infinite;
}

@keyframes hsg-gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50%       { background-position: 100% 50%; }
}

/* ---- Typewriter ---- */
.hsg-typewriter {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 1.05rem;
    line-height: 1;
    letter-spacing: 0.01em;
    min-height: 1.6em;
    animation: hsg-slide-up 1s cubic-bezier(0.16, 1, 0.3, 1) 0.44s both;
}

/* Light */
.hsg-type-prompt {
    color: rgba(234, 88, 12, 0.45);
    font-size: 1rem;
    flex-shrink: 0;
    user-select: none;
}

.hsg-type-text  { color: rgba(30, 35, 55, 0.42); }

.hsg-type-cursor {
    color: rgba(234, 88, 12, 0.6);
    user-select: none;
    animation: hsg-cursor-blink 1.1s step-end infinite;
}

@keyframes hsg-cursor-blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

/* ---- Scroll cue ---- */
.hsg-scroll-cue {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 2;
    animation: hsg-enter 1s 1s both;
}

.hsg-scroll-line {
    display: block;
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, rgba(234, 88, 12, 0.4), transparent);
    animation: hsg-scroll-drop 2.6s ease-in-out infinite;
}

/* Light */
.hsg-scroll-label {
    font-family: var(--font-mono);
    font-size: 0.52rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(0, 0, 0, 0.16);
}

@keyframes hsg-scroll-drop {
    0%   { transform: scaleY(0); opacity: 0; transform-origin: top; }
    35%  { transform: scaleY(1); opacity: 1; transform-origin: top; }
    65%  { transform: scaleY(1); opacity: 1; transform-origin: bottom; }
    100% { transform: scaleY(0); opacity: 0; transform-origin: bottom; }
}

/* ---- Bottom vignette (light) ---- */
.hero-signal::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 200px;
    background: linear-gradient(to bottom, transparent, rgba(250, 250, 250, 0.88));
    pointer-events: none;
    z-index: 3;
}

/* ---- Shared keyframes ---- */
@keyframes hsg-enter {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes hsg-slide-up {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* =============================================
   DARK MODE OVERRIDES
   ============================================= */
html.dark .hero-signal {
    background: #07070f;
}

html.dark .hsg-title-row--1 {
    color: rgba(240, 244, 252, 0.93);
}

html.dark .hsg-type-text   { color: rgba(200, 215, 235, 0.42); }
html.dark .hsg-type-prompt { color: rgba(249, 115, 22, 0.38); }
html.dark .hsg-type-cursor { color: rgba(249, 115, 22, 0.55); }

html.dark .hsg-scroll-label {
    color: rgba(255, 255, 255, 0.10);
}

html.dark .hero-signal::after {
    background: linear-gradient(to bottom, transparent, rgba(7, 7, 15, 0.82));
}

/* Dark orbit rings */
html.dark .hsg-reticle-ring--1 { border-color: rgba(249, 115, 22, 0.04); }
html.dark .hsg-reticle-ring--2 { border-color: rgba(56, 189, 248, 0.025); }
html.dark .hsg-reticle-ring--3 { border-color: rgba(255, 255, 255, 0.012); }

/* Dark pulse rings */
html.dark .hsg-pulse-ring--1 { border-color: rgba(249, 115, 22, 0.18); }
html.dark .hsg-pulse-ring--2 { border-color: rgba(56, 189, 248, 0.14); }
html.dark .hsg-pulse-ring--3 { border-color: rgba(249, 115, 22, 0.08); }

/* ---- Responsive ---- */
@media (max-width: 900px) {
    .hsg-reticle-ring--2 { width: 500px; height: 500px; }
    .hsg-reticle-ring--3 { width: 750px; height: 750px; }
}

@media (max-width: 640px) {
    .hsg-content    { padding: 0 20px; }
    .hsg-typewriter { font-size: 0.92rem; }
    .hsg-pulse-ring--1,
    .hsg-pulse-ring--2,
    .hsg-pulse-ring--3 { width: 200px; height: 200px; }
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
    .hsg-reticle-ring,
    .hsg-pulse-ring,
    .hsg-scroll-line,
    .hsg-type-cursor { animation: none !important; }
}
