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

:root {
    --color-bg: #ffffff;
    --color-text: #202124;
    --color-text-light: #5f6368;
    --color-link: #1a73e8;
    --color-link-hover: #174ea6;
    --color-border: #e0e0e0;
    --color-section-alt: #f8f9fa;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --max-width: 1100px;
    --header-height: 64px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.7;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--color-link);
    text-decoration: none;
    transition: color 0.15s;
}

a:hover {
    color: var(--color-link-hover);
    text-decoration: underline;
}

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

/* ── Header ─────────────────────────────────────────────── */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    height: var(--header-height);
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--color-text);
    font-weight: 600;
    font-size: 18px;
    text-decoration: none;
}

.site-logo:hover {
    text-decoration: none;
    color: var(--color-text);
}

.site-logo .logo-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.site-nav ul {
    list-style: none;
    display: flex;
    gap: 4px;
}

.site-nav a {
    display: block;
    padding: 8px 14px;
    color: var(--color-text-light);
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.site-nav a:hover {
    background: var(--color-section-alt);
    color: var(--color-text);
    text-decoration: none;
}

.site-nav a.active {
    color: var(--color-text);
    font-weight: 700;
    border-bottom: 2px solid var(--color-text);
    border-radius: 0;
}

/* Mobile menu */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    transition: transform 0.2s, opacity 0.2s;
}

.mobile-menu-toggle.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.mobile-menu-toggle.open span:nth-child(2) {
    opacity: 0;
}
.mobile-menu-toggle.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ── Page nav bar ──────────────────────────────────────── */

.page-nav-bar {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 28px 24px 20px;
    font-size: 22px;
    font-weight: 400;
    text-align: center;
}

.page-nav-bar strong {
    font-weight: 900;
}

.page-nav-bar a {
    color: var(--color-text);
    text-decoration: none;
}

.page-nav-bar a:hover {
    text-decoration: underline;
}

.nav-sep {
    margin: 0 6px;
    color: var(--color-text-light);
    font-weight: 300;
}

/* ── Main content ──────────────────────────────────────── */

.site-main {
    min-height: calc(100vh - var(--header-height) - 80px);
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Section layout ─────────────────────────────────────── */

.section {
    padding: 40px 0;
}

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

.section-title {
    font-size: 32px;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 14px;
    color: var(--color-text-light);
    line-height: 1.6;
    max-width: 520px;
}

/* ── Homepage hero ──────────────────────────────────────── */

.hero-row {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 40px;
    align-items: start;
    margin-bottom: 48px;
}

.hero-row .hero-image img {
    border-radius: 8px;
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
}

.hero-row .hero-caption {
    margin-top: 12px;
    font-size: 14px;
}

.hero-row .hero-caption a {
    display: inline;
}

/* ── News grid ──────────────────────────────────────────── */

.news-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}

.news-grid.three-col {
    grid-template-columns: repeat(3, 1fr);
}

.news-card img {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 12px;
}

.news-card p {
    font-size: 14px;
    line-height: 1.5;
}

.news-card a {
    font-size: 14px;
}

/* ── Volunteer cards ────────────────────────────────────── */

.volunteer-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    margin-bottom: 48px;
}

.volunteer-card {
    display: flex;
    flex-direction: column;
}

.volunteer-card img {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 16px;
}

.volunteer-card h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
}

.volunteer-card h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-light);
    margin-bottom: 12px;
}

.volunteer-card .card-body {
    font-size: 14px;
    line-height: 1.6;
    flex: 1;
    margin-bottom: 12px;
}

.volunteer-card .card-link {
    font-size: 14px;
    font-weight: 600;
}

/* ── Collaboration posts ──────────────────────────────── */

.collab-post {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    padding: 48px 0;
    border-bottom: 1px solid var(--color-border);
}

.collab-post:last-child {
    border-bottom: none;
}

.collab-post.image-left {
    direction: ltr;
}

.collab-post.image-left img {
    order: -1;
}

.collab-post img {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
    border-radius: 8px;
}

.collab-post h2 {
    font-size: 24px;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 16px;
}

.collab-post .collab-body {
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 12px;
}

/* ── Project cards ──────────────────────────────────────── */

.project-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-bottom: 48px;
}

.project-card {
    display: flex;
    flex-direction: column;
}

.project-card img {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 16px;
}

.project-card h2 {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 6px;
}

