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

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

:root {
    --bg: #0a0a0a;
    --bg-elevated: #111111;
    --bg-card: #161616;
    --text: #f0f0f0;
    --text-muted: #888888;
    --accent: #c8ff00;
    --accent-dim: #a3cc00;
    --border: #222222;
    --radius: 12px;
}

html { scroll-behavior: smooth; }

.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.skip-link:focus {
    position: fixed;
    left: 16px;
    top: 16px;
    z-index: 1000;
    width: auto;
    height: auto;
    padding: 12px 20px;
    background: var(--accent);
    color: var(--bg);
    font-weight: 600;
    font-size: .9rem;
    border-radius: 8px;
    outline: 2px solid var(--text);
    outline-offset: 2px;
}

/* BODY & TYPOGRAPHY */
body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* HEADER NAVIGATION - Scoped to header > nav to prevent conflicts */
header > nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 20px 0;
    transition: background .3s, backdrop-filter .3s, padding .3s;
}

header > nav.scrolled {
    background: rgba(10,10,10,.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

header > nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.02em;
}

.logo span { color: var(--accent); }

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
    list-style: none;
}

.nav-links a {
    font-size: .9rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: color .2s;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: var(--accent);
    color: var(--bg);
    font-weight: 600;
    font-size: .9rem;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: transform .2s, box-shadow .2s;
    font-family: inherit;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(200,255,0,.25);
}

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 8px 30px rgba(200,255,0,.1);
}

/* HAMBURGER */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.hamburger span {
    width: 24px;
    height: 2px;
    background: var(--text);
    transition: .3s;
}

/* MOBILE NAV */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg);
    z-index: 99;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
}

.mobile-menu.open { display: flex; }

.mobile-menu a {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
}

.mobile-close {
    position: absolute;
    top: 24px;
    right: 24px;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.8rem;
    cursor: pointer;
}

/* FOOTER */
footer {
    border-top: 1px solid var(--border);
    padding: 60px 0 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 60px;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: .9rem;
    margin-top: 12px;
    max-width: 280px;
    line-height: 1.6;
}

.footer-partner {
    margin-top: 20px;
    max-width: 320px;
}

.footer-partner a {
    color: var(--text);
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: rgba(200, 255, 0, 0.35);
    text-underline-offset: 3px;
    transition: color .2s, text-decoration-color .2s;
}

.footer-partner a:hover {
    color: var(--accent);
    text-decoration-color: var(--accent);
}

.footer-col h4 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    margin-bottom: 16px;
    font-size: .95rem;
}

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

.footer-col li { margin-bottom: 10px; }

.footer-col a {
    color: var(--text-muted);
    font-size: .9rem;
    transition: color .2s;
}

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 32px;
    border-top: 1px solid var(--border);
    font-size: .85rem;
    color: var(--text-muted);
}

.footer-socials {
    display: flex;
    gap: 20px;
}

.footer-socials a { transition: color .2s; }
.footer-socials a:hover { color: var(--accent); }

/* BLOG LAYOUT - Fixed nav compensation */
body.pbn-blog-page > main {
    padding-top: 100px;
}

/* BLOG COMPONENTS */
.article-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 24px 120px;
}

.article-container h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
    color: var(--text);
}

.article-container .meta {
    font-size: .9rem;
    color: var(--text-muted);
    margin-bottom: 32px;
    display: flex;
    gap: 16px;
    align-items: center;
}

.article-container .featured-image {
    width: 100%;
    border-radius: var(--radius);
    margin-bottom: 48px;
}

.article-container .content {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text);
}

.article-container .content h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.8rem;
    font-weight: 600;
    margin: 48px 0 16px;
    color: var(--text);
}

.article-container .content h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.4rem;
    font-weight: 600;
    margin: 32px 0 12px;
    color: var(--text);
}

.article-container .content h4 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 24px 0 8px;
    color: var(--text);
}

.article-container .content p {
    margin-bottom: 20px;
}

.article-container .content ul,
.article-container .content ol {
    margin: 20px 0;
    padding-left: 20px;
}

.article-container .content li {
    margin-bottom: 8px;
}

.article-container .content img {
    width: 100%;
    border-radius: var(--radius);
    margin: 32px 0;
}

