/* ==========================================================================
   Coherent Works — Ghost Theme (Dope-inspired layout)
   Dark theme · Manrope · Compact spacing
   ========================================================================== */

/* ---------- Variables ---------- */
:root {
    --color-bg: #111111;
    --color-surface: #1a1a1a;
    --color-border: #2a2a2a;
    --color-text: #f0f0f0;
    --color-text-secondary: #999;
    --color-accent: #a6068e;
    --color-white: #fff;
    --color-black: #000;
    --font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    --content-width: 720px;
    --wide-width: 1200px;
    --animation: ease;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    font-size: 62.5%;
}

body {
    margin: 0;
    font-family: var(--font-family);
    font-size: 1.7rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--color-text);
    text-decoration: none;
    transition: opacity 0.2s var(--animation);
}

a:hover {
    opacity: 0.8;
}

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

h1, h2, h3, h4, h5, h6 {
    margin: 0 0 0.5em;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

p {
    margin: 0 0 1.2em;
}

figure {
    margin: 0;
}

figcaption {
    margin-top: 8px;
    font-size: 1.4rem;
    color: var(--color-text-secondary);
    text-align: center;
}

/* ---------- Layout ---------- */
.site {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-content {
    flex-grow: 1;
    padding-top: 100px;
}

.home-template .site-content {
    padding-top: 0;
}

.content-area {
    width: 100%;
}

.gh-canvas {
    width: 100%;
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 24px;
}

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

/* ---------- Header ---------- */
.site-header {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    z-index: 80;
    padding: 0 24px;
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100px;
}

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

.logo {
    position: relative;
    display: inline-block;
}

.logo-image {
    max-height: 40px;
}

.logo-text {
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1;
    color: var(--color-white);
}

.header-search {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    cursor: pointer;
    color: var(--color-white);
    background: transparent;
    border: none;
    transition: opacity 0.2s;
}

.header-search:hover {
    opacity: 0.7;
}

.header-search svg {
    width: 20px;
    height: 20px;
}

/* Burger menu */
.burger {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 34px;
    height: 34px;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 7px;
    background: transparent;
}

.burger span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--color-white);
}

.home-template .burger {
    border-color: rgba(255, 255, 255, 0.5);
}

@media (max-width: 767px) {
    .navbar {
        height: 80px;
    }
}

/* ---------- Off-canvas Side Menu ---------- */
.off-canvas {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 100;
    width: 360px;
    height: 100vh;
    padding: 96px 30px 64px;
    overflow-y: auto;
    background-color: var(--color-surface);
    transition: transform 0.4s var(--animation);
    transform: translateX(360px);
    -webkit-overflow-scrolling: touch;
}

html:not(.canvas-visible) .off-canvas {
    visibility: hidden;
}

html.canvas-opened .off-canvas {
    visibility: visible;
    transform: translateX(0);
}

.off-canvas-search {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 32px;
    font-family: var(--font-family);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    cursor: pointer;
    background: var(--color-border);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    transition: border-color 0.2s;
}

.off-canvas-search:hover {
    border-color: var(--color-text-secondary);
}

.off-canvas-search svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.off-canvas-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--color-text-secondary);
    transition: color 0.2s;
}

.off-canvas-close:hover {
    color: var(--color-text);
}

.dimmer {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s var(--animation), visibility 0.4s;
}

html.canvas-opened .dimmer {
    opacity: 1;
    visibility: visible;
}

/* Widgets in side menu */
.widget + .widget {
    margin-top: 48px;
}

.widget-title {
    margin-bottom: 20px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.off-canvas-nav .nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.off-canvas-nav .nav li {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1;
}

.off-canvas-nav .nav li + li {
    margin-top: 18px;
}

.off-canvas-nav .nav a {
    color: var(--color-text);
}

.widget-links .nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget-links .nav li {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1;
}

.widget-links .nav li + li {
    margin-top: 16px;
}

.widget-links .nav a {
    color: var(--color-text-secondary);
}

.widget-links .nav a:hover {
    color: var(--color-text);
    opacity: 1;
}

/* Recent posts widget */
.recent + .recent {
    margin-top: 20px;
}

.recent-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.35;
}

.recent-title a {
    color: var(--color-text);
}

.recent-meta {
    margin-top: 6px;
    font-size: 1.3rem;
    color: var(--color-text-secondary);
}

