/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors */
    --primary-color: #303e7a;
    --primary-color-dark: #202a54;
    --secondary-color: #9ec9e2;   /* light blue accent (was gold) */
    --accent-color: #303e7a;      /* CTAs use the brand navy (was khaki) */
    --link-color: #1a5fb4;        /* in-text links: a clearer blue than the navy headings and slate body text */
    --link-color-hover: #0f3f7f;
    --accent-red: #f66161;
    --accent-blue: #9ec9e2;
    --heading-color: #202a54;
    --bg-color: #fff;
    --light-bg: #f6f8fa;
    --dark-bg: #0f1325;
    --border-color: #ddd;

    /* Typography Colors */
    --text-color-primary: #2c3e50;
    --text-color-secondary: #5a6c7d;
    --text-color-light: #7f8c98;
    --text-color-white: #ffffff;

    /* Font Families */
    --font-primary: 'Mulish', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;

    /* Font Weights */
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;

    /* Modular Type Scale (1.250 - Major Third) */
    --text-xs: 0.8rem;      /* 12.8px */
    --text-sm: 0.875rem;    /* 14px */
    --text-base: 1rem;      /* 16px */
    --text-lg: 1.125rem;    /* 18px */
    --text-xl: 1.25rem;     /* 20px */
    --text-2xl: 1.563rem;   /* 25px */
    --text-3xl: 1.953rem;   /* 31.25px */
    --text-4xl: 2.441rem;   /* 39px */
    --text-5xl: 3.052rem;   /* 48.8px */
    --text-6xl: 3.815rem;   /* 61px */

    /* Line Heights */
    --leading-tight: 1.25;
    --leading-snug: 1.375;
    --leading-normal: 1.5;
    --leading-relaxed: 1.625;
    --leading-loose: 1.75;

    /* Letter Spacing */
    --tracking-tight: -0.025em;
    --tracking-normal: 0;
    --tracking-wide: 0.025em;
    --tracking-wider: 0.05em;
    --tracking-widest: 0.1em;

    /* Max Line Length for Readability */
    --prose-width: 65ch;
}

@import url('https://fonts.googleapis.com/css2?family=Mulish:wght@300;400;500;600;700;800&display=swap');

