/* ===== CSS Variables ===== */
:root {
    --primary-color: #1a365d;
    --primary-light: #2c5282;
    --accent-color: #d69e2e;
    --accent-light: #ecc94b;
    --text-color: #2d3748;
    --text-light: #718096;
    --bg-color: #ffffff;
    --bg-light: #f7fafc;
    --bg-dark: #1a202c;
    --gradient-primary: linear-gradient(135deg, #1a365d 0%, #2c5282 100%);
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.08);
    --shadow-md: 0 2px 4px rgba(0,0,0,0.1);
    --border-radius: 6px;
    --transition: all 0.2s ease;
    --sidebar-width: 140px;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 13px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-color);
    background: var(--bg-color);
    line-height: 1.5;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

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

/* ===== Layout with Sidebar ===== */
.layout-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--gradient-primary);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    padding: 0.5rem;
}

.sidebar-header {
    padding: 0.5rem;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header img {
    max-width: 100%;
    height: 28px;
}

.sidebar-nav {
    flex: 1;
    padding: 0.5rem 0;
    overflow-y: auto;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.5rem;
    color: rgba(255,255,255,0.85);
    font-size: 0.7rem;
    font-weight: 500;
    border-radius: 4px;
    margin-bottom: 0.15rem;
    transition: var(--transition);
}

.sidebar-nav a:hover {
    background: rgba(255,255,255,0.15);
    color: white;
}

.sidebar-nav a i {
    width: 14px;
    font-size: 0.65rem;
    text-align: center;
}

.sidebar-footer {
    padding: 0.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: center;
    gap: 0.75rem;
}

.sidebar-footer a {
    color: rgba(255,255,255,0.7);
    font-size: 0.85rem;
}

.sidebar-footer a:hover {
    color: var(--accent-color);
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
}

/* ===== Hero Section ===== */
.hero {
    display: flex;
    align-items: center;
    background: var(--gradient-primary);
    padding: 1.5rem 1rem;
}

.hero-container {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    align-items: center;
}

.hero-content {
    color: white;
}

.hero-badge {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    padding: 0.15rem 0.4rem;
    border-radius: 50px;
    font-size: 0.55rem;
    margin-bottom: 0.3rem;
    margin-right: 0.2rem;
}

.hero-badge.completed {
    background: rgba(56, 161, 105, 0.3);
    border: 1px solid rgba(56, 161, 105, 0.5);
}

.hero-title {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.3rem;
}

.hero-subtitle {
    font-size: 0.7rem;
    opacity: 0.9;
    margin-bottom: 0.4rem;
    line-height: 1.4;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    background: var(--accent-color);
    color: var(--primary-color);
    padding: 0.3rem 0.6rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.65rem;
}

.hero-cta:hover {
    background: var(--accent-light);
    color: var(--primary-color);
}

.hero-visual {
    display: none;
}

/* ===== Sections ===== */
.section {
    padding: 0.75rem 1rem;
}

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

.container {
    max-width: 1000px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 0.5rem;
}

.section-title {
    font-size: 1rem;
    color: var(--primary-color);
    margin-bottom: 0.15rem;
}

.section-subtitle {
    font-size: 0.65rem;
    color: var(--text-light);
}

/* ===== About Section ===== */
.about-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.4rem;
}

.about-card {
    background: white;
    padding: 0.4rem 0.5rem;
    border-radius: 4px;
    box-shadow: var(--shadow-sm);
}

.about-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.15rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
}

.about-card h3 i {
    color: var(--accent-color);
    font-size: 0.65rem;
}

.about-card p {
    color: var(--text-light);
    line-height: 1.35;
    font-size: 0.6rem;
}

.impact-section {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: white;
    border-radius: 4px;
    box-shadow: var(--shadow-sm);
    border-left: 3px solid var(--accent-color);
}

.impact-section h3 {
    color: var(--primary-color);
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.impact-section h3 i {
    color: var(--accent-color);
}

.impact-section p {
    color: var(--text-light);
    font-size: 0.6rem;
    line-height: 1.4;
}

/* ===== Team Section ===== */
.team-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 0.35rem;
}

.team-card {
    background: white;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.team-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    object-position: center top;
}

.team-info {
    padding: 0.25rem;
}

.team-info h3 {
    color: var(--primary-color);
    font-size: 0.55rem;
    line-height: 1.2;
}

.team-info h3 a.orcid-link {
    color: var(--primary-color);
}

.team-info h3 a.orcid-link i.fa-orcid {
    color: #a6ce39;
    font-size: 0.5rem;
}

.team-role {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 0.45rem;
}

.team-affiliation {
    color: var(--text-light);
    font-size: 0.4rem;
    line-height: 1.15;
}