/* ---------- Homepage: Tag Columns ---------- */
.tag-feed {
    display: grid;
    min-height: 100vh;
}

.tag-feed[data-count="1"] { grid-template-columns: 1fr; }
.tag-feed[data-count="2"] { grid-template-columns: repeat(2, 1fr); }
.tag-feed[data-count="3"] { grid-template-columns: repeat(3, 1fr); }
.tag-feed[data-count="4"] { grid-template-columns: repeat(4, 1fr); }
.tag-feed:not([data-count="1"]):not([data-count="2"]):not([data-count="3"]):not([data-count="4"]) {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.tag-column {
    position: relative;
    overflow: hidden;
    min-height: 300px;
}

.tag-column::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 10;
    background-color: rgba(0, 0, 0, 0.25);
    opacity: 0;
    transition: opacity 0.4s var(--animation);
}

.tag-column:hover::before {
    opacity: 1;
}

.tag-column:hover .tag-name::before {
    width: 30px;
    margin-right: 10px;
}

.tag-image {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tag-content {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 10;
    padding: 40px 40px 56px;
}

.tag-content::before {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: -1;
    height: 180%;
    background-image: linear-gradient(transparent, rgba(0, 0, 0, 0.35) 50%, rgba(0, 0, 0, 0.8));
}

.tag-name {
    display: flex;
    align-items: center;
    margin-bottom: 0;
    font-size: 3.2rem;
    font-weight: 800;
    color: var(--color-white);
    letter-spacing: -0.01em;
}

.tag-name::before {
    width: 0;
    height: 3px;
    margin-right: 0;
    content: "";
    background: var(--color-white);
    transition: 0.4s var(--animation);
    transition-property: margin-right, width;
    flex-shrink: 0;
}

.tag-description {
    margin-top: 10px;
    font-size: 1.6rem;
    line-height: 1.4;
    color: var(--color-white);
    opacity: 0.7;
}

.tag-permalink {
    position: absolute;
    inset: 0;
    z-index: 50;
}

@media (max-width: 767px) {
    .tag-feed {
        grid-template-columns: 1fr !important;
        min-height: auto;
    }

    .tag-column {
        min-height: 250px;
    }

    .tag-content {
        padding: 24px 24px 36px;
    }

    .tag-name {
        font-size: 2.6rem;
    }
}

/* ---------- Tag Filter Tabs ---------- */
.tag-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 40px;
}

.tag-tab {
    padding: 8px 20px;
    font-family: var(--font-family);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-text-secondary);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.2s var(--animation);
}

.tag-tab:hover {
    color: var(--color-text);
    border-color: var(--color-text-secondary);
}

.tag-tab.is-active {
    color: var(--color-white);
    background: var(--ghost-accent-color, var(--color-accent));
    border-color: var(--ghost-accent-color, var(--color-accent));
}

/* ---------- Masonry Feed (homepage Latest) ---------- */
.masonry-feed {
    columns: 3;
    column-gap: 28px;
}

.masonry-feed .post {
    display: inline-block;
    width: 100%;
    margin-bottom: 28px;
    break-inside: avoid;
    background: var(--color-surface);
    border-radius: 12px;
    overflow: hidden;
    transition: opacity 0.3s, transform 0.3s;
}

.masonry-feed .post.is-hidden {
    display: none;
}

.masonry-feed .post-media {
    border-radius: 0;
    overflow: hidden;
}

.masonry-feed .post-image {
    width: 100%;
    display: block;
    transition: transform 0.3s var(--animation);
}

.masonry-feed .post-image-link:hover .post-image {
    transform: scale(1.03);
}

.masonry-feed .post.no-image {
    border-left: none;
    padding-left: 0;
}

.masonry-feed .post-wrapper {
    padding: 20px 24px 24px;
    max-width: none;
}

.masonry-feed .post:not(.no-image) .post-wrapper {
    margin-top: 0;
}

.masonry-feed .post-title {
    font-size: 2rem;
}

.masonry-feed .post-excerpt {
    font-size: 1.5rem;
    margin-top: 6px;
}

.masonry-feed .post-footer {
    margin-top: 14px;
}

@media (max-width: 767px) {
    .masonry-feed {
        columns: 1;
    }
}

