@import url('https://fonts.googleapis.com/css2?family=Merriweather:ital,wght@0,400;0,700;1,400&display=swap');

/* === CUSTOM PROPERTIES === */
:root {
    --color-primary:    #1d3a2f;
    --color-accent:     #c9882a;
    --color-terracotta: #B36545;
    --color-text:       #1a1a1a;
    --color-bg:         #ffffff;
    --color-bg-alt:     #f5f1ea;
    --color-muted:      #6b7280;
    --color-border:     #d4c9b8;
    --color-btn-text:   #ffffff;
    --font-heading:     'Merriweather', Georgia, serif;
    --font-body:        -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --shadow-card:      0 2px 10px rgba(0,0,0,0.09);
    --radius:           4px;
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img, video, iframe { max-width: 100%; height: auto; display: block; }
input, select, textarea, button { font-size: 16px; }

/* === BASE === */
html { scroll-behavior: smooth; }

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

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    line-height: 1.3;
    color: var(--color-primary);
}

a { color: var(--color-terracotta); }
a:hover { color: var(--color-primary); }

/* === LAYOUT === */
.container {
    width: 100%;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

/* === HEADER === */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--color-primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 68px;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.site-title {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    line-height: 1.25;
}

.site-title-main {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.05rem;
    color: #ffffff;
    letter-spacing: 0.01em;
}

.site-title-sub {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.75);
    letter-spacing: 0.02em;
}

/* === NAV TOGGLE === */
.nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: #ffffff;
}
.nav-toggle span {
    display: block;
    height: 2px;
    background: #ffffff;
    width: 100%;
    border-radius: 1px;
    transition: background-color 0.2s;
}

/* === NAV === */
.site-nav {
    display: none;
    width: 100%;
    order: 3;
    background: var(--color-primary);
    border-top: 1px solid rgba(255,255,255,0.15);
    padding-bottom: 0.5rem;
}
.site-nav.open { display: block; }

.nav-list { list-style: none; }

.nav-list > li > a {
    display: block;
    padding: 0.65rem 0.25rem;
    text-decoration: none;
    color: rgba(255,255,255,0.88);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-size: 0.95rem;
    transition: color 0.2s;
}
.nav-list > li > a:hover { color: #ffffff; }
.nav-list > li.active > a { color: var(--color-accent); font-weight: 700; }

/* Mobile dropdown */
.dropdown { list-style: none; display: none; padding-left: 1rem; }
.has-dropdown.dropdown-open > .dropdown { display: block; }
.dropdown li a {
    display: block;
    padding: 0.45rem 0;
    text-decoration: none;
    color: rgba(255,255,255,0.75);
    font-size: 0.875rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    transition: color 0.2s;
}
.dropdown li a:hover { color: #ffffff; }
.dropdown li.active a { color: var(--color-accent); }
.arrow { font-size: 0.6rem; margin-left: 0.2rem; }

@media (min-width: 768px) {
    .nav-toggle { display: none; }

    .site-nav {
        display: flex !important;
        width: auto;
        order: 0;
        background: transparent;
        border-top: none;
        padding-bottom: 0;
        align-items: center;
    }

    .nav-list {
        display: flex;
        flex-direction: row;
        align-items: center;
    }

    .nav-list > li > a {
        padding: 0.5rem 0.8rem;
        border-bottom: none;
        white-space: nowrap;
        font-size: 0.9rem;
    }
    .nav-list > li.active > a {
        color: var(--color-accent);
        font-weight: 700;
    }

    /* Desktop dropdown */
    .has-dropdown { position: relative; }
    .dropdown {
        position: absolute;
        top: calc(100% + 4px);
        left: 0;
        background: var(--color-primary);
        border: 1px solid rgba(255,255,255,0.15);
        border-radius: var(--radius);
        min-width: 240px;
        padding-left: 0;
        box-shadow: 0 4px 16px rgba(0,0,0,0.25);
    }
    .dropdown li a {
        padding: 0.6rem 1rem;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        white-space: nowrap;
        color: rgba(255,255,255,0.85);
        font-size: 0.875rem;
    }
    .dropdown li:last-child a { border-bottom: none; }
    .dropdown li a:hover { color: #ffffff; background: rgba(255,255,255,0.08); }
}

/* === BODY OFFSET FOR FIXED HEADER === */
body { padding-top: 76px; }

@media (min-width: 768px) { body { padding-top: 68px; } }

/* === HERO (HOME PAGE) === */
.hero {
    background: var(--color-bg-alt);
    padding: 3.5rem 0 2.5rem;
    text-align: center;
    border-bottom: 1px solid var(--color-border);
}

.hero-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--color-primary);
    max-width: 640px;
    margin: 0 auto 1.5rem;
    line-height: 1.25;
}

.hero-image {
    margin: 0 auto 1.5rem;
    max-width: 200px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--color-primary);
    box-shadow: var(--shadow-card);
}
.hero-image img { border-radius: 50%; }

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 1rem;
}

