/* BlackNest Theme - Faithful recreation of the original WordPress "Most" theme */

/* Space Grotesk Font */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

/* CSS Variables - BlackNest theme colors */
:root, [data-theme="light"] {
    --bn-color-primary: #8224e3;
    --bn-color-bg: #ffffff;
    --bn-color-text: #000000;
    --bn-color-text-muted: #79797c;
    --bn-color-border: #e8e8e8;
    --bn-color-contrast-lower: #f7f7f7;
    --bn-font-primary: 'Space Grotesk', sans-serif;
}

[data-theme="dark"] {
    --bn-color-primary: #a855f7;
    --bn-color-bg: #000000;
    --bn-color-text: #fcfcfd;
    --bn-color-text-muted: #919191;
    --bn-color-border: #222;
    --bn-color-contrast-lower: #151515;
}

/* Base reset for BlackNest pages */
.bn-page {
    /* font-family: var(--bn-font-secondary); */
    font-family: sans-serif;
    background: var(--bn-color-bg);
    color: var(--bn-color-text);
    min-height: 100vh;
}

/* Header */
.bn-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--bn-color-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--bn-color-border);
    transition: background 0.3s ease;
}

.bn-header__inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.bn-header__logo img {
    height: 60px;
    width: auto;
}

.bn-header__logo .logo-light {
    display: none;
}

[data-theme="dark"] .bn-header__logo .logo-dark {
    display: none;
}

[data-theme="dark"] .bn-header__logo .logo-light {
    display: block;
}

.bn-header__nav {
    display: flex;
    gap: 2rem;
}

.bn-header__nav a {
    color: var(--bn-color-text);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.bn-header__nav a:hover {
    color: var(--bn-color-primary);
}

/* Main content area */
.bn-main {
    padding-top: 80px;
}

/* Single post layout */
.bn-single-post {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

/* Article header */
.bn-article-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--bn-color-border);
}

.bn-category-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.bn-category-list a {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--bn-color-contrast-lower);
    color: var(--bn-color-text-muted);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
}

.bn-category-list a:hover {
    background: var(--bn-color-primary);
    color: #fff;
}

.bn-article-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 1.5rem 0;
    color: var(--bn-color-text);
}

@media (max-width: 768px) {
    .bn-article-title {
        font-size: 1.75rem;
    }
}

.bn-article-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    color: var(--bn-color-text-muted);
    font-size: 0.9rem;
}

.bn-article-meta .author {
    font-weight: 600;
    color: var(--bn-color-text);
}

/* Article content */
.bn-article-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.bn-article-content p {
    margin-bottom: 1.5rem;
}

.bn-article-content em {
    font-style: italic;
}

.bn-article-content a {
    color: var(--bn-color-primary);
    text-decoration: none;
}

.bn-article-content a:hover {
    text-decoration: underline;
}

.bn-article-content 
    blockquote {
        background: #f7f7f7;
        padding: 1em;
        border-left: 2px solid #79797c;
    }
}


/* Embedded PDF */
.bn-pdf-embed {
    margin: 2rem 0;
    border: 1px solid var(--bn-color-border);
    border-radius: 8px;
    overflow: hidden;
}

.bn-pdf-embed object {
    width: 100%;
    height: 590px;
    display: block;
}

.bn-pdf-fallback {
    padding: 1.5rem;
    background: var(--bn-color-contrast-lower);
    text-align: center;
}

.bn-pdf-fallback a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--bn-color-primary);
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
}

.bn-pdf-fallback a:hover {
    opacity: 0.9;
}

/* Tags */
.bn-article-tags {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--bn-color-border);
}

.bn-article-tags a {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--bn-color-contrast-lower);
    color: var(--bn-color-text);
    border-radius: 4px;
    font-size: 0.85rem;
    text-decoration: none;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.bn-article-tags a:hover {
    background: var(--bn-color-primary);
    color: #fff;
}

/* Post navigation */
.bn-post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--bn-color-border);
}

@media (max-width: 600px) {
    .bn-post-nav {
        grid-template-columns: 1fr;
    }
}

.bn-post-nav__item {
    text-decoration: none;
    color: var(--bn-color-text);
}

.bn-post-nav__item:hover h3 {
    color: var(--bn-color-primary);
}

.bn-post-nav__label {
    display: block;
    font-size: 0.75rem;
    color: var(--bn-color-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.bn-post-nav__item h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.4;
    transition: color 0.2s ease;
}

.bn-post-nav__item--next {
    text-align: right;
}

/* Related posts */
.bn-related-posts {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--bn-color-border);
}

.bn-related-posts__title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
}

.bn-related-posts__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.bn-related-post {
    background: var(--bn-color-contrast-lower);
    border-radius: 12px;
    padding: 1.5rem;
    text-decoration: none;
    color: var(--bn-color-text);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bn-related-post:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.bn-related-post__meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: var(--bn-color-text-muted);
}

.bn-related-post__author {
    font-weight: 600;
    color: var(--bn-color-text);
}

.bn-related-post__title {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 0.75rem 0;
}

.bn-related-post__excerpt {
    font-size: 0.9rem;
    color: var(--bn-color-text-muted);
    line-height: 1.6;
    margin: 0;
}

.bn-related-post__categories {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.bn-related-post__categories span {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    background: var(--bn-color-bg);
    border-radius: 4px;
    color: var(--bn-color-text-muted);
}

/* Footer */
.bn-footer {
    background: var(--bn-color-contrast-lower);
    padding: 2rem;
    text-align: center;
    color: var(--bn-color-text-muted);
    font-size: 0.85rem;
}

/* Mobile menu */
.bn-mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--bn-color-text);
}

@media (max-width: 768px) {
    .bn-mobile-menu-btn {
        display: block;
    }

    .bn-header__nav {
        display: none;
        position: absolute;
        top: 80px;
        left: 0;
        right: 0;
        background: var(--bn-color-bg);
        flex-direction: column;
        padding: 1rem;
        gap: 0;
        border-bottom: 1px solid var(--bn-color-border);
    }

    .bn-header__nav.is-open {
        display: flex;
    }

    .bn-header__nav a {
        padding: 1rem;
        border-bottom: 1px solid var(--bn-color-border);
    }

    .bn-header__nav a:last-child {
        border-bottom: none;
    }
}

/* Back to top button */
.bn-back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    background: var(--bn-color-primary);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bn-back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
}

.bn-back-to-top:hover {
    transform: translateY(-4px);
}


