/* ═══════════════════════════════════════════════════════
   NEXAGEN Editorial — Ghost Blog Theme
   Typography: Newsreader (serif) + Outfit (sans)
   Palette: Warm white, near-black, champagne gold accent
   ═══════════════════════════════════════════════════════ */

:root {
    --bg: #FAFAF7;
    --bg-warm: #F5F3EE;
    --bg-card: #FFFFFF;
    --text: #1A1A18;
    --text-secondary: #6B6860;
    --text-muted: #9B9890;
    --accent: #C4A46D;
    --accent-hover: #B08D52;
    --accent-soft: rgba(196, 164, 109, 0.12);
    --border: #E8E4DC;
    --border-light: #F0EDE6;

    --font-serif: 'Newsreader', Georgia, serif;
    --font-sans: 'Outfit', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --content-width: 720px;
    --wide-width: 1080px;
    --site-width: 1240px;

    --radius: 6px;
    --radius-lg: 12px;
}

/* ─── Reset & Base ──────────────────────────────────── */

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

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

body {
    font-family: var(--font-serif);
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

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

::selection {
    background: var(--accent-soft);
    color: var(--text);
}

/* ─── Header ────────────────────────────────────────── */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(250, 250, 247, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-light);
}

.header-inner {
    max-width: var(--site-width);
    margin: 0 auto;
    padding: 0 2rem;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
}

.logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--text);
    color: var(--bg);
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 1rem;
    border-radius: 8px;
    letter-spacing: -0.02em;
}

.logo-text {
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: 0.08em;
    color: var(--text);
}

.site-nav {
    display: flex;
    gap: 0;
}

.site-nav ul {
    display: flex;
    list-style: none;
    gap: 0;
}

.site-nav a {
    font-family: var(--font-sans);
    font-size: 0.82rem;
    font-weight: 400;
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    letter-spacing: 0.01em;
    transition: color 0.2s ease;
}

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

.header-cta {
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    color: var(--accent);
    border: 1.5px solid var(--accent);
    padding: 0.5rem 1.2rem;
    border-radius: 100px;
    transition: all 0.25s ease;
}

.header-cta:hover {
    background: var(--accent);
    color: white;
}

/* ─── Hero ──────────────────────────────────────────── */

.hero {
    position: relative;
    padding: 6rem 2rem 5rem;
    max-width: var(--site-width);
    margin: 0 auto;
    overflow: hidden;
}

.hero-inner {
    position: relative;
    z-index: 1;
}

.hero-label {
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1.5rem;
}

.hero-title {
    font-family: var(--font-serif);
    font-size: clamp(2.8rem, 6vw, 4.5rem);
    font-weight: 500;
    line-height: 1.08;
    letter-spacing: -0.03em;
    color: var(--text);
    margin-bottom: 1.5rem;
}

.hero-title em {
    font-style: italic;
    color: var(--accent);
}

.hero-desc {
    font-family: var(--font-sans);
    font-size: 1.05rem;
    font-weight: 300;
    color: var(--text-secondary);
    max-width: 520px;
    line-height: 1.6;
}

.hero-accent {
    position: absolute;
    top: 2rem;
    right: -4rem;
    width: 340px;
    height: 340px;
    background: radial-gradient(circle, var(--accent-soft) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    opacity: 0.7;
}

/* ─── Featured Post ─────────────────────────────────── */

.post-feed-section {
    padding: 0 2rem 4rem;
}

.feed-inner {
    max-width: var(--site-width);
    margin: 0 auto;
}

.featured-post {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem;
    align-items: center;
    padding: 3rem 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 3rem;
}

.featured-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 16/10;
    display: block;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.featured-image:hover img {
    transform: scale(1.03);
}

.featured-content .post-tag {
    margin-bottom: 1rem;
}

.featured-title {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 0.8rem;
}

.featured-title a:hover {
    color: var(--accent);
}

.featured-excerpt {
    font-family: var(--font-sans);
    font-size: 0.92rem;
    font-weight: 300;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.2rem;
}

/* ─── Post Cards Grid ───────────────────────────────── */

.post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.post-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
}

