/* Applied Machine Learning in Empirical Finance - Narrative Digital Finance Theme */

/* CSS Variables */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    --secondary: #b45309;
    --secondary-light: #fef3c7;
    --accent: #b45309;
    --accent-light: #fef3c7;
    --dark: #0f172a;
    --dark-light: #1e293b;
    --text: #1f2937;
    --text-light: #4b5563;
    --text-muted: #6b7280;
    --background: #f8fafc;
    --background-alt: #f1f5f9;
    --white: #ffffff;
    --surface: #ffffff;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --success: #047857;
    --success-light: #d1fae5;
    --warning: #b45309;
    --error: #dc2626;
    --shadow: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08);
    --radius: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --transition: all 0.15s ease;
    --navbar-height: 48px;
    --content-max-width: 1000px;

    /* On-dark text hierarchy (navbar, hero, footer) */
    --on-dark:           rgba(255,255,255, 1.0);
    --on-dark-secondary: rgba(255,255,255, 0.8);
    --on-dark-light:     rgba(255,255,255, 0.7);
    --on-dark-muted:     rgba(255,255,255, 0.5);
}

/* Dark Mode */
[data-theme="dark"] {
    --primary: #60a5fa;
    --primary-dark: #93bbfd;
    --primary-light: #1e3a5f;
    --secondary: #d97706;
    --secondary-light: #422006;
    --accent: #d97706;
    --accent-light: #422006;
    --text: #e2e8f0;
    --text-light: #b4c0cc;
    --text-muted: #94a3b8;
    --background: #0f172a;
    --background-alt: #1e293b;
    --border: #334155;
    --border-light: #1e293b;
    --success: #34d399;
    --success-light: #14332a;
    --warning: #d97706;
    --error: #f87171;
    --surface: #1e293b;
    --shadow: 0 1px 2px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.5);

    /* On-dark text hierarchy (navbar, hero, footer) */
    --on-dark:           rgba(255,255,255, 1.0);
    --on-dark-secondary: rgba(255,255,255, 0.8);
    --on-dark-light:     rgba(255,255,255, 0.7);
    --on-dark-muted:     rgba(255,255,255, 0.5);
}
[data-theme="dark"] .gap-importance.high { background: #451a1a; color: #f87171; }
[data-theme="dark"] .gap-importance.medium { background: #422006; color: #d97706; }
[data-theme="dark"] #partners-detail .card img { filter: brightness(0) invert(1); }
[data-theme="dark"] .filter-input,
[data-theme="dark"] .filter-select {
    background: #0f172a;
    color: #e2e8f0;
}
[data-theme="dark"] .tag:not(.tag-primary):not(.tag-accent) {
    background: #334155;
    border-color: #475569;
}
[data-theme="dark"] .publications-table tr:nth-child(even) {
    background: #263548;
}
[data-theme="dark"] .publications-table tr:hover {
    background: #2d3f55;
}
[data-theme="dark"] .timeline-item::before { border-color: #1e293b; }
[data-theme="dark"] .wiki-table th {
    background: #0f172a;
}
[data-theme="dark"] .wiki-table th,
[data-theme="dark"] .wiki-table td {
    border-color: #334155;
}
[data-theme="dark"] .bg-alt .card {
    border-color: #475569;
}
[data-theme="dark"] .btn-secondary:hover {
    background: #334155;
}
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6 {
    color: #f1f5f9;
}
[data-theme="dark"] .publication-title,
[data-theme="dark"] .team-metric-value,
[data-theme="dark"] .chart-title {
    color: #f1f5f9;
}

/* Theme toggle */
.theme-toggle {
    background: var(--background-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-light);
    cursor: pointer;
    font-size: 16px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    padding: 0;
    line-height: 1;
    font-family: 'Inter', sans-serif;
}
.theme-toggle:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
}
.theme-toggle-dark { display: none; }
[data-theme="dark"] .theme-toggle-light { display: none; }
[data-theme="dark"] .theme-toggle-dark { display: inline; }

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--navbar-height) + 10px); }
[id] { scroll-margin-top: calc(var(--navbar-height) + 10px); }
body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 13px;
    line-height: 1.55;
    color: var(--text);
    background: var(--background);
    padding-top: var(--navbar-height);
}

