/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    font-size: 16px;
    font-weight: 400;
}

/* Container */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    padding: 40px 0 30px;
    border-bottom: 1px solid #e5e5e5;
    margin-bottom: 40px;
}

.header-content {
    margin-bottom: 20px;
}

.name {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.contact-info {
    font-size: 14px;
    color: #666;
}

.email {
    font-family: 'Courier New', monospace;
    background-color: #f8f9fa;
    padding: 2px 6px;
    border-radius: 3px;
    display: inline-block;
}

/* Navigation */
.nav {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.nav-link {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 0;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: #0066cc;
    border-bottom-color: #0066cc;
}

/* Main content */
.main {
    min-height: calc(100vh - 200px);
}

.content {
    margin-bottom: 60px;
}

/* Sections */
.section {
    margin-bottom: 50px;
    scroll-margin-top: 80px;
}

.section-title {
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e5e5e5;
}

.section-content {
    font-size: 16px;
    line-height: 1.7;
}

.section-content p {
    margin-bottom: 16px;
    color: #444;
}

.section-content p:last-child {
    margin-bottom: 0;
}

/* About section with profile photo */
.about-container {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    margin-bottom: 20px;
}

.profile-section {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.profile-photo {
    /* Photo styling remains the same */
}

.profile-img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e5e5e5;
    transition: border-color 0.3s ease;
}

.profile-img:hover {
    border-color: #0066cc;
}

.profile-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 200px;
}

.profile-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    color: #333;
    text-decoration: none;
    border-radius: 6px;
    border: 1px solid #e5e5e5;
    background-color: #fff;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.profile-link:hover {
    background-color: #f8f9fa;
    border-color: #0066cc;
    color: #0066cc;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,102,204,0.1);
}

.link-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.about-content {
    flex: 1;
    min-width: 0; /* Prevents flex item from overflowing */
}

/* Research areas */
.research-areas {
    margin-top: 30px;
}

.research-area {
    margin-bottom: 25px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #0066cc;
}

.research-area h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.research-area p {
    margin-bottom: 0;
    color: #555;
}

/* Publications */
.publications {
    margin-top: 20px;
}

.publication {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.publication:last-child {
    border-bottom: none;
}

.pub-title {
    font-size: 17px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 6px;
    line-height: 1.4;
}

.pub-authors {
    color: #666;
    margin-bottom: 4px;
    font-size: 15px;
}

.pub-venue {
    color: #888;
    font-style: italic;
    margin-bottom: 8px;
    font-size: 14px;
}

.pub-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.pub-link {
    color: #0066cc;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.pub-link:hover {
    color: #004499;
    text-decoration: underline;
}

/* Teaching */
.teaching-item {
    display: flex;
    align-items: baseline;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.course-semester {
    font-weight: 600;
    color: #1a1a1a;
    min-width: 100px;
}

.course-title {
    color: #333;
    flex: 1;
}

.course-role {
    color: #666;
    font-style: italic;
    font-size: 14px;
}

/* News */
.news-items {
    margin-top: 20px;
}

.news-item {
    margin-bottom: 15px;
    padding-left: 0;
    line-height: 1.6;
}

.news-date {
    font-weight: 600;
    color: #1a1a1a;
    margin-right: 8px;
}

.news-content {
    color: #444;
}

/* Footer */
.footer {
    border-top: 1px solid #e5e5e5;
    padding: 30px 0;
    text-align: center;
    color: #666;
    font-size: 14px;
    margin-top: 40px;
}

/* Links */
a {
    color: #0066cc;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header {
        padding: 30px 0 20px;
    }
    
    .name {
        font-size: 24px;
    }
    
    .nav {
        gap: 20px;
    }
    
    .section {
        margin-bottom: 40px;
    }
    
    .section-title {
        font-size: 20px;
    }
    
    /* Mobile layout for about section */
    .about-container {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .profile-section {
        align-items: center;
        width: 100%;
    }
    
    .profile-img {
        width: 150px;
        height: 150px;
    }
    
    .profile-links {
        width: 100%;
        max-width: 300px;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
    }
    
    .profile-link {
        flex: 1;
        min-width: 80px;
        justify-content: center;
        font-size: 13px;
        padding: 6px 8px;
    }
    
    .about-content {
        text-align: left;
    }
    
    .teaching-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .course-semester {
        min-width: auto;
    }
    
    .research-area {
        padding: 15px;
    }
    
    .pub-links {
        gap: 10px;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 15px;
    }
    
    .name {
        font-size: 22px;
    }
    
    .section-title {
        font-size: 18px;
    }
    
    .nav {
        gap: 15px;
    }
    
    .nav-link {
        font-size: 14px;
    }
}

/* Smooth scrolling behavior */
html {
    scroll-behavior: smooth;
}

/* Selection color */
::selection {
    background-color: #0066cc;
    color: white;
}

::-moz-selection {
    background-color: #0066cc;
    color: white;
}