:root {
    --navy: #0A2A43;
    --navy-dark: #071D2F;
    --blue: #1E6FB8;
    --green: #3FA34D;
    --orange: #F2994A;
    --bg: #FAF9F6;
    --text: #1A1A1A;
    --muted: #5B6670;
    --card-border: #E3E1DA;

    --font-heading: "Poppins", "Segoe UI", system-ui, -apple-system, sans-serif;
    --font-body: "Lora", Georgia, "Times New Roman", serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.65;
    overflow-x: hidden;
}

h1, h2, h3, .brand, .btn, .nav-cta, .site-nav a, .hero-eyebrow {
    font-family: var(--font-heading);
}

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

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== HEADER ===== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 32px;
    background-color: var(--navy);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.brand-logo {
    height: 40px;
    width: auto;
    display: block;
}

.brand-mark {
    color: var(--orange);
    letter-spacing: 1px;
}

.brand-text {
    color: #ffffff;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: #ffffff;
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

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

.site-nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.site-nav a {
    color: #D7DEE3;
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
}

.site-nav a:hover {
    color: #ffffff;
}

.nav-cta {
    background-color: var(--orange);
    color: var(--navy-dark) !important;
    padding: 8px 16px;
    border-radius: 6px;
}

/* ===== HERO ===== */

.hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(160deg, var(--navy), var(--navy-dark));
    color: #ffffff;
    padding: 100px 32px;
    text-align: center;
}

.hero-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.35;
    pointer-events: none;
    z-index: 0;
}

.hero-glow-1 {
    width: 340px;
    height: 340px;
    background: var(--blue);
    top: -120px;
    left: -80px;
}

.hero-glow-2 {
    width: 300px;
    height: 300px;
    background: var(--orange);
    bottom: -140px;
    right: -60px;
}

.hero-glow-3 {
    width: 240px;
    height: 240px;
    background: var(--green);
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.18;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin: 0 auto;
    animation: fadeInUp 0.7s ease both;
}

.hero-eyebrow {
    color: var(--orange);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 14px;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 18px;
}

.hero-subtitle {
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: #C7D0D6;
    margin-bottom: 32px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.btn:hover {
    transform: translateY(-3px);
}

.btn-primary {
    background-color: var(--orange);
    color: var(--navy-dark);
    box-shadow: 0 6px 18px rgba(242, 153, 74, 0.35);
}

.btn-primary:hover {
    box-shadow: 0 10px 24px rgba(242, 153, 74, 0.45);
}

.btn-secondary {
    background-color: transparent;
    color: #ffffff;
    border: 2px solid var(--green);
}

.btn-secondary:hover {
    background-color: var(--green);
}

.btn-tertiary {
    background-color: transparent;
    color: #ffffff;
    border: 2px solid var(--blue);
}

.btn-tertiary:hover {
    background-color: var(--blue);
}

/* ===== SECTIONS ===== */

main section {
    max-width: 1000px;
    margin: 0 auto;
    padding: 70px 32px;
}

.topics h2,
.about h2 {
    font-family: var(--font-heading);
    font-size: 1.9rem;
    font-weight: 800;
    color: var(--navy);
    margin-bottom: 10px;
    text-align: center;
}

.section-intro {
    text-align: center;
    color: var(--muted);
    margin-bottom: 40px;
}

.topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 20px;
}

.topic-card {
    background-color: #ffffff;
    border: 1px solid var(--card-border);
    border-top: 4px solid var(--blue);
    border-radius: 12px;
    padding: 26px;
    box-shadow: 0 2px 6px rgba(10, 42, 67, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    animation: fadeInUp 0.6s ease both;
}

.topic-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(10, 42, 67, 0.12);
}

.topic-card:nth-child(1) { animation-delay: 0.05s; }
.topic-card:nth-child(2) { animation-delay: 0.1s; }
.topic-card:nth-child(3) { animation-delay: 0.15s; }
.topic-card:nth-child(4) { animation-delay: 0.2s; }
.topic-card:nth-child(5) { animation-delay: 0.25s; }
.topic-card:nth-child(6) { animation-delay: 0.3s; }

