/* =============================================================================
   HUGO RESEARCH PROJECT TEMPLATE - CSS
   Blue Theme with Dark Mode Support
   ============================================================================= */

/* ===== CSS Variables - Light Mode ===== */
:root {
    /* Colors - Blue Theme */
    --primary-color: #1e40af;
    --primary-light: #3b82f6;
    --accent-color: #f59e0b;
    --accent-light: #fbbf24;

    /* Text colors */
    --text-color: #1e293b;
    --text-light: #64748b;

    /* Background colors */
    --bg-color: #ffffff;
    --bg-light: #f8fafc;
    --bg-dark: #0f172a;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);

    /* Layout */
    --sidebar-width: 160px;
    --border-radius: 8px;
    --transition: all 0.2s ease;
}

/* ===== Dark Mode Variables ===== */
html.dark {
    --primary-color: #3b82f6;
    --primary-light: #60a5fa;
    --accent-color: #fbbf24;
    --accent-light: #fcd34d;

    --text-color: #f1f5f9;
    --text-light: #94a3b8;

    --bg-color: #0f172a;
    --bg-light: #1e293b;
    --bg-dark: #020617;

    --gradient-primary: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);

    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.3);
}

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

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

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

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: 1rem 0.75rem;
    transition: transform 0.3s ease;
}

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

.logo-text {
    color: white;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 2px;
}

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

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

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

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

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

.sidebar-footer a,
.sidebar-footer button {
    color: rgba(255,255,255,0.7);
    font-size: 1rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    transition: var(--transition);
}

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

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

/* ===== Mobile Navigation ===== */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: var(--gradient-primary);
    z-index: 999;
    padding: 0 1rem;
    align-items: center;
    justify-content: space-between;
}

.mobile-header .logo-text {
    font-size: 1.1rem;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1001;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-nav-overlay.active {
    opacity: 1;
}

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

.hero-content {
    color: white;
    max-width: 900px;
}

.hero-badges {
    margin-bottom: 0.75rem;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-right: 0.5rem;
}

.badge-primary {
    background: rgba(251, 191, 36, 0.3);
    border: 1px solid rgba(251, 191, 36, 0.5);
}

.badge-secondary {
    background: rgba(255,255,255,0.2);
}

.hero h1 {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.75rem;
}

.hero-subtitle {
    font-size: 1rem;
    opacity: 0.9;
    line-height: 1.5;
}

/* ===== News Section ===== */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 800px;
    margin: 0 auto;
}

.news-item {
    background: white;
    padding: 1rem 1.25rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border-left: 3px solid var(--accent-color);
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

html.dark .news-item {
    background: var(--bg-light);
}

.news-date {
    color: var(--accent-color);
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    min-width: 80px;
}

.news-content h4 {
    color: var(--primary-color);
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.news-content p {
    color: var(--text-light);
    font-size: 0.875rem;
    line-height: 1.5;
}

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

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

.section-title {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1.25rem;
    text-align: center;
    font-weight: 600;
}

/* ===== Timeline Section ===== */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary-light);
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2rem;
    top: 0.25rem;
    width: 12px;
    height: 12px;
    background: var(--accent-color);
    border-radius: 50%;
    border: 3px solid var(--bg-color);
    box-shadow: var(--shadow-sm);
}

.timeline-item.completed::before {
    background: #10b981;
}

.timeline-item.current::before {
    background: var(--accent-color);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(245, 158, 11, 0); }
}

.timeline-date {
    color: var(--accent-color);
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.timeline-item h4 {
    color: var(--primary-color);
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.timeline-item p {
    color: var(--text-light);
    font-size: 0.875rem;
}

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

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

html.dark .about-card {
    background: var(--bg-light);
}

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

.about-card i {
    color: var(--accent-color);
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    display: block;
}

.about-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
}

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

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

.team-member {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    text-align: center;
    padding: 1rem;
    transition: var(--transition);
}

html.dark .team-member {
    background: var(--bg-light);
}

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

.team-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 0.75rem;
    border: 3px solid var(--primary-light);
}

.team-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 0.75rem;
    background: var(--gradient-primary);
}

.team-member h4 {
    color: var(--primary-color);
    font-size: 0.95rem;
    line-height: 1.3;
    margin-bottom: 0.25rem;
}

.team-member h4 a {
    color: inherit;
}

.team-member h4 a:hover {
    color: var(--accent-color);
}

.team-member .role {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
}

.team-member .affiliation {
    color: var(--text-light);
    font-size: 0.75rem;
    line-height: 1.3;
}

