/* ======================== VARIABLES ======================== */
:root {
    --hot: #CCDD00;
    --pink: #E8205E;
    --bg: #F4F2ED;
    --bg-alt: #EAE7E0;
    --text: #1a1a1a;
    --text-body: #2a2a2a;
    --muted: #888;
    --dim: #ccc;
    --card: #FFFFFF;
    --code-bg: #F0EDE6;
    --border: #ddd;
}

[data-theme="dark"] {
    --hot: #E8FF00;
    --pink: #FF2D8A;
    --bg: #0A0A0A;
    --bg-alt: #111;
    --text: #F0EDE6;
    --text-body: #ccc;
    --muted: #777;
    --dim: #333;
    --card: #151515;
    --code-bg: #1a1a1a;
    --border: #222;
}

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

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
    transition: background 0.3s, color 0.3s;
    padding-bottom: 48px;
}

a { color: inherit; }
img { max-width: 100%; height: auto; }
html { overflow-x: hidden; }

/* ======================== HEADER ======================== */
.site-header {
    max-width: 1080px;
    margin: 0 auto;
    padding: 28px 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand { display: flex; align-items: baseline; gap: 12px; }
.brand-name {
    font-family: 'Space Mono', monospace;
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
    text-decoration: none;
}
.brand-dot {
    width: 8px; height: 8px;
    background: var(--hot);
    border-radius: 50%;
    display: inline-block;
    margin-left: 2px;
}
.brand-role {
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    color: var(--muted);
}

.header-right { display: flex; align-items: center; gap: 24px; }

/* Ghost navigation override */
.site-header nav {
    display: flex;
    gap: 20px;
    font-family: 'Space Mono', monospace;
    font-size: 12px;
}
.site-header nav ul { list-style: none; display: flex; gap: 20px; }
.site-header nav a {
    color: var(--muted);
    text-decoration: none;
    padding: 4px 0;
    transition: color 0.15s;
}
.site-header nav a:hover { color: var(--text); }
.site-header nav .nav-current a { color: var(--pink); }

/* Theme toggle */
.theme-toggle {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 20px;
    width: 52px; height: 28px;
    cursor: pointer;
    position: relative;
    transition: background 0.3s;
    flex-shrink: 0;
}
.theme-toggle .knob {
    width: 22px; height: 22px;
    background: var(--text);
    border-radius: 50%;
    position: absolute;
    top: 2px; left: 3px;
    transition: transform 0.3s;
}
[data-theme="dark"] .theme-toggle .knob { transform: translateX(23px); }

/* ======================== HERO ======================== */
.hero {
    max-width: 1080px;
    margin: 0 auto;
    padding: 60px 48px 48px;
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 60px;
    align-items: center;
}
.hero-text {
    font-size: 52px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
}
.hero-text .hot { color: var(--hot); }
[data-theme="light"] .hero-text .hot {
    color: var(--text);
    background: var(--hot);
    padding: 0 6px;
    display: inline;
}
.hero-text .line2 {
    color: var(--muted);
    font-weight: 500;
    font-size: 36px;
    margin-top: 8px;
    line-height: 1.3;
}
.hero-sub {
    font-family: 'Space Mono', monospace;
    font-size: 13px;
    color: var(--muted);
    margin-top: 24px;
    line-height: 1.7;
    max-width: 480px;
}
.hero-graphic { width: 340px; height: 340px; }
.hero-graphic svg { width: 100%; height: 100%; }

/* ======================== TICKER ======================== */
.ticker {
    overflow: hidden;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 10px 0;
    background: var(--bg-alt);
}
.ticker-inner {
    display: flex; gap: 48px;
    animation: scroll 30s linear infinite;
    width: max-content;
}
.ticker-item {
    font-family: 'Space Mono', monospace;
    font-size: 11px; color: var(--muted);
    white-space: nowrap; text-transform: uppercase; letter-spacing: 0.08em;
}
.ticker-item .accent { color: var(--pink); }
@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ======================== POST LIST ======================== */
.posts-section {
    max-width: 1080px;
    margin: 0 auto;
    padding: 48px 48px 20px;
}
.section-label {
    font-family: 'Space Mono', monospace;
    font-size: 11px; text-transform: uppercase;
    letter-spacing: 0.1em; color: var(--muted);
    margin-bottom: 24px;
}

.post-entry {
    padding: 32px 0;
    border-bottom: 1px solid var(--border);
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 24px; align-items: start;
}
.post-entry:last-child { border-bottom: none; }

.post-num {
    font-family: 'Space Mono', monospace;
    font-size: 32px; font-weight: 700;
    color: var(--dim); line-height: 1;
    padding-top: 6px; transition: color 0.15s;
}
.post-entry:hover .post-num { color: var(--hot); }
[data-theme="light"] .post-entry:hover .post-num { color: var(--pink); }

.post-tags { display: flex; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.tag {
    font-family: 'Space Mono', monospace;
    font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em;
    padding: 3px 10px; border-radius: 2px;
    background: var(--bg-alt); color: var(--muted);
    border: 1px solid var(--border);
}
.tag.hot { background: var(--hot); color: #000; border-color: transparent; }
.tag.pink { background: var(--pink); color: #fff; border-color: transparent; }

.post-title {
    font-size: 28px; font-weight: 600;
    line-height: 1.25; letter-spacing: -0.01em;
    margin-bottom: 10px;
}
.post-title a { color: var(--text); text-decoration: none; transition: color 0.15s; }
.post-title a:hover { color: var(--pink); }

.post-lede { font-size: 17px; color: var(--muted); line-height: 1.65; }

.post-meta {
    font-family: 'Space Mono', monospace;
    font-size: 11px; color: var(--dim); margin-top: 12px;
}

/* ======================== ARTICLE ======================== */
.article-section {
    border-top: 4px solid var(--pink);
    background: var(--bg);
}
.article-wrapper {
    max-width: 860px;
    margin: 0 auto;
    padding: 60px 48px 80px;
}

.article-header {
    margin-bottom: 40px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border);
}
.article-label {
    font-family: 'Space Mono', monospace;
    font-size: 11px; color: var(--pink);
    text-transform: uppercase; letter-spacing: 0.1em;
    margin-bottom: 16px;
}
.article-title {
    font-size: 44px; font-weight: 700;
    line-height: 1.1; letter-spacing: -0.025em;
}
.article-meta {
    font-family: 'Space Mono', monospace;
    font-size: 12px; color: var(--muted); margin-top: 16px;
}

/* Ghost content output */
.article-body,
.gh-content {
    font-size: 22px;
    line-height: 1.9;
    color: var(--text-body);
    max-width: 760px;
    margin: 0 auto;
}
.gh-content p { margin-bottom: 28px; }
.gh-content a { color: var(--pink); text-decoration: underline; text-underline-offset: 3px; }
.gh-content a:hover { text-decoration-thickness: 2px; }
.gh-content strong { color: var(--text); font-weight: 600; }
.gh-content em { font-style: italic; }

/* Ghost heading styles */
.gh-content h2 {
    font-family: 'Space Mono', monospace;
    font-size: 11px; color: var(--muted);
    text-transform: uppercase; letter-spacing: 0.1em;
    margin-top: 44px; margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
    font-weight: 500;
}
.gh-content h3 {
    font-size: 26px;
    font-weight: 600;
    margin-top: 36px;
    margin-bottom: 16px;
    color: var(--text);
}

/* Blockquote = pull quote / punch */
.gh-content blockquote {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text);
    padding: 36px 0 36px 32px;
    margin: 24px 0;
    border-left: 6px solid var(--hot);
    letter-spacing: -0.01em;
    font-style: normal;
}
.gh-content blockquote p { margin-bottom: 0; }

/* Callout card / depth check — uses Ghost's callout card */
.gh-content .kg-callout-card {
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-left: 4px solid var(--pink);
    padding: 20px 24px;
    margin: 32px 0;
    border-radius: 0 6px 6px 0;
}
.gh-content .kg-callout-text {
    font-family: 'Space Mono', monospace;
    font-size: 14px;
    color: var(--muted);
    line-height: 1.65;
}

/* Code blocks */
.gh-content pre {
    background: var(--code-bg);
    border: 1px solid var(--border);
    padding: 20px 24px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 24px 0;
}
.gh-content code {
    font-family: 'Space Mono', monospace;
    font-size: 14px;
}

/* Lists */
.gh-content ul, .gh-content ol {
    margin: 0 0 28px 24px;
    font-size: 22px;
    line-height: 1.9;
}
.gh-content li { margin-bottom: 8px; }

/* Width overrides — required by Ghost */
.gh-content .kg-width-wide {
    max-width: 1080px;
    margin-left: calc(50% - 540px);
    margin-right: calc(50% - 540px);
}
.gh-content .kg-width-full {
    max-width: none;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    width: 100vw;
}
@media (max-width: 1180px) {
    .gh-content .kg-width-wide {
        margin-left: -48px;
        margin-right: -48px;
        max-width: none;
    }
}
@media (max-width: 900px) {
    .gh-content .kg-width-wide {
        margin-left: -24px;
        margin-right: -24px;
    }
}

/* Images */
.gh-content .kg-image-card { margin: 32px 0; }
.gh-content .kg-image-card img { border-radius: 4px; }
.gh-content figcaption {
    font-family: 'Space Mono', monospace;
    font-size: 12px;
    color: var(--muted);
    text-align: center;
    margin-top: 8px;
}

/* Divider / HR */
.gh-content hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 40px 0;
}

/* ─── Ghost Card Styles (all card types) ─── */

/* Bookmark card */
.gh-content .kg-bookmark-card {
    margin: 32px 0;
}
.gh-content .kg-bookmark-container {
    display: flex;
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
    text-decoration: none;
    color: var(--text);
    transition: border-color 0.15s;
}
.gh-content .kg-bookmark-container:hover {
    border-color: var(--pink);
}
.gh-content .kg-bookmark-content {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    order: 1;
}
.gh-content .kg-bookmark-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text);
}
.gh-content .kg-bookmark-description {
    font-size: 14px;
    color: var(--muted);
    margin-top: 8px;
    line-height: 1.5;
    max-height: 3em;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    display: -webkit-box;
}
.gh-content .kg-bookmark-metadata {
    display: flex;
    align-items: center;
    margin-top: 12px;
    font-size: 12px;
    font-family: 'Space Mono', monospace;
    color: var(--muted);
    gap: 8px;
}
.gh-content .kg-bookmark-icon {
    width: 16px;
    height: 16px;
}
.gh-content .kg-bookmark-author,
.gh-content .kg-bookmark-publisher {
    font-size: 12px;
}
.gh-content .kg-bookmark-thumbnail {
    position: relative;
    min-width: 200px;
    max-width: 200px;
    order: 2;
}
.gh-content .kg-bookmark-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

