:root {
    --primary-color: #003366;
    --secondary-color: #f8f9fa;
    --text-color: #333;
    --light-text: #666;
    --accent-color: #0056b3;
    --border-color: #ddd;
    --white: #ffffff;
    --max-width: 1100px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
}

/* Layout */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background-color: var(--white);
    border-bottom: 3px solid var(--primary-color);
    padding: 20px 0;
}

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

.logo-area img {
    height: 60px;
    width: auto;
}

.title-area h1 {
    margin: 0;
    font-size: 1.8rem;
    color: var(--primary-color);
}

.title-area p {
    margin: 5px 0 0;
    font-size: 0.9rem;
    color: var(--light-text);
    line-height: 1.2;
}

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

.title-area a:hover {
    color: var(--primary-color);
}

/* Navigation */
nav {
    background-color: var(--primary-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.nav-item a {
    display: block;
    padding: 15px 20px;
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: background 0.3s;
}

.nav-item a:hover, .nav-item a.active {
    background-color: var(--accent-color);
}

/* Main Content */
main {
    padding: 40px 0;
}

h2 {
    color: var(--primary-color);
    border-left: 5px solid var(--primary-color);
    padding-left: 15px;
    margin-bottom: 25px;
}

.hero-image {
    width: 100%;
    max-width: 800px;
    height: auto;
    display: block;
    margin: 0 auto 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Content figures retain their natural size, but never exceed 600px or the viewport. */
.feature-figure {
    width: 100%;
    max-width: 650px;
    height: auto;
}

.home-hero {
    margin-top: 12px;
}

.content-section {
    margin-top: 40px;
}

.research-section {
    margin-bottom: 60px;
}

.previous-members {
    border-top: 1px solid var(--border-color);
    padding-top: 40px;
}

.contact-heading {
    border: 0;
    margin-bottom: 40px;
    padding: 0;
    text-align: center;
}

/* Member Grid */
.member-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.member-card {
    background: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
}

 .member-card:hover {
    transition: all 0.3s ease;
    transform: scale(1.03) translateY(-5px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}

 .member-photo {
    transition: transform 0.3s ease;
    width: 100px;
    height: 130px;
    border-radius: 4px;
    object-fit: cover;
    object-position: top;
    border: 3px solid var(--white);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.member-info {
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

.member-info h3 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
}

.member-info p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--light-text);
}

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

.pub-item {
    margin-bottom: 14px;
    padding-bottom: 12px;
    line-height: 1.4;
    border-bottom: 1px solid var(--border-color);
}

.pub-authors,
.pub-title,
.pub-venue,
.pub-doi {
    display: block;
}

.pub-authors {
    margin-bottom: 0.15rem;
}

.pub-title {
    margin-bottom: 0.2rem;
    font-weight: 700;
}

.pub-venue {
    margin-bottom: 0.2rem;
}

.pub-venue cite {
    font-style: italic;
}

.pub-volume {
    font-weight: 700;
}

.pub-doi {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 0.9rem;
}

.pub-doi:hover {
    text-decoration: underline;
}

.two-column-list {
    columns: 2;
    list-style: none;
    padding: 0;
}

/* Contact */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-box {
    background: var(--secondary-color);
    padding: 30px;
    border-radius: 8px;
    border-top: 4px solid var(--primary-color);
}

/* Footer */
footer {
    text-align: center;
    padding: 30px 0;
    background: #eee;
    font-size: 0.9rem;
    color: var(--light-text);
    margin-top: 50px;
}

/* Responsive */
@media (max-width: 768px) {
    .header-wrapper {
        flex-direction: column;
        text-align: center;
    }
    
    .title-area {
        margin-top: 20px;
    }

    .nav-list {
        flex-direction: row; /* Keep items on one line if possible */
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-item a {
        padding: 10px 12px;
        font-size: 0.85rem;
    }

    .contact-container {
        grid-template-columns: 1fr;
    }
    
    .member-card {
        flex-direction: column;
        text-align: center;
    }

    main {
        padding: 28px 0;
    }

    .two-column-list {
        columns: 1;
    }
}

@media (max-width: 430px) {
    .container {
        padding: 0 16px;
    }

    .title-area h1 {
        font-size: 1.45rem;
    }

    .nav-item a {
        padding: 10px;
    }

    .member-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}
.member-card:hover .member-photo { transform: scale(1.1); box-shadow: 0 5px 15px rgba(0,0,0,0.2); }