.team-links {
    margin-top: 0.5rem;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.team-links a {
    color: var(--text-light);
    font-size: 0.9rem;
}

.team-links a:hover {
    color: var(--primary-color);
}

.team-links .fa-orcid {
    color: #a6ce39;
}

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

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

html.dark .stat-card {
    background: var(--bg-light);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.stat-label {
    color: var(--text-light);
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

/* ===== Publications Section ===== */
.publications-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.publications-header .section-title {
    margin-bottom: 0;
}

.bibtex-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.bibtex-btn:hover {
    background: var(--primary-light);
    color: white;
}

.publications-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.publication-card {
    background: white;
    padding: 1.25rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border-left: 3px solid var(--primary-light);
}

html.dark .publication-card {
    background: var(--bg-light);
}

.pub-type {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.pub-type.journal {
    background: #dcfce7;
    color: #166534;
}

html.dark .pub-type.journal {
    background: #166534;
    color: #dcfce7;
}

.pub-type.conference {
    background: #dbeafe;
    color: #1e40af;
}

html.dark .pub-type.conference {
    background: #1e40af;
    color: #dbeafe;
}

.pub-type.preprint {
    background: #f1f5f9;
    color: #475569;
}

html.dark .pub-type.preprint {
    background: #475569;
    color: #f1f5f9;
}

.publication-card h4 {
    color: var(--primary-color);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.publication-card .authors {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.publication-card .venue {
    color: var(--text-color);
    font-style: italic;
    font-size: 0.85rem;
    font-weight: 500;
}

.pub-links {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

.pub-links a {
    font-size: 0.8rem;
    color: var(--primary-color);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

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

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

.event-card {
    background: white;
    padding: 1.25rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    display: flex;
    gap: 1rem;
}

html.dark .event-card {
    background: var(--bg-light);
}

.event-card.upcoming {
    border-left: 4px solid var(--accent-color);
}

.event-date {
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    text-align: center;
    min-width: 60px;
    flex-shrink: 0;
}

.event-date .month {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 500;
}

.event-date .day {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}

.event-date .year {
    display: block;
    font-size: 0.7rem;
}

.event-details {
    flex: 1;
}

.event-details .event-type {
    display: inline-block;
    background: var(--bg-light);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

html.dark .event-details .event-type {
    background: var(--bg-dark);
}

.event-details h4 {
    color: var(--primary-color);
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.event-details p {
    color: var(--text-light);
    font-size: 0.85rem;
    line-height: 1.4;
}

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

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

html.dark .collab-card {
    background: var(--bg-light);
}

.collab-card h4 {
    color: var(--primary-color);
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.collab-partner {
    color: var(--accent-color);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.collab-card p:last-child {
    color: var(--text-light);
    font-size: 0.85rem;
    line-height: 1.5;
}

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

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

.funding-logo {
    width: 70px;
    height: 70px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    padding: 0.5rem;
    overflow: hidden;
}

.funding-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.funding-icon {
    width: 70px;
    height: 70px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-weight: bold;
    color: var(--primary-color);
    font-size: 1rem;
}

.funding-card h4 {
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.funding-card p {
    font-size: 0.85rem;
    opacity: 0.9;
}

.funding-card .grant-id {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-top: 0.25rem;
}

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

.partner-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    min-height: 80px;
    transition: var(--transition);
}

html.dark .partner-card {
    background: var(--bg-light);
}

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

.partner-card img {
    max-width: 100%;
    max-height: 50px;
    object-fit: contain;
}

.partner-text {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.85rem;
    text-align: center;
}

/* ===== Contact Section ===== */
.contact-container {
    max-width: 700px;
    margin: 0 auto;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: white;
    padding: 1.25rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

html.dark .contact-item {
    background: var(--bg-light);
}

.contact-item i {
    color: var(--primary-color);
    font-size: 1.25rem;
    margin-top: 0.1rem;
}

.contact-item h4 {
    color: var(--primary-color);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.contact-item p {
    color: var(--text-light);
    font-size: 0.875rem;
    line-height: 1.5;
}

.contact-item a {
    color: var(--primary-color);
}

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

/* ===== Acknowledgment Section ===== */
.funding-acknowledgment {
    background: var(--bg-dark);
    color: rgba(255,255,255,0.7);
    padding: 1rem 2rem;
    text-align: center;
}

.funding-acknowledgment p {
    max-width: 800px;
    margin: 0 auto;
    font-size: 0.8rem;
    line-height: 1.5;
}

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

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

/* ===== Responsive Design ===== */
@media (max-width: 900px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .mobile-header {
        display: flex;
    }

    .hamburger {
        display: block;
    }

    .mobile-nav-overlay {
        display: block;
        pointer-events: none;
    }

    .mobile-nav-overlay.active {
        pointer-events: auto;
    }

    .main-content {
        margin-left: 0;
        padding-top: 56px;
    }

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

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

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

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

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

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

    .section {
        padding: 1.5rem 1rem;
    }

    .hero {
        padding: 2rem 1rem;
    }
}

@media (max-width: 600px) {
    .about-grid,
    .events-grid,
    .collaborations-grid,
    .funding-grid {
        grid-template-columns: 1fr;
    }

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

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

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

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

    .section-title {
        font-size: 1.25rem;
    }

    .news-item {
        flex-direction: column;
        gap: 0.5rem;
    }

    .news-date {
        min-width: auto;
    }
}