/* Gallery card */
.gh-content .kg-gallery-card {
    margin: 32px 0;
}
.gh-content .kg-gallery-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.gh-content .kg-gallery-row {
    display: flex;
    gap: 4px;
}
.gh-content .kg-gallery-row:not(:first-of-type) {
    margin: 0;
}
.gh-content .kg-gallery-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 2px;
}

/* Video card */
.gh-content .kg-video-card {
    margin: 32px 0;
    border-radius: 6px;
    overflow: hidden;
}
.gh-content .kg-video-card video {
    width: 100%;
    display: block;
}
.gh-content .kg-video-overlay {
    position: absolute;
    inset: 0;
}

/* Audio card */
.gh-content .kg-audio-card {
    margin: 32px 0;
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}
.gh-content .kg-audio-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}
.gh-content .kg-audio-player-container {
    flex: 1;
}

/* Toggle card (accordion) */
.gh-content .kg-toggle-card {
    margin: 32px 0;
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 20px 24px;
}
.gh-content .kg-toggle-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}
.gh-content .kg-toggle-heading-text {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
}
.gh-content .kg-toggle-content {
    margin-top: 16px;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-body);
}
.gh-content .kg-toggle-card[data-kg-toggle-state="close"] .kg-toggle-content {
    display: none;
}

