/* Global Styles */
:root {
    --text-color: #333;
    --heading-color: #111;
    --accent-color: #E34234;
    /* Tulip Red */
    /* Slightly darker, smarter blue */
    --bg-color: #fafafa;
    --nav-height: 70px;
    --font-heading: 'IBM Plex Sans', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

html {
    scrollbar-gutter: stable;
}

body {
    font-family: var(--font-body);
    font-weight: 300;
    color: var(--text-color);
    line-height: 1.7;
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
    /* Ensure positioning context for pseudo-element */
}

/* Decorative visual - minimalist flower silhouette */
body::after {
    content: "";
    position: fixed;
    bottom: -20px;
    right: -20px;
    width: 300px;
    height: 300px;
    background-image: url('images/flower.svg');
    background-repeat: no-repeat;
    background-position: bottom right;
    background-size: contain;
    opacity: 0.12;
    /* Adjusted for red visibility */
    z-index: -1;
    pointer-events: none;
    transform: rotate(-10deg);
}

a {
    color: #444;
    /* Neutral grey for premium feel */
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: var(--accent-color);
    /* Tulip Red */
    text-decoration: none;
    opacity: 1;
}

/* Top Navigation */
.top-nav {
    height: var(--nav-height);
    background-color: #fff;
    /* Keep white for premium contrast */
    border-bottom: 1px solid #eaeaea;
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 0 5%;
}

.nav-container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.2rem;
    color: var(--heading-color);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.top-nav nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

.top-nav nav a {
    color: #666;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
}

.top-nav nav a:hover,
.top-nav nav a.active {
    color: var(--heading-color);
    text-decoration: none;
}

.cv-link {
    /* Optional special styling for CV if desired, currently matches nav */
}

/* Content Wrapper */
.content-wrapper {
    animation: fadeIn 0.8s ease-out;
    margin-top: var(--nav-height);
    /* Offset for fixed header */
    padding: 6rem 1.5rem;
    /* Increased top padding for balance */
    flex: 1;
}

.centered-layout {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

/* Home Page Intro */
.intro-section {
    margin-top: 1rem;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.profile-img-small {
    width: 150px;
    /* Enlarged from 100px */
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 20%;
    /* Focus more on face */
    background-color: #eee;
    transform: scale(1.1);
    /* Slight zoom effect */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    /* Subtle shadow for depth */
}

.profile-text h1 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
    color: var(--heading-color);
    letter-spacing: -0.5px;
    border-bottom: none;
    padding-bottom: 0;
}

.profile-text .title {
    font-size: 1rem;
    font-weight: 500;
    color: #555;
    margin-bottom: 0.1rem;
    line-height: 1.3;
}

.profile-text .institution {
    font-size: 0.95rem;
    color: #777;
    margin-bottom: 0;
}

.bio-text .lead {
    font-size: 1.1rem;
    color: #222;
    margin-bottom: 1.5rem;
}

/* Typography & Sections */
.section {
    margin-bottom: 4rem;
}

h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--heading-color);
    margin-bottom: 2rem;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--heading-color);
}

p {
    margin-bottom: 1.2rem;
    font-size: 1rem;
    color: #444;
}

/* Research Grid - Stacked Vertically */
.research-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 1rem;
}

.research-item {
    border-bottom: 1px solid #e5e5e5;
    padding-bottom: 2rem;
}

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

.research-item h3 {
    margin-bottom: 0.8rem;
    font-size: 1rem;
    color: var(--heading-color);
    border-left: 2px solid var(--accent-color);
    padding-left: 0.8rem;
}

.research-item p {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 0;
}

/* Publications */
.citation-list {
    list-style: none;
    padding-left: 0;
}

.citation-item {
    margin-bottom: 2rem;
}

.paper-title {
    font-family: var(--font-heading);
    font-weight: 500;
    color: var(--heading-color);
    font-size: 1.05rem;
    display: block;
    margin-bottom: 0.2rem;
}

.authors {
    color: #666;
    font-size: 0.95rem;
}

.journal {
    color: #888;
    font-size: 0.95rem;
    margin-left: 5px;
}

.paper-link {
    font-size: 0.9rem;
    margin-top: 0.3rem;
    display: inline-block;
    color: var(--accent-color);
}

/* Teaching */
.teaching-group {
    margin-bottom: 2.5rem;
}

.teaching-list {
    list-style: none;
    padding-left: 0;
}

.teaching-list li {
    margin-bottom: 0.8rem;
    border-left: 2px solid #eee;
    padding-left: 1rem;
}

.year {
    color: #999;
    font-size: 0.85rem;
    margin-left: 0.3rem;
    font-weight: 400;
}

/* Contact Page */
.contact-layout {
    margin-top: 1rem;
}

.contact-info p {
    font-size: 1rem;
    color: #444;
    line-height: 1.8;
}

.social-links {
    margin-top: 3rem;
    border-top: 1px solid #f0f0f0;
    padding-top: 2rem;
}

.social-links h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
}

.link-group {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.social-links a {
    color: #666;
    font-size: 0.95rem;
    text-decoration: none;
    border-bottom: 1px solid transparent;
}

.social-links a:hover {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
    text-decoration: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        padding: 1rem 0;
    }

    .top-nav {
        height: auto;
        position: relative;
    }

    .top-nav nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
        margin-top: 1rem;
        padding: 0;
    }

    .content-wrapper {
        margin-top: 0;
        padding: 2rem 1.5rem;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
}

/* Premium Enhancements */

/* Smooth Fade In */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-wrapper {
    animation: fadeIn 0.8s ease-out;
}

/* Footer Styling */
footer {
    text-align: center;
    padding: 3rem 0 2rem;
    font-size: 0.85rem;
    color: #999;
    font-family: var(--font-body);
    margin-top: auto;
}

/* Interactive Confetti Text */
.confetti-trigger {
    cursor: pointer;
    text-decoration: underline dotted var(--accent-color);
    text-underline-offset: 3px;
    position: relative;
    display: inline-block;
    transition: all 0.2s ease;
}

.confetti-trigger:hover {
    color: var(--accent-color);
}

.confetti-piece {
    position: fixed;
    /* Fixed to viewport to avoid overflow issues */
    font-family: var(--font-body);
    font-size: 0.9rem;
    /* Slightly larger */
    font-weight: 500;
    /* Bolder */
    font-style: italic;
    color: #000;
    /* Much darker (black) */
    pointer-events: none;
    opacity: 0;
    z-index: 9999;
    white-space: nowrap;
}