/* ===== Stats Section ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.35rem;
}

.stat-card {
    background: white;
    padding: 0.35rem;
    border-radius: 4px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.stat-number {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    color: var(--text-light);
    font-size: 0.5rem;
}

/* ===== Publications Section ===== */
.publications-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.35rem;
}

.publication-card {
    background: white;
    padding: 0.4rem 0.5rem;
    border-radius: 4px;
    box-shadow: var(--shadow-sm);
    border-left: 2px solid var(--text-light);
}

.publication-card.published {
    border-left-color: #38a169;
}

.publication-card.high-impact {
    border-left-color: var(--accent-color);
    background: linear-gradient(to right, rgba(214, 158, 46, 0.03), white);
}

.publication-badge {
    display: inline-block;
    padding: 0.1rem 0.25rem;
    border-radius: 2px;
    font-size: 0.45rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 0.2rem;
    background: #38a169;
    color: white;
}

.publication-badge.preprint {
    background: #718096;
}

.publication-card h3 {
    color: var(--primary-color);
    font-size: 0.65rem;
    margin-bottom: 0.1rem;
    line-height: 1.25;
}

.publication-authors {
    color: var(--text-light);
    font-size: 0.5rem;
}

.publication-journal {
    color: var(--primary-color);
    font-style: italic;
    font-size: 0.5rem;
    font-weight: 500;
}

.publication-citations {
    color: #38a169;
    font-size: 0.5rem;
    font-weight: 600;
}

.publication-desc {
    color: var(--text-light);
    font-size: 0.5rem;
    line-height: 1.3;
    margin-top: 0.15rem;
}

.publication-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.15rem;
    margin-top: 0.2rem;
}

.publication-doi {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    padding: 0.12rem 0.25rem;
    background: var(--bg-light);
    border-radius: 2px;
    font-size: 0.45rem;
    color: var(--primary-color);
}

.publication-doi:hover {
    background: var(--primary-color);
    color: white;
}

.publication-doi.scholar {
    background: #4285f4;
    color: white;
}

/* ===== Events Section ===== */
.events-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.35rem;
}

.event-card {
    background: white;
    padding: 0.4rem 0.5rem;
    border-radius: 4px;
    box-shadow: var(--shadow-sm);
}

.event-date {
    display: inline-block;
    background: var(--accent-color);
    color: var(--primary-color);
    padding: 0.1rem 0.25rem;
    border-radius: 2px;
    font-size: 0.5rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.event-card h3 {
    color: var(--primary-color);
    font-size: 0.7rem;
    margin-bottom: 0.1rem;
}

.event-location {
    color: var(--text-light);
    font-size: 0.5rem;
    font-style: italic;
}

.event-desc {
    color: var(--text-light);
    font-size: 0.55rem;
    line-height: 1.3;
    margin-top: 0.15rem;
}

/* ===== Collaborations Section ===== */
.collab-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.35rem;
}

.collab-card {
    background: white;
    padding: 0.4rem 0.5rem;
    border-radius: 4px;
    box-shadow: var(--shadow-sm);
}

.collab-card.network {
    background: var(--gradient-primary);
    color: white;
}

.collab-card.network h3,
.collab-card.network .collab-dept,
.collab-card.network .collab-contact {
    color: white;
}

.collab-card.network .collab-activities li {
    color: rgba(255,255,255,0.9);
}

.collab-card h3 {
    color: var(--primary-color);
    font-size: 0.65rem;
    margin-bottom: 0.1rem;
}

.collab-dept {
    color: var(--text-light);
    font-size: 0.5rem;
}

.collab-contact {
    color: var(--accent-color);
    font-size: 0.5rem;
    font-weight: 500;
    margin-bottom: 0.2rem;
}

.collab-activities {
    list-style: none;
}

.collab-activities li {
    font-size: 0.45rem;
    color: var(--text-light);
    padding-left: 0.5rem;
    position: relative;
}

.collab-activities li::before {
    content: "-";
    position: absolute;
    left: 0;
}

/* ===== Funding Section ===== */
.funding-grid-extended {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.35rem;
}

.funding-card {
    background: var(--gradient-primary);
    color: white;
    padding: 0.4rem 0.5rem;
    border-radius: 4px;
    text-align: center;
}

.funding-amount {
    font-size: 0.75rem;
    font-weight: 700;
}

.funding-source {
    font-size: 0.5rem;
    opacity: 0.9;
}

.funding-title {
    font-size: 0.45rem;
    opacity: 0.8;
    font-style: italic;
}

.funding-period {
    font-size: 0.45rem;
    opacity: 0.7;
}

a.funding-link {
    text-decoration: none;
}

a.funding-link:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.funding-highlight {
    text-align: center;
    margin-top: 0.5rem;
    padding: 0.35rem;
    background: var(--bg-light);
    border-radius: 4px;
    font-size: 0.55rem;
}

.funding-link-inline {
    color: var(--primary-color);
}