.topic-card:nth-child(4n+2) { border-top-color: var(--green); }
.topic-card:nth-child(4n+3) { border-top-color: var(--orange); }
.topic-card:nth-child(4n+4) { border-top-color: var(--navy); }

.topic-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    font-size: 1.4rem;
    margin-bottom: 14px;
    background-color: rgba(30, 111, 184, 0.1);
}

.topic-card:nth-child(4n+2) .topic-icon { background-color: rgba(63, 163, 77, 0.12); }
.topic-card:nth-child(4n+3) .topic-icon { background-color: rgba(242, 153, 74, 0.15); }
.topic-card:nth-child(4n+4) .topic-icon { background-color: rgba(10, 42, 67, 0.08); }

.topic-card h3 {
    font-family: var(--font-heading);
    color: var(--navy);
    margin-bottom: 10px;
    font-size: 1.15rem;
}

.topic-card p {
    color: var(--muted);
    font-size: 0.95rem;
}

.about {
    text-align: center;
}

.about p {
    max-width: 700px;
    margin: 0 auto;
    color: var(--muted);
    font-size: 1.05rem;
}

.site-footer {
    text-align: center;
    padding: 28px;
    background-color: var(--navy-dark);
    color: #9FADB6;
    font-size: 0.9rem;
}

.site-footer a {
    color: var(--blue);
    font-weight: 600;
}

/* ===== OPPORTUNITIES PAGE ===== */

.opportunities-hero {
    text-align: center;
    padding-bottom: 20px !important;
}

.opportunities-hero h1 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--navy);
    margin-bottom: 14px;
}

.filter-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.sort-bar {
    margin-top: 12px;
}

.sort-label {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--muted);
    font-size: 0.9rem;
}

.filter-btn {
    font-family: var(--font-heading);
    background-color: #ffffff;
    border: 2px solid var(--card-border);
    color: var(--navy);
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.filter-btn:hover {
    border-color: var(--blue);
}

.filter-btn.active {
    background-color: var(--navy);
    border-color: var(--navy);
    color: #ffffff;
}

.last-updated {
    margin-top: 16px;
    color: var(--muted);
    font-size: 0.85rem;
}

.opportunities-list-section {
    padding-top: 10px !important;
}

.opportunities-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.loading-msg {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--muted);
    padding: 40px 0;
}

.opportunity-card {
    background-color: #ffffff;
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 22px;
    box-shadow: 0 2px 6px rgba(10, 42, 67, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.opportunity-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(10, 42, 67, 0.1);
}

.opportunity-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.tag {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 12px;
}

.tag-job {
    background-color: rgba(30, 111, 184, 0.12);
    color: var(--blue);
}

.tag-fellowship {
    background-color: rgba(63, 163, 77, 0.12);
    color: var(--green);
}

.tag-location {
    background-color: rgba(242, 153, 74, 0.15);
    color: #B5651D;
}

.opportunity-card h3 {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    margin-bottom: 8px;
    line-height: 1.4;
}

.opportunity-card h3 a {
    color: var(--navy);
}

.opportunity-card h3 a:hover {
    color: var(--blue);
    text-decoration: underline;
}

.opportunity-org {
    color: var(--text);
    font-size: 0.9rem;
    margin-bottom: 6px;
}

.opportunity-meta {
    color: var(--muted);
    font-size: 0.8rem;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 860px) {
    .nav-toggle {
        display: flex;
    }

    .site-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background-color: var(--navy);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    }

    .site-nav.open {
        max-height: 320px;
    }

    .site-nav a {
        padding: 16px 24px;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        width: 100%;
    }

    .site-nav a.nav-cta {
        margin: 12px 24px;
        text-align: center;
        width: calc(100% - 48px);
        border-top: none;
        padding: 12px 16px;
    }
}

@media (max-width: 600px) {
    .site-header {
        padding: 12px 20px;
    }

    .hero {
        padding: 64px 20px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

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

    main section {
        padding: 50px 20px;
    }

    .filter-bar {
        gap: 8px;
    }

    .filter-btn {
        padding: 9px 16px;
        font-size: 0.85rem;
    }
}
