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

:root {
    --primary-color: #000;
    --text-color: #333;
    --light-gray: #fafafa;
    --border-color: #e0e0e0;
    --link-color: #000;
    --link-hover: #666;
    --spacing: 1rem;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 300;
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-color);
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 30px;
    background-color: #fff;
}

/* Navigation */
nav {
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 60px;
    padding-bottom: 20px;
}

nav a {
    text-decoration: none;
    color: var(--text-color);
    margin-right: 30px;
    font-weight: 400;
    font-size: 14px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: color 0.2s;
}

nav a:hover {
    color: var(--link-hover);
}

nav a.active {
    color: var(--primary-color);
    font-weight: 500;
}

/* Profile section */
.profile {
    text-align: center;
    margin-bottom: 60px;
}

.profile-img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 30px;
    filter: grayscale(20%);
}

.profile h1 {
    font-size: 2.2em;
    font-weight: 300;
    margin-bottom: 12px;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

.profile .title {
    font-size: 1em;
    font-weight: 300;
    color: #666;
    margin-bottom: 8px;
    letter-spacing: 0.3px;
}

.profile .email {
    color: #999;
    font-size: 0.9em;
    margin-bottom: 25px;
    font-weight: 300;
}

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

.links a {
    color: var(--link-color);
    text-decoration: none;
    padding: 8px 20px;
    border: 1px solid var(--border-color);
    border-radius: 2px;
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.5px;
    transition: all 0.2s;
}

.links a:hover {
    border-color: var(--primary-color);
    background-color: var(--light-gray);
}

/* Bio section */
.bio {
    max-width: 700px;
    margin: 0 auto;
}

.bio p {
    margin-bottom: 20px;
    font-weight: 300;
    line-height: 1.8;
}

.bio h2 {
    margin-top: 40px;
    margin-bottom: 20px;
    color: var(--primary-color);
    font-size: 1.3em;
    font-weight: 400;
    letter-spacing: -0.3px;
}

.bio ul {
    margin-left: 20px;
}

.bio li {
    margin-bottom: 10px;
    font-weight: 300;
}

.bio a {
    color: var(--link-color);
    text-decoration: none;
    border-bottom: 1px solid var(--border-color);
    transition: border-color 0.2s;
}

.bio a:hover {
    border-bottom-color: var(--primary-color);
}

/* Publications page */
h1 {
    color: var(--primary-color);
    margin-bottom: 8px;
    font-size: 2em;
    font-weight: 300;
    letter-spacing: -0.5px;
}

.subtitle {
    color: #999;
    font-weight: 300;
    font-size: 0.9em;
    margin-bottom: 50px;
    letter-spacing: 0.3px;
}

.year-section {
    margin-bottom: 60px;
}

.year-section h2 {
    color: var(--primary-color);
    font-size: 1.5em;
    font-weight: 400;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
    margin-bottom: 30px;
    letter-spacing: -0.3px;
}

.publication {
    margin-bottom: 40px;
    padding: 0;
    background-color: transparent;
    border-radius: 0;
    transition: none;
}

.publication:hover {
    transform: none;
    box-shadow: none;
}

.publication h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.05em;
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: -0.2px;
}

.publication .authors {
    color: #666;
    margin-bottom: 6px;
    font-weight: 300;
    font-size: 0.95em;
}

.publication .venue {
    color: #888;
    font-style: normal;
    margin-bottom: 12px;
    font-weight: 300;
    font-size: 0.9em;
}

.publication .abbr-badge {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 2px 10px;
    border-radius: 2px;
    font-size: 0.75em;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-right: 8px;
}