.tag {
    padding: 0.3rem 0.9rem;
    border: 2px solid var(--color-primary);
    border-radius: 2rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-primary);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: #fff;
}

@media (min-width: 768px) {
    .hero-title { font-size: 2.1rem; }
    .hero { padding: 4rem 0 3rem; }
}

/* === HOME SECTIONS === */
.home-sections { padding-bottom: 0; }

.home-section {
    padding: 3.5rem 0;
    border-bottom: 1px solid var(--color-border);
}
.home-section:last-child { border-bottom: none; }
.home-section:nth-child(even) { background: var(--color-bg-alt); }

.home-section-inner {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.home-section-image img {
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
}

@media (min-width: 768px) {
    .home-section-inner {
        flex-direction: row;
        align-items: flex-start;
        gap: 3rem;
    }
    .home-section-inner.reverse { flex-direction: row-reverse; }
    .home-section-image { flex: 0 0 280px; }
    .home-section-text { flex: 1; }
}

/* === TYPOGRAPHY === */
.section-heading {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 0.75rem;
}

.section-subheading {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
    margin-top: 1.5rem;
}

.page-title {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--color-accent);
    display: inline-block;
}

.lead {
    font-size: 1.05rem;
    color: #333;
    margin-bottom: 1.25rem;
    line-height: 1.75;
}

p + p { margin-top: 0.85rem; }

ul.content-list { padding-left: 1.5rem; margin: 0.75rem 0; }
ul.content-list li { margin-bottom: 0.4rem; }
ol.content-list { padding-left: 1.5rem; margin: 0.75rem 0; }
ol.content-list li { margin-bottom: 0.5rem; }

blockquote {
    border-left: 4px solid var(--color-accent);
    padding: 0.75rem 1.25rem;
    font-style: italic;
    color: #444;
    background: var(--color-bg-alt);
    border-radius: 0 var(--radius) var(--radius) 0;
    margin: 1.25rem 0;
}

.cta-link {
    display: inline-block;
    margin-top: 1rem;
    color: var(--color-terracotta);
    font-weight: 700;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s;
}
.cta-link:hover {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

/* === PAGE CONTENT === */
.page-content {
    padding: 2.5rem 0 4rem;
}

/* === ABOUT === */
.about-layout {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}
.about-photo {
    max-width: 280px;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-card);
}
.about-photo img { border-radius: var(--radius); }

@media (min-width: 768px) {
    .about-layout {
        flex-direction: row;
        align-items: flex-start;
        gap: 3rem;
    }
    .about-photo { flex: 0 0 260px; }
    .about-text { flex: 1; }
}

/* === TABLES === */
.table-scroll { overflow-x: auto; width: 100%; -webkit-overflow-scrolling: touch; }
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    min-width: 420px;
    font-size: 0.95rem;
}
th, td { padding: 0.6rem 0.9rem; text-align: left; border: 1px solid var(--color-border); }
th {
    font-weight: 700;
    background: var(--color-primary);
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 0.85rem;
}
tr:nth-child(even) td { background: var(--color-bg-alt); }

/* === SCHOLARS GRID === */
.scholars-year { margin-bottom: 3rem; }

.scholars-year-heading {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.4rem;
    border-bottom: 3px solid var(--color-accent);
    display: inline-block;
}

.scholars-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin-top: 0.75rem;
}

.scholar-card {
    flex: 0 0 calc(50% - 0.625rem);
    text-align: center;
    background: var(--color-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    border: 1px solid var(--color-border);
}
.scholar-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    object-position: top center;
}
.scholar-name {
    padding: 0.5rem 0.4rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1.3;
}

@media (min-width: 768px) {
    .scholar-card { flex: 0 0 calc(25% - 1rem); }
}
@media (min-width: 1280px) {
    .scholar-card { flex: 0 0 calc(20% - 1rem); }
}

