/* Modern Academic Website Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2c5282;
    --secondary-color: #4a90e2;
    --accent-color: #e2725b;
    --text-color: #2d3748;
    --text-light: #4a5568;
    --bg-light: #f7fafc;
    --bg-white: #ffffff;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-light);
    scroll-behavior: smooth;
}

/* Navigation */
.navbar {
    background: var(--bg-white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.site-title a {
    text-decoration: none;
    color: inherit;
}

/* Desktop Menu */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s ease;
}

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

/* Mobile Toggle - Hidden on Desktop */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 5px;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

/* Hero Section */
#hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 5rem 2rem;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-text .name {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.title-desc {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #ffffff;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.institution {
    font-size: 1.2rem;
    color: #f0f4ff;
    font-weight: 500;
    margin-bottom: 2rem;
    text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

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

.social-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.social-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.profile-pic {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    object-fit: cover;
    border: 6px solid rgba(255, 255, 255, 0.3);
    box-shadow: var(--shadow-lg);
}

/* Sections */
section {
    padding: 5rem 2rem;
}

section:nth-child(even) {
    background: var(--bg-white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    font-weight: 700;
    position: relative;
    padding-bottom: 1rem;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--accent-color);
    border-radius: 2px;
}

h3 {
    font-size: 1.75rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 600;
}

h4 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

p {
    margin-bottom: 1.25rem;
    color: var(--text-light);
    font-size: 1.1rem;
}

/* About Section */
.about-content {
    max-width: 900px;
}

.interests {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.interests li {
    padding: 1rem;
    background: var(--bg-light);
    border-left: 4px solid var(--secondary-color);
    border-radius: 4px;
    font-weight: 500;
    color: var(--text-color);
}

/* Research Section */
.research-item {
    background: var(--bg-white);
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border-left: 5px solid var(--secondary-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.research-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.collaborators {
    font-style: italic;
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

/* Publications Section */
.pub-item {
    margin-bottom: 2.5rem;
}

.pub-item ul {
    list-style: none;
    padding-left: 0;
}

.pub-item li {
    padding: 0.75rem 0;
    padding-left: 1.5rem;
    border-left: 3px solid var(--border-color);
    margin-bottom: 0.75rem;
    position: relative;
}

.pub-item li::before {
    content: '\2192';
    position: absolute;
    left: 0.5rem;
    color: var(--secondary-color);
    font-weight: bold;
}

.pub-item strong {
    color: var(--primary-color);
}

/* Fieldwork & Caving Section */
.fieldwork-item {
    background: var(--bg-white);
    padding: 2rem;
    margin-bottom: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border-left: 5px solid var(--accent-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.fieldwork-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.field-focus {
    font-style: italic;
    color: var(--secondary-color);
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.fieldwork-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.field-img-wrap {
    display: flex;
    flex-direction: column;
}

.field-img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.field-img:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
}

.img-caption {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-light);
    font-style: italic;
    margin-top: 0.5rem;
}

/* Teaching Section */
.teaching-item {
    margin-bottom: 2rem;
}

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

.teaching-item li {
    padding: 0.75rem 1.25rem;
    background: var(--bg-light);
    margin-bottom: 0.75rem;
    border-radius: 6px;
    border-left: 4px solid var(--accent-color);
}

/* Leadership Section */
.leadership-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.leadership-item {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.leadership-item ul {
    list-style: none;
    padding-left: 0;
}

.leadership-item li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

/* Contact Section */
.contact-info {
    max-width: 700px;
    background: var(--bg-white);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.contact-info a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.contact-info a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Footer */
footer {
    background: var(--primary-color);
    color: white;
    padding: 2rem;
    text-align: center;
}

footer p {
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav-menu {
        display: none; /* Hidden by default on mobile */
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-white);
        flex-direction: column;
        padding: 1rem 2rem;
        gap: 1rem;
        box-shadow: var(--shadow);
        border-top: 1px solid var(--border-color);
    }

    /* JavaScript-less toggle support using :focus-within or similar would be tricky here, 
       but we define the active state for the JS toggle */
    .nav-menu.active {
        display: flex;
    }

    .nav-container {
        justify-content: space-between;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-image {
        order: -1;
        display: flex;
        justify-content: center;
    }

    .profile-pic {
        width: 200px;
        height: 200px;
    }

    .hero-text .name {
        font-size: 2.5rem;
    }

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

    h2 {
        font-size: 2rem;
    }
}

/* Hero text overrides - ensure visibility on blue background */
#hero .title-desc {
    color: #ffffff !important;
    font-weight: 600;
    font-size: 1.5rem;
    text-shadow: 0 1px 4px rgba(0,0,0,0.4);
    margin-bottom: 0.5rem;
    opacity: 1 !important;
}

#hero .institution {
    color: #e8f0fe !important;
    font-weight: 500;
    font-size: 1.2rem;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
    margin-bottom: 2rem;
    opacity: 1 !important;
}
