:root {
    --mit-red: #A31F34;
    --mit-red-dark: #8A1B2C;
    --text-main: #222222;
    --text-light: #666666;
    --bg-color: #ffffff;
    --font-header: 'Roboto', Helvetica, Arial, sans-serif;
    --font-body: 'Merriweather', Georgia, serif;
}

body {
    font-family: var(--font-body);
    line-height: 1.7;
    color: var(--text-main);
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
}

body::before {
    content: "";
    display: block;
    height: 4px;
    background-color: var(--mit-red);
    width: 100%;
}

.container {
    max-width: 840px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

h1, h2, h3, h4 {
    font-family: var(--font-header);
    color: #111;
    margin-top: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

h2 {
    border-bottom: 1px solid #ddd;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 1.75rem;
}

a {
    color: var(--mit-red);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--mit-red-dark);
    text-decoration: underline;
}

hr {
    border: 0;
    border-top: 1px solid #eee;
    margin: 3rem 0;
}

.masthead {
    margin-bottom: 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #222;
    padding-bottom: 1rem;
}

.masthead-title a {
    font-family: var(--font-header);
    font-weight: 700;
    font-size: 1.4rem;
    color: #000;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-links a {
    margin-left: 20px;
    font-family: var(--font-header);
    color: #555;
    font-size: 0.95rem;
    font-weight: 500;
    text-transform: uppercase;
}
.nav-links a:hover {
    color: var(--mit-red);
    text-decoration: none;
}

.profile-section {
    display: flex;
    align-items: flex-start;
    gap: 50px;
    margin-bottom: 3rem;
}

.profile-text {
    flex: 1;
    font-size: 1.05rem;
}

.profile-image img {
    width: 200px;
    height: auto;
    border-radius: 4px;
    border: 1px solid #ddd;
    padding: 4px;
    background: #fff;
    margin-top: 5px;
}

.profile-contact {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
    width: 100%;
}

.contact-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    color: #444;
    font-size: 0.9rem;
    font-family: var(--font-header);
    text-decoration: none;
    transition: color 0.2s ease;
}

.contact-row.link:hover {
    color: var(--mit-red);
    cursor: pointer;
}

.contact-row .icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    
    color: #111; 
}

.contact-row.link:hover .icon {
    color: var(--mit-red); 
}

.category-header {
    border-bottom: 2px solid #222;
    padding-bottom: 5px;
    margin-top: 60px;
    margin-bottom: 25px;
    font-size: 1.4rem;
    color: #111;
    font-family: var(--font-header);
    font-weight: 700;
}

.publication-item {
    margin-bottom: 25px;
}

.pub-title {
    font-family: var(--font-header);
    font-weight: 700;
    font-size: 1.1rem;
    color: #000;
    margin-bottom: 4px;
}

.pub-link-icon {
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
    
    color: var(--mit-red); 
    
    text-decoration: none;
    vertical-align: middle;
    transition: color 0.2s ease;
}

.pub-link-icon:hover {
    color: var(--mit-red-dark);
    cursor: pointer;
}

.pub-link-icon svg {
    width: 14px;
    height: 14px;
}

.pub-authors {
    color: #444;
    font-size: 1rem;
    margin: 4px 0;
}

.pub-venue {
    color: #666;
    font-style: italic;
    font-size: 0.95rem;
}

.pub-note {
    font-weight: normal;
    color: #666;
    font-style: normal;
    font-size: 0.9rem;
}

.pub-links { margin-top: 6px; }
.pub-links a {
    font-size: 0.8rem;
    font-family: var(--font-header);
    font-weight: 700;
    text-transform: uppercase;
    color: var(--mit-red);
    border: 1px solid var(--mit-red);
    padding: 1px 6px;
    border-radius: 2px;
    text-decoration: none;
    margin-right: 5px;
    transition: all 0.2s ease;
}

.pub-links a:hover {
    background-color: var(--mit-red);
    color: #fff;
}

u {
    text-decoration: underline;
    text-decoration-skip-ink: none;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    text-decoration-color: #555;
}

.footer {
    margin-top: 5rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
    text-align: center;
    font-size: 0.85rem;
    color: #999;
    font-family: var(--font-header);
}