/* File card */
.gh-content .kg-file-card {
    margin: 32px 0;
}
.gh-content .kg-file-card-container {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--code-bg);
    text-decoration: none;
    color: var(--text);
    transition: border-color 0.15s;
}
.gh-content .kg-file-card-container:hover {
    border-color: var(--pink);
}
.gh-content .kg-file-card-contents {
    flex: 1;
}
.gh-content .kg-file-card-title {
    font-size: 15px;
    font-weight: 600;
}
.gh-content .kg-file-card-caption {
    font-size: 13px;
    color: var(--muted);
    margin-top: 4px;
}
.gh-content .kg-file-card-metadata {
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    color: var(--muted);
    margin-top: 4px;
}
.gh-content .kg-file-card-icon {
    width: 24px;
    height: 24px;
}

/* Header card */
.gh-content .kg-header-card {
    margin: 32px 0;
    padding: 60px 40px;
    text-align: center;
    border-radius: 6px;
    background: var(--bg-alt);
}
.gh-content .kg-header-card h2 {
    font-size: 36px;
    font-weight: 700;
    text-transform: none;
    letter-spacing: -0.02em;
    border-bottom: none;
    padding-bottom: 0;
    color: var(--text);
}
.gh-content .kg-header-card h3 {
    font-size: 20px;
    font-weight: 400;
    color: var(--muted);
    margin-top: 12px;
}
.gh-content .kg-header-card.kg-style-dark {
    background: var(--text);
    color: var(--bg);
}
.gh-content .kg-header-card.kg-style-dark h2,
.gh-content .kg-header-card.kg-style-dark h3 { color: var(--bg); }
.gh-content .kg-header-card.kg-style-accent {
    background: var(--pink);
    color: #fff;
}
.gh-content .kg-header-card.kg-style-accent h2,
.gh-content .kg-header-card.kg-style-accent h3 { color: #fff; }

/* Button card */
.gh-content .kg-button-card {
    margin: 32px 0;
    text-align: center;
}
.gh-content .kg-btn {
    display: inline-block;
    padding: 10px 28px;
    font-family: 'Space Mono', monospace;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-radius: 4px;
    text-decoration: none;
    transition: opacity 0.15s;
}
.gh-content .kg-btn:hover { opacity: 0.85; }
.gh-content .kg-btn-accent {
    background: var(--pink);
    color: #fff;
}

/* Product card */
.gh-content .kg-product-card {
    margin: 32px 0;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 24px;
}
.gh-content .kg-product-card-title {
    font-size: 20px;
    font-weight: 700;
}
.gh-content .kg-product-card-description {
    font-size: 15px;
    color: var(--muted);
    margin-top: 8px;
    line-height: 1.6;
}

/* Signup card (used by Ghost newsletters) */
.gh-content .kg-signup-card {
    margin: 32px 0;
    padding: 40px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 6px;
    text-align: center;
}

/* Embed / video iframes */
.gh-content .kg-embed-card {
    margin: 32px 0;
}
.gh-content .kg-embed-card iframe {
    width: 100%;
    border-radius: 4px;
}

/* NFT card */
.gh-content .kg-nft-card {
    margin: 32px 0;
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
}

/* Signature */
.signature {
    margin-top: 56px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
    display: flex; align-items: center; gap: 20px;
    max-width: 760px; margin-left: auto; margin-right: auto;
}
.sig-mark { width: 48px; height: 48px; flex-shrink: 0; }
.sig-mark svg { width: 100%; height: 100%; }
.sig-info {
    font-family: 'Space Mono', monospace;
    font-size: 12px; color: var(--muted); line-height: 1.7;
}
.sig-info strong { color: var(--text); font-weight: 600; }

/* ======================== NOW PLAYING ======================== */
.now-playing {
    position: fixed; bottom: 0; left: 0; right: 0;
    background: var(--card);
    border-top: 1px solid var(--border);
    padding: 10px 48px;
    display: flex; justify-content: space-between; align-items: center;
    font-family: 'Space Mono', monospace; font-size: 11px;
    z-index: 50;
}
.now-playing .track { color: var(--muted); display: flex; align-items: center; gap: 12px; }
.eq { display: flex; gap: 2px; align-items: flex-end; height: 14px; }
.eq-bar {
    width: 3px; background: var(--pink); border-radius: 1px;
    animation: eq 0.8s ease-in-out infinite alternate;
}
.eq-bar:nth-child(1) { height: 4px; animation-delay: 0s; }
.eq-bar:nth-child(2) { height: 10px; animation-delay: 0.2s; }
.eq-bar:nth-child(3) { height: 6px; animation-delay: 0.4s; }
.eq-bar:nth-child(4) { height: 12px; animation-delay: 0.1s; }
.eq-bar:nth-child(5) { height: 3px; animation-delay: 0.3s; }
@keyframes eq { 0% { height: 3px; } 100% { height: 14px; } }
.now-playing .mood { color: var(--dim); }

/* ======================== FOOTER ======================== */
.site-footer {
    max-width: 1080px; margin: 0 auto;
    padding: 40px 48px 80px;
    border-top: 1px solid var(--border);
    font-family: 'Space Mono', monospace;
    font-size: 11px; color: var(--dim);
    display: flex; justify-content: space-between;
}
.footer-links { display: flex; gap: 20px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--pink); }