a {
    color: var(--primary);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: var(--transition);
}
a:hover {
    color: var(--primary-dark);
    border-bottom-color: var(--primary-dark);
}
img { max-width: 100%; height: auto; }
h1, h2, h3, h4, h5, h6 {
    margin: 0 0 0.75rem;
    color: var(--dark);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 600;
    line-height: 1.25;
}
h1 { font-size: 1.75rem; }
h2 { font-size: 1.375rem; }
h3 { font-size: 1.125rem; }
h4 { font-size: 1rem; }
p { margin: 0 0 0.75rem; }
small, .text-small { font-size: 11px; }

/* Navbar */
.navbar {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--navbar-height);
    background: var(--dark);
    color: var(--white);
    z-index: 1100;
    align-items: center;
    padding: 0 1rem;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
}
.navbar-brand {
    font-weight: 600;
    font-size: 12px;
    color: var(--white);
    text-decoration: none;
    white-space: nowrap;
    border-bottom: none;
}
.navbar-brand:hover { color: var(--white); text-decoration: none; }
.navbar-brand .navbar-abbrev {
    color: var(--primary);
    font-weight: 700;
}
.navbar-nav {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    margin-left: auto;
    gap: 0.25rem;
}
.navbar-nav a {
    display: block;
    padding: 0 0.75rem;
    color: var(--on-dark-light);
    font-size: 13px;
    font-weight: 500;
    line-height: var(--navbar-height);
    border-bottom: none;
    transition: var(--transition);
}
.navbar-nav a:hover,
.navbar-nav a.active {
    color: var(--white);
    background: rgba(255,255,255,0.1);
    text-decoration: none;
}

/* Mobile Toggle (hamburger icon) */
.navbar .mobile-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    width: 32px;
    height: 32px;
    position: relative;
    padding: 0;
    flex-shrink: 0;
}
.navbar .mobile-toggle span {
    display: block;
    width: 20px;
    height: 2.5px;
    background: var(--white);
    border-radius: 1px;
    position: absolute;
    left: 6px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}
.navbar .mobile-toggle span:nth-child(1) { top: 8px; }
.navbar .mobile-toggle span:nth-child(2) { top: 15px; }
.navbar .mobile-toggle span:nth-child(3) { top: 22px; }
.navbar .mobile-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.navbar .mobile-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}
.navbar .mobile-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Navbar theme toggle */
.navbar .theme-toggle {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--on-dark-light);
    width: 32px;
    height: 32px;
    font-size: 16px;
    margin-left: 0.5rem;
    flex-shrink: 0;
}
.navbar .theme-toggle:hover {
    background: rgba(255,255,255,0.1);
    color: var(--white);
    border-color: rgba(255,255,255,0.4);
}

/* Scroll progress bar */
.scroll-progress {
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    height: 2px;
    background: var(--primary);
    z-index: 1099;
    transition: width 0.05s linear;
    pointer-events: none;
}

/* Nav overlay (mobile backdrop) */
.nav-overlay {
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1050;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}
.nav-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Main Content */
main {
    margin-top: 0;
    min-height: 100vh;
}
.container {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}
.section {
    padding: 1.5rem 0;
}
.section-card > .container {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    padding: 1.5rem;
}
.section-title {
    text-align: left;
    margin-bottom: 1rem;
}
.section-title h2 {
    margin-bottom: 0.25rem;
}
.section-title p {
    color: var(--text-light);
    max-width: none;
    margin: 0;
    font-size: 12px;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-light) 100%);
    color: var(--white);
    padding: 2rem 0 1.5rem;
    position: relative;
}
.hero-subpage {
    padding: 1rem 0 0.75rem;
}
.hero::before { display: none; }
.hero-content {
    position: relative;
    max-width: none;
}
.hero-badge {
    display: inline-block;
    background: var(--secondary);
    color: var(--white);
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    font-family: 'Inter', sans-serif;
}
.hero h1 {
    color: var(--white);
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}
.hero-subtitle {
    font-size: 13px;
    color: var(--on-dark-secondary);
    margin-bottom: 1rem;
    max-width: 600px;
    line-height: 1.5;
}
.hero-stats {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
}
.hero-stat {
    text-align: left;
}
.hero-stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    font-family: 'Inter', sans-serif;
}
.hero-stat-label {
    font-size: 10px;
    color: var(--on-dark-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: 'Inter', sans-serif;
}
.hero-buttons {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 11px;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.btn-primary {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}
.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: var(--white);
}
.btn-secondary {
    background: var(--surface);
    color: var(--text);
    border-color: var(--border);
}
.btn-secondary:hover {
    background: var(--background-alt);
    border-color: var(--primary);
    color: var(--primary);
}
.btn-outline {
    background: transparent;
    color: var(--white);
    border: 1px solid var(--white);
}
.btn-outline:hover {
    background: var(--white);
    color: var(--dark);
}

/* Cards */
.card {
    background: var(--surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    padding: 1rem;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}
.card > .btn:last-child,
.card > div:last-child > .btn:last-child {
    margin-top: auto;
}
.card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}
.card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.card-icon {
    width: 32px;
    height: 32px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
}
.card-title {
    font-size: 1rem;
    margin: 0;
}
.card-text {
    color: var(--text-light);
    font-size: 12px;
    margin-bottom: 0;
}

/* Wiki Accordion Cards */
.wiki-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: var(--transition);
}
.wiki-card summary {
    padding: 1rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
}
.wiki-card summary::-webkit-details-marker { display: none; }
.wiki-card summary::after {
    content: "\25B8";
    margin-left: auto;
    font-size: 0.85rem;
    color: var(--text-light);
    transition: transform 0.2s ease;
}
.wiki-card[open] summary::after {
    transform: rotate(90deg);
}
.wiki-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}
.wiki-content {
    padding: 0 1rem 1rem;
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.7;
    border-top: 1px solid var(--border);
    overflow-x: auto;
}

