/* ============================
   Mundial Font Face
   ============================ */
@font-face {
    font-family: 'Mundial';
    src: url('../fonts/MundialLight.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Mundial';
    src: url('../fonts/MundialRegular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Mundial';
    src: url('../fonts/MundialDemibold.otf') format('opentype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Mundial';
    src: url('../fonts/MundialBold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Mundial';
    src: url('../fonts/MundialBlack.otf') format('opentype');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

/* ============================
   CSS Variables
   ============================ */
:root {
    --color-bg: #FFFFFF;
    --color-bg-alt: #F8FAFC;
    --color-bg-dark: #0A0F1C;
    --color-text: #1E293B;
    --color-text-light: #64748B;
    --color-text-inverse: #F8FAFC;
    --color-accent: #2563EB;
    --color-accent-hover: #1D4ED8;
    --color-accent-glow: #3B82F6;
    --color-border: #E2E8F0;
    --color-tag-bg: #F1F5F9;

    --font-body: 'Mundial', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Mundial', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-weight-normal: 400;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;

    --container-max: 1440px;
    --container-narrow: 960px;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 7rem;

    --radius: 1.5rem;
    --radius-lg: 2rem;
    --radius-btn: 1rem;
    --radius-tag: 0.75rem;
    --transition: 300ms ease;
}

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

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

body {
    font-family: var(--font-body);
    font-weight: var(--font-weight-normal);
    color: var(--color-text);
    background-color: var(--color-bg);
    font-size: 1.125rem;
    line-height: 1.7;
}

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

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color var(--transition);
}

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

ul, ol {
    list-style: none;
}

/* ============================
   Typography
   ============================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: var(--font-weight-bold);
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--color-text);
}

h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.875rem, 4.5vw, 3rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }

p {
    margin-bottom: 1rem;
    color: var(--color-text-light);
}

p:last-child {
    margin-bottom: 0;
}

/* ============================
   Layout
   ============================ */
.container {
    width: 100%;
    padding: 0 2rem;
}

@media (min-width: 1024px) {
    .container {
        padding: 0 4rem;
    }
}

.container-narrow {
    max-width: var(--container-narrow);
    margin: 0 auto;
}

.grid {
    display: grid;
    gap: var(--spacing-md);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* ============================
   Header & Navigation
   ============================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    background-color: rgba(255, 255, 255, 0.6);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.site-logo {
    text-decoration: none;
    flex-shrink: 0;
    transition: opacity var(--transition);
}

.site-logo:hover {
    opacity: 0.8;
}

.site-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: var(--font-weight-extrabold);
    color: var(--color-text);
    letter-spacing: -0.025em;
}

.site-title .accent {
    color: var(--color-accent);
}

.site-title .dot {
    color: rgba(37, 99, 235, 0.4);
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-list li a {
    font-size: 0.875rem;
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    text-decoration: none;
    padding: 0.5rem 0;
    position: relative;
    transition: color var(--transition);
}

.nav-list li a:hover,
.nav-list li.current-menu-item a,
.nav-list li.current_page_item a {
    color: var(--color-accent);
}

.nav-list li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-accent);
    border-radius: 1px;
    transition: width var(--transition);
}

.nav-list li a:hover::after,
.nav-list li.current-menu-item a::after,
.nav-list li.current_page_item a::after {
    width: 100%;
}

/* Mobile-only nav elements: hidden on desktop, shown inside @media overlay */
.mobile-nav-close,
.mobile-nav-logo,
.mobile-nav-contact {
    display: none;
}

/* Hamburger */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--color-text);
    position: relative;
    transition: background-color var(--transition);
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background-color: var(--color-text);
    left: 0;
    transition: transform var(--transition);
}

.hamburger::before { top: -7px; }
.hamburger::after { top: 7px; }

.menu-toggle[aria-expanded="true"] .hamburger {
    background-color: transparent;
}

.menu-toggle[aria-expanded="true"] .hamburger::before {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle[aria-expanded="true"] .hamburger::after {
    transform: rotate(-45deg) translate(5px, -5px);
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
        position: relative;
        z-index: 1001;
    }

    .main-nav {
        position: fixed;
        inset: 0;
        width: 100%;
        height: 100vh;
        background: linear-gradient(160deg, rgba(191,219,254,0.97) 0%, rgba(219,234,254,0.98) 50%, rgba(239,246,255,0.99) 100%);
        backdrop-filter: blur(32px);
        -webkit-backdrop-filter: blur(32px);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
        z-index: 998;
    }

    .main-nav.is-open {
        opacity: 1;
        pointer-events: all;
    }

    .nav-list {
        flex-direction: column;
        align-items: center;
        gap: 1.75rem;
    }

    .nav-list li a {
        font-family: var(--font-display);
        font-size: 1.75rem;
        font-weight: var(--font-weight-bold);
        letter-spacing: 0.1em;
        color: var(--color-text);
        text-decoration: none;
        transition: color var(--transition);
    }

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

    /* Logo inside mobile menu */
    .mobile-nav-logo {
        margin-bottom: 3rem;
        font-family: var(--font-display);
        font-size: 1.5rem;
        font-weight: 800;
        color: var(--color-text);
        text-decoration: none;
        text-align: center;
        display: block;
    }

    .mobile-nav-logo .accent { color: var(--color-accent); }
    .mobile-nav-logo .dot { color: rgba(37,99,235,0.4); }

/* Close button inside mobile menu */
    .mobile-nav-close {
        position: absolute;
        top: 1.5rem;
        right: 1.5rem;
        width: 2.5rem;
        height: 2.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        background: rgba(37,99,235,0.1);
        border: none;
        cursor: pointer;
        font-size: 1.5rem;
        color: var(--color-text);
        line-height: 1;
        transition: background var(--transition);
    }

    .mobile-nav-close:hover {
        background: rgba(37,99,235,0.2);
    }

    /* Contact link at bottom */
    .mobile-nav-contact {
        position: absolute;
        bottom: 2.5rem;
        font-size: 0.875rem;
        font-weight: 500;
        color: var(--color-text-light);
        text-decoration: none;
        transition: color var(--transition);
    }

    .mobile-nav-contact:hover {
        color: var(--color-accent);
    }
}

/* ============================
   Hero
   ============================ */
.hero {
    padding: var(--spacing-xl) 0;
    text-align: center;
}

.hero-compact {
    padding: var(--spacing-lg) 0 var(--spacing-md);
}

.hero-label {
    font-size: 0.875rem;
    font-weight: var(--font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--color-accent);
    margin-bottom: var(--spacing-sm);
}

.hero-title {
    font-family: var(--font-display);
    font-weight: var(--font-weight-extrabold);
    margin-bottom: 1.5rem;
    max-width: 64rem;
    margin-left: auto;
    margin-right: auto;
}

.hero-subtitle {
    font-size: clamp(1.125rem, 2.5vw, 1.5rem);
    color: var(--color-text-light);
    max-width: 48rem;
    margin: 0 auto 2.5rem;
    line-height: 1.6;
}

.hero .btn {
    margin-top: var(--spacing-xs);
}

/* ============================
   Sections
   ============================ */
.section {
    padding: var(--spacing-xl) 0;
}

.section-alt {
    background-color: var(--color-bg-alt);
}

.section-cta {
    background-color: var(--color-bg-dark);
    text-align: center;
    padding: var(--spacing-xl) 0;
}

.section-cta h2 {
    color: var(--color-text-inverse);
    margin-bottom: var(--spacing-md);
    max-width: 48rem;
    margin-left: auto;
    margin-right: auto;
}

.section-cta p {
    color: rgba(156, 163, 175, 1);
    font-size: 1.25rem;
    max-width: 48rem;
    margin: 0 auto 2.5rem;
}

.section-cta .btn-primary {
    background-color: var(--color-text-inverse);
    color: var(--color-bg-dark);
    box-shadow: 0 4px 14px rgba(255, 255, 255, 0.15);
}

.section-cta .btn-primary:hover {
    background-color: #E2E8F0;
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.25);
}