.post-card-image {
    display: block;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.post-card-content {
    padding: 1.5rem;
}

.post-tag {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    background: var(--accent-soft);
    padding: 0.25rem 0.7rem;
    border-radius: 100px;
    margin-bottom: 0.6rem;
}

.post-card-title {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: -0.01em;
    margin-bottom: 0.5rem;
}

.post-card-title a:hover {
    color: var(--accent);
}

.post-card-excerpt {
    font-family: var(--font-sans);
    font-size: 0.82rem;
    font-weight: 300;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 1rem;
}

.post-meta {
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 400;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.meta-sep {
    color: var(--border);
}

/* ─── Post Full (Single) ────────────────────────────── */

.post-header {
    padding: 5rem 2rem 2rem;
    text-align: center;
}

.post-header-inner {
    max-width: var(--content-width);
    margin: 0 auto;
}

.post-header .post-tag {
    margin-bottom: 1.5rem;
}

.post-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 500;
    line-height: 1.12;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
}

.post-subtitle {
    font-family: var(--font-sans);
    font-size: 1.1rem;
    font-weight: 300;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.5;
}

.post-meta-full {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    font-family: var(--font-sans);
    font-size: 0.82rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.author-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.author-name {
    font-weight: 500;
    color: var(--text);
}

/* Feature Image */

.post-feature-image {
    max-width: var(--wide-width);
    margin: 0 auto 3rem;
    padding: 0 2rem;
}

.post-feature-image img {
    width: 100%;
    border-radius: var(--radius-lg);
}

.post-feature-image figcaption {
    text-align: center;
    font-family: var(--font-sans);
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.8rem;
}

/* ─── Post Content (gh-content) ─────────────────────── */

.post-content {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 2rem 4rem;
}

.gh-content > * + * {
    margin-top: 1.6rem;
}

.gh-content p {
    font-size: 1.05rem;
    line-height: 1.8;
}

.gh-content h2 {
    font-family: var(--font-serif);
    font-size: 1.7rem;
    font-weight: 500;
    letter-spacing: -0.02em;
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-light);
}

.gh-content h3 {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    margin-top: 2.5rem;
}

.gh-content h4 {
    font-family: var(--font-sans);
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-top: 2rem;
}

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

.gh-content a:hover {
    color: var(--accent-hover);
}

.gh-content strong {
    font-weight: 600;
}

.gh-content blockquote {
    border-left: 3px solid var(--accent);
    padding: 0.5rem 0 0.5rem 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--text-secondary);
}

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

.gh-content li {
    margin-bottom: 0.5rem;
}

.gh-content li::marker {
    color: var(--accent);
}

.gh-content pre {
    background: var(--text);
    color: #E8E4DC;
    padding: 1.5rem;
    border-radius: var(--radius);
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    line-height: 1.6;
    margin: 2rem 0;
}

.gh-content code {
    font-family: var(--font-mono);
    font-size: 0.88em;
    background: var(--bg-warm);
    padding: 0.15em 0.4em;
    border-radius: 3px;
}

.gh-content pre code {
    background: none;
    padding: 0;
    font-size: inherit;
}

.gh-content hr {
    border: none;
    height: 1px;
    background: var(--border);
    margin: 3rem 0;
}

.gh-content figure {
    margin: 2.5rem 0;
}

.gh-content figcaption {
    text-align: center;
    font-family: var(--font-sans);
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.8rem;
}

/* Wide/full images in content */
.gh-content .kg-width-wide {
    max-width: var(--wide-width);
    margin-left: calc(50% - var(--wide-width) / 2);
    margin-right: calc(50% - var(--wide-width) / 2);
}

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

.gh-content .kg-width-wide img,
.gh-content .kg-width-full img {
    border-radius: var(--radius);
}

/* ─── Post Footer ───────────────────────────────────── */