.wiki-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    margin: 0.5rem 0 1rem;
}
.wiki-table th,
.wiki-table td {
    text-align: left;
    padding: 0.35rem 0.6rem;
    border: 1px solid var(--border);
}
.wiki-table th {
    background: var(--background-alt);
    font-weight: 600;
    font-family: Inter, sans-serif;
}
.wiki-table th:first-child,
.wiki-table td:first-child {
    width: 200px;
}

/* Grid Layouts */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; }

/* Team Cards */
.team-card {
    text-align: left;
    padding: 1rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}
.team-avatar {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    flex-shrink: 0;
    margin: 0;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
}
.team-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.team-avatar-initials {
    color: var(--white);
    font-size: 1.25rem;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
}
.team-content { flex: 1; }
.team-name {
    font-size: 14px;
    margin-bottom: 0.125rem;
    font-family: 'Inter', sans-serif;
}
.team-role {
    color: var(--secondary);
    font-weight: 600;
    font-size: 11px;
    margin-bottom: 0.25rem;
    font-family: 'Inter', sans-serif;
}
.team-affiliation {
    color: var(--text-light);
    font-size: 11px;
    margin-bottom: 0.5rem;
}
.team-card--compact {
    padding: 0.75rem;
}
.team-card--compact .team-avatar {
    width: 50px;
    height: 50px;
}
.team-card--compact .team-name {
    font-size: 13px;
}
.team-card--compact .team-role,
.team-card--compact .team-affiliation {
    font-size: 10px;
}
.team-links {
    display: flex;
    justify-content: flex-start;
    gap: 0.5rem;
}
.team-links a:not(.btn) {
    background: var(--background-alt);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 10px;
    border-bottom: none;
}
.team-links a:not(.btn):hover {
    background: var(--primary);
    color: var(--white);
}
.team-links a.btn {
    border-bottom: none;
}
.team-metrics {
    display: flex;
    justify-content: flex-start;
    gap: 1rem;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
}
.team-metric { text-align: left; }
.team-metric-value {
    display: block;
    font-weight: 700;
    color: var(--dark);
    font-size: 13px;
    font-family: 'Inter', sans-serif;
}
.team-metric-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-family: 'Inter', sans-serif;
}

/* Footer partner logos */
.footer-logos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem 0.75rem;
    margin-top: 0.5rem;
    align-items: center;
    justify-items: center;
}
.footer-logos a {
    display: inline-flex;
    align-items: center;
    border-bottom: none;
}
.footer-logos img {
    width: auto;
    max-width: 100%;
    filter: brightness(0) invert(1);
    opacity: 0.7;
}

/* Partner Logos */
.partners {
    background: var(--surface);
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border);
}
.partners-grid {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 2rem;
    flex-wrap: wrap;
}
.partner-logo {
    height: 36px;
    transition: var(--transition);
}
#partners-detail .card {
    display: flex;
    flex-direction: column;
}
#partners-detail .card p:last-of-type {
    flex: 1;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 1.5rem;
    list-style: none;
    margin: 0;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--primary);
}
.timeline-item {
    position: relative;
    padding-bottom: 1rem;
}
.timeline-item::before {
    content: '';
    position: absolute;
    left: -1.5rem;
    top: 0.25rem;
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    border: 2px solid var(--white);
}
.timeline-date {
    font-size: 10px;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 0.125rem;
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
}
.timeline-title {
    font-size: 13px;
    margin-bottom: 0.25rem;
}
.timeline-text {
    color: var(--text-light);
    font-size: 12px;
}

