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

:root {
    --primary: #1e4a7d;
    --primary-light: #2d6cb5;
    --primary-pale: #e8f0f8;
    --accent: #d4a03c;
    --text: #1a2332;
    --text-light: #4a5568;
    --text-muted: #7a8599;
    --bg: #f4f7fa;
    --bg-card: #ffffff;
    --border: #dce4ed;
    --shadow-sm: 0 1px 3px rgba(30,74,125,0.06);
    --shadow-md: 0 4px 20px rgba(30,74,125,0.08);
    --shadow-lg: 0 12px 40px rgba(30,74,125,0.12);
    --max-width: 920px;
}

html {
    scroll-behavior: smooth;
}

/* Custom selection color */
::selection {
    background: var(--primary-pale);
    color: var(--primary);
}

/* Focus states for accessibility */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--primary-light);
    outline-offset: 2px;
}

body {
    font-family: 'Source Serif 4', Georgia, 'Times New Roman', serif;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
    background-image:
        radial-gradient(ellipse at 0% 0%, rgba(45,108,181,0.05) 0%, transparent 40%),
        radial-gradient(ellipse at 100% 50%, rgba(212,160,60,0.04) 0%, transparent 35%),
        radial-gradient(ellipse at 50% 100%, rgba(45,108,181,0.03) 0%, transparent 40%);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* Floating decorative shapes */
body::before {
    content: '';
    position: fixed;
    top: 15%;
    right: 5%;
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, rgba(45,108,181,0.03) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
}

body::after {
    content: '';
    position: fixed;
    bottom: 10%;
    left: 3%;
    width: 200px;
    height: 200px;
    border: 1px solid rgba(45,108,181,0.08);
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(244, 247, 250, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: -0.02em;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-logo:hover {
    color: var(--primary-light);
    transform: translateX(2px);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-menu a {
    font-family: 'DM Sans', -apple-system, sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-light);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transition: color 0.2s ease;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-light), var(--accent));
    transition: width 0.3s ease;
}

.nav-menu a:hover {
    color: var(--primary);
}

.nav-menu a:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.hamburger {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    position: relative;
    transition: background 0.2s;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
    width: 22px;
    height: 2px;
    background: var(--text);
    transition: transform 0.3s ease;
}

.hamburger::before { top: -6px; }
.hamburger::after { top: 6px; }

.nav-toggle.active .hamburger {
    background: transparent;
}

.nav-toggle.active .hamburger::before {
    transform: rotate(45deg) translate(4px, 4px);
}

.nav-toggle.active .hamburger::after {
    transform: rotate(-45deg) translate(4px, -4px);
}

/* Main Container */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
    padding-top: 70px;
}

/* Hero Section */
.hero {
    padding: 2rem 0 1.5rem;
    border-bottom: 1px solid var(--border);
    animation: heroFadeIn 0.8s ease forwards;
}

@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content {
    display: flex;
    flex-direction: row-reverse;
    gap: 2.5rem;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.hero-text {
    flex: 1;
}

.profile-photo-container {
    position: relative;
    flex-shrink: 0;
}

.profile-photo {
    width: 190px;
    height: 230px;
    border-radius: 6px;
    object-fit: cover;
    object-position: center 20%;
    box-shadow: var(--shadow-lg);
    transition: all 0.4s ease;
    border: 3px solid white;
    display: block;
}

.photo-location {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 1.4rem;
    font-weight: 400;
    font-style: italic;
    color: white;
    opacity: 0;
    transition: opacity 0.4s ease;
    text-shadow: 0 2px 12px rgba(0,0,0,0.4);
    letter-spacing: 0.08em;
    pointer-events: none;
}

.profile-photo-container:hover .profile-photo {
    filter: brightness(0.5);
    transform: scale(1.02);
}

.profile-photo-container:hover .photo-location {
    opacity: 1;
}

.hero-content::before {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 180px;
    height: 180px;
    background: linear-gradient(135deg, var(--primary-pale) 0%, transparent 60%);
    border-radius: 50%;
    z-index: -1;
    opacity: 0.7;
}

.hero-text h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.subtitle {
    font-size: 1.05rem;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.subtitle a {
    color: var(--primary-light);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.subtitle a:hover {
    border-bottom-color: var(--primary-light);
}

.email-line {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    letter-spacing: 0.01em;
}

.hero-links {
    display: flex;
    gap: 0.75rem;
}

.icon-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-card);
    color: var(--text-light);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.icon-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.icon-link:hover {
    color: white;
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(30,74,125,0.2);
}

.icon-link:hover::before {
    opacity: 1;
}

.icon-link svg {
    position: relative;
    z-index: 1;
    width: 20px;
    height: 20px;
}

/* Sections */
.section {
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--border);
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.section:nth-child(1) { animation-delay: 0.1s; }
.section:nth-child(2) { animation-delay: 0.2s; }
.section:nth-child(3) { animation-delay: 0.3s; }
.section:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section:last-of-type {
    border-bottom: none;
}

.section h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
    position: relative;
    display: inline-block;
}

.section h2::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 2.5rem;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-light), var(--accent));
    border-radius: 2px;
}

.section p {
    margin-bottom: 0.6rem;
    color: var(--text);
}

.section a {
    color: var(--primary-light);
    text-decoration: none;
    background-image: linear-gradient(var(--primary-light), var(--primary-light));
    background-size: 0% 1px;
    background-position: 0 100%;
    background-repeat: no-repeat;
    transition: background-size 0.3s ease, color 0.2s ease;
}

