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

:root {
    --primary-color: #1a4971;
    --secondary-color: #5ba3c9;
    --accent-color: #2c7da0;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #ffffff;
    --bg-light: #f8f9fa;
    --border-color: #e0e0e0;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.55;
    color: var(--text-color);
    background-color: var(--bg-color);
}

/* Navigation */
.navbar {
    background-color: var(--primary-color);
    color: white;
    padding: 0.75rem 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.nav-logo {
    font-size: 1.4rem;
    font-weight: 600;
    color: white;
}

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

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s ease;
    padding: 0.4rem 0;
    border-bottom: 2px solid transparent;
}

.nav-link:hover,
.nav-link.active {
    border-bottom-color: var(--secondary-color);
}

/* Page Banner (top of each page, optional image) */
.page-banner {
    width: 100%;
    height: 160px;
    background-color: var(--bg-light);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-bottom: 3px solid var(--secondary-color);
    position: relative;
}

.page-banner.banner-tall {
    height: 260px;
}

.page-banner .banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,0.35) 100%);
}

.page-banner .banner-title {
    position: absolute;
    bottom: 1.25rem;
    left: 0;
    right: 0;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    color: white;
    font-size: 2rem;
    font-weight: 600;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.75rem 2rem;
}

/* Hero Section */
.hero {
    padding: 1rem 0 0.5rem;
}

.hero-content {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 2rem;
    align-items: center;
}

.hero-text h1 {
    font-size: 2.4rem;
    color: var(--primary-color);
    margin-bottom: 0.3rem;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    background-color: white;
    color: var(--primary-color);
    text-decoration: none;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

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

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

.icon {
    width: 20px;
    height: 20px;
}

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

.profile-img {
    width: 100%;
    max-width: 260px;
    height: auto;
    border-radius: 12px;
    box-shadow: var(--shadow-hover);
    object-fit: cover;
}

/* About Section */
.about {
    padding: 1.25rem 1.5rem;
    background-color: var(--bg-light);
    margin: 0.75rem -1.5rem;
    border-radius: 4px;
}

.about h2 {
    color: var(--primary-color);
    font-size: 1.55rem;
    margin-bottom: 0.6rem;
}

.about p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 0.55rem;
    color: var(--text-color);
}

/* Gallery Section */
.gallery {
    padding: 1rem 0 0.5rem;
}

.gallery h2 {
    color: var(--primary-color);
    font-size: 1.55rem;
    margin-bottom: 0.85rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.85rem;
}

.gallery-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-img:hover {
    transform: scale(1.04);
    box-shadow: var(--shadow-hover);
}

/* Content Section (Publications, Research, Contact) */
.content-section {
    padding: 0.75rem 0;
}

.content-section h1 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 0.3rem;
}

.content-section h2 {
    color: var(--primary-color);
    font-size: 1.45rem;
    margin: 1.4rem 0 0.75rem;
}

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

/* Publications */
.publications-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.publication-item {
    padding: 1rem 1.25rem;
    background-color: var(--bg-light);
    border-left: 4px solid var(--primary-color);
    border-radius: 4px;
}

.publication-text {
    font-size: 1rem;
    line-height: 1.65;
}

.publication-number {
    font-weight: 600;
    color: var(--primary-color);
    margin-right: 0.4rem;
}

.publication-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    margin-left: 0.4rem;
}

.publication-link:hover {
    text-decoration: underline;
}

.note {
    margin-top: 2rem;
    padding: 1rem 1.25rem;
    background-color: #e8f5e9;
    border-radius: 8px;
    border: 1px solid var(--secondary-color);
}

.note p {
    margin: 0;
}

.note a {
    color: var(--primary-color);
    font-weight: 500;
}

/* Research interests / collaborative work cards (with optional figure) */
.research-areas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.research-card {
    padding: 1rem 1.25rem 1.1rem;
    background-color: var(--bg-light);
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

.research-card-figure {
    height: 130px;
    background-color: #d8e3d4;
    background-size: cover;
    background-position: center;
    border-radius: 6px;
    margin: -0.25rem -0.5rem 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    font-size: 0.8rem;
    overflow: hidden;
}

.research-card h3 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.research-card p {
    color: var(--text-color);
    line-height: 1.55;
    font-size: 0.95rem;
    margin-bottom: 0.4rem;
}

.research-card a {
    color: var(--primary-color);
    word-break: break-word;
}

.research-approach {
    padding: 1.5rem;
    background-color: var(--bg-light);
    border-radius: 8px;
}

.research-approach h2 {
    color: var(--primary-color);
    font-size: 1.6rem;
    margin-bottom: 0.75rem;
}

.research-approach p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-color);
}

/* Projects Section (figure + blurb cards) */
.projects-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.project-card {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 1.25rem;
    padding: 1rem 1.25rem;
    background-color: var(--bg-light);
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: box-shadow 0.3s ease;
    align-items: start;
}

.project-card:hover {
    box-shadow: var(--shadow-hover);
}

.project-figure {
    width: 100%;
    height: 150px;
    background-color: #d8e3d4;
    background-size: cover;
    background-position: center;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    font-size: 0.85rem;
    overflow: hidden;
}

.project-figure img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.project-body h3 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 0.4rem;
}

.project-body p {
    color: var(--text-color);
    line-height: 1.55;
    font-size: 0.95rem;
    margin-bottom: 0.4rem;
}

.project-body a {
    color: var(--primary-color);
    word-break: break-word;
}

.project-meta {
    color: var(--text-light);
    font-size: 0.88rem;
    font-style: italic;
}

/* Contact Page */
.contact-block {
    background-color: var(--bg-light);
    border-radius: 8px;
    padding: 1.75rem 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

.contact-block h2 {
    color: var(--primary-color);
    font-size: 1.4rem;
    margin: 0 0 0.75rem;
}

.contact-email {
    display: inline-block;
    font-size: 1.4rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s ease;
}

.contact-email:hover {
    border-bottom-color: var(--primary-color);
}

.contact-block p {
    line-height: 1.65;
    margin-bottom: 0.5rem;
}

/* Footer */
.footer {
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    padding: 1.25rem;
    margin-top: 2.5rem;
}

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

    .nav-menu {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .page-banner {
        height: 160px;
    }

    .page-banner .banner-title {
        font-size: 1.4rem;
    }

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

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

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

    .about,
    .gallery {
        margin-left: -1rem;
        margin-right: -1rem;
        padding-left: 1rem;
        padding-right: 1rem;
    }

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

    .research-areas {
        grid-template-columns: 1fr;
    }

    .project-card {
        grid-template-columns: 1fr;
    }

    .project-figure {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 1rem;
    }

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

    .subtitle {
        font-size: 1rem;
    }

    .social-links {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}