/* Tags */
.tag {
    display: inline-block;
    background: var(--background-alt);
    color: var(--text);
    padding: 0.125rem 0.5rem;
    border-radius: var(--radius);
    font-size: 10px;
    font-weight: 500;
    margin: 0.125rem;
    font-family: 'Inter', sans-serif;
    border: 1px solid var(--border);
}
.tag-primary {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary-light);
}
.tag-accent {
    background: var(--secondary-light);
    color: var(--secondary);
    border-color: var(--secondary-light);
}

/* Publications Table */
.publications-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
.publications-table th {
    background: var(--dark);
    color: var(--white);
    padding: 0.5rem 0.75rem;
    text-align: left;
    font-weight: 600;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
    font-family: 'Inter', sans-serif;
    border-bottom: 2px solid var(--secondary);
}
.publications-table th:first-child { border-radius: var(--radius) 0 0 0; }
.publications-table th:last-child { border-radius: 0 var(--radius) 0 0; }
.publications-table td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}
.publications-table tr:hover {
    background: var(--background-alt);
}
.publications-table tr:nth-child(even) {
    background: var(--background);
}
.publication-title {
    font-weight: 500;
    color: var(--dark);
    font-size: 12px;
}
.publication-venue {
    color: var(--text-light);
    font-size: 10px;
    font-style: italic;
}
.publication-apa {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    font-style: italic;
}
.publication-citations {
    background: var(--primary);
    color: var(--white);
    padding: 0.125rem 0.375rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 10px;
    font-family: 'Inter', sans-serif;
}
.publication-oa {
    background: var(--success);
    color: var(--white);
    padding: 0.125rem 0.25rem;
    border-radius: var(--radius);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    font-family: 'Inter', sans-serif;
}

/* Filters */
.filters {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.filter-input {
    flex: 1;
    min-width: 150px;
    padding: 0.375rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 12px;
    font-family: 'Inter', sans-serif;
}
.filter-input:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-color: var(--primary);
}
.filter-select:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-color: var(--primary);
}
.filter-select {
    padding: 0.375rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 12px;
    background: var(--white);
    min-width: 120px;
    font-family: 'Inter', sans-serif;
}

/* Research Gaps */
.gap-card {
    border-left: 3px solid var(--primary);
    padding-left: 1rem;
}
.gap-card.high { border-left-color: var(--error); }
.gap-card.medium { border-left-color: var(--warning); }
.gap-importance {
    display: inline-block;
    padding: 0.125rem 0.375rem;
    border-radius: var(--radius);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.375rem;
    font-family: 'Inter', sans-serif;
}
.gap-importance.high { background: #fee2e2; color: #b91c1c; }
.gap-importance.medium { background: #fef3c7; color: #b45309; }

/* Footer */
.footer {
    background: #0f172a;
    color: var(--on-dark-light);
    padding: 1rem 0 0.75rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 1rem;
    margin-bottom: 0.75rem;
}
.footer-brand {
    color: var(--white);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-family: 'Inter', sans-serif;
}
.footer-text {
    color: var(--on-dark-light);
    font-size: 11px;
    line-height: 1.5;
}
.footer-title {
    color: var(--white);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    font-family: 'Inter', sans-serif;
}
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-links li { margin-bottom: 0.375rem; }
.footer-links a {
    color: var(--on-dark-light);
    font-size: 11px;
    border-bottom: none;
}
.footer-links a:hover { color: var(--white); }
.footer-bottom {
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 10px;
}
.footer-social {
    display: flex;
    gap: 0.75rem;
}
.footer-social a {
    color: var(--on-dark-light);
    font-size: 1rem;
    border-bottom: none;
}
.footer-social a:hover { color: var(--white); }

/* EU/MSCA Funding Disclaimer */
.footer-funding {
    padding: 1rem 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 0.75rem;
}
.footer-funding-logos {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}
.footer-funding-logos img {
    height: 28px;
    opacity: 0.85;
}
.footer-funding-text {
    color: var(--on-dark-muted);
    font-size: 10px;
    line-height: 1.5;
    max-width: 700px;
}

/* Event metadata (date/location) on news cards */
.event-meta {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

/* Pagination info text */
.pagination-info {
    color: var(--text-light);
    font-size: 0.875rem;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}
.stat-card {
    text-align: center;
    padding: 1rem;
}
.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    font-family: 'Inter', sans-serif;
}
.stat-label {
    color: var(--text-light);
    font-size: 10px;
    margin-top: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-family: 'Inter', sans-serif;
}

/* Charts */
.chart-container {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 1rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}
.chart-title {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--dark);
    font-family: 'Inter', sans-serif;
}

/* Resources */
.resource-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.resource-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}
.resource-item:last-child { border-bottom: none; }
.resource-icon {
    width: 32px;
    height: 32px;
    background: var(--background-alt);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
    font-size: 14px;
}
.resource-content { flex: 1; }
.resource-title {
    font-weight: 600;
    margin-bottom: 0.125rem;
    font-size: 13px;
}
.resource-description {
    color: var(--text-light);
    font-size: 11px;
}

