/* Color Variables */
:root {
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --heading-color: #ffffff;
    --link-color: #58a6ff;
    --secondary-text: #a0a0a0;
    --card-bg: #1e1e1e;
    --border-color: #333333;
    --shadow-color: rgba(0, 0, 0, 0.3);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Roboto', -apple-system, sans-serif;
    line-height: 1.6;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Typography */
h1, h2, h3 { color: var(--heading-color); font-weight: 500; }
h2 { padding-bottom: 10px; margin: 40px 0 20px; }
a { color: var(--link-color); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header Restructuring */
.header { margin-top: 30px; }
.header-titles { margin-bottom: 25px; }
h1 { font-size: 3em; margin-bottom: 5px; font-weight: 700; }
.institution { color: var(--secondary-text); font-weight: 400; margin-bottom: 5px; }

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 50px;
}
.header-text { flex: 1; }
.intro { margin-bottom: 20px; font-size: 1.05em; color: var(--text-color); font-weight: 300; line-height: 1.7; }

/* Desktop Profile Area */
.desktop-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}
.desktop-profile img { 
    width: 240px; 
    height: 240px; 
    border-radius: 16px;
    object-fit: cover; 
}
.desktop-socials { margin-top: 20px; }
.social-icons { display: flex; gap: 20px; }
.social-icons a { font-size: 1.6em; color: var(--text-color); transition: color 0.2s; }
.social-icons a:hover { color: var(--link-color); }

/* Hide Mobile Elements on Desktop */
.mobile-photo, .mobile-socials { display: none; }

/* News */
.news-item { display: flex; margin-bottom: 15px; }
.news-date { width: 100px; font-weight: 500; color: var(--secondary-text); flex-shrink: 0; }
.news-content { flex: 1; font-weight: 300;}

/* Cards Grid (Used for Projects & Pubs) */
.projects-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.project-card {
    background: var(--card-bg); 
    border: 1px solid var(--border-color);
    padding: 20px; 
    border-radius: 8px; 
    display: flex; 
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
/* Hover effect */
.project-card:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 20px var(--shadow-color);
}
.project-card h3 { margin-bottom: 10px; font-weight: 500;}
.project-card p { font-size: 0.9em; color: var(--secondary-text); flex-grow: 1; margin-bottom: 15px; font-weight: 300;}
.tags { margin-bottom: 15px; display: flex; flex-wrap: wrap; gap: 8px; }
.tags span { background: var(--bg-color); border: 1px solid var(--border-color); padding: 4px 8px; border-radius: 4px; font-size: 0.8em; }
.hidden-project { display: none; } 

/* Link formatting for icons */
.project-link-container { margin-top: auto; color: var(--secondary-text); }
.project-link-container i { margin-right: 4px; color: var(--text-color); }
.project-link-container a { font-weight: normal; }

/* Publications */
.pub-authors { 
    font-size: 0.95em; 
    color: var(--text-color); 
    margin-bottom: 5px; 
}
.pub-authors strong { 
    color: var(--heading-color);
}
.pub-card { grid-column: 1 / -1; }
.pub-venue { font-weight: 500 !important; color: var(--secondary-text); margin-bottom: 10px; }
.pub-links { display: flex; gap: 20px; }
.link-item { color: var(--secondary-text); }
.link-item i { margin-right: 4px; color: var(--text-color); }
.link-item a { font-weight: normal; }

/* Load More Button */
.load-btn {
    display: block; 
    margin: 30px auto 0; 
    background: transparent; 
    color: #888888;
    border: 1px solid #888888; 
    padding: 6px 14px; 
    border-radius: 6px;
    cursor: pointer; 
    font-size: 0.85em; 
    transition: 0.2s;
}
.load-btn:hover { background: #888888; color: var(--bg-color); }

/* Teaching Section */
.teaching-list { list-style-type: none; padding-left: 0; }
.teaching-list li { margin-bottom: 10px; font-weight: 300; }
.teaching-list strong { font-weight: 500; color: var(--text-color); }

/* Footer */
footer { margin-top: 60px; text-align: center; color: var(--secondary-text); font-size: 0.9em; padding-top: 20px; border-top: 1px solid var(--border-color); font-weight: 300;}

/* Responsive Mobile Layout */
@media (max-width: 768px) {
    .header-content { flex-direction: column; }
    .header-titles { text-align: center; }
    
    .desktop-profile, .desktop-socials { display: none; }
    
    .mobile-photo { display: block; margin-bottom: 20px; }
    .mobile-photo img { width: 200px; height: 200px; border-radius: 16px; object-fit: cover; margin: 0 auto; }
    
    .mobile-socials { display: flex; justify-content: center; gap: 20px; margin: 15px 0 25px 0; }
    .mobile-socials a { font-size: 1.6em; color: var(--text-color); }
    .mobile-socials a:hover { color: var(--link-color); }
    
    .news-item { flex-direction: column; margin-bottom: 20px;}
    .news-date { width: 100%; margin-bottom: 5px; }
    .projects-grid { grid-template-columns: 1fr; }
}