.section-title {
    margin-bottom: var(--spacing-lg);
    text-align: center;
}

.section-link {
    text-align: center;
    margin-top: var(--spacing-lg);
}

.cta-email {
    margin-top: var(--spacing-sm);
}

.cta-email a {
    color: var(--color-text-light);
    font-size: 0.875rem;
}

.section-cta .cta-email a {
    color: rgba(248, 250, 252, 0.6);
}

.section-cta .cta-email a:hover {
    color: var(--color-text-inverse);
}

/* ============================
   Buttons
   ============================ */
.btn {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: var(--font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 1rem 2.5rem;
    border-radius: var(--radius-btn);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background-color: var(--color-accent);
    color: var(--color-text-inverse);
    border-color: var(--color-accent);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
    background-color: var(--color-accent-hover);
    border-color: var(--color-accent-hover);
    color: var(--color-text-inverse);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
    transform: scale(1.02);
}

.btn-outline {
    background-color: transparent;
    color: var(--color-accent);
    border-color: var(--color-accent);
    border-radius: var(--radius-btn);
}

.btn-outline:hover {
    background-color: var(--color-accent);
    color: var(--color-text-inverse);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
    transform: scale(1.02);
}

/* ============================
   Cards
   ============================ */
.card {
    background-color: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--radius);
    padding: 2rem;
    transition: all var(--transition);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.card:hover {
    box-shadow: 0 12px 40px rgba(37, 99, 235, 0.1);
    transform: translateY(-4px);
}

.card-title {
    font-family: var(--font-display);
    font-weight: var(--font-weight-bold);
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.card-title a {
    color: var(--color-text);
    text-decoration: none;
}

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

.card p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-text-light);
}