/* Author cover */
.author-cover {
    width: 100%; height: 200px;
    background-size: cover; background-position: center;
    border-radius: 6px;
    margin-bottom: 24px;
}

/* Author page */
.author-header {
    display: flex; gap: 20px; align-items: center;
    margin-bottom: 32px; padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}
.author-avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.author-bio { font-size: 15px; color: var(--muted); margin-top: 4px; line-height: 1.6; }
.author-location, .author-link {
    font-family: 'Space Mono', monospace; font-size: 11px;
    color: var(--dim); margin-right: 12px;
}
.author-link { color: var(--pink); text-decoration: none; }

/* Tag page */
.tag-description { font-size: 15px; color: var(--muted); margin-bottom: 24px; line-height: 1.6; }
.tag-image { max-width: 100%; border-radius: 4px; margin-bottom: 24px; }

/* Feature image */
.article-feature-image { margin: 0 0 32px; }
.article-feature-image img { width: 100%; border-radius: 4px; }

/* Brand logo */
.brand-logo img { height: 28px; width: auto; }

/* Pagination */
.pagination {
    max-width: 1080px;
    margin: 0 auto;
    padding: 20px 48px 40px;
    font-family: 'Space Mono', monospace;
    font-size: 12px;
    color: var(--muted);
    text-align: center;
}
.pagination a { color: var(--pink); text-decoration: none; }