.publication .award {
    display: inline-block;
    background-color: #000;
    color: white;
    padding: 2px 10px;
    border-radius: 2px;
    font-size: 0.75em;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.publication .abstract {
    margin: 15px 0;
    padding: 0;
    background-color: transparent;
    border-left: none;
    font-size: 0.9em;
    line-height: 1.7;
    color: #666;
    font-weight: 300;
    display: none;
}

.publication .abstract.show {
    display: block;
}

.publication .links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.publication .links a,
.publication .links button {
    color: var(--text-color);
    text-decoration: none;
    padding: 4px 14px;
    border: 1px solid var(--border-color);
    border-radius: 2px;
    font-size: 0.85em;
    font-weight: 400;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.3px;
}

.publication .links a:hover,
.publication .links button:hover {
    border-color: var(--primary-color);
    background-color: var(--light-gray);
}

.loading {
    text-align: center;
    padding: 60px;
    color: #999;
    font-weight: 300;
    font-size: 0.9em;
}

.error {
    text-align: center;
    padding: 60px;
    color: #e74c3c;
    font-weight: 300;
}

/* Footer */
footer {
    margin-top: 80px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: #999;
    font-size: 0.85em;
    font-weight: 300;
}

/* Responsive design */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }
    
    .profile-img {
        width: 150px;
        height: 150px;
    }
    
    .profile h1 {
        font-size: 1.6em;
    }
    
    nav a {
        margin-right: 10px;
        font-size: 0.95em;
    }
    
    .publication {
        padding: 15px;
    }

    .student-grid {
        grid-template-columns: 1fr;
    }
}

/* Service Page Styles */
.service-section {
    margin-bottom: 60px;
}

.service-section h2 {
    color: var(--primary-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
    margin-bottom: 30px;
    font-size: 1.5em;
    font-weight: 400;
    letter-spacing: -0.3px;
}

.section-intro {
    font-style: normal;
    color: #666;
    margin-bottom: 30px;
    padding: 0;
    background-color: transparent;
    border-left: none;
    font-weight: 300;
}

.service-item {
    margin-bottom: 35px;
}

.service-item h3 {
    color: var(--primary-color);
    font-size: 1em;
    margin-bottom: 18px;
    font-weight: 400;
    letter-spacing: -0.2px;
}

.service-content {
    margin-left: 0;
}

.course {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.course strong {
    color: var(--primary-color);
    min-width: 200px;
    font-weight: 400;
}

.institution {
    color: #888;
    font-style: normal;
    font-weight: 300;
}

.term {
    color: #999;
    font-size: 0.9em;
    font-weight: 300;
}

.award {
    color: #000;
    font-weight: 500;
    font-size: 0.75em;
    padding: 2px 10px;
    background-color: transparent;
    border: 1px solid var(--border-color);
    border-radius: 2px;
    margin-left: auto;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.award-inline {
    color: #000;
    font-weight: 500;
    font-size: 0.85em;
}

/* Student Grid Layout */
.student-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-left: 0;
}

.student-link {
    padding: 12px 18px;
    background-color: transparent;
    border-radius: 2px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);
    text-align: center;
    font-weight: 400;
    font-size: 0.9em;
}

.student-link:hover {
    background-color: var(--light-gray);
    border-color: var(--primary-color);
    transform: none;
    box-shadow: none;
}

/* Service List (for Academic Service) */
.service-list {
    margin-left: 0;
}

.service-entry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    margin-bottom: 0;
    background-color: transparent;
    border-radius: 0;
    border-left: none;
    border-bottom: 1px solid var(--border-color);
}

.service-entry:last-child {
    border-bottom: none;
}

.service-entry strong {
    color: var(--primary-color);
    font-weight: 400;
    min-width: 200px;
}

.service-entry span {
    color: #888;
    font-weight: 300;
}

/* Resources List */
.resources-list {
    list-style: none;
    margin-left: 0;
}

.resources-list li {
    padding: 12px 0;
    margin-bottom: 0;
    background-color: transparent;
    border-radius: 0;
    border-left: none;
    border-bottom: 1px solid var(--border-color);
    line-height: 1.7;
    font-weight: 300;
}

.resources-list li:last-child {
    border-bottom: none;
}

.resources-list a {
    color: var(--link-color);
    text-decoration: none;
    border-bottom: 1px solid var(--border-color);
    transition: border-color 0.2s;
}

.resources-list a:hover {
    border-bottom-color: var(--primary-color);
}

.service-section > p {
    color: #666;
    font-weight: 300;
    line-height: 1.7;
    margin-bottom: 20px;
}
