:root {
    --primary-color: #15803D; /* Match site green */
    --accent-color: #15803D; /* Match site green */
    --accent-hover: #166534;
    --text-color: #333;
    --heading-color: #000;
    --bg-color: #ffffff;
    --bg-secondary: #f8fafc;
    --border-color: #e2e8f0;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius: 0.5rem;
    --container-width: 1200px;
    --header-height: 80px;

    /* Layout tokens */
    --container-narrow: 820px;
    --container-wide: 1200px;
    --space-1: 0.25rem; /* 4px */
    --space-2: 0.5rem;  /* 8px */
    --space-3: 0.75rem; /* 12px */
    --space-4: 1rem;    /* 16px */
    --space-5: 1.5rem;  /* 24px */
    --space-6: 2rem;    /* 32px */
    --space-7: 3rem;    /* 48px */
    --space-8: 4rem;    /* 64px */
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --content-max: 70ch;
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: 'Source Sans Pro', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

/* Typography */
html { font-size: 16px; }

h1, h2, h3, h4, h5, h6 {
    font-family: 'Oswald', sans-serif;
    color: var(--heading-color);
    margin-top: 0;
    font-weight: 600; /* Increased weight for better hierarchy */
}

h1 { font-size: clamp(2rem, 1.4rem + 2vw, 3rem); line-height: 1.1; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.2rem); line-height: 1.15; }
h3 { font-size: 1.4rem; }
small, .muted { font-size: 0.92rem; color: #64748b; }

.prose {
    max-width: var(--content-max);
}

.prose p {
    margin: 0 0 var(--space-5);
    font-size: 1.0625rem; /* 17px: reads "premium" without being huge */
}

.prose ul, .prose ol {
    padding-left: 1.2rem;
    margin: 0 0 var(--space-5);
}

.prose li { margin: 0.4rem 0; }

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.2s;
    font-weight: 500;
}

a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* Layout Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 4rem 0;
}

.bg-secondary {
    background-color: var(--bg-secondary);
    background-size: auto 100%;
    background-position: center;
    background-repeat: no-repeat;
}

.text-center { text-align: center; }
.text-right { text-align: right; }

.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }

@media (min-width: 768px) {
    .grid-2 { grid-template-columns: 1fr 1fr; }
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: 1px solid transparent;
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    color: var(--white);
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background-color: transparent;
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.btn-outline:hover {
    background-color: var(--accent-color);
    color: var(--white);
    text-decoration: none;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* Header */
header {
    background-color: var(--white);
    /* box-shadow: var(--shadow-sm); Removed to match clean look */
    position: relative; /* Not sticky on main site post */
    z-index: 1000;
    height: auto; /* Let it grow */
    padding: 1rem 0;
    display: flex;
    align-items: center;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.logo img {
    height: 50px;
    width: auto;
    display: block;
}

/* Navigation */
.main-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 1.5rem;
}

.main-nav a {
    color: var(--heading-color);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    padding: 0.5rem 0;
    position: relative;
}

.main-nav a:hover {
    color: var(--accent-color);
    text-decoration: none;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.2s;
}

.main-nav a:hover::after {
    width: 100%;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--heading-color);
    border-radius: 2px;
}

/* Hero Section */
.hero {
    position: relative;
    background-color: var(--primary-color);
    color: var(--white);
    overflow: hidden;
    padding: 6rem 0;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.8));
    z-index: 1;
}