/* ======================== RESPONSIVE ======================== */
@media (max-width: 900px) {
    .hero { grid-template-columns: 1fr; gap: 32px; padding: 40px 24px 32px; }
    .hero-graphic { width: 200px; height: 200px; justify-self: center; }
    .hero-text { font-size: 36px; }
    .hero-text .line2 { font-size: 26px; }

    .site-header { padding: 20px 24px; flex-wrap: wrap; gap: 12px; }
    .posts-section { padding: 40px 24px 20px; }
    .article-wrapper { padding: 40px 24px 60px; }
    .site-footer { padding: 40px 24px 80px; flex-direction: column; gap: 12px; }

    .article-title { font-size: 32px; }
    .gh-content, .article-body { font-size: 19px; }
    .gh-content blockquote { font-size: 24px; padding-left: 20px; }
    .gh-content ul, .gh-content ol { font-size: 19px; }

    .post-entry { grid-template-columns: 1fr; }
    .post-num { display: none; }

    .now-playing { padding: 10px 24px; }
    .now-playing .mood { display: none; }
}

@media (max-width: 500px) {
    .hero-graphic { display: none; }
    .hero-text { font-size: 28px; }
    .hero-text .line2 { font-size: 20px; }
    .brand-role { display: none; }
    .ticker { display: none; }

    .article-title { font-size: 26px; }
    .gh-content blockquote { font-size: 20px; padding-left: 16px; border-left-width: 4px; }
    .gh-content h3 { font-size: 22px; }
    .article-wrapper { padding: 28px 16px 48px; }
    .posts-section { padding: 32px 16px 16px; }
    .site-header { padding: 16px; }
    .now-playing { padding: 8px 16px; }
    .site-footer { padding: 32px 16px 64px; }
    .pagination { padding: 16px; }

    /* Bookmark cards stack on mobile */
    .gh-content .kg-bookmark-container { flex-direction: column; }
    .gh-content .kg-bookmark-thumbnail { max-width: none; min-width: auto; order: 0; max-height: 180px; }

    /* Header cards smaller on mobile */
    .gh-content .kg-header-card { padding: 40px 20px; }
    .gh-content .kg-header-card h2 { font-size: 26px; }

    .hero-sub { font-size: 12px; }
    .signature { flex-direction: column; text-align: center; }
}
