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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    line-height: 1.7;
    color: #363636;
    background-color: #fff;
    font-size: 18px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 60px;
}

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

.site-nav {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    align-items: center;
}

.site-nav .nav-name {
    font-size: 1.3em;
    font-weight: 700;
    color: #363636;
    margin-right: 20px;
}

.site-nav a {
    color: #4a4a4a;
    text-decoration: none;
    font-size: 1.05em;
    transition: color 0.2s;
}

.site-nav a:hover,
.site-nav a.active {
    color: #363636;
}

.site-nav .nav-name:hover {
    color: #363636;
    text-decoration: none;
}

/* Main Content */
main {
    min-height: 60vh;
    padding: 20px 0 60px;
}

h1 {
    font-size: 2.5em;
    font-weight: 600;
    margin-bottom: 25px;
    color: #363636;
    line-height: 1.2;
}

h2 {
    font-size: 1.75em;
    font-weight: 600;
    margin: 45px 0 25px;
    color: #363636;
    line-height: 1.3;
}

h3 {
    font-size: 1.3em;
    font-weight: 600;
    margin: 30px 0 15px;
    color: #363636;
    line-height: 1.3;
}

p {
    margin-bottom: 20px;
    line-height: 1.8;
    color: #4a4a4a;
    font-size: 1.05em;
}

/* Reduce spacing when paragraph is immediately followed by a list */
p + ul, p + ol {
    margin-top: -10px;
}

ul, ol {
    margin-left: 30px;
    margin-bottom: 20px;
}

ul li, ol li {
    margin-bottom: 8px;
    line-height: 1.8;
    color: #4a4a4a;
    font-size: 1.05em;
}

a {
    color: #3273dc;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Profile Section */
.home-grid {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 60px;
    align-items: start;
}

.profile-image-column {
    position: sticky;
    top: 40px;
}

.profile-image-column img {
    width: 100%;
    max-width: 250px;
    height: auto;
    aspect-ratio: 1;
    border-radius: 50%;
    object-fit: cover;
}

.content-column {
    min-width: 0;
}

/* Old profile styles for other pages */
.profile {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 60px;
    margin-bottom: 50px;
    align-items: start;
}

.profile-image {
    position: sticky;
    top: 40px;
}

.profile-image img {
    width: 100%;
    max-width: 250px;
    height: auto;
    aspect-ratio: 1;
    border-radius: 50%;
    object-fit: cover;
}

.profile-info {
    flex: 1;
}

.subtitle {
    font-size: 1.2em;
    color: #4a4a4a;
    font-weight: 400;
    margin-bottom: 20px;
    margin-top: -15px;
}

/* Research Interests */
.interests {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 25px 0;
    list-style: none;
}

.interests li {
    background-color: #f5f5f5;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 1em;
    color: #4a4a4a;
}

/* Publications */
.publication {
    margin-bottom: 35px;
    padding-bottom: 25px;
    border-bottom: 1px solid #f0f0f0;
}

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

.pub-title {
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

.pub-authors {
    font-size: 0.9em;
    color: #586e75;
    margin-bottom: 5px;
}

.pub-venue {
    font-size: 0.9em;
    color: #718096;
    font-style: italic;
    margin-bottom: 10px;
}

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

.pub-links a {
    font-size: 0.85em;
    color: #0366d6;
}

/* News/Updates */
.news-item {
    margin-bottom: 25px;
    padding-left: 25px;
    border-left: 3px solid #dbdbdb;
}

.news-item .date {
    font-size: 0.95em;
    color: #7a7a7a;
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
}

.news-item p {
    font-size: 1em;
    color: #4a4a4a;
}

/* Projects */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.project-card {
    background: white;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.project-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background-color: #f6f8fa;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-content {
    padding: 20px;
}

.project-content h3 {
    margin: 0 0 12px 0;
    font-size: 1.2em;
    font-weight: 600;
}

.project-content h3 a {
    color: #2c3e50;
    text-decoration: none;
}

.project-content h3 a:hover {
    color: #0366d6;
}

.project-desc {
    color: #586e75;
    font-size: 0.9em;
    line-height: 1.5;
    margin-bottom: 15px;
}

.project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.tech-tag {
    background-color: #f1f3f5;
    color: #495057;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 500;
}

.stars {
    color: #ffa500;
    font-size: 0.85em;
    margin-left: auto;
}

.project {
    margin-bottom: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #0366d6;
}

.project p {
    margin-bottom: 10px;
}

.project .tech-stack {
    font-size: 0.9em;
    color: #586e75;
    margin-bottom: 12px;
}

.project a {
    color: #0366d6;
    font-weight: 500;
}

.note {
    margin-top: 40px;
    padding: 15px;
    background-color: #f6f8fa;
    border-radius: 6px;
    text-align: center;
    font-size: 0.9em;
    color: #586e75;
}

/* Footer */
.site-footer {
    margin-top: 60px;
    padding: 30px 0;
    border-top: 1px solid #e1e4e8;
    background-color: #f6f8fa;
}

.site-footer p {
    text-align: center;
    color: #718096;
    font-size: 0.85em;
    margin-bottom: 5px;
}

.site-footer .site-disclaimer {
    font-size: 0.8em;
    color: #a0aec0;
}

.footer-links {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #586e75;
    font-size: 0.9em;
}

.social-links {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.social-links a {
    color: #586e75;
    font-size: 0.9em;
}

.footer-text {
    text-align: center;
    color: #718096;
    font-size: 0.85em;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 30px;
    }
    
    .home-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .profile-image-column {
        position: static;
        margin: 0 auto;
        text-align: center;
    }
    
    .profile-image-column img {
        max-width: 180px;
    }
    
    .profile {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .profile-image {
        position: static;
        margin: 0 auto;
    }
    
    .profile-image img {
        max-width: 180px;
    }
    
    .site-nav {
        gap: 15px;
    }
    
    h1 {
        font-size: 1.8em;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}