.hero-bg-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.hero h1 {
    color: var(--white);
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 1.25rem;
    color: #e2e8f0;
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Cards */
.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 2rem;
    transition: transform 0.2s;
    border: 1px solid var(--border-color);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card h3 {
    margin-bottom: 1rem;
    color: var(--heading-color);
}

.card-footer {
    margin-top: auto;
    padding-top: 1.5rem;
}

/* News Feed */
.news-item {
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 0;
}

.news-item:last-child {
    border-bottom: none;
}

.news-date {
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 0.5rem;
    display: block;
    font-weight: 600;
}

/* Footer */
footer {
    background-color: #ffffff; /* Match main site footer */
    color: #333;
    padding: 4rem 0 2rem;
    margin-top: auto;
    border-top: 1px solid #e2e8f0;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr; /* Match column layout */
    gap: 3rem;
    margin-bottom: 3rem;
    max-width: var(--container-width);
    margin: 0 auto 3rem auto;
    padding: 0 1.5rem;
}

.footer-section h4 {
    color: #000;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    font-family: 'Oswald', sans-serif;
    font-weight: 400;
}

.footer-section p {
    margin-bottom: 1rem;
    color: #64748b;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section li {
    margin-bottom: 0.75rem;
}

.footer-section a {
    color: #64748b;
    font-weight: 400;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-section a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid #e2e8f0;
    padding-top: 2rem;
    text-align: center;
    font-size: 0.875rem;
    color: #94a3b8;
    max-width: var(--container-width);
    margin: 0 auto;
}

/* Post Layout */
.post-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: var(--space-7);
    align-items: start;
}

.post { min-width: 0; }

.post-head { margin-bottom: var(--space-6); }
.post-meta {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.hero-media { margin: 0 0 var(--space-7); }
.hero-media img {
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.post-actions {
    margin-top: var(--space-7);
    padding-top: var(--space-6);
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: var(--space-5);
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.post-aside { position: sticky; top: 1.5rem; }

/* Media/Figures */
.media {
    margin: var(--space-7) 0;
}
.media img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

/* Sidebar Cards */
.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-5);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--space-6);
}

.card:hover { box-shadow: var(--shadow-md); }

.list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.list li {
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(226,232,240,0.8);
}

.list li:last-child { border-bottom: 0; }

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.6rem;
    border-radius: 9999px;
    border: 1px solid var(--border-color);
    background: #fff;
    font-size: 0.85rem;
    color: #334155;
}

.badge--green {
    border-color: rgba(21,128,61,0.25);
    color: var(--accent-color);
}

/* Focus Styles */
a:focus-visible, button:focus-visible {
    outline: 3px solid rgba(21,128,61,0.35);
    outline-offset: 3px;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    h1 { font-size: 2rem; }
    .hero h1 { font-size: 2.5rem; }

    .main-nav {
        display: none; /* Hide by default on mobile */
        position: absolute;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background: var(--white);
        box-shadow: var(--shadow-md);
        padding: 1rem 0;
    }

    .main-nav.active {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0;
    }

    .main-nav li {
        border-bottom: 1px solid var(--border-color);
    }

    .main-nav a {
        display: block;
        padding: 1rem 1.5rem;
    }

    .menu-toggle {
        display: flex;
    }
}

@media (max-width: 980px) {
    .post-layout {
        grid-template-columns: 1fr;
    }
    .post-aside {
        position: static;
    }
}

/* Footer */
.site-footer {
    background-color: #0f172a;
    color: #e2e8f0;
    padding: 4rem 0 2rem;
    margin-top: auto;
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--space-7);
    align-items: start;
}

.footer-brand img { max-width: 220px; height: auto; }
.footer-social {
    display: flex;
    gap: var(--space-4);
    flex-wrap: wrap;
    margin-top: var(--space-4);
}

.footer-links h4, .footer-cta h4 {
    margin-bottom: var(--space-4);
    color: #e2e8f0;
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin: 0 0 var(--space-3);
}

.footer-links a {
    color: #e2e8f0;
    text-decoration: none;
}

.footer-links a:hover {
    color: #ffffff;
}

.footer-brand p, .footer-cta p {
    color: #cbd5e1;
}

.footer-social a {
    color: #e2e8f0;
}

.footer-social a:hover {
    color: #ffffff;
}

.footer-bottom {
    margin-top: var(--space-7);
    padding-top: var(--space-5);
    border-top: 1px solid rgba(226,232,240,0.3);
}

.footer-bottom p {
    color: #cbd5e1;
}

@media (max-width: 900px) {
    .footer-top {
        grid-template-columns: 1fr;
    }
}