.funding-separator {
    color: var(--text-light);
    margin: 0 0.2rem;
}

.funding-major {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--accent-color);
}

/* ===== Follow-up Section ===== */
.followup-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.35rem;
}

.followup-card {
    background: white;
    padding: 0.4rem 0.5rem;
    border-radius: 4px;
    box-shadow: var(--shadow-sm);
    border-left: 2px solid var(--accent-color);
}

.followup-card h3 {
    color: var(--primary-color);
    font-size: 0.65rem;
}

.followup-period {
    color: var(--accent-color);
    font-size: 0.5rem;
    font-weight: 600;
}

.followup-card p:last-child {
    color: var(--text-light);
    font-size: 0.55rem;
    line-height: 1.3;
}

/* ===== Partners Section ===== */
.partners-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.35rem;
}

.partner-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.35rem;
    background: white;
    border-radius: 4px;
    box-shadow: var(--shadow-sm);
    text-align: center;
    color: var(--text-color);
}

.partner-link:hover {
    color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.partner-link i {
    font-size: 0.8rem;
    color: var(--primary-color);
    margin-bottom: 0.15rem;
}

.partner-link span {
    font-weight: 500;
    font-size: 0.45rem;
    line-height: 1.2;
}

/* ===== Datasets Section ===== */
.datasets-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.dataset-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 1rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.dataset-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.dataset-icon {
    width: 2rem;
    height: 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.dataset-icon i {
    color: white;
    font-size: 0.8rem;
}

.dataset-card h3 {
    font-size: 0.7rem;
    color: var(--text-color);
    margin-bottom: 0.3rem;
}

.dataset-desc {
    font-size: 0.5rem;
    color: var(--text-light);
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.dataset-meta {
    display: flex;
    gap: 0.8rem;
    margin-bottom: 0.5rem;
}

.dataset-meta span {
    font-size: 0.45rem;
    color: var(--text-light);
}

.dataset-meta i {
    margin-right: 0.2rem;
    color: var(--primary-color);
}

.dataset-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.5rem;
    color: var(--primary-color);
    font-weight: 500;
}

.dataset-link:hover {
    color: var(--accent-color);
}

/* ===== Knowledge Transfer Section ===== */
.transfer-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.transfer-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 1rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.transfer-card:hover {
    box-shadow: var(--shadow-md);
}

.transfer-icon {
    width: 2rem;
    height: 2rem;
    background: linear-gradient(135deg, var(--accent-color), #f6ad55);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.transfer-icon i {
    color: white;
    font-size: 0.8rem;
}

.transfer-card h3 {
    font-size: 0.7rem;
    color: var(--text-color);
    margin-bottom: 0.2rem;
}

.transfer-date {
    font-size: 0.45rem;
    color: var(--accent-color);
    font-weight: 500;
    margin-bottom: 0.3rem;
}

.transfer-desc {
    font-size: 0.5rem;
    color: var(--text-light);
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.transfer-outcome {
    background: var(--bg-alt);
    padding: 0.4rem;
    border-radius: var(--radius-sm);
    font-size: 0.45rem;
}

.outcome-label {
    font-weight: 600;
    color: var(--primary-color);
}

/* ===== PDF Link Style ===== */
.publication-doi.pdf {
    background: #dc2626;
    color: white;
}

.publication-doi.pdf:hover {
    background: #b91c1c;
}

/* ===== EU Funding ===== */
.eu-funding {
    background: var(--bg-dark);
    color: rgba(255,255,255,0.7);
    padding: 0.35rem 1rem;
    text-align: center;
}

.eu-funding-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    max-width: 900px;
    margin: 0 auto;
}

.eu-flag {
    width: 60px;
    height: auto;
    flex-shrink: 0;
}

.eu-funding p {
    max-width: 800px;
    margin: 0;
    font-size: 0.45rem;
    line-height: 1.3;
    text-align: left;
}

/* ===== Footer ===== */
.footer {
    background: var(--bg-dark);
    color: rgba(255,255,255,0.6);
    padding: 0.5rem 1rem;
    text-align: center;
}

.footer p {
    font-size: 0.5rem;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .sidebar {
        display: none;
    }

    .main-content {
        margin-left: 0;
    }

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

    .team-grid {
        grid-template-columns: repeat(4, 1fr);
    }

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

    .publications-list {
        grid-template-columns: 1fr;
    }

    .collab-grid,
    .funding-grid-extended,
    .datasets-grid,
    .transfer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

@media (max-width: 600px) {
    .about-grid,
    .events-grid,
    .followup-grid,
    .collab-grid,
    .funding-grid-extended,
    .datasets-grid,
    .transfer-grid {
        grid-template-columns: 1fr;
    }

    .eu-funding-content {
        flex-direction: column;
        text-align: center;
    }

    .eu-funding p {
        text-align: center;
    }

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

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

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