.card-link {
    display: inline-block;
    margin-top: 1rem;
    font-size: 1rem;
    font-weight: var(--font-weight-semibold);
    color: var(--color-accent);
}

.card-date {
    display: block;
    font-size: 0.875rem;
    color: var(--color-text-light);
    margin-bottom: 0.5rem;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: var(--spacing-sm);
}

.card-tag {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: var(--font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-light);
    background-color: var(--color-tag-bg);
    padding: 0.375rem 1rem;
    border-radius: var(--radius-tag);
    margin-bottom: var(--spacing-sm);
}

/* Topic card (clickable) */
a.card-topic {
    display: block;
    text-decoration: none;
}

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

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

a.card-topic .card-link {
    pointer-events: none;
}

/* ============================
   Tags
   ============================ */
.tag {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-light);
    background-color: var(--color-tag-bg);
    padding: 0.375rem 1rem;
    border-radius: var(--radius-tag);
    text-decoration: none;
    transition: all var(--transition);
}

a.tag:hover {
    background-color: var(--color-accent);
    color: var(--color-text-inverse);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}

.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

/* ============================
   Posts Grid (News page)
   ============================ */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

@media (max-width: 768px) {
    .posts-grid {
        grid-template-columns: 1fr;
    }
}

.post-card {
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.post-card-thumb {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: var(--radius) var(--radius) 0 0;
}

.post-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition);
}

.post-card:hover .post-card-thumb img {
    transform: scale(1.04);
}

.post-card-body {
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.post-date {
    display: block;
    font-size: 0.875rem;
    color: var(--color-text-light);
    margin-bottom: 0.75rem;
}

.post-title {
    font-family: var(--font-display);
    font-weight: var(--font-weight-bold);
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.post-title a {
    color: var(--color-text);
    text-decoration: none;
}

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

.post-excerpt {
    font-size: 1rem;
    color: var(--color-text-light);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.post-read-more {
    font-size: 1rem;
    font-weight: var(--font-weight-semibold);
    color: var(--color-accent);
}

/* ============================
   Single Post
   ============================ */
.single-post .hero-compact {
    padding-bottom: var(--spacing-md);
}

.single-post .hero-compact .post-tags {
    justify-content: center;
    margin-bottom: var(--spacing-sm);
}

.single-post .hero-compact .post-date {
    margin-top: var(--spacing-sm);
}

.prose {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--color-text) !important;
}

.prose p,
.prose span,
.prose li,
.prose td,
.prose th,
.prose dd,
.prose dt {
    color: var(--color-text-light) !important;
    font-size: 1.125rem;
    line-height: 1.7;
}

.prose p {
    margin-bottom: 1.5rem;
}

.prose p:last-child {
    margin-bottom: 0;
}

.prose h1,
.prose h2,
.prose h3,
.prose h4,
.prose h5,
.prose h6 {
    color: var(--color-text) !important;
}

.prose h2 {
    margin-top: 3rem;
    margin-bottom: 1rem;
    font-size: 1.75rem;
}

.prose h3 {
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.375rem;
}

.prose ul,
.prose ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.prose ul {
    list-style: disc;
}

.prose ol {
    list-style: decimal;
}

.prose li {
    margin-bottom: 0.5rem;
    color: var(--color-text);
    font-size: 1.125rem;
}

.prose blockquote {
    border-left: 3px solid var(--color-accent);
    padding-left: var(--spacing-md);
    margin: 2rem 0;
    font-style: italic;
    color: var(--color-text-light);
}

.prose a {
    color: var(--color-accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.prose img {
    border-radius: var(--radius);
    margin: 2rem 0;
}

.prose pre {
    background-color: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-btn);
    padding: var(--spacing-md);
    overflow-x: auto;
    margin: 2rem 0;
    font-size: 0.875rem;
}

.prose code {
    font-size: 0.875em;
    background-color: var(--color-bg-alt);
    padding: 0.2em 0.5em;
    border-radius: 4px;
}

/* Tables */
.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 2.5rem 0;
    font-size: 1rem;
    border-radius: var(--radius-btn);
    overflow: hidden;
    border: 1px solid var(--color-border);
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.05);
}

.prose thead th {
    background-color: var(--color-accent);
    color: #ffffff !important;
    font-family: var(--font-display);
    font-weight: var(--font-weight-bold);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.9rem 1.25rem;
    text-align: left;
    border: none;
}

.prose tbody td {
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid var(--color-border);
    vertical-align: top;
    line-height: 1.65;
    color: var(--color-text-light) !important;
    font-size: 1rem;
}

.prose tbody tr:nth-child(even) td {
    background-color: rgba(241, 245, 249, 0.6);
}

.prose tbody tr:nth-child(odd) td {
    background-color: rgba(255, 255, 255, 0.8);
}

.prose tbody tr:hover td {
    background-color: rgba(219, 234, 254, 0.35);
}

.prose tbody tr:last-child td {
    border-bottom: none;
}

@media (max-width: 768px) {
    .prose table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        font-size: 0.9375rem;
    }

    .prose thead th,
    .prose tbody td {
        padding: 0.75rem 1rem;
        white-space: normal;
        min-width: 120px;
    }
}

