/* ============================================
   CSS VARIABLES — derived from MBSoft brand
   ============================================ */
:root {
    --navy-deep: #0b1628;
    --navy: #142038;
    --navy-mid: #1a2d4d;
    --navy-light: #243a5e;
    --teal: #3ec8c2;
    --teal-dim: #2a8e8a;
    --teal-glow: #5eeee8;
    --cyan-pale: #a8ece9;
    --white: #e8edf4;
    --white-dim: #9ba8be;
    --white-muted: #6b7a94;
    --font-display: 'Syne', sans-serif;
    --font-body: 'Newsreader', Georgia, serif;
}

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

html {
    scroll-behavior: smooth;
    scrollbar-color: var(--navy-light) var(--navy-deep);
}

body {
    background: var(--navy-deep);
    color: var(--white);
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--teal);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--teal-glow);
}

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

/* ============================================
   LAYOUT
   ============================================ */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 clamp(20px, 5vw, 40px);
}

main.container {
    padding-top: 120px;
    padding-bottom: 80px;
    min-height: 80vh;
}

/* ============================================
   NAVIGATION
   ============================================ */
#nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 16px 0;
    transition: background 0.4s ease, backdrop-filter 0.4s ease;
}

#nav.scrolled {
    background: rgba(11, 22, 40, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(62, 200, 194, 0.08);
}

.nav-inner {
    max-width: 1000px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--white);
}

.nav-logo-text {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 20px;
    letter-spacing: 0.02em;
}

.nav-logo-badge {
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 3px;
    background: rgba(62, 200, 194, 0.12);
    color: var(--teal);
}

.nav-links {
    display: flex;
    gap: 28px;
    list-style: none;
}

.nav-links a {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--white-dim);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.nav-link-external {
    opacity: 0.7;
}

.nav-link-external:hover {
    opacity: 1;
}

/* ============================================
   POST LIST (Home & Taxonomy pages)
   ============================================ */
.list-header {
    margin-bottom: 48px;
}

.list-header h1 {
    font-family: var(--font-display);
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.01em;
}

.list-description {
    color: var(--white-dim);
    margin-top: 12px;
    font-size: 19px;
}

.post-card {
    border-bottom: 1px solid rgba(62, 200, 194, 0.06);
    padding: 32px 0;
}

.post-card:last-of-type {
    border-bottom: none;
}

.post-card h2 {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.post-card h2 a {
    color: var(--white);
    text-decoration: none;
}

.post-card h2 a:hover {
    color: var(--teal);
}

.post-card p {
    color: var(--white-dim);
    font-size: 16px;
    line-height: 1.65;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.post-meta time {
    font-family: var(--font-display);
    font-size: 13px;
    color: var(--white-muted);
    letter-spacing: 0.02em;
}

/* ============================================
   TAGS
   ============================================ */
.tag {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 3px;
}

.tag-product {
    background: rgba(62, 200, 194, 0.1);
    color: var(--teal);
}

.tag-audience {
    background: rgba(155, 168, 190, 0.1);
    color: var(--white-muted);
}

.tag-link {
    background: rgba(62, 200, 194, 0.08);
    color: var(--teal-dim);
    text-decoration: none;
    transition: background 0.3s ease;
}

.tag-link:hover {
    background: rgba(62, 200, 194, 0.18);
    color: var(--teal);
}

.post-audiences {
    margin-top: 8px;
}

/* ============================================
   SINGLE POST
   ============================================ */
.post-header {
    margin-bottom: 40px;
    padding-bottom: 32px;
    border-bottom: 1px solid rgba(62, 200, 194, 0.06);
}

.post-header h1 {
    font-family: var(--font-display);
    font-size: clamp(28px, 5vw, 42px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-top: 12px;
}

.post-description {
    color: var(--white-dim);
    font-size: 20px;
    line-height: 1.6;
    margin-top: 16px;
}

.post-content {
    font-size: 18px;
    line-height: 1.8;
    color: var(--white);
}

.post-content h2 {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    margin-top: 48px;
    margin-bottom: 16px;
    letter-spacing: -0.01em;
}

.post-content h3 {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 600;
    margin-top: 36px;
    margin-bottom: 12px;
}

.post-content p {
    margin-bottom: 20px;
    color: var(--white-dim);
}

.post-content strong {
    color: var(--white);
}

.post-content ul, .post-content ol {
    margin-bottom: 20px;
    padding-left: 24px;
    color: var(--white-dim);
}

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

.post-content blockquote {
    border-left: 3px solid var(--teal);
    padding-left: 20px;
    margin: 24px 0;
    color: var(--white-dim);
    font-style: italic;
}

.post-content code {
    font-family: 'Fira Code', 'Cascadia Code', monospace;
    font-size: 0.9em;
    background: rgba(26, 45, 77, 0.6);
    padding: 2px 6px;
    border-radius: 3px;
    color: var(--cyan-pale);
}

.post-content pre {
    background: var(--navy);
    border: 1px solid rgba(62, 200, 194, 0.08);
    border-radius: 8px;
    padding: 20px 24px;
    overflow-x: auto;
    margin: 24px 0;
}

.post-content pre code {
    background: none;
    padding: 0;
    font-size: 14px;
    line-height: 1.6;
}

.post-content a {
    color: var(--teal);
    text-decoration: underline;
    text-decoration-color: rgba(62, 200, 194, 0.3);
    text-underline-offset: 3px;
}

.post-content a:hover {
    text-decoration-color: var(--teal);
}

.post-content img {
    border-radius: 8px;
    margin: 24px 0;
}

/* ============================================
   POST FOOTER
   ============================================ */
.post-footer {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid rgba(62, 200, 194, 0.06);
}

.post-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.post-nav {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.post-nav-link {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 500;
    color: var(--white-dim);
}

.post-nav-link:hover {
    color: var(--teal);
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 48px;
    list-style: none;
}

.page-item a, .page-item span {
    font-family: var(--font-display);
    font-size: 14px;
    padding: 8px 14px;
    border-radius: 4px;
    color: var(--white-dim);
    text-decoration: none;
}

.page-item.active span {
    background: rgba(62, 200, 194, 0.15);
    color: var(--teal);
}

.page-item a:hover {
    background: rgba(62, 200, 194, 0.08);
    color: var(--teal);
}

/* ============================================
   FOOTER
   ============================================ */
footer {
    padding: 48px 0;
    border-top: 1px solid rgba(62, 200, 194, 0.06);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-left span {
    font-family: var(--font-display);
    font-size: 13px;
    color: var(--white-muted);
}

.footer-links {
    display: flex;
    gap: 24px;
    list-style: none;
}

.footer-links a {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--white-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--teal);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .post-nav {
        flex-direction: column;
    }
}