.post-footer {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 2rem 2rem 4rem;
    border-top: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.post-share {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.share-label {
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

.share-link {
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 400;
    color: var(--text-secondary);
    padding: 0.35rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: 100px;
    transition: all 0.2s ease;
}

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

.post-tags-list {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag-link {
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 400;
    color: var(--text-muted);
    background: var(--bg-warm);
    padding: 0.3rem 0.8rem;
    border-radius: 100px;
    transition: all 0.2s ease;
}

.tag-link:hover {
    background: var(--accent-soft);
    color: var(--accent);
}

/* ─── Read More Section ─────────────────────────────── */

.read-more-section {
    padding: 4rem 2rem;
    background: var(--bg-warm);
}

.read-more-inner {
    max-width: var(--site-width);
    margin: 0 auto;
}

.read-more-inner h3 {
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.read-more-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

/* ─── Tag Page ──────────────────────────────────────── */

.tag-header {
    padding: 5rem 2rem 3rem;
    text-align: center;
}

.tag-header-inner {
    max-width: var(--content-width);
    margin: 0 auto;
}

.tag-title {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    font-weight: 500;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.tag-description {
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 300;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.tag-count {
    font-family: var(--font-sans);
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* ─── CTA Section ───────────────────────────────────── */

.cta-section {
    padding: 5rem 2rem;
    text-align: center;
    background: var(--text);
    color: var(--bg);
}

.cta-inner {
    max-width: 560px;
    margin: 0 auto;
}

.cta-inner h2 {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    font-weight: 500;
    letter-spacing: -0.02em;
    margin-bottom: 0.8rem;
}

.cta-inner p {
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 300;
    color: #9B9890;
    margin-bottom: 2rem;
}

.cta-button {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    background: var(--accent);
    color: white;
    padding: 0.85rem 2.2rem;
    border-radius: 100px;
    transition: all 0.3s ease;
}

.cta-button:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(196, 164, 109, 0.3);
}

/* ─── Footer ────────────────────────────────────────── */

.site-footer {
    border-top: 1px solid var(--border);
    padding: 4rem 2rem 2rem;
}

.footer-inner {
    max-width: var(--site-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr 2fr;
    gap: 4rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    margin-bottom: 0.8rem;
}

.footer-tagline {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 300;
    color: var(--text-secondary);
}

.footer-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.footer-col h4 {
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 0.5rem;
}

.footer-col a {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

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

.footer-bottom {
    grid-column: 1 / -1;
    padding-top: 2rem;
    border-top: 1px solid var(--border-light);
    margin-top: 2rem;
}

.footer-bottom p {
    font-family: var(--font-sans);
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* ─── Pagination ────────────────────────────────────── */

.pagination {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-light);
    text-align: center;
}

.pagination a {
    font-family: var(--font-sans);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--accent);
    padding: 0.5rem 1.2rem;
    border: 1.5px solid var(--accent);
    border-radius: 100px;
    transition: all 0.2s ease;
}

.pagination a:hover {
    background: var(--accent);
    color: white;
}

/* ─── Responsive ────────────────────────────────────── */

@media (max-width: 1024px) {
    .featured-post {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .post-grid,
    .read-more-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    html { font-size: 16px; }

    .header-inner { padding: 0 1.2rem; }

    .site-nav { display: none; }

    .hero { padding: 4rem 1.2rem 3rem; }

    .hero-accent { display: none; }

    .post-feed-section,
    .post-header,
    .post-content,
    .post-footer,
    .read-more-section,
    .cta-section,
    .tag-header { padding-left: 1.2rem; padding-right: 1.2rem; }

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

    .footer-inner {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .post-meta-full {
        flex-direction: column;
        gap: 0.3rem;
    }

    .post-meta-full .meta-sep { display: none; }
}

/* ─── Animations ────────────────────────────────────── */

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

.hero-inner {
    animation: fadeUp 0.6s ease both;
}

.featured-post {
    animation: fadeUp 0.6s ease 0.15s both;
}

.post-card {
    animation: fadeUp 0.5s ease both;
}

.post-card:nth-child(1) { animation-delay: 0.1s; }
.post-card:nth-child(2) { animation-delay: 0.2s; }
.post-card:nth-child(3) { animation-delay: 0.3s; }
.post-card:nth-child(4) { animation-delay: 0.4s; }
.post-card:nth-child(5) { animation-delay: 0.5s; }
.post-card:nth-child(6) { animation-delay: 0.6s; }

.post-header {
    animation: fadeUp 0.6s ease both;
}