/* Base Typography */
body {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    font-weight: var(--font-weight-normal);
    line-height: var(--leading-relaxed);
    color: var(--text-color-primary);
    background-color: var(--bg-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Headings Base Styles */
h1, h2, h3, h4, h5, h6 {
    font-weight: var(--font-weight-bold);
    line-height: var(--leading-tight);
    color: var(--heading-color);
    margin-bottom: 0.75em;
    margin-top: 1.5em;
    letter-spacing: var(--tracking-tight);
}

h1:first-child,
h2:first-child,
h3:first-child,
h4:first-child,
h5:first-child,
h6:first-child {
    margin-top: 0;
}

h1 {
    font-size: var(--text-5xl);
    font-weight: var(--font-weight-extrabold);
    line-height: 1.1;
}

h2 {
    font-size: var(--text-4xl);
    font-weight: var(--font-weight-bold);
}

h3 {
    font-size: var(--text-3xl);
    font-weight: var(--font-weight-bold);
}

h4 {
    font-size: var(--text-2xl);
    font-weight: var(--font-weight-semibold);
}

h5 {
    font-size: var(--text-xl);
    font-weight: var(--font-weight-semibold);
}

h6 {
    font-size: var(--text-lg);
    font-weight: var(--font-weight-medium);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider);
}

/* Paragraph & Text */
p {
    margin-bottom: 1.25em;
    max-width: var(--prose-width);
}

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

.lead {
    font-size: var(--text-xl);
    font-weight: var(--font-weight-normal);
    line-height: var(--leading-relaxed);
    color: var(--text-color-secondary);
}

strong, b {
    font-weight: var(--font-weight-bold);
}

em, i {
    font-style: italic;
}

small {
    font-size: var(--text-sm);
}

/* Links */
a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

/* Links inside running text are underlined as well as coloured */
.page-prose a,
.post-content a,
.article-excerpt a,
.contact-details a,
.pub-excerpt a,
.land-acknowledgment a,
.mission-section a {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.15em;
}

/* Lists */
ul, ol {
    margin-bottom: 1.25em;
    padding-left: 1.5em;
}

li {
    margin-bottom: 0.5em;
    line-height: var(--leading-normal);
}

/* Blockquotes */
blockquote {
    margin: 2em 0;
    padding: 1.5em 2em;
    border-left: 4px solid var(--secondary-color);
    background-color: var(--light-bg);
    font-size: var(--text-lg);
    font-style: italic;
    color: var(--text-color-secondary);
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Navigation */
.site-header {
    background-color: transparent;
    color: white;
    padding: 2.5rem 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.site-header.scrolled {
    background-color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 1rem 0;
}

.site-header.scrolled .nav-menu a,
.site-header.scrolled .navbar-brand a {
    color: #000;
}

.site-header.scrolled .mobile-menu-toggle span {
    background-color: var(--primary-color);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.navbar-logo {
    margin-right: 2rem;
}

.site-logo {
    height: 80px;
    width: auto;
    transition: opacity 0.3s ease;
}

.logo-white {
    display: block;
}

.logo-dark {
    display: none;
}

.site-header.scrolled .logo-white {
    display: none;
}

.site-header.scrolled .logo-dark {
    display: block;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin-left: auto;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-size: var(--text-base);
    font-weight: var(--font-weight-medium);
    letter-spacing: var(--tracking-wide);
    transition: opacity 0.3s;
}

.nav-menu a:hover {
    opacity: 0.8;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    min-height: 88vh;
    background-color: #03a9f4;
    background-image: linear-gradient(rgba(32, 42, 84, 0.12), rgba(32, 42, 84, 0.35)), url('/assets/images/hero/toronto-cityscape.jpg');
    background-position: 45% 44%;
    background-size: cover;
    background-attachment: scroll;
    background-repeat: no-repeat;
    color: white;
    padding: 14rem 0 5rem;
    display: flex;
    align-items: flex-end;
}

.hero .container {
    width: 100%;
}

.hero-title {
    color: var(--text-color-white);
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
    font-size: var(--text-6xl);
    font-weight: var(--font-weight-extrabold);
    letter-spacing: var(--tracking-tight);
    text-align: left;
    margin-bottom: 0.75rem;
    line-height: 1.05;
    white-space: nowrap;
}

.hero-tagline {
    font-size: var(--text-xl);
    font-weight: var(--font-weight-medium);
    text-align: left;
    margin-bottom: 1.75rem;
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    line-height: var(--leading-snug);
    opacity: 0.9;
}

.hero-description {
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
    max-width: 42rem;
    margin: 0;
    text-align: left;
    font-size: var(--text-lg);
    line-height: var(--leading-normal);
}

.hero-description p {
    margin-bottom: 0;
}

.hero-mission {
    font-weight: var(--font-weight-normal);
    font-size: var(--text-lg);
    opacity: 0.92;
}

/* News Section */
.news-section {
    padding: 4rem 0;
    background-color: var(--light-bg);
}

.news-section h2 {
    text-align: center;
    font-size: var(--text-4xl);
    font-weight: var(--font-weight-bold);
    margin-bottom: 3rem;
    color: var(--primary-color);
    letter-spacing: var(--tracking-tight);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.news-item {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: visible;
    box-shadow: 0 4px 12px rgba(32, 42, 84, 0.08);
    transition: box-shadow 0.3s;
    text-align: center;
    padding: 1.5rem;
}

.news-item:hover {
    box-shadow: 0 10px 24px rgba(32, 42, 84, 0.16);
}

.news-image {
    display: block;
    width: 150px;
    height: 150px;
    margin: 0 auto 1.5rem;
    overflow: hidden;
    border-radius: 50%;
    text-decoration: none;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-content {
    padding: 0;
}

.news-content h3 {
    color: var(--heading-color);
    margin-bottom: 0.75rem;
    font-size: var(--text-xl);
    font-weight: var(--font-weight-semibold);
    line-height: var(--leading-snug);
}

.news-content p {
    margin-bottom: 1rem;
    color: var(--text-color-secondary);
    line-height: var(--leading-relaxed);
    font-size: var(--text-base);
}

.read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: var(--font-weight-semibold);
    font-size: var(--text-sm);
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    transition: color 0.3s;
}

.read-more:hover {
    color: var(--primary-color-dark);
    text-decoration: underline;
}

/* Mission Section */
.mission-section {
    padding: 4rem 0;
    background-color: white;
    text-align: center;
}

.mission-section h2 {
    font-size: var(--text-4xl);
    font-weight: var(--font-weight-bold);
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    letter-spacing: var(--tracking-tight);
}

.mission-section p {
    font-size: var(--text-xl);
    line-height: var(--leading-loose);
    max-width: 940px;
    text-wrap: balance;
    margin: 0 auto 2rem;
    color: var(--text-color-secondary);
}

.cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: var(--accent-color);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: var(--text-base);
    font-weight: var(--font-weight-semibold);
    letter-spacing: var(--tracking-wide);
    transition: background-color 0.3s, transform 0.2s;
}

.cta-button:hover {
    background-color: var(--primary-color-dark);
    transform: translateY(-2px);
}

/* Partners Section */
.partners-section {
    padding: 4rem 0;
    background-color: var(--light-bg);
}

.partners-section h2 {
    text-align: center;
    font-size: var(--text-4xl);
    font-weight: var(--font-weight-bold);
    margin-bottom: 1rem;
    color: var(--primary-color);
    letter-spacing: var(--tracking-tight);
}

.partners-section p {
    text-align: center;
    margin-bottom: 2rem;
    font-size: var(--text-base);
    color: var(--text-color-secondary);
}

.partners-logos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    align-items: center;
    justify-items: center;
}

.partners-logos img {
    max-width: 180px;
    max-height: 100px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: filter 0.3s, opacity 0.3s;
}

.partners-logos img:hover {
    filter: grayscale(0%);
    opacity: 1;
}

/* Funders Section */
.funders-section {
    padding: 4rem 0;
    background-color: white;
}

.funders-section h2 {
    text-align: center;
    font-size: var(--text-4xl);
    font-weight: var(--font-weight-bold);
    margin-bottom: 1rem;
    color: var(--primary-color);
    letter-spacing: var(--tracking-tight);
}

.funders-section p {
    text-align: center;
    margin-bottom: 2rem;
    font-size: var(--text-base);
    color: var(--text-color-secondary);
}

.funders-logos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    align-items: center;
    justify-items: center;
}

.funders-logos img {
    max-width: 180px;
    max-height: 100px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: filter 0.3s, opacity 0.3s;
}

.funders-logos img:hover {
    filter: grayscale(0%);
    opacity: 1;
}

/* Newsletter Section */
.newsletter-section {
    position: relative;
    padding: 4rem 0;
    background-image: url('../images/hero/toronto-cityscape.jpg');
    background-size: cover;
    background-position: center;
    text-align: center;
}

.newsletter-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(48, 62, 122, 0.85);
    z-index: 1;
}

.newsletter-section .container {
    position: relative;
    z-index: 2;
}

.newsletter-section h2 {
    font-size: var(--text-4xl);
    font-weight: var(--font-weight-bold);
    margin-bottom: 1rem;
    color: white;
    letter-spacing: var(--tracking-tight);
}

.newsletter-section p {
    margin: 0 auto 2rem;
    color: white;
    font-size: var(--text-lg);
    line-height: var(--leading-relaxed);
}

/* Page Header */
.page-header {
    position: relative;
    background-color: var(--primary-color);
    background-size: cover;
    background-position: center;
    color: white;
    padding: 9rem 0 3rem;
    margin-top: 0;
    margin-bottom: 2.5rem;
}

.page-header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(32, 42, 84, 0.8);
    z-index: 1;
}

