/* KSM Journal — Ghost theme
   Mirrors the neon/cypherpunk design tokens from the main site's
   app/globals.css and tailwind.config.ts (see STYLE_GUIDE.md). */

:root {
    --neon-pink: #ff0066;
    --neon-cyan: #00ffff;
    --neon-purple: #9900ff;
    --bg: #000000;
    --fg: #ffffff;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--fg);
    font-family: monospace, ui-monospace, SFMono-Regular;
    -webkit-font-smoothing: antialiased;
}

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

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

/* Layout */

.container {
    margin-inline: auto;
    padding-inline: 1rem;
}

.container-wide {
    max-width: 72rem; /* max-w-6xl */
}

.container-narrow {
    max-width: 48rem; /* max-w-3xl */
}

/* Scrollbar */

::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #000;
}
::-webkit-scrollbar-thumb {
    background: var(--neon-pink);
    border-radius: 3px;
}

/* Scanline overlay */

.scanline {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 255, 255, 0.015) 2px,
        rgba(0, 255, 255, 0.015) 4px
    );
    animation: scanline 8s linear infinite;
}

@keyframes scanline {
    0% { background-position: 0 0; }
    100% { background-position: 0 100vh; }
}

/* Glow / accent utilities */

.accent {
    color: var(--neon-pink);
}

.glow {
    text-shadow:
        0 0 10px rgba(255, 255, 255, 0.6),
        0 0 30px rgba(255, 255, 255, 0.3),
        0 0 60px rgba(255, 255, 255, 0.15);
}

.glow-pink {
    text-shadow:
        0 0 10px rgba(255, 0, 102, 0.6),
        0 0 30px rgba(255, 0, 102, 0.3),
        0 0 60px rgba(255, 0, 102, 0.15);
}

/* Header / footer */

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

.back-link {
    display: inline-block;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.4);
    transition: color 0.15s;
}

.back-link:hover {
    color: rgba(255, 255, 255, 0.7);
}

.site-footer {
    position: relative;
    z-index: 10;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 3rem 1rem;
    background: #000;
    margin-top: 4rem;
}

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.footer-legal a {
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.4);
    transition: color 0.15s;
}

.footer-legal a:hover {
    color: rgba(255, 255, 255, 0.7);
}

.footer-brand {
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.3);
}

.footer-social {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.footer-social a {
    font-size: 0.75rem;
    font-weight: bold;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.4);
    transition: color 0.15s;
}

.footer-social a:hover {
    color: rgba(255, 255, 255, 0.8);
}

@media (min-width: 768px) {
    .footer-inner {
        flex-direction: row;
    }
}

/* Journal index */

.journal {
    min-height: 100vh;
    padding: 3rem 0 6rem;
}

.journal-head {
    margin-bottom: 3.5rem;
}

.journal-head h1 {
    font-size: 1.875rem;
    font-weight: bold;
    letter-spacing: 0.05em;
    margin: 0 0 1rem;
}

.journal-sub {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.125rem;
    line-height: 1.75;
    max-width: 42rem;
}

.journal-empty {
    color: rgba(255, 255, 255, 0.5);
}

@media (min-width: 768px) {
    .journal-head h1 {
        font-size: 2.25rem;
    }
}

/* Shared post meta */

.post-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.post-tag {
    font-size: 10.5px;
    font-weight: bold;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--neon-cyan);
    border: 1px solid rgba(0, 255, 255, 0.3);
    padding: 0.125rem 0.5rem;
}

.post-date {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
}

.post-meta--detail {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.05em;
    margin-bottom: 2rem;
}

/* Featured post */