@media (min-width: 768px) and (max-width: 1080px) {
    .masonry-feed {
        columns: 2;
    }
}

/* ---------- Post Feed (tag/author pages) ---------- */
.post-feed .post {
    display: flex;
    align-items: flex-start;
    margin-bottom: 64px;
}

.post-feed .post-media {
    flex-shrink: 0;
    width: 460px;
    margin-right: 40px;
    border-radius: 8px;
    overflow: hidden;
}

.post-feed .post-image {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    display: block;
    transition: transform 0.3s var(--animation);
}

.post-feed .post-image-link:hover .post-image {
    transform: scale(1.03);
}

.post-feed .post.no-image {
    border-left: 3px solid var(--ghost-accent-color, var(--color-accent));
    padding-left: 24px;
}

.post-wrapper {
    max-width: 600px;
}

.post:not(.no-image) .post-wrapper {
    margin-top: 8px;
}

.post-header {
    margin-bottom: 12px;
}

/* Post meta */
.post-meta {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-text-secondary);
    margin-bottom: 8px;
}

.post-meta-item + .post-meta-item::before {
    content: "\02022";
    padding: 0 8px 0 4px;
    font-family: serif;
}

.post-meta-members {
    display: inline-block;
    padding: 2px 8px;
    margin-right: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-white);
    background: var(--ghost-accent-color, var(--color-accent));
    border-radius: 100px;
}

.post-meta-featured {
    color: #ff6b35;
    padding-left: 6px;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}

.post-meta-featured .material-symbols-outlined {
    font-size: 18px;
    font-variation-settings: 'FILL' 1, 'wght' 600, 'GRAD' 0, 'opsz' 20;
}

/* Post titles */
.post-title {
    margin-bottom: 0;
    font-size: 2.4rem;
    font-weight: 800;
    word-break: break-word;
}

.post-title-link {
    color: var(--color-text);
}

.post-title-link:hover {
    opacity: 1;
    color: var(--ghost-accent-color, var(--color-accent));
}

.post-tags {
    margin-bottom: 14px;
}

.post-tag {
    display: inline-block;
    padding: 4px 12px;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-white);
    background-color: var(--ghost-accent-color, var(--color-accent));
    border-radius: 100px;
    letter-spacing: 0.01em;
}

.post-excerpt {
    margin-top: 8px;
    font-size: 1.6rem;
    line-height: 1.45;
    color: var(--color-text-secondary);
    word-break: break-word;
}

.post-footer {
    display: flex;
    align-items: center;
    margin-top: 16px;
    gap: 16px;
}

.read-more {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--ghost-accent-color, var(--color-accent));
}

.read-more:hover {
    opacity: 0.85;
}

.post-author {
    display: flex;
    align-items: center;
}

.post-author-link {
    display: block;
    width: 30px;
    height: 30px;
    margin-right: -4px;
}

.post-author-link:first-child {
    z-index: 10;
}

.post-author-image {
    width: 100%;
    height: 100%;
    border: 2px solid var(--color-surface);
    border-radius: 50%;
    object-fit: cover;
}

@media (max-width: 767px) {
    .post-feed .post {
        display: block;
        margin-bottom: 48px;
    }

    .post-feed .post-media {
        width: auto;
        margin-right: 0;
        margin-bottom: 20px;
    }

    .post-feed .post-title {
        font-size: 2rem;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .post-feed .post-media {
        width: 260px;
        margin-right: 30px;
    }

    .post-feed .post-title {
        font-size: 2.2rem;
    }
}

/* ---------- Single Post / Page ---------- */
.single-post {
    margin-bottom: 0;
}

.single-post > .post-header {
    padding: 48px 0 32px;
}

.single-post .post-hero {
    position: relative;
    display: flex;
    min-height: 520px;
    overflow: hidden;
}

.single-post .post-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 10;
    background-color: rgba(0, 0, 0, 0.45);
}