.post-featured-image {
    margin: 0 0 2rem;
    border-radius: var(--radius);
    overflow: hidden;
}

.post-featured-image img {
    width: 100%;
    margin: 0;
}

/* Post Navigation */
.post-navigation {
    display: flex;
    justify-content: space-between;
    gap: var(--spacing-md);
}

.post-nav-link {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    text-decoration: none;
    max-width: 50%;
}

.post-nav-next {
    text-align: right;
    margin-left: auto;
}

.post-nav-label {
    font-size: 0.875rem;
    color: var(--color-text-light);
}

.post-nav-title {
    font-family: var(--font-display);
    font-size: 1.0625rem;
    font-weight: var(--font-weight-bold);
    color: var(--color-text);
}

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

@media (max-width: 768px) {
    .post-navigation {
        flex-direction: column;
    }

    .post-nav-link {
        max-width: 100%;
    }

    .post-nav-next {
        text-align: left;
    }
}


/* ============================
   Placeholder
   ============================ */
.placeholder-block {
    text-align: center;
    padding: var(--spacing-lg);
    background-color: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px dashed var(--color-border);
    border-radius: var(--radius);
    grid-column: 1 / -1;
}

.placeholder-block p {
    color: var(--color-text-light);
    font-size: 1rem;
}

/* ============================
   Pagination
   ============================ */
.pagination {
    margin-top: var(--spacing-lg);
    text-align: center;
}

.pagination .nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: var(--font-weight-semibold);
    border-radius: var(--radius-tag);
    text-decoration: none;
    transition: all var(--transition);
}

.pagination a {
    color: var(--color-text-light);
    border: 1px solid var(--color-border);
}

.pagination a:hover {
    color: var(--color-accent);
    border-color: var(--color-accent);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
}