/* === UNSUNG HEROES === */
.hero-featured {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    margin-bottom: 2.5rem;
    background: var(--color-bg-alt);
    border-radius: var(--radius);
    padding: 1.5rem;
    border: 1px solid var(--color-border);
}
.hero-featured-photo {
    max-width: 240px;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-card);
}
.hero-featured-photo img { border-radius: var(--radius); }

@media (min-width: 768px) {
    .hero-featured {
        flex-direction: row;
        align-items: flex-start;
    }
    .hero-featured-photo { flex: 0 0 220px; }
    .hero-featured-text { flex: 1; }
}

/* === BUTTONS === */
a.btn, button.btn {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    min-height: 44px;
    background: var(--color-primary);
    color: var(--color-btn-text);
    border: 2px solid var(--color-primary);
    border-radius: var(--radius);
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    font-family: var(--font-body);
    letter-spacing: 0.02em;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
a.btn:hover, button.btn:hover {
    background: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}

a.btn-accent, button.btn-accent {
    background: var(--color-accent);
    border-color: var(--color-terracotta);
    color: var(--color-btn-text);
}
a.btn-accent:hover, button.btn-accent:hover {
    background: transparent;
    color: var(--color-terracotta);
    border-color: var(--color-terracotta);
}

/* === FORMS === */
.form-group { margin-bottom: 1.25rem; }
.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--color-primary);
}
.form-group input,
.form-group textarea {
    width: 100%;
    min-height: 44px;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-family: var(--font-body);
    color: var(--color-text);
    background: #fff;
    transition: border-color 0.2s;
}
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(29,58,47,0.1);
}
.form-group textarea { min-height: 130px; resize: vertical; }

.alert {
    padding: 0.85rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1.25rem;
    font-weight: 600;
}
.alert-success { background: #ecfdf5; border: 1px solid #6ee7b7; color: #065f46; }
.alert-error   { background: #fef2f2; border: 1px solid #fca5a5; color: #991b1b; }

/* === DONATE === */
.donate-methods {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 2.5rem;
}
.donate-method {
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.5rem;
}
.donate-method .section-heading { margin-top: 0; }

@media (min-width: 768px) {
    .donate-methods { flex-direction: row; }
    .donate-method { flex: 1; }
}

.donors-list {
    columns: 2;
    column-gap: 2rem;
    list-style: none;
    margin-top: 0.75rem;
}
.donors-list li {
    break-inside: avoid;
    padding: 0.25rem 0;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--color-border);
}
.donors-list li em { color: var(--color-muted); font-size: 0.82rem; }

@media (min-width: 768px) { .donors-list { columns: 3; } }

/* === FOOTER === */
.site-footer {
    background: var(--color-primary);
    color: rgba(255,255,255,0.85);
    margin-top: 0;
    padding-top: 3rem;
}

.footer-inner {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding-bottom: 2rem;
}

@media (min-width: 768px) {
    .footer-inner { flex-direction: row; }
    .footer-col { flex: 1; }
}

.footer-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    color: #ffffff;
    margin-bottom: 0.75rem;
}

.footer-col p { font-size: 0.9rem; margin-bottom: 0.25rem; }
.footer-col a { color: rgba(255,255,255,0.75); text-decoration: none; transition: color 0.2s; }
.footer-col a:hover { color: var(--color-terracotta); }

.footer-nav { list-style: none; }
.footer-nav li { margin-bottom: 0.4rem; }
.footer-nav a { font-size: 0.9rem; color: rgba(255,255,255,0.75); text-decoration: none; transition: color 0.2s; }
.footer-nav a:hover { color: var(--color-terracotta); }

.footer-social {
    display: inline-block;
    margin-top: 0.5rem;
    color: var(--color-accent) !important;
    font-weight: 700;
    font-size: 0.9rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.15);
    padding: 1.25rem;
    text-align: center;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.55);
}

/* === HERO SUBTITLE & TEXT === */
.hero-subtitle {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-top: 1.25rem;
    margin-bottom: 0.75rem;
}

.hero-text {
    font-size: 1rem;
    color: #333;
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.75;
}

@media (min-width: 768px) {
    .hero-subtitle { font-size: 1.35rem; }
    .hero-text { font-size: 1.05rem; }
}

/* === FOOTER LOGO === */

.footer-logo-img {
    max-width: 120px;
    height: auto;
    margin-bottom: 0.75rem;
}