.article-container .content blockquote {
    background: var(--bg-elevated);
    border-left: 4px solid var(--accent);
    padding: 24px;
    margin: 32px 0;
    border-radius: var(--radius);
    font-style: italic;
    color: var(--text-muted);
}

.article-container .content pre {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin: 32px 0;
    overflow-x: auto;
    font-size: .9rem;
}

.article-container .content code {
    background: var(--bg-elevated);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: .9rem;
    font-family: 'Monaco', 'Menlo', monospace;
}

.article-container .content pre code {
    background: none;
    padding: 0;
}

.article-container .content table {
    width: 100%;
    border-collapse: collapse;
    margin: 32px 0;
    background: var(--bg-elevated);
    border-radius: var(--radius);
    overflow: hidden;
}

.article-container .content th,
.article-container .content td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.article-container .content th {
    background: var(--bg-card);
    font-weight: 600;
    color: var(--text);
}

/* Table of Contents - Reset fixed nav styles */
nav.toc {
    position: static !important;
    z-index: auto !important;
    width: auto !important;
    top: auto !important;
    left: auto !important;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 48px;
}

nav.toc h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text);
}

nav.toc ul {
    list-style: none;
    padding: 0;
}

nav.toc li {
    margin-bottom: 8px;
}

nav.toc a {
    color: var(--text-muted);
    font-size: .9rem;
    transition: color .2s;
}

nav.toc a:hover {
    color: var(--accent);
}

/* Breadcrumbs - Reset fixed nav styles */
nav.breadcrumbs {
    position: static !important;
    z-index: auto !important;
    width: auto !important;
    top: auto !important;
    left: auto !important;
    margin-bottom: 32px;
    font-size: .9rem;
}

nav.breadcrumbs a {
    color: var(--text-muted);
    transition: color .2s;
}

nav.breadcrumbs a:hover {
    color: var(--accent);
}

.breadcrumbs span {
    color: var(--text-muted);
    margin: 0 8px;
}

/* Tags */
.tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 24px 0;
}

.tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: .8rem;
    color: var(--text-muted);
    transition: all .2s;
}

.tag:hover {
    background: var(--accent);
    color: var(--bg);
    border-color: var(--accent);
}

/* Share Buttons */
.share-buttons {
    display: flex;
    gap: 12px;
    margin: 48px 0;
    padding: 24px 0;
    border-top: 1px solid var(--border);
}

.share-btn-twitter,
.share-btn-linkedin,
.share-btn-facebook {
    padding: 12px 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-elevated);
    color: var(--text-muted);
    font-size: .85rem;
    transition: all .2s;
}

.share-btn-twitter:hover {
    background: #1DA1F2;
    color: white;
    border-color: #1DA1F2;
}

.share-btn-linkedin:hover {
    background: #0077B5;
    color: white;
    border-color: #0077B5;
}

.share-btn-facebook:hover {
    background: #4267B2;
    color: white;
    border-color: #4267B2;
}

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

.related-posts h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 32px;
    color: var(--text);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.related-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: transform .2s;
}

.related-card:hover {
    transform: translateY(-4px);
}

.related-card h4 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}

.related-card p {
    color: var(--text-muted);
    font-size: .9rem;
}

/* Post Cards (Blog List) */
.post-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    margin-bottom: 24px;
    transition: transform .2s, box-shadow .2s;
}

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

.post-card h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text);
}

.post-card .meta {
    font-size: .85rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.post-card p {
    color: var(--text-muted);
    font-size: .95rem;
    line-height: 1.6;
}

/* Categories */
.categories {
    display: flex;
    gap: 16px;
    margin-bottom: 48px;
    padding: 0 24px;
    align-items: center;
}

.categories-label {
    font-size: .85rem;
    font-weight: 600;
    color: var(--text);
    margin-right: 8px;
}

.categories .tag {
    font-weight: 500;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin: 64px 0;
}

.pagination a,
.pagination span {
    padding: 12px 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-muted);
    transition: all .2s;
}

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

.pagination .current {
    background: var(--accent);
    color: var(--bg);
    border-color: var(--accent);
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .related-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .hamburger { display: flex; }
    .footer-grid { grid-template-columns: 1fr; }
    .categories { flex-wrap: wrap; }
    .share-buttons { flex-wrap: wrap; }
    .pagination { flex-wrap: wrap; }

    body.pbn-blog-page > main {
        padding-top: 80px;
    }
}