.single-post .post-hero-image {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.single-post .post-media {
    margin-bottom: 48px;
    border-radius: 0;
    width: auto;
}

.single-post .post-media .post-header {
    position: relative;
    z-index: 20;
    padding: 64px 0;
    margin: auto;
}

.single-post .post-media .post-title {
    font-size: 4.8rem;
    color: var(--color-white);
    letter-spacing: -0.02em;
}

.single-post .post-media .post-meta {
    margin-top: 16px;
    color: rgba(255, 255, 255, 0.7);
}

.single-post .post-media .post-tag {
    background-color: rgba(255, 255, 255, 0.2);
}

.single-post.no-image .post-header {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 48px 24px 8px;
}

.single-post.no-image .post-title {
    font-size: 4.2rem;
}

@media (max-width: 767px) {
    .single-post .post-hero {
        min-height: 300px;
    }

    .single-post .post-media .post-title {
        font-size: 3.2rem;
    }

    .single-post.no-image .post-title {
        font-size: 3rem;
    }
}

/* ---------- Post Content (gh-content) ---------- */
.post-content {
    padding-top: 16px;
    padding-bottom: 48px;
}

.gh-content {
    font-size: 1.8rem;
    line-height: 1.45;
    word-break: break-word;
    overflow-wrap: break-word;
}

.gh-content > * + * {
    margin-top: 1.2em;
    margin-bottom: 0;
}

.gh-content p {
    margin: 0 0 1.2em;
    line-height: 1.45;
}

.gh-content h2 {
    margin-top: 2em;
    font-size: 2.8rem;
}

.gh-content h3 {
    margin-top: 1.8em;
    font-size: 2.2rem;
}

.gh-content h4 {
    margin-top: 1.6em;
    font-size: 1.8rem;
}

.gh-content a {
    color: var(--ghost-accent-color, var(--color-accent));
    text-decoration: underline;
    text-underline-offset: 2px;
}

.gh-content a:hover {
    opacity: 0.85;
}

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

.gh-content pre {
    margin: 1.5em 0;
    padding: 20px 24px;
    overflow-x: auto;
    font-size: 1.5rem;
    line-height: 1.5;
    background: var(--color-surface);
    border-radius: 8px;
}

.gh-content code {
    font-size: 0.9em;
    padding: 2px 6px;
    background: var(--color-surface);
    border-radius: 4px;
}

.gh-content pre code {
    padding: 0;
    background: none;
    border-radius: 0;
}

.gh-content img {
    border-radius: 8px;
}

.gh-content .kg-image-card,
.gh-content .kg-gallery-card {
    margin-top: 1.5em;
    margin-bottom: 1.5em;
}

.gh-content .kg-width-wide {
    max-width: min(1040px, calc(100vw - 48px));
    margin-left: calc(50% - min(520px, calc(50vw - 24px)));
}

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

.gh-content .kg-width-full img {
    border-radius: 0;
}

.gh-content .kg-callout-card {
    padding: 20px 24px;
    border-radius: 8px;
}

.gh-content .kg-bookmark-card {
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
}

.gh-content .kg-bookmark-container {
    color: var(--color-text);
}

.gh-content .kg-bookmark-content {
    padding: 20px;
}

.gh-content .kg-bookmark-title {
    font-weight: 700;
}

.gh-content .kg-bookmark-description {
    margin-top: 8px;
    font-size: 1.5rem;
    color: var(--color-text-secondary);
}

.gh-content .kg-bookmark-metadata {
    margin-top: 12px;
    font-size: 1.3rem;
    color: var(--color-text-secondary);
}

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

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

/* ---------- Author Box ---------- */
.author-box {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 32px 0;
    margin-top: 16px;
    border-top: 1px solid var(--color-border);
}

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

.author-box-name {
    margin: 0;
    font-size: 1.7rem;
}

.author-box-name a {
    color: var(--color-text);
}

.author-box-bio {
    margin: 4px 0 0;
    font-size: 1.5rem;
    color: var(--color-text-secondary);
    line-height: 1.4;
}

/* ---------- Related Posts ---------- */
.related-posts {
    margin-top: 72px;
    padding-top: 48px;
    border-top: 1px solid var(--color-border);
}

.related-title {
    margin-bottom: 32px;
    font-size: 2rem;
    color: var(--ghost-accent-color, var(--color-accent));
}

.related-posts .post-feed .post-media {
    width: 280px;
}

.related-posts .post-feed .post-title {
    font-size: 1.8rem;
}

.related-posts .post-feed .post-excerpt {
    display: none;
}

/* ---------- Term header (tag/author pages) ---------- */
.term {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 48px 24px 40px;
    text-align: center;
}

.term-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 16px;
}

