/* --- DESIGN TOKENS --- */
:root {
    --bg-color: #ffffff;
    --text-color: #000000;
    --line-color: #000000;
    --accent-color: #ff69b4;
    /* Hot Pink */
    --accent-light: #fffafa;
    /* Light Pink Tint */
    --muted-color: #666666;
    --border-color: #888888;
    --border-soft: #eeeeee;
    --font-main: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --font-mono: 'Courier New', Courier, monospace;
}

/* --- BASE STYLES --- */
body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
}

.container {
    width: 100%;
    max-width: 900px;
    margin-top: 40px;
    margin-bottom: 80px;
    padding: 0 20px;
}

/* --- TYPOGRAPHY & LINKS --- */
h1,
h2,
h3 {
    font-weight: 400;
    margin-bottom: 10px;
}

h1 {
    font-size: 2rem;
    letter-spacing: -0.02em;
}

.subtitle {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 30px;
}

hr {
    border: none;
    border-top: 1px solid var(--line-color);
    margin: 0;
}

/* Standard links throughout the text */
a {
    color: var(--accent-color);
    text-decoration: none;
    background-image: linear-gradient(var(--accent-color), var(--accent-color));
    background-size: 0% 1px;
    background-position: 50% 100%;
    background-repeat: no-repeat;
    transition: background-size 0.3s ease, opacity 0.2s ease, color 0.2s ease;
    padding-bottom: 2px;
}

a:hover {
    opacity: 0.7;
    background-size: 100% 1px;
}

/* --- COMPONENTS: CARDS --- */
.person-card,
.software-card,
.publication-card {
    border: 1.75px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
}

.person-card {
    border-width: 1px;
    padding: 15px;
    border-radius: 0;
    /* Match original design if needed */
}

.person-card:hover,
.software-card:hover,
.publication-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* --- COMPONENTS: IMAGES --- */
.header-image-container img,
.photo-filler img,
.pi-photo-container img,
.modal-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.header-image-container img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.photo-filler {
    background-color: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--muted-color);
}

/* --- HEADER & NAVIGATION --- */
header {
    margin-bottom: 20px;
}

