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

body {
    font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

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

a:hover {
    text-decoration: underline;
}

/* Header and Navigation */
header {
    border-bottom: 1px solid #e5e5e5;
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 100;
}

nav {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #333;
}

.nav-name:hover {
    text-decoration: none;
    color: #0066cc;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: #555;
    font-weight: 400;
}

.nav-links a:hover,
.nav-links a.active {
    color: #0066cc;
}

/* Main content */
main {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

/* Homepage two-column layout */
.home-layout {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
    padding-top: 2rem;
}

.home-layout .about-section {
    flex: 1;
    margin: 0;
    max-width: none;
}

.home-layout .profile-section {
    flex-shrink: 0;
    width: 250px;
    margin-bottom: 0;
    padding-top: 0;
}

/* Homepage layout */
.profile-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 3rem;
    padding-top: 2rem;
}

.profile-image img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e5e5e5;
}

.profile-info {
    margin-top: 1.5rem;
}

.profile-info h1 {
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
}

.profile-info .title {
    font-size: 1.1rem;
    color: #555;
}

.profile-info .location {
    color: #777;
    font-size: 0.95rem;
}

/* Contact links */
.contact-links {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e5e5;
}

.contact-links h3 {
    font-size: 0.9rem;
    color: #777;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.contact-item {
    display: block;
    padding: 0.4rem 0;
    color: #555;
}

.contact-item:hover {
    color: #0066cc;
    text-decoration: none;
}

.contact-item .icon {
    margin-right: 0.5rem;
}

.bluesky-icon {
    vertical-align: middle;
    margin-right: 0.4rem;
}

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

.about-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #0066cc;
    display: inline-block;
}

.about-section p {
    margin-bottom: 1rem;
    font-size: 1.05rem;
}

/* Content pages (Research, Teaching, CV) */
.content-page {
    max-width: 800px;
}

.content-page h1 {
    font-size: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #0066cc;
}

/* Research page */
.research-section {
    margin-bottom: 2.5rem;
}

.research-section h2 {
    font-size: 1.25rem;
    color: #555;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.paper {
    margin-bottom: 1.5rem;
}

.paper-title {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 0.25rem;
}

.paper-authors {
    color: #666;
    margin-bottom: 0.5rem;
}

.paper-abstract {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 0.5rem;
}

.paper-journal {
    color: #666;
    margin-bottom: 0.5rem;
}

.paper-links a {
    margin-right: 1rem;
    font-size: 0.9rem;
}

/* Teaching page */
.teaching-section {
    margin-bottom: 2.5rem;
}

.teaching-section h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: #333;
}

.course h3 {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 0.75rem;
}

.course ul {
    list-style: none;
    padding-left: 1rem;
}

.course li {
    margin-bottom: 1rem;
}

.course .instructor {
    color: #666;
    font-size: 0.95rem;
}

/* CV page */
.cv-download {
    margin-bottom: 2rem;
}

.download-btn {
    display: inline-block;
    background: #0066cc;
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-weight: 600;
}

.download-btn:hover {
    background: #0052a3;
    text-decoration: none;
}

.cv-section {
    margin-bottom: 2rem;
}

.cv-section h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e5e5;
}

.cv-item {
    display: flex;
    margin-bottom: 1rem;
}

.cv-date {
    min-width: 120px;
    color: #666;
    font-size: 0.95rem;
}

.cv-details {
    flex: 1;
}

/* Footer */
footer {
    margin-top: 4rem;
    padding: 2rem;
    background: #f8f8f8;
    border-top: 1px solid #e5e5e5;
}

.footer-content {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.footer-links {
    margin-bottom: 1rem;
}

.footer-links a {
    margin: 0 1rem;
    color: #666;
    font-size: 0.9rem;
}

.copyright {
    color: #999;
    font-size: 0.85rem;
}

/* Responsive design */
@media (max-width: 768px) {
    header {
        padding: 1rem;
    }

    nav {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        gap: 1rem;
    }

    main {
        padding: 1.5rem;
    }

    .home-layout {
        flex-direction: column;
        gap: 2rem;
    }

    .home-layout .profile-section {
        width: 100%;
    }

    .profile-image img {
        width: 150px;
        height: 150px;
    }

    .cv-item {
        flex-direction: column;
    }

    .cv-date {
        margin-bottom: 0.25rem;
    }
}