/* Import Inter font from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* MIT Colors */
:root {
    --mit-red: #A31F34;
    --text-color: #333;
    --light-gray: #666;
    --lighter-gray: #999;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.5;
    color: var(--text-color);
    font-size: 16px;
    background: white;
    padding: 0;
}

.banner {
    width: 100%;
    height: 16px;
    background: linear-gradient(to bottom, var(--mit-red) 0%, var(--mit-red) 50%, #8B959E 50%, #8B959E 100%);
    margin-bottom: 20px;
}

@media (min-width: 768px) {
    .banner {
        margin-bottom: 30px;
    }
}

.page-container {
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 0 20px 30px 20px;
}

/* Desktop layout - three sections in two columns */
@media (min-width: 768px) {
    .page-container {
        grid-template-columns: 1fr 280px;
        gap: 60px;
        padding: 0 40px 30px 40px;
    }
    
    .header {
        grid-column: 1;
        grid-row: 1;
    }
    
    .sidebar {
        grid-column: 2;
        grid-row: 1 / 3;
    }
    
    .main-column {
        grid-column: 1;
        grid-row: 2;
    }
}

/* Header */
.header {
    min-width: 0;
    margin-bottom: -10px;
}

@media (min-width: 768px) {
    .header {
        margin-bottom: 0;
    }
}

/* Main Column */
.main-column {
    min-width: 0;
}

@media (min-width: 768px) {
    .main-column {
        margin-top: -35px;
    }
}

h1 {
    font-size: 1.75em;
    font-weight: normal;
    margin-bottom: 8px;
    color: var(--text-color);
}

@media (min-width: 768px) {
    h1 {
        font-size: 2em;
    }
}

h2.subtitle {
    font-size: 1em;
    font-weight: normal;
    margin: 2px 0;
    color: var(--text-color);
}

.contact {
    margin: 0 0 5px 0;
    font-size: 0.9em;
}

.links {
    margin: 0 0 25px 0;
    font-size: 0.9em;
}

.bio {
    margin: 0 0 30px 0;
    font-size: 1em;
    line-height: 1.6;
}

@media (min-width: 768px) {
    .bio {
        margin-top: 0;
    }
}

.bio p {
    margin-bottom: 12px;
}

h3 {
    font-size: 1.3em;
    font-weight: normal;
    margin: 25px 0 12px 0;
    color: var(--text-color);
}

@media (min-width: 768px) {
    h3 {
        margin-top: 35px;
    }
}

/* Links */
a {
    color: var(--mit-red);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Publications - Much denser like MSB */
#publications-list {
    margin-bottom: 0;
}

.publication {
    margin-bottom: 15px;
}

.pub-title {
    font-weight: normal;
    font-size: 1em;
    margin-bottom: 2px;
    line-height: 1.4;
}

.pub-authors {
    font-size: 0.95em;
    margin-bottom: 2px;
    color: var(--text-color);
}

.pub-venue {
    font-size: 0.9em;
    color: var(--lighter-gray);
}

.award {
    background-color: #fff3cd;
    padding: 1px 5px;
    border-radius: 2px;
    font-style: normal;
    font-size: 0.85em;
}

.more-link {
    margin: 20px 0 30px 0;
    font-size: 1em;
}

/* Teaching */
#teaching-list {
    margin: 0;
}

.teaching-item {
    margin-bottom: 10px;
    line-height: 1.5;
}

.teaching-item p {
    margin: 0;
}

/* Sidebar */
.sidebar {
    min-width: 0;
    text-align: center;
}

.sidebar .contact {
    text-align: center;
}

.sidebar .links {
    text-align: center;
}

.profile-photo {
    width: 100%;
    max-width: 220px;
    height: auto;
    display: block;
    margin-bottom: 15px;
    margin-left: auto;
    margin-right: auto;
}

.sidebar-section {
    margin-bottom: 30px;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 768px) {
    .sidebar-section {
        max-width: 220px;
    }
}

h4 {
    font-size: 1.1em;
    font-weight: normal;
    margin-bottom: 15px;
    color: var(--text-color);
}

/* Students in sidebar - compact horizontal layout */
#students-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

@media (min-width: 768px) {
    #students-list {
        justify-content: flex-start;
    }
}

.student-item {
    flex: 0 0 auto;
    text-align: center;
    width: 55px;
}

.student-photo {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    display: block;
    margin: 0 auto 5px auto;
    transition: opacity 0.2s;
}

a .student-photo:hover {
    opacity: 0.8;
}

.student-photo-placeholder {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    background-color: #f0f0f0;
    display: block;
    margin: 0 auto 5px auto;
}

.student-name {
    font-size: 0.8em;
    line-height: 1.2;
    text-align: center;
    word-break: break-word;
}

.student-name a {
    color: var(--mit-red);
}