.page-header .container {
    position: relative;
    z-index: 2;
}

.page-header h1 {
    color: var(--text-color-white);
    font-size: var(--text-4xl);
    font-weight: var(--font-weight-extrabold);
    margin-bottom: 0;
    letter-spacing: var(--tracking-tight);
    line-height: var(--leading-tight);
}

.post-title {
    color: var(--heading-color);
    font-size: var(--text-4xl);
    font-weight: var(--font-weight-extrabold);
    margin-bottom: 1rem;
    letter-spacing: var(--tracking-tight);
    line-height: var(--leading-tight);
}

.recent-news-item {
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.recent-news-item:last-child {
    border-bottom: none;
}

.recent-news-item h4 {
    font-size: var(--text-base);
    font-weight: var(--font-weight-semibold);
    margin-bottom: 0.25rem;
    line-height: var(--leading-snug);
}

.recent-news-item .news-date {
    font-size: var(--text-sm);
    color: var(--text-color-light);
}

/* About Page */
.about-content {
    padding: 2rem 0 4rem;
}

.mission {
    font-size: var(--text-xl);
    line-height: var(--leading-loose);
    margin-bottom: 3rem;
    padding: 2rem;
    background-color: var(--light-bg);
    border-left: 4px solid var(--secondary-color);
    color: var(--text-color-secondary);
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 2rem 0 4rem;
}

.value-item {
    padding: 2rem;
    background-color: white;
    border: 2px solid var(--border-color);
    border-radius: 8px;
}

.value-item h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: var(--text-xl);
    font-weight: var(--font-weight-bold);
    line-height: var(--leading-snug);
}