@media (max-width: 768px) {
    .profile-section {
        flex-direction: column-reverse;
        align-items: center;
        gap: 30px;
    }
    .profile-image img {
        margin-top: 0;
        width: 180px;
    }
    .profile-contact {
        align-items: center;
    }
    .contact-row {
        justify-content: center;
    }
}

.research-list {
    margin-top: 40px;
}

.research-img {
    flex: 0 0 280px;
    max-width: 280px;
}

.research-img img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    border: 1px solid #ddd;
    padding: 4px;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.no-image {
    width: 100%;
    height: 180px;
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    border: 1px dashed #ccc;
}

.research-content {
    flex: 1;
}

.research-title {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 1.3rem;
    color: #111;
    border-bottom: none;
}

.research-meta {
    font-family: var(--font-header);
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 12px;
}

.research-period {
    font-weight: 700;
    color: #222;
    margin-right: 10px;
}

.research-keywords {
    color: var(--mit-red);
    font-style: italic;
}

.research-desc {
    font-size: 0.95rem;
    color: #444;
    line-height: 1.6;
    margin-bottom: 15px;
}
.research-desc p { margin: 0; }

.research-links a {
    font-family: var(--font-header);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
    padding: 4px 10px;
    border: 1px solid #333;
    border-radius: 2px;
    color: #333;
    text-decoration: none;
    margin-right: 6px;
    transition: all 0.2s ease;
}

.research-links a:hover {
    background-color: var(--mit-red);
    border-color: var(--mit-red);
    color: white;
}

.research-divider {
    border: 0;
    border-top: 1px dashed #ccc;
    margin: 40px 0;
}

.research-item-vertical {
    display: block;
    margin-bottom: 50px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.research-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #111;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.research-img-center {
    text-align: center;
    margin-bottom: 25px;
    background-color: #fafafa;
    padding: 10px;
    border-radius: 4px;
}

.research-img-center img {
    max-width: 600px;
    width: 100%;
    height: auto;
    border: 1px solid #ddd;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.research-content-body {
    padding: 0 5px;
}

@media (max-width: 768px) {
    .research-item {
        flex-direction: column-reverse; 
    }

    .research-img {
        flex: 0 0 auto;
        max-width: 100%;
        width: 100%;
        margin-bottom: 15px;
    }

    .masthead {
        flex-direction: column;
        align-items: center;
        gap: 15px;
        padding-bottom: 1.5rem;
    }
    .masthead-title { margin-bottom: 0; }
    .masthead-title a { font-size: 1.3rem; }
    .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 15px; }
    .nav-links a { margin: 0 5px; font-size: 0.9rem; }
    
    .research-intro-section {
        flex-direction: column-reverse;
    }
}

.research-intro-section {
    max-width: 700px;
    margin: 0 auto 60px;
    text-align: left;
}

.intro-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
    margin: 0;
}

.intro-text b {
    color: var(--mit-red);
    font-weight: 700;
}

.intro-image-centered {
    text-align: center;
    margin: 40px 0;
}

.intro-image-centered img {
    max-width: 500px;
    width: 100%;
    height: auto;
}

.related-pubs-section {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px dotted #ddd;
}

.related-pubs-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #111;
    margin: 0 0 10px 0;
    text-transform: uppercase;
    font-family: var(--font-header);
}

.related-pubs-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.related-pubs-list li {
    margin-bottom: 6px;
    font-size: 0.9rem;
    line-height: 1.4;
    padding-left: 12px;
    position: relative;
}

.related-pubs-list li::before {
    content: "•";
    color: var(--mit-red);
    position: absolute;
    left: 0;
    top: 0px;
}

.rel-pub-link {
    color: #000;
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.rel-pub-link:hover {
    color: var(--mit-red);
    border-bottom-color: var(--mit-red);
}

.rel-pub-meta {
    color: #666;
    font-style: italic;
    font-size: 0.85rem;
}

.research-caption {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #666;
    font-family: var(--font-header);
    font-style: italic;
    line-height: 1.4;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.rel-pub-title-text {
    font-weight: 500;
    color: #000;
}

.rel-pub-link-icon {
    display: inline-flex;
    align-items: center;
    margin-left: 5px;
    
    color: var(--mit-red); 
    
    vertical-align: middle;
    text-decoration: none;
    transition: color 0.2s;
}

.rel-pub-link-icon:hover {
    color: var(--mit-red-dark);
}

.rel-pub-link-icon svg {
    width: 13px;
    height: 13px;
}