.project-card .budget {
    font-size: 15px;
    font-weight: 700;
    color: var(--color-link);
    margin-bottom: 12px;
}

.project-card .card-body {
    font-size: 13px;
    line-height: 1.6;
    flex: 1;
    margin-bottom: 12px;
}

.project-card .card-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-link);
}

/* ── Challenge cards ────────────────────────────────────── */

.challenge-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    margin-bottom: 48px;
}

.challenge-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 24px;
    align-items: start;
}

.challenge-card .challenge-logo {
    width: 120px;
    height: 90px;
    object-fit: contain;
    border-radius: 4px;
}

.challenge-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 2px;
}

.challenge-card .budget {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
}

.challenge-card .card-body {
    font-size: 13px;
    line-height: 1.6;
    font-style: italic;
    margin-bottom: 8px;
}

/* ── About page ─────────────────────────────────────────── */

.about-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 48px;
    align-items: start;
    padding: 48px 0;
}

.about-logo-block {
    text-align: center;
}

.about-logo-block img,
.about-logo-block .about-logo-img {
    max-width: 220px;
    margin: 0 auto 16px;
}

.about-logo-block .org-name {
    font-style: italic;
    color: var(--color-text-light);
    font-size: 14px;
}

.about-content h1 {
    font-size: 36px;
    font-weight: 900;
    margin-bottom: 24px;
}

.about-content p {
    margin-bottom: 20px;
    font-size: 15px;
    line-height: 1.8;
}

/* ── Footer ─────────────────────────────────────────────── */

.site-footer {
    background: var(--color-section-alt);
    border-top: 1px solid var(--color-border);
    padding: 24px 0;
    text-align: center;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    font-size: 13px;
    color: var(--color-text-light);
}

.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
    color: var(--color-text);
    font-weight: 700;
    font-size: 14px;
}

.footer-logo-img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

/* ── Responsive ─────────────────────────────────────────── */

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

    .news-grid.three-col {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .site-nav {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--color-bg);
        border-bottom: 1px solid var(--color-border);
        box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    }

    .site-nav.open {
        display: block;
    }

    .site-nav ul {
        flex-direction: column;
        padding: 12px 24px;
    }

    .site-nav a {
        padding: 10px 0;
        font-size: 16px;
    }

    .site-nav a.active {
        border-bottom: none;
        font-weight: 700;
    }

    .page-nav-bar {
        font-size: 16px;
        padding: 20px 16px;
    }

    .hero-row {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .news-grid,
    .news-grid.three-col,
    .volunteer-grid,
    .challenge-grid {
        grid-template-columns: 1fr;
    }

    .project-grid {
        grid-template-columns: 1fr;
    }

    .collab-post {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .collab-post img {
        order: -1 !important;
    }

    .about-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .container {
        padding: 0 16px;
    }

    .section-title {
        font-size: 26px;
    }
}

/* ── Article view ───────────────────────────────────────────── */

.article-view {
    max-width: 760px;
    margin: 0 auto;
}

.article-back {
    margin-bottom: 24px;
    font-size: 14px;
}

.article-back a {
    color: var(--color-text-light);
}

.article-back a:hover {
    color: var(--color-link);
}

.article-hero {
    margin-bottom: 28px;
}

.article-hero img {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    border-radius: 10px;
}

.article-title {
    font-size: 32px;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 12px;
}

.article-budget {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-link);
    margin-bottom: 12px;
}

.article-subtitle {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-light);
    margin-bottom: 20px;
}

.article-body {
    font-size: 16px;
    line-height: 1.8;
}

.article-body p {
    margin-bottom: 18px;
}

.article-body h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 32px 0 12px;
}

.article-body h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 28px 0 10px;
}

.article-body ul,
.article-body ol {
    margin: 12px 0 18px 24px;
}

.article-body li {
    margin-bottom: 6px;
}

.article-body blockquote {
    border-left: 3px solid var(--color-border);
    padding: 12px 20px;
    margin: 18px 0;
    color: var(--color-text-light);
    font-style: italic;
}

.article-body img {
    max-width: 100%;
    border-radius: 8px;
    margin: 18px 0;
}

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

    .article-hero img {
        max-height: 280px;
    }
}

@media (max-width: 480px) {
    .page-nav-bar {
        font-size: 14px;
    }

    .nav-sep {
        margin: 0 3px;
    }
}