.pagination .current {
    background-color: var(--color-accent);
    color: var(--color-text-inverse);
    border: 1px solid var(--color-accent);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

/* ============================
   Footer
   ============================ */
.site-footer {
    background-color: var(--color-bg-dark);
    color: var(--color-text-inverse);
    padding: 5rem 0;
}

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

.footer-brand .site-title {
    font-family: var(--font-display);
    color: var(--color-text-inverse);
    font-size: 1.125rem;
    font-weight: var(--font-weight-extrabold);
}

.footer-brand .site-title .accent {
    color: var(--color-accent-glow);
}

.footer-brand .site-title .dot {
    color: rgba(59, 130, 246, 0.4);
}

.footer-tagline {
    font-size: 1rem;
    color: rgba(156, 163, 175, 1);
    margin-top: 0.75rem;
    line-height: 1.6;
}

.footer-contact a {
    color: rgba(156, 163, 175, 1);
    font-size: 1rem;
    text-decoration: none;
    transition: color var(--transition);
}

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

.footer-bottom {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.footer-bottom p,
.footer-bottom a {
    font-size: 0.875rem;
    color: rgba(107, 114, 128, 1);
}

.footer-bottom a {
    text-decoration: none;
    transition: color var(--transition);
}

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

.footer-heading {
    font-size: 0.875rem;
    font-weight: var(--font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(156, 163, 175, 1);
    margin-bottom: 1.25rem;
}

.footer-nav ul {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-nav a {
    color: rgba(156, 163, 175, 1);
    font-size: 1rem;
    text-decoration: none;
    transition: color var(--transition);
}

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

@media (min-width: 640px) {
    .footer-sep {
        display: inline !important;
    }
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
}

/* ============================
   Utility
   ============================ */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ============================
   WordPress / Gutenberg overrides
   ============================ */

/* Force all Gutenberg blocks inside .prose to be visible */
.prose > *,
.prose p,
.prose div,
.prose figure,
.prose .wp-block-paragraph,
.prose .wp-block-heading,
.prose .wp-block-list,
.prose .wp-block-image,
.prose .wp-block-quote,
.prose .wp-block-group,
.prose .wp-block-columns,
.prose .wp-block-column,
.prose .wp-block-separator,
.prose .wp-block-spacer,
.prose .wp-block-cover,
.prose .wp-block-table,
.prose figure.wp-block-table {
    visibility: visible !important;
    opacity: 1 !important;
    max-height: none !important;
    overflow: visible !important;
    position: relative;
    color: inherit;
}

.prose .wp-block-image img {
    border-radius: var(--radius);
    max-width: 100%;
    height: auto;
}

.prose .wp-block-separator {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: 2rem 0;
}

/* Gutenberg table block — scrollable wrapper + reset inner table */
.prose .wp-block-table,
.prose figure.wp-block-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 2.5rem 0 !important;
    border-radius: var(--radius-btn);
}

.prose .wp-block-table table,
.prose figure.wp-block-table table {
    margin: 0 !important;
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--color-border);
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.05);
    border-radius: var(--radius-btn);
    overflow: hidden;
}

.prose .wp-block-table thead th,
.prose figure.wp-block-table thead th {
    background-color: var(--color-accent);
    color: #ffffff !important;
    font-family: var(--font-display);
    font-weight: var(--font-weight-bold);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.9rem 1.25rem;
    text-align: left;
    border: none;
}

.prose .wp-block-table td,
.prose figure.wp-block-table td {
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid var(--color-border);
    vertical-align: top;
    color: var(--color-text-light) !important;
}

.prose .wp-block-table tbody tr:nth-child(even) td,
.prose figure.wp-block-table tbody tr:nth-child(even) td {
    background-color: rgba(241, 245, 249, 0.6);
}

.prose .wp-block-table tbody tr:last-child td,
.prose figure.wp-block-table tbody tr:last-child td {
    border-bottom: none;
}

.prose .wp-block-quote {
    border-left: 3px solid var(--color-accent);
    padding-left: var(--spacing-md);
    margin: 2rem 0;
    font-style: italic;
    color: var(--color-text-light);
}

.prose .wp-block-columns {
    display: flex;
    gap: var(--spacing-md);
}

.prose .wp-block-column {
    flex: 1;
}

/* Reset any WP layout classes that might constrain content */
.is-layout-flow,
.is-layout-constrained,
.is-layout-flex,
.has-global-padding {
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.is-layout-constrained > *,
.is-layout-flow > * {
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Exception: preserve vertical margins on tables inside layout blocks */
.is-layout-constrained > .wp-block-table,
.is-layout-flow > .wp-block-table,
.is-layout-constrained > figure.wp-block-table,
.is-layout-flow > figure.wp-block-table {
    margin-top: 2.5rem !important;
    margin-bottom: 2.5rem !important;
}

.aligncenter {
    text-align: center;
}

.alignleft {
    float: left;
    margin-right: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
}

.alignright {
    float: right;
    margin-left: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
}

/* ============================
   Responsive fine-tuning
   ============================ */
@media (max-width: 768px) {
    .hero {
        padding: var(--spacing-lg) 0;
    }

    .section {
        padding: var(--spacing-lg) 0;
    }

    .container {
        padding: 0 1.5rem;
    }

    .post-title {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: var(--spacing-md) 0;
    }

    .section {
        padding: var(--spacing-md) 0;
    }

    .btn {
        width: 100%;
        text-align: center;
    }
}

/* ============================
   Hero with Background Image
   ============================ */
.hero-img {
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 85vh;
    display: flex;
    align-items: center;
    padding: 8rem 0;
}

.hero-img::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
}

.hero-img .container {
    position: relative;
    z-index: 2;
}

/* Dark hero — HOME (dark image, white text) */
.hero-dark {
    color: var(--color-text-inverse);
}

.hero-dark::before {
    background: linear-gradient(
        135deg,
        rgba(10, 15, 28, 0.88) 0%,
        rgba(37, 99, 235, 0.25) 100%
    );
}

.hero-dark .hero-title {
    color: #FFFFFF;
}

.hero-dark .hero-subtitle {
    color: rgba(248, 250, 252, 0.8);
}

.hero-dark .btn-primary {
    background-color: #FFFFFF;
    color: var(--color-accent);
    box-shadow: 0 4px 14px rgba(255, 255, 255, 0.2);
}

.hero-dark .btn-primary:hover {
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.3);
    transform: scale(1.02);
}

/* Tags on dark hero */
.hero-dark .tag-light {
    background-color: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
}

.hero-dark .tag-light:hover {
    background-color: rgba(255, 255, 255, 0.25);
    color: #FFFFFF;
}

.hero-dark .hero-date {
    color: rgba(248, 250, 252, 0.7);
}

/* Light hero — ABOUT, TOPICS, PRACTICE, NOTES, CONTACT */
.hero-light::before {
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.82) 0%,
        rgba(248, 250, 252, 0.92) 100%
    );
}