/* Team Section */
.team-section {
    padding: 2rem 0 4rem;
}

.team-section h2 {
    color: var(--primary-color);
    font-size: var(--text-3xl);
    font-weight: var(--font-weight-bold);
    margin: 3rem 0 2rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--secondary-color);
    letter-spacing: var(--tracking-tight);
}

.team-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 3rem;
}

.team-member-item {
    display: flex;
    gap: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    align-items: flex-start;
}

.team-member-item .member-image {
    flex-shrink: 0;
    width: 150px;
    height: 150px;
    overflow: hidden;
    border-radius: 50%;
}

.team-member-item .member-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-member-item .member-info {
    flex: 1;
    padding: 0;
}

.member-info h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: var(--text-xl);
    font-weight: var(--font-weight-bold);
    line-height: var(--leading-snug);
}

.member-title {
    color: var(--text-color-secondary);
    font-size: var(--text-sm);
    font-style: italic;
    margin-bottom: 1rem;
    line-height: var(--leading-normal);
}

.member-bio {
    color: var(--text-color-secondary);
    line-height: var(--leading-relaxed);
    margin-bottom: 1rem;
    font-size: var(--text-base);
}

/* Team Member Page */
.team-member-page {
    padding: 2rem 0 4rem;
}

.back-link {
    display: inline-block;
    margin-bottom: 2rem;
    color: var(--primary-color);
    text-decoration: none;
    font-size: var(--text-base);
    font-weight: var(--font-weight-semibold);
    letter-spacing: var(--tracking-wide);
}

.back-link:hover {
    text-decoration: underline;
}

.member-header {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
}

.member-photo {
    flex-shrink: 0;
    width: 250px;
    height: 250px;
    border-radius: 8px;
    overflow: hidden;
}

.member-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-details h1 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.position {
    font-size: var(--text-xl);
    font-weight: var(--font-weight-medium);
    color: var(--text-color-secondary);
    margin-bottom: 1rem;
    line-height: var(--leading-normal);
}

.member-bio-full {
    line-height: var(--leading-loose);
    margin-bottom: 2rem;
    font-size: var(--text-base);
    color: var(--text-color-primary);
}

/* Work Content */
.work-content {
    padding: 2rem 0 4rem;
}

.intro {
    font-size: var(--text-lg);
    line-height: var(--leading-loose);
    margin-bottom: 3rem;
    color: var(--text-color-secondary);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 2rem 0 3rem;
}

