/* Base styles */
:root {
    --primary-color: #2c5282;
    --primary-dark: #1a365d;
    --text-color: #2d3748;
    --text-light: #4a5568;
    --background: #ffffff;
    --background-alt: #f7fafc;
    --border-color: #e2e8f0;
    --link-color: #2b6cb0;
    --link-hover: #1a4971;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 19px;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--background);
}

/* Layout */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header */
header {
    background: var(--primary-color);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

header h1 a {
    color: white;
    text-decoration: none;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

nav a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s;
}

nav a:hover {
    color: white;
}

nav a.active {
    color: white;
    border-bottom: 2px solid white;
    padding-bottom: 2px;
}

/* Profile section */
.profile {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.profile-image {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.profile-info h2 {
    font-size: 2.2rem;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.profile-info .title {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

.profile-info .affiliation {
    font-size: 1.1rem;
    color: var(--text-color);
    font-weight: 500;
    margin-bottom: 1rem;
}

.profile-info .email {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.profile-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.profile-links a {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background-color 0.2s;
}

.profile-links a:hover {
    background: var(--primary-dark);
}

/* Award highlight */
.award-highlight {
    background: var(--background-alt);
    border-left: 4px solid var(--primary-color);
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    border-radius: 0 4px 4px 0;
}

.award-highlight a {
    color: var(--link-color);
    text-decoration: none;
    font-weight: 500;
}

.award-highlight a:hover {
    text-decoration: underline;
}

/* Section styles */
section {
    margin-bottom: 3rem;
}

section h2 {
    font-size: 1.6rem;
    color: var(--primary-dark);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

/* Paper list */
.paper-list {
    list-style: none;
}

.paper-list li {
    margin-bottom: 1.25rem;
    padding-left: 0;
}

.paper-list .paper-title {
    color: var(--link-color);
    text-decoration: none;
    font-weight: 500;
}

.paper-list .paper-title:hover {
    text-decoration: underline;
}

.paper-list .tagline {
    color: var(--text-color);
    font-size: 0.92rem;
    font-style: italic;
    margin-top: 0.2rem;
    line-height: 1.5;
}

.paper-list .coauthors {
    color: var(--text-light);
    font-size: 0.95rem;
}

.paper-list .coauthors a {
    color: var(--text-light);
    text-decoration: none;
}

.paper-list .coauthors a:hover {
    color: var(--link-color);
    text-decoration: underline;
}

.paper-list .publication {
    font-style: italic;
    color: var(--text-light);
    font-size: 0.95rem;
}

.paper-list .award {
    display: inline-block;
    background: #fef3c7;
    color: #92400e;
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.paper-list .extra-links {
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.paper-list .extra-links a {
    color: var(--link-color);
    text-decoration: none;
    margin-right: 1rem;
}

.paper-list .extra-links a:hover {
    text-decoration: underline;
}

/* Data page */
.data-list {
    list-style: none;
}

.data-list li {
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--background-alt);
    border-radius: 4px;
}

.data-list a {
    color: var(--link-color);
    text-decoration: none;
    font-weight: 500;
}

.data-list a:hover {
    text-decoration: underline;
}

.data-list .description {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-top: 0.25rem;
}

/* Expandable abstracts */
.paper-item {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

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

.abstract-toggle {
    background: none;
    border: none;
    color: var(--link-color);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0;
    margin-left: 0.5rem;
    font-family: inherit;
}

.abstract-toggle:hover {
    text-decoration: underline;
}

.abstract {
    display: none;
    margin-top: 0.75rem;
    padding: 1rem;
    background: var(--background-alt);
    border-radius: 4px;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-light);
}

.abstract.show {
    display: block;
}

/* Video/Media badges */
.media-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: #e0f2fe;
    color: #0369a1;
    padding: 0.2rem 0.6rem;
    border-radius: 3px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-right: 0.5rem;
    text-decoration: none;
    transition: background-color 0.2s;
}

.media-badge:hover {
    background: #bae6fd;
    text-decoration: none;
}

.media-badge.video {
    background: #fce7f3;
    color: #be185d;
}

.media-badge.video:hover {
    background: #fbcfe8;
}

.media-badge.press {
    background: #ecfccb;
    color: #4d7c0f;
}

.media-badge.press:hover {
    background: #d9f99d;
}

.media-links {
    margin-top: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Featured research section */
.featured-research {
    background: linear-gradient(135deg, var(--background-alt) 0%, #edf2f7 100%);
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 3rem;
}

.featured-research h2 {
    border-bottom: none;
    margin-bottom: 1rem;
}

.featured-item {
    background: white;
    padding: 1.5rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.featured-item:last-child {
    margin-bottom: 0;
}

.featured-item .paper-title {
    font-size: 1.1rem;
}

/* Photo gallery */
.photo-gallery {
    margin-bottom: 3rem;
}

.photo-gallery .gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.photo-gallery figure {
    margin: 0;
}

.photo-gallery img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.photo-gallery img:hover {
    transform: scale(1.02);
}

.photo-gallery figcaption {
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.photo-gallery figcaption a {
    color: var(--link-color);
    text-decoration: none;
}

.photo-gallery figcaption a:hover {
    text-decoration: underline;
}

.gallery-caption {
    font-style: italic;
    color: var(--text-light);
    margin-top: 1rem;
}

/* Footer */
footer {
    background: var(--background-alt);
    padding: 2rem 0;
    margin-top: 3rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Skip to content */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-dark);
    color: white;
    padding: 0.5rem 1rem;
    z-index: 100;
    font-size: 0.9rem;
    text-decoration: none;
}

.skip-link:focus {
    top: 0;
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
}

/* Back to top */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, background-color 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 50;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-dark);
}

/* Responsive */
@media (max-width: 768px) {
    .profile {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .profile-image {
        max-width: 250px;
        margin: 0 auto;
    }

    header .container {
        flex-direction: column;
        gap: 1rem;
        position: relative;
    }

    .menu-toggle {
        display: block;
        position: absolute;
        top: 0;
        right: 0;
    }

    nav ul {
        gap: 1rem;
        display: none;
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    nav ul.open {
        display: flex;
    }

    .container {
        padding: 0 1rem;
    }

    .photo-gallery .gallery-grid {
        grid-template-columns: 1fr;
    }
}