.hero-light .hero-title {
    color: var(--color-text);
}

.hero-light .hero-subtitle {
    color: var(--color-text-light);
}

@media (max-width: 768px) {
    .hero-img {
        min-height: 50vh;
        padding: 5rem 0;
    }
}


/* ============================
   Placeholder Thumbnail
   ============================ */
.placeholder-thumbnail {
    border-radius: var(--radius);
    background-color: var(--color-bg-alt);
}

/* ============================
   Scroll Reveal Animation
   ============================ */
.will-animate {
    opacity: 0;
    transform: translateY(2.5rem);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

.will-animate.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.will-animate:nth-child(2) { transition-delay: 120ms; }
.will-animate:nth-child(3) { transition-delay: 240ms; }
.will-animate:nth-child(4) { transition-delay: 360ms; }
.will-animate:nth-child(5) { transition-delay: 480ms; }
.will-animate:nth-child(6) { transition-delay: 600ms; }
.will-animate:nth-child(7) { transition-delay: 720ms; }
.will-animate:nth-child(8) { transition-delay: 840ms; }
.will-animate:nth-child(9) { transition-delay: 960ms; }

/* ============================
   NUCLEAR: Force article text color
   Loaded last to override everything
   ============================ */
body.single-post .prose,
body.single-post .prose p,
body.single-post .prose span,
body.single-post .prose li,
body.single-post .prose td,
body.single-post .prose th,
body.single-post .prose dd,
body.single-post .prose dt,
body.single-post .prose div {
    color: #64748B !important;
}

body.single-post .prose h1,
body.single-post .prose h2,
body.single-post .prose h3,
body.single-post .prose h4,
body.single-post .prose h5,
body.single-post .prose h6,
body.single-post .prose strong,
body.single-post .prose b {
    color: #1E293B !important;
}

body.single-post .prose a {
    color: #2563EB !important;
}

body.single-post .prose .has-text-color,
body.single-post .prose .has-black-color,
body.single-post .prose .has-white-color,
body.single-post .prose [class*="has-"][class*="-color"] {
    color: #64748B !important;
}

body.single-post .prose h1.has-text-color,
body.single-post .prose h2.has-text-color,
body.single-post .prose h3.has-text-color,
body.single-post .prose h4.has-text-color,
body.single-post .prose h1[class*="has-"][class*="-color"],
body.single-post .prose h2[class*="has-"][class*="-color"],
body.single-post .prose h3[class*="has-"][class*="-color"],
body.single-post .prose h4[class*="has-"][class*="-color"] {
    color: #1E293B !important;
}