.project-card {
    padding: 2rem;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.project-card:hover {
    border-color: var(--secondary-color);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.project-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: var(--text-2xl);
    font-weight: var(--font-weight-bold);
    line-height: var(--leading-snug);
}

.btn {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: var(--text-base);
    font-weight: var(--font-weight-medium);
    letter-spacing: var(--tracking-wide);
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: var(--primary-color-dark);
}

/* Contact Page */
.contact-content {
    padding: 2rem 0 4rem;
}

.contact-intro {
    font-size: var(--text-lg);
    line-height: var(--leading-loose);
    margin-bottom: 2rem;
    color: var(--text-color-secondary);
}

.participation-list {
    list-style-position: inside;
    margin: 2rem 0;
    font-size: var(--text-lg);
    line-height: var(--leading-relaxed);
}

.participation-list li {
    padding: 0.5rem 0;
}

.contact-info {
    margin-top: 3rem;
    padding: 2rem;
    background-color: var(--light-bg);
    border-radius: 8px;
}

.email-large {
    font-size: var(--text-2xl);
    font-weight: var(--font-weight-semibold);
    margin-top: 1rem;
}

.email-large a {
    color: var(--primary-color);
    text-decoration: none;
}

.email-large a:hover {
    text-decoration: underline;
}

/* Footer */
.site-footer {
    background-color: var(--primary-color);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 4rem;
    margin-bottom: 2rem;
}

.footer-section {
    text-align: left;
}

.footer-section:nth-child(2) {
    justify-self: center;
}

.footer-section:nth-child(3) {
    justify-self: end;
    min-width: 8rem;
}

.footer-section p {
    max-width: none;
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

.footer-section h3 {
    color: var(--text-color-white);
    margin-bottom: 1rem;
    font-size: var(--text-xl);
    font-weight: var(--font-weight-semibold);
    line-height: var(--leading-snug);
}

.footer-section a {
    color: white;
    text-decoration: none;
}

.footer-section a:hover {
    text-decoration: underline;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 2rem;
    margin-top: 2rem;
}

.land-acknowledgment {
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
    margin: 0 auto;
    max-width: 52rem;
    text-align: center;
    opacity: 0.9;
}

.land-acknowledgment p {
    max-width: none;
}

.copyright {
    text-align: center;
    font-size: var(--text-sm);
    opacity: 0.8;
}

/* News List */
.news-list {
    padding: 2rem 0 4rem;
}

.news-article {
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-color);
}

.news-article:last-child {
    border-bottom: none;
}

.article-meta {
    color: var(--text-color-light);
    font-size: var(--text-sm);
    margin-bottom: 0.25rem;
}

.news-article h2 {
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.article-image {
    margin-bottom: 1.5rem;
    max-width: 100%;
}

.article-image a {
    display: block;
    line-height: 0;
}

.article-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s;
}

.article-image img:hover {
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.news-article h2 a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

.news-article h2 a:hover {
    color: var(--secondary-color);
}

.article-excerpt {
    color: var(--text-color-secondary);
    font-size: var(--text-base);
    line-height: var(--leading-loose);
    margin-bottom: 1rem;
}

/* Post Page */
.post {
    padding: 2rem 0 4rem;
}

.post-header {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.post-title {
    color: var(--heading-color);
    font-size: var(--text-5xl);
    font-weight: var(--font-weight-extrabold);
    margin-bottom: 1rem;
    letter-spacing: var(--tracking-tight);
    line-height: var(--leading-tight);
}

.post-meta {
    color: var(--text-color-light);
    font-size: var(--text-sm);
}

.post-author {
    margin-left: 1rem;
}

.post-content {
    line-height: var(--leading-loose);
    font-size: var(--text-lg);
    margin-bottom: 3rem;
    color: var(--text-color-primary);
}

.post-content h2 {
    color: var(--primary-color);
    margin: 2rem 0 1rem;
    font-size: var(--text-3xl);
    font-weight: var(--font-weight-bold);
    line-height: var(--leading-tight);
}

.post-content h3 {
    color: var(--primary-color);
    margin: 1.5rem 0 1rem;
    font-size: var(--text-2xl);
    font-weight: var(--font-weight-semibold);
    line-height: var(--leading-snug);
}

.post-content p {
    margin-bottom: 1.5rem;
}

.post-content ul,
.post-content ol {
    margin: 1rem 0 1.5rem 2rem;
}

.post-content li {
    margin-bottom: 0.5rem;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 2rem 0;
}

.post-content a {
    color: var(--link-color);
}

.post-content a:hover {
    color: var(--link-color-hover);
}

.post-footer {
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

/* Sidebar Layout */
.content-with-sidebar {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.main-column {
    flex: 2;
    min-width: 0;
}

.sidebar {
    flex: 1;
    background-color: var(--light-bg);
    padding: 2rem;
    border-radius: 8px;
    align-self: flex-start;
}

.sidebar h2 {
    font-size: var(--text-3xl);
    font-weight: var(--font-weight-bold);
    margin-bottom: 1.5rem;
    color: var(--heading-color);
    letter-spacing: var(--tracking-tight);
}

.publications-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.publication-item {
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.publication-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.publication-item h4 {
    font-size: var(--text-lg);
    font-weight: var(--font-weight-semibold);
    margin-bottom: 0.5rem;
    line-height: var(--leading-snug);
}

.publication-item h4 a {
    color: var(--heading-color);
    text-decoration: none;
}

.publication-item h4 a:hover {
    color: var(--primary-color);
}

.pub-excerpt {
    font-size: var(--text-sm);
    color: var(--text-color-secondary);
    line-height: var(--leading-normal);
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Adjust type scale for tablets */
    :root {
        --text-5xl: 2.5rem;
        --text-4xl: 2rem;
        --text-3xl: 1.75rem;
        --text-2xl: 1.5rem;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: rgba(48, 62, 122, 0.95);
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    }

    .nav-menu.active {
        display: flex;
    }

    .site-header.scrolled .nav-menu {
        background-color: white;
    }

    .site-header.scrolled .nav-menu a {
        color: var(--primary-color);
    }

    .hero {
        min-height: 70vh;
        padding: 9rem 0 5rem;
    }

    .hero-title {
        white-space: normal;
    }

    p {
        max-width: 100%;
    }
    
    .member-header {
        flex-direction: column;
    }
    
    .member-photo {
        width: 100%;
    }

    .news-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .team-member-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .content-with-sidebar {
        flex-direction: column;
    }

    .sidebar {
        position: static;
        width: 100%;
    }
}

@media (max-width: 480px) {
    /* Adjust type scale for mobile */
    :root {
        --text-6xl: 2.5rem;
        --text-5xl: 2rem;
        --text-4xl: 1.75rem;
        --text-3xl: 1.5rem;
        --text-2xl: 1.375rem;
        --text-xl: 1.25rem;
        --text-lg: 1.125rem;
    }

    .hero {
        min-height: 50vh;
        padding: 4rem 0;
    }

    .hero-title {
        text-align: center;
    }

    .container {
        padding: 0 15px;
    }

    /* Improve readability on small screens */
    body {
        font-size: 16px; /* Prevent mobile zoom on inputs */
    }

    h1, h2, h3, h4, h5, h6 {
        word-wrap: break-word;
        hyphens: auto;
    }
}

/* Prose pages (About, Our Work, Connect, TCSS): wide reading column, flush left with the header and footer */
.page-prose {
    max-width: 60rem;
    margin: 0;
}

.page-prose--wide {
    max-width: none;
}

.page-prose p,
.page-prose li {
    font-size: var(--text-lg);
    line-height: var(--leading-relaxed);
    max-width: none;
    margin-bottom: 1em;
}

.page-prose h2 {
    font-size: var(--text-2xl);
    font-weight: var(--font-weight-bold);
    margin-top: 2rem;
    margin-bottom: 0.5rem;
}

.page-prose h2:first-child {
    margin-top: 0;
}

.page-prose h3 {
    font-size: var(--text-lg);
    margin-top: 1.1rem;
    margin-bottom: 0.2rem;
}

.page-prose ul {
    padding-left: 1.25rem;
    margin-bottom: 1.25rem;
}

.page-prose li + li {
    margin-top: 0.6rem;
}

.page-prose .partners-logos,
.page-prose .funders-logos {
    justify-content: flex-start;
}

/* "News →" links on Our Work project bullets */
a.project-news {
    white-space: nowrap;
    font-size: var(--text-base);
    font-weight: var(--font-weight-semibold, 600);
    color: var(--link-color);
    text-decoration: none;
}

a.project-news:hover {
    text-decoration: underline;
}

/* News sidebar: filter by project */
.project-filter-list {
    list-style: none;
    padding: 0;
    margin: 0 0 2.5rem;
}

.project-filter-list li {
    margin-bottom: 0.4rem;
    font-size: var(--text-base);
}

.project-filter-list a.active {
    font-weight: var(--font-weight-bold);
}

.project-filter-list .count {
    color: var(--text-color-light);
    font-size: var(--text-sm);
}

.news-filter-note {
    margin-bottom: 1.5rem;
    color: var(--text-color-secondary);
}

/* Publications page */
.publications-year {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
}

.publications-year li {
    margin-bottom: 1.1rem;
}

.publications-year .pub-title {
    display: block;
    font-weight: var(--font-weight-semibold, 600);
    color: var(--heading-color);
    text-decoration: none;
}

.publications-year .pub-title:hover {
    color: var(--primary-color);
}

.publications-year .pub-authors,
.publications-year .pub-venue,
.publications-year .pub-doi {
    display: block;
    font-size: var(--text-base);
    color: var(--text-color-secondary);
}

.publications-year .pub-doi {
    font-size: var(--text-sm);
}

.sidebar-more {
    margin-top: 0.5rem;
    font-weight: var(--font-weight-semibold, 600);
}

/* Connect page sidebar */
.contact-details p {
    margin-bottom: 1.1rem;
    line-height: var(--leading-relaxed);
}

.contact-details strong {
    color: var(--heading-color);
}