.term-name {
    font-size: 3.6rem;
    margin-bottom: 8px;
}

.term-description {
    font-size: 1.7rem;
    color: var(--color-text-secondary);
    line-height: 1.45;
}

.term-count {
    display: block;
    margin-top: 8px;
    font-size: 1.4rem;
    color: var(--color-text-secondary);
}

/* ---------- Latest Posts section ---------- */
.latest-posts {
    padding: 72px 0;
}

.latest-posts .section-title {
    font-size: 2rem;
    color: var(--ghost-accent-color, var(--color-accent));
    margin-bottom: 40px;
}

/* ---------- Newsletter CTA ---------- */
.newsletter-cta {
    padding: 72px 24px;
    text-align: center;
    background: var(--color-surface);
}

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

.newsletter-cta-title {
    font-size: 2.8rem;
    margin-bottom: 12px;
}

.newsletter-cta-description {
    font-size: 1.7rem;
    color: var(--color-text-secondary);
    margin-bottom: 24px;
    line-height: 1.45;
}

.newsletter-cta-btn {
    display: inline-block;
    padding: 12px 32px;
    font-family: var(--font-family);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-white);
    background: var(--ghost-accent-color, var(--color-accent));
    border-radius: 100px;
    transition: opacity 0.2s;
}

.newsletter-cta-btn:hover {
    opacity: 0.85;
}

.newsletter-cta-member-note {
    margin-top: 12px;
    font-size: 1.4rem;
    color: var(--color-text-secondary);
}

/* ---------- Floating Subscribe ---------- */
.floating-subscribe {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 70;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-family: var(--font-family);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-white);
    background: var(--ghost-accent-color, var(--color-accent));
    border-radius: 100px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    transition: opacity 0.2s, transform 0.2s;
}

.floating-subscribe:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.floating-subscribe-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.gh-portal-triggerbtn-iframe {
    display: none !important;
}

/* ---------- Pagination ---------- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 48px 24px;
}

.pagination-link {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ghost-accent-color, var(--color-accent));
}

.pagination-info {
    font-size: 1.4rem;
    color: var(--color-text-secondary);
}

/* ---------- Footer ---------- */
.site-footer {
    border-top: 1px solid var(--color-border);
    padding: 40px 24px;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--wide-width);
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-copyright {
    font-size: 1.4rem;
    color: var(--color-text-secondary);
}

.footer-menu .nav {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 20px;
}

.footer-menu .nav a {
    font-size: 1.4rem;
    color: var(--color-text-secondary);
}

.footer-menu .nav a:hover {
    color: var(--color-text);
    opacity: 1;
}

.footer-social {
    display: flex;
    gap: 16px;
}

.footer-social a {
    color: var(--color-text-secondary);
}

.footer-social a:hover {
    color: var(--color-text);
    opacity: 1;
}

/* ---------- Merch Page ---------- */
.merch-page {
    max-width: var(--wide-width);
    margin: 0 auto;
    padding: 0 24px;
}

.merch-header {
    padding: 48px 0 32px;
    text-align: center;
}

.merch-header-title {
    font-size: 3.6rem;
}

.merch-header-description {
    font-size: 1.7rem;
    color: var(--color-text-secondary);
    margin-top: 8px;
}

.merch-cta {
    padding: 48px 0;
    text-align: center;
}

.merch-cta-btn {
    display: inline-block;
    padding: 14px 36px;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--color-white);
    background: var(--ghost-accent-color, var(--color-accent));
    border-radius: 100px;
}

/* ---------- Error Page ---------- */
.error-page {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 120px 24px;
    text-align: center;
}

.error-code {
    font-size: 12rem;
    font-weight: 800;
    color: var(--color-border);
    line-height: 1;
    margin-bottom: 16px;
}

.error-message {
    font-size: 2rem;
    color: var(--color-text-secondary);
    margin-bottom: 32px;
}

.error-link {
    font-weight: 700;
    color: var(--ghost-accent-color, var(--color-accent));
}

/* ---------- Responsive helpers ---------- */
@media (max-width: 767px) {
    .footer-inner {
        flex-direction: column;
        text-align: center;
    }

    .off-canvas {
        width: 100%;
        transform: translateX(100%);
    }

    .related-posts .post-feed .post-media {
        width: auto;
    }
}