.header-image-container {
    width: 100%;
    height: 140px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

nav {
    display: flex;
    gap: 30px;
    border-top: 1px solid var(--line-color);
    border-bottom: 1px solid var(--line-color);
    padding: 15px 0;
    margin-bottom: 40px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

nav a {
    color: var(--text-color);
    text-transform: uppercase;
    background-image: none;
    padding-bottom: 0;
}

nav a:hover {
    color: var(--accent-color);
    opacity: 1;
}

nav a.active {
    color: var(--accent-color);
    font-weight: bold;
}

/* --- SECTION: PEOPLE --- */
.people-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.person-card .photo-filler {
    height: 200px;
    margin-bottom: 15px;
}

.person-name {
    font-weight: bold;
    font-size: 1.1rem;
}

.person-name.large {
    font-size: 1.5rem;
}

.person-title {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    margin-bottom: 10px;
}

.person-contact {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

/* PI Card Specialist Layout */
.pi-card {
    display: flex;
    flex-direction: row;
    gap: 40px;
    padding: 25px;
    margin-top: 20px;
    align-items: flex-start;
}

.pi-photo-container {
    flex: 0 0 250px;
    width: 250px;
    height: 550px;
    border: 1px solid var(--line-color);
    overflow: hidden;
}

.pi-info {
    flex: 1;
}

.pi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
}

/* Unified Social Icons */
.pi-socials,
.modal-socials {
    display: flex;
    gap: 15px;
    align-items: center;
}

.pi-socials img,
.modal-socials img {
    height: 20px;
    width: auto;
    filter: grayscale(1) opacity(0.6);
    transition: filter 0.2s ease, opacity 0.2s ease;
}

.modal-socials img {
    height: 18px;
}

.pi-socials a:hover img,
.modal-socials a:hover img {
    filter: grayscale(0) opacity(1);
    opacity: 1;
}

.modal-socials a {
    background-image: none;
    padding-bottom: 0;
}

@media (max-width: 700px) {
    .pi-card {
        flex-direction: column;
    }

    .pi-photo-container {
        width: 100%;
        flex: none;
    }
}

/* --- SECTION: NEWS --- */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.news-entry {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.news-date {
    font-family: var(--font-mono);
    font-weight: bold;
    flex: 0 0 110px;
}

.news-content {
    flex: 1;
}

/* --- SECTION: RESEARCH AREAS & LISTS --- */
.list-item {
    border-bottom: 1px solid var(--border-color);
    padding: 30px 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: center;
}

.list-item:last-of-type {
    border-bottom: none;
}

.list-item .photo-filler {
    height: 300px;
}

.section-header {
    margin-top: 50px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.section-header h2 {
    margin: 0;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 1.25rem;
    white-space: nowrap;
}

.section-header .line {
    height: 1.5px;
    flex-grow: 1;
    background-color: var(--border-color);
}

/* --- SECTION: SOFTWARE --- */
.software-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.software-card p {
    flex-grow: 1;
    font-size: 0.95rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.card-header h3 {
    margin: 0;
}

.header-logos {
    display: flex;
    gap: 10px;
    align-items: center;
}

.header-logos img {
    height: 18px;
    width: auto;
    filter: grayscale(0.2) opacity(0.8);
    transition: filter 0.2s ease, opacity 0.2s ease;
}

.software-card:hover .header-logos img {
    filter: grayscale(0) opacity(1);
}

.card-links {
    margin-top: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.9rem;
}

.tech-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 15px;
}

.tech-pills span {
    background-color: #f4f4f4;
    color: #444;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 4px;
}

@media (max-width: 768px) {
    .software-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .software-grid {
        grid-template-columns: 1fr;
    }
}

/* --- SECTION: PUBLICATIONS --- */
.publication-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

.publication-card .pub-title {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.publication-card .pub-authors {
    font-size: 0.95rem;
    margin-bottom: 5px;
}

.publication-card .pub-venue {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--muted-color);
}

.publication-card .pub-year {
    font-weight: bold;
}

.year-header {
    margin-top: 60px;
    margin-bottom: 25px;
    font-weight: 500;
    font-size: 1.4rem;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-soft);
    padding-bottom: 10px;
}

.year-header:first-of-type {
    margin-top: 30px;
}

.featured-pub {
    border-color: var(--accent-color) !important;
    background-color: var(--accent-light);
}

/* --- HIRING / MISC --- */
.hiring-box {
    border: 1.5px solid var(--border-color);
    padding: 25px;
    margin-top: 40px;
    background-color: #fafafa;
    border-radius: 8px;
}

.hiring-box h3 {
    margin-top: 0;
}

.hiring-box .roles {
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.hiring-box a {
    font-weight: bold;
}

/* --- MODAL --- */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
}

.modal-content {
    background-color: var(--bg-color);
    margin: 10% auto;
    padding: 30px;
    border: 1px solid var(--line-color);
    width: 80%;
    max-width: 700px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 15px;
    right: 20px;
}

.close:hover,
.close:focus {
    color: var(--accent-color);
    text-decoration: none;
}

.modal-body {
    display: flex;
    gap: 30px;
}

.modal-photo {
    flex: 0 0 250px;
    width: 250px;
    height: 250px;
    border: 1px solid var(--line-color);
    overflow: hidden;
}

@media (max-width: 600px) {
    .modal-body {
        flex-direction: column;
    }

    .modal-photo {
        width: 100%;
        flex: none;
    }
}

/* --- FOOTER --- */
.site-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 40px 0;
    margin-top: 60px;
    border-top: 1px solid var(--line-color);
}

.footer-address {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--text-color);
}

.footer-logo {
    height: 80px;
    width: auto;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.footer-logo:hover {
    opacity: 1;
}