.featured-post {
    display: grid;
    gap: 2rem;
    align-items: center;
    margin-bottom: 4rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.featured-post__media {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(to bottom right, #0a0a0a, #141414);
}

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

.featured-post .post-tag {
    font-size: 0.75rem;
    padding: 0.25rem 0.625rem;
    border-color: rgba(0, 255, 255, 0.35);
}

.featured-post__title {
    font-size: 1.5rem;
    font-weight: bold;
    line-height: 1.25;
    letter-spacing: 0.025em;
    margin: 0 0 1rem;
    color: #fff;
}

.featured-post__excerpt {
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.75;
    margin: 0 0 1.5rem;
    max-width: 32rem;
}

.featured-post__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: bold;
    color: var(--neon-pink);
    text-shadow:
        0 0 10px rgba(255, 0, 102, 0.6),
        0 0 30px rgba(255, 0, 102, 0.3),
        0 0 60px rgba(255, 0, 102, 0.15);
}

.featured-post .arrow {
    display: inline-block;
    transition: transform 0.15s;
}

.featured-post:hover .arrow {
    transform: translateX(4px);
}

@media (min-width: 768px) {
    .featured-post {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
        margin-bottom: 5rem;
        padding-bottom: 4rem;
    }

    .featured-post__title {
        font-size: 1.875rem;
    }
}

/* Post grid + cards */

.journal-grid {
    display: grid;
    gap: 2.5rem;
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .journal-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .journal-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.post-card {
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.post-card:hover {
    border-color: rgba(255, 0, 102, 0.4);
    box-shadow: 0 0 24px rgba(255, 0, 102, 0.15);
}

.post-card__media {
    position: relative;
    aspect-ratio: 4 / 3;
    margin-bottom: 1rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(to bottom right, #0a0a0a, #141414);
}

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

.post-card__title {
    font-size: 1.125rem;
    font-weight: bold;
    letter-spacing: 0.025em;
    line-height: 1.375;
    margin: 0 0 0.5rem;
    color: #fff;
}

.post-card__excerpt {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.75;
    margin: 0;
}

/* Pagination (Ghost's {{pagination}} default markup) */

.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.5);
}

.pagination a {
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.15s;
}

.pagination a:hover {
    color: var(--neon-pink);
}

/* Single post */

.journal-post {
    min-height: 100vh;
    padding: 3rem 0 6rem;
}

.post-title {
    font-size: 1.875rem;
    font-weight: bold;
    letter-spacing: 0.05em;
    margin: 0 0 3rem;
}

@media (min-width: 768px) {
    .post-title {
        font-size: 2.25rem;
    }
}

/* Ghost post body content */

.blog-content {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.75;
}

.blog-content > * + * {
    margin-top: 1.25rem;
}

.blog-content h2,
.blog-content h3,
.blog-content h4 {
    color: #fff;
    font-weight: bold;
    letter-spacing: 0.05em;
}

.blog-content h2 {
    font-size: 1.5rem;
}

.blog-content h3 {
    font-size: 1.25rem;
}

.blog-content a {
    color: var(--neon-pink);
    border-bottom: 1px solid rgba(255, 0, 102, 0.3);
    transition: border-color 0.15s;
}

.blog-content a:hover {
    border-bottom-color: var(--neon-pink);
}

.blog-content strong {
    color: #fff;
}

.blog-content ul,
.blog-content ol {
    padding-left: 1.5rem;
}

.blog-content ul {
    list-style: disc;
}

.blog-content ol {
    list-style: decimal;
}

.blog-content blockquote {
    border-left: 2px solid rgba(255, 0, 102, 0.4);
    padding-left: 1rem;
    color: rgba(255, 255, 255, 0.5);
    margin: 1.25rem 0;
}

.blog-content img {
    max-width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.blog-content code {
    color: var(--neon-cyan);
    font-size: 0.9em;
}

/* Koenig editor wide/full-bleed image cards */

.blog-content .kg-width-wide {
    margin-left: calc(50% - 50vw + 8px);
    margin-right: calc(50% - 50vw + 8px);
    width: calc(100vw - 16px);
    max-width: 64rem;
}

.blog-content .kg-width-full {
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    width: 100vw;
    max-width: 100vw;
}

.blog-content .kg-width-wide img,
.blog-content .kg-width-full img {
    border: none;
}

.page-feature-image {
    margin-bottom: 2rem;
}

.page-feature-image img {
    border: 1px solid rgba(255, 255, 255, 0.1);
}