/* Loading */
.loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
}
.loading-spinner {
    width: 30px;
    height: 30px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 0.75rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Focus Visible Accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Article Content (long-form reading) */
.article-content {
    max-width: 740px;
    margin: 0 auto;
    font-size: 15px;
    line-height: 1.7;
}
.article-content h2 {
    margin-top: 2rem;
    padding-bottom: 0.375rem;
    border-bottom: 2px solid var(--primary);
}
.article-content h3 {
    margin-top: 1.5rem;
}
.article-content p {
    margin-bottom: 1rem;
}
.article-content ol,
.article-content ul {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}
.article-content li {
    margin-bottom: 0.375rem;
}
.article-meta {
    color: var(--on-dark-light);
    font-size: 13px;
    margin-bottom: 0;
}
.article-abstract {
    border-left: 3px solid var(--primary);
    padding: 1rem 1.25rem;
    background: var(--background-alt);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    margin-bottom: 1.5rem;
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-light);
    max-width: 740px;
    margin-left: auto;
    margin-right: auto;
}
.article-abstract p:last-child {
    margin-bottom: 0;
}
.article-agenda {
    max-width: 740px;
    margin: 1.5rem auto;
    padding: 1rem 1.25rem 1rem 1.5rem;
    background: var(--background-alt);
    border: 1px solid var(--border);
    font-size: 14px;
}
.article-agenda-title {
    font-family: Inter, sans-serif;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
    margin: 0 0 0.5rem;
}
.article-agenda ol {
    margin: 0;
    padding-left: 1.25rem;
}
.article-agenda li {
    margin-bottom: 0.25rem;
}
.article-agenda a {
    color: var(--primary);
    text-decoration: none;
}
.article-agenda a:hover {
    text-decoration: underline;
}
.article-content .table-wrap {
    overflow-x: auto;
    margin-bottom: 1.5rem;
}
.article-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    border: 1px solid var(--border);
}
.article-table caption {
    caption-side: top;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text);
}
.article-table th {
    background: var(--background-alt);
    color: var(--text);
    padding: 0.6rem 0.75rem;
    text-align: left;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 13px;
    border-bottom: 1px solid var(--border);
}
.article-table td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}
.article-references {
    max-width: 740px;
    margin: 2rem auto 0;
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-light);
}
.article-references h2 {
    font-size: 1.375rem;
    margin-bottom: 1rem;
    padding-bottom: 0.375rem;
    border-bottom: 2px solid var(--primary);
}
.article-references p {
    margin-bottom: 0.5rem;
    padding-left: 2rem;
    text-indent: -2rem;
}