.section a:hover {
    background-size: 100% 1px;
    color: var(--primary);
}

/* News List */
.news-list {
    list-style: none;
    margin-left: 0;
}

.news-list li:nth-child(1) { animation-delay: 0.1s; }
.news-list li:nth-child(2) { animation-delay: 0.15s; }
.news-list li:nth-child(3) { animation-delay: 0.2s; }
.news-list li:nth-child(4) { animation-delay: 0.25s; }
.news-list li:nth-child(5) { animation-delay: 0.3s; }

.news-list li {
    display: flex;
    gap: 1.5rem;
    padding: 0.85rem 1rem;
    margin-bottom: 0.4rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.news-list li:hover {
    background: rgba(45,108,181,0.04);
    border-left-color: var(--primary-light);
    transform: translateX(4px);
}

.news-list li:last-child {
    margin-bottom: 0;
}

.news-date {
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    font-size: 0.75rem;
    color: white;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    padding: 0.3rem 0.65rem;
    border-radius: 4px;
    min-width: auto;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    height: fit-content;
    box-shadow: 0 2px 8px rgba(30,74,125,0.2);
}

.news-content {
    color: var(--text);
    font-size: 0.95rem;
}

.pub-note {
    margin-bottom: 1.5rem;
}

.pub-note a {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary-light);
    font-weight: 500;
    border-bottom: none;
}

.pub-note a:hover {
    color: var(--primary);
}

.pub-spacer {
    height: 0.75rem;
}

.publications-page {
    padding-top: 2rem;
}

.year-divider {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary);
    margin: 2rem 0 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-pale);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.year-divider::before {
    content: '';
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, var(--primary-light), var(--accent));
    border-radius: 50%;
}

.year-divider:first-of-type {
    margin-top: 0;
}

/* Publications */
.publication {
    display: flex;
    gap: 1.75rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-card);
    border-radius: 8px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.publication:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--primary-pale);
    background: linear-gradient(135deg, #fff 0%, var(--primary-pale) 100%);
}

.publication:last-child {
    margin-bottom: 0;
}

.pub-image {
    width: 140px;
    height: auto;
    max-height: 110px;
    object-fit: contain;
    border-radius: 4px;
    flex-shrink: 0;
    background: var(--bg-warm);
    padding: 0.5rem;
}

.pub-content {
    flex: 1;
}

.publication h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.5rem;
    line-height: 1.4;
    letter-spacing: -0.01em;
    transition: color 0.2s ease;
}

.publication:hover h3 {
    color: var(--primary);
}

.authors {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.25rem;
    line-height: 1.5;
}

.venue {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 0.6rem;
    letter-spacing: 0.02em;
    background: var(--primary-pale);
    display: inline-block;
    padding: 0.35rem 0.7rem;
    border-radius: 4px;
    border: 1px solid rgba(45,108,181,0.2);
}

.tldr {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    font-style: italic;
}

.tldr strong {
    font-style: normal;
    color: var(--primary);
    font-weight: 600;
}

.abstract-toggle {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8rem;
    color: var(--primary-light);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: color 0.2s ease;
}

.abstract-toggle:hover {
    color: var(--primary);
}

.abstract-toggle svg {
    width: 14px;
    height: 14px;
    transition: transform 0.3s ease;
}

.abstract-toggle.open svg {
    transform: rotate(180deg);
}

.abstract-content {
    font-size: 0.88rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    background: var(--primary-pale);
    border-radius: 6px;
    border-left: 3px solid var(--primary-light);
    display: none;
}

.abstract-content.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.pub-links {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.pub-links a {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--primary);
    padding: 0.4rem 0.85rem;
    background: white;
    border: 1.5px solid var(--primary);
    border-radius: 5px;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.pub-links a:hover {
    color: white;
    background: var(--primary);
}

.pub-links a svg {
    width: 14px;
    height: 14px;
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem 2rem 2.5rem;
    color: var(--text-muted);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    border-top: 1px solid var(--border);
    margin-top: 2rem;
    letter-spacing: 0.02em;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-light), var(--accent));
    border-radius: 2px;
}

.footer p {
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.footer:hover p {
    opacity: 1;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(244, 247, 250, 0.98);
        backdrop-filter: blur(12px);
        flex-direction: column;
        padding: 1rem 2rem;
        gap: 0;
        display: none;
        border-bottom: 1px solid var(--border);
    }

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

    .nav-menu li {
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--border);
    }

    .nav-menu li:last-child {
        border-bottom: none;
    }

    .hero-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 2rem;
    }

    .hero-content::before {
        display: none;
    }

    .hero-text {
        padding-top: 0;
    }

    .profile-photo {
        width: 160px;
        height: 200px;
    }

    .hero-text h1 {
        font-size: 1.75rem;
    }

    .hero-links {
        justify-content: center;
    }

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

    .news-date {
        width: fit-content;
    }

    .container {
        padding: 0 1.5rem;
        padding-top: 70px;
    }

    .section {
        padding: 1.75rem 0;
    }

    .section h2 {
        font-size: 1.35rem;
    }

    .section h2::after {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 1.5rem;
    }

    .subtitle {
        font-size: 0.95rem;
    }

    .profile-photo {
        width: 140px;
        height: 175px;
    }

    .publication {
        flex-direction: column;
        padding: 1.25rem;
    }

    .pub-image {
        width: 100%;
        max-height: 140px;
    }
}
