/* Modern CSS Variables */
:root {
    /* Color Palette */
    --primary-color: #0c439b;
    /* Deep Blue from original but refined */
    --primary-dark: #072b6d;
    --accent-color: #e6b800;
    /* Goldish yellow for accents */
    --text-main: #333333;
    --text-light: #666666;
    --bg-body: #f4f7f6;
    /* Subtle cool gray/white */
    --bg-card: #ffffff;
    --border-color: #e0e0e0;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;

    /* Typography */
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-heading: 'Poppins', sans-serif;

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.1);

    /* Transitions */
    --transition-speed: 0.3s;
}

/* Reset & Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    font-size: 16px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

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

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Layout Utilities */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

main {
    flex: 1;
    padding: var(--spacing-md) 0 10rem 0;
}

/* Typography */
h1,
h2,
h3 {
    font-family: var(--font-heading);
    color: var(--primary-dark);
    margin-bottom: var(--spacing-sm);
    line-height: 1.2;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 1.5rem;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.5rem;
    display: inline-block;
    margin-bottom: var(--spacing-md);
}

h3 {
    font-size: 1.25rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

p {
    margin-bottom: var(--spacing-sm);
}

/* Header & Navigation */
.site-header {
    background-color: #fff;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--border-color);
}

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

.logo-area {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.logo-area img {
    height: 85px;
}

.site-title {
    text-align: center;
    flex: 1;
}

.site-title h1 {
    font-size: 1.5rem;
    margin: 0;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

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

/* Navigation */
.main-nav {
    background-color: var(--primary-color);
}

.nav-list {
    display: flex;
    justify-content: center;
    list-style: none;
}

.nav-item a {
    display: block;
    padding: 1rem 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.9rem;
    border-bottom: 3px solid transparent;
}

.nav-item a:hover,
.nav-item a.active {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
    border-bottom-color: var(--accent-color);
}

/* Mobile Navigation Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Footer */
.site-footer {
    background-color: var(--primary-dark);
    color: #fff;
    padding: var(--spacing-sm) 0;
    margin-top: auto;
    text-align: center;
    font-size: 0.8rem;
}

/* Components */
.card {
    background: var(--bg-card);
    padding: var(--spacing-md);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--spacing-md);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

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

.btn {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 4px;
    font-weight: 600;
    transition: background-color var(--transition-speed);
}

.btn:hover {
    background-color: var(--primary-dark);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .header-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        text-align: center;
        padding-right: 0.5rem;
        /* Space for items */
    }

    .logo-area {
        margin-bottom: 0;
    }

    .logo-area img {
        height: 40px;
    }

    .site-title h1 {
        font-size: 1rem;
        margin-bottom: 0.2rem;
    }

    .site-subtitle {
        font-size: 0.7rem;
        line-height: 1.2;
    }

    .menu-toggle {
        display: block;
        position: static;
        /* Flow with flex items */
        font-size: 1.5rem;
        margin-left: 0.5rem;
        padding: 0.25rem;
    }

    .nav-list {
        flex-direction: column;
        display: none;
        width: 100%;
        text-align: center;
    }

    .nav-list.open {
        display: flex;
    }

    .nav-item a {
        padding: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
}

/* Home Page Specifics */
.intro-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--spacing-md);
    align-items: center;
    /* Vertically center content */
    margin-top: var(--spacing-sm);
    margin-bottom: 5rem;
}

.intro-section .greeting {
    grid-column: 1;
    grid-row: 1;
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 0;
    position: relative;
    display: inline-block;
    align-self: end;
    /* Push greeting towards bio-text */
}

.intro-section .bio-text {
    grid-column: 1;
    grid-row: 2;
    align-self: start;
}

.intro-image {
    grid-column: 2;
    grid-row: 1 / span 2;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.intro-section .greeting::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 60%;
    height: 4px;
    background-color: var(--accent-color);
    border-radius: 2px;
}

.lead {
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--text-main);
    margin-bottom: var(--spacing-md);
}

.profile-photo {
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    border: 4px solid #fff;
    transition: transform 0.3s ease;
    width: 100%;
    height: auto;
    object-fit: cover;
    max-height: 500px;
}

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

@media (max-width: 768px) {
    .intro-section {
        display: flex;
        flex-direction: column;
        gap: var(--spacing-md);
    }

    .intro-section .greeting {
        order: 1;
        font-size: 2.5rem;
        margin-bottom: var(--spacing-xs);
        text-align: center;
        align-self: center;
    }

    .intro-image {
        order: 2;
        text-align: center;
        margin-bottom: var(--spacing-md);
    }

    .intro-section .bio-text {
        order: 3;
    }

    .intro-section .greeting::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .profile-photo {
        max-width: 300px;
        margin: 0 auto;
    }
}

/* Lists (Talks & Publications) */
.content-section {
    margin-bottom: var(--spacing-lg);
}

.content-list {
    list-style: none;
    padding: 0;
}

.content-item {
    margin-bottom: var(--spacing-sm);
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid var(--border-color);
}

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

.item-title {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
    display: block;
}

.item-meta {
    font-size: 0.95rem;
    color: var(--text-light);
}

.item-body {
    font-size: 0.95rem;
    color: var(--text-main);
}

.item-links {
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.item-links a {
    font-weight: 500;
}