/* PRISMA Flow Diagram */
.prisma-flow {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 1.5rem 0;
    font-size: 13px;
}
.prisma-stage {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.prisma-box {
    background: var(--primary-light);
    border: 1px solid var(--primary);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    text-align: center;
    width: 280px;
    line-height: 1.4;
}
.prisma-box strong {
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-size: 11px;
    margin-bottom: 0.25rem;
    color: var(--primary-dark);
}
.prisma-exclude {
    background: var(--background-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    font-size: 12px;
    line-height: 1.5;
    width: 240px;
    color: var(--text-light);
    text-align: left;
}
.prisma-exclude strong {
    color: var(--error);
}
.prisma-included {
    border-width: 2px;
    font-weight: 600;
}
.prisma-arrow {
    color: var(--text-muted);
    font-size: 20px;
    line-height: 1;
    padding: 0.25rem 0;
}
.prisma-connector {
    color: var(--text-muted);
    font-size: 18px;
    flex-shrink: 0;
}
@media (max-width: 600px) {
    .article-content {
        font-size: 14px;
    }
    .prisma-stage {
        flex-direction: column;
    }
    .prisma-box,
    .prisma-exclude {
        width: 100%;
        max-width: 300px;
    }
    .prisma-connector {
        transform: rotate(90deg);
    }
}

/* Responsive */
@media (max-width: 900px) {
    .navbar .mobile-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        order: 2;
        margin-left: 0.25rem;
    }
    .navbar-nav {
        display: flex;
        position: absolute;
        top: var(--navbar-height);
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--dark);
        padding: 0;
        box-shadow: none;
        gap: 0;
        z-index: 1100;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: max-height 0.2s ease, opacity 0.15s ease, padding 0.2s ease,
                    box-shadow 0.2s ease, visibility 0s linear 0.2s;
    }
    .navbar-nav.open {
        max-height: 350px;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        padding: 0.5rem 0;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        transition: max-height 0.25s ease, opacity 0.2s ease, padding 0.25s ease,
                    box-shadow 0.25s ease, visibility 0s linear 0s;
    }
    .navbar-nav a {
        padding: 0.75rem 1.5rem;
        line-height: 1.5;
        font-size: 13px;
    }
    .navbar .theme-toggle {
        margin-left: auto;
        order: 1;
    }
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
    .dataset-category-grid {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .footer-logos img {
        width: 120px !important;
        height: 36px !important;
        object-fit: contain !important;
    }
    .footer-funding-logos {
        flex-wrap: wrap;
    }
    .hero-stats {
        flex-wrap: wrap;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 0 1rem;
    }
    .team-card {
        flex-direction: column;
        text-align: center;
    }
    .team-avatar {
        margin: 0 auto;
    }
    .team-links, .team-metrics {
        justify-content: center;
    }
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    .hero h1 {
        font-size: 1.5rem;
    }
    .hero-buttons {
        flex-direction: column;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }
    .wiki-table th:first-child,
    .wiki-table td:first-child {
        width: auto;
        min-width: 100px;
    }
    .wiki-table th,
    .wiki-table td {
        padding: 0.25rem 0.4rem;
        font-size: 11px;
    }
}

/* Print Styles */
@media print {
    .navbar, .scroll-progress, .nav-overlay, .theme-toggle,
    .mobile-toggle, .footer, .hero-buttons, .btn {
        display: none !important;
    }
    body {
        padding-top: 0;
        font-size: 12pt;
        color: #000;
        background: #fff;
    }
    .hero {
        background: none;
        color: #000;
        padding: 1rem 0;
    }
    .hero h1 { color: #000; }
    .hero-subtitle { color: #333; }
    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
    }
    .article-content {
        max-width: none;
    }
    .card {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    .card, .timeline-item, .publications-table tr {
        break-inside: avoid;
    }
}

/* Dataset category accordion contents */
.dataset-category-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    padding: 0.75rem 1rem 1rem;
}

/* Dataset count badge in accordion summary */
.dataset-count {
    margin-left: auto;
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.85em;
}

#datasets-grid .wiki-card summary::after {
    margin-left: 0;
}

/* Dataset metadata line */
.dataset-meta {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 0.25rem;
    margin-bottom: 0.25rem;
}
.dataset-meta code {
    background: var(--background-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.05rem 0.3rem;
    font-size: 10px;
}

/* Academic resource list (no borders, compact) */
.academic-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.academic-item {
    border: none;
    padding: 0.5rem 0;
}

/* Article agenda inside hero-subpage */
.hero-subpage .article-agenda {
    margin: 0.75rem 0 0;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}
.hero-subpage .article-agenda-title {
    color: var(--on-dark-light);
}
.hero-subpage .article-agenda a {
    color: var(--on-dark-secondary);
}
.hero-subpage .article-agenda a:hover {
    color: var(--white);
}

/* Skip Link */
.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    z-index: 9999;
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: white;
    font-family: Inter, sans-serif;
    font-size: 13px;
    text-decoration: none;
    border-radius: 0 0 4px 0;
    border-bottom: none;
}
.skip-link:focus {
    position: fixed;
    left: 0;
    top: 0;
    width: auto;
    height: auto;
    overflow: visible;
}

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.375rem; }
.mb-2 { margin-bottom: 0.75rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mt-2 { margin-top: 0.75rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.bg-white { background: var(--surface); }
.bg-alt { background: var(--background-alt); }
