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

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

main {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

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

header h1 {
    font-size: 2em;
    font-weight: 600;
    color: #24292e;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

header .subtitle {
    font-size: 1.1em;
    color: #586069;
    max-width: 900px;
    margin: 10px auto 20px;
    padding: 0 20px;
}

nav {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
    margin-top: 15px;
}

nav a {
    color: #586069;
    text-decoration: none;
    margin-right: 20px;
    font-size: 0.95em;
    padding-bottom: 5px;
}

nav a:hover {
    color: #0366d6;
}

nav a.active {
    color: #0366d6;
    border-bottom: 2px solid #0366d6;
}

/* Hero Section with Photo */
.hero {
    margin-bottom: 50px;
}

.hero-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    align-items: center;
}

.hero-text h2 {
    font-size: 1.5em;
    font-weight: 600;
    color: #24292e;
    margin-bottom: 15px;
}

.hero-text p {
    color: #586069;
    margin-bottom: 15px;
}

.hero-image {
    text-align: center;
}

.hero-image img {
    width: 100%;
    max-width: 250px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Sections */
section {
    margin-bottom: 50px;
}

h2 {
    font-size: 1.5em;
    font-weight: 600;
    margin-bottom: 20px;
    color: #24292e;
    border-bottom: 1px solid #e1e4e8;
    padding-bottom: 10px;
}

h3 {
    font-size: 1.2em;
    font-weight: 600;
    margin-bottom: 10px;
    margin-top: 25px;
    color: #24292e;
}

p {
    margin-bottom: 15px;
    color: #586069;
}

a {
    color: #0366d6;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Publications */
.year-section {
    margin-bottom: 30px;
}

.year-header {
    font-size: 1.3em;
    font-weight: 600;
    color: #24292e;
    margin-bottom: 15px;
    margin-top: 30px;
}

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

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

.pub-title {
    font-weight: 600;
    color: #24292e;
    margin-bottom: 5px;
    font-size: 1.05em;
}

.pub-authors {
    color: #586069;
    font-size: 0.95em;
    margin-bottom: 5px;
}

.pub-journal {
    color: #0366d6;
    font-style: italic;
    font-size: 0.95em;
    margin-bottom: 5px;
}

.pub-links {
    margin-top: 8px;
}

.pub-links a {
    color: #0366d6;
    text-decoration: none;
    margin-right: 15px;
    font-size: 0.9em;
}

.pub-links a:hover {
    text-decoration: underline;
}

.loading {
    color: #586069;
    font-style: italic;
}

/* Contact Section */
.contact {
    margin-top: 10px;
}

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

/* CV Sections */
.cv-section {
    margin-bottom: 40px;
}

.cv-entry {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

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

.cv-date {
    color: #0366d6;
    font-weight: 600;
    font-size: 0.95em;
}

.cv-content {
    color: #586069;
}

.cv-content strong {
    color: #24292e;
    font-size: 1.05em;
    display: block;
    margin-bottom: 5px;
}

.cv-content em {
    color: #6a737d;
    font-size: 0.9em;
}

.cv-section ul {
    margin-left: 20px;
    color: #586069;
}

.cv-section ul li {
    margin-bottom: 8px;
}

/* CV Metrics */
.cv-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 30px 0;
    padding: 20px 0;
}

.metric {
    text-align: center;
    padding: 15px;
    background: #f6f8fa;
    border-radius: 6px;
}

.metric-number {
    font-size: 2em;
    font-weight: 600;
    color: #0366d6;
    margin-bottom: 5px;
}

.metric-label {
    font-size: 0.9em;
    color: #586069;
}

/* Footer */
footer {
    margin-top: 60px;
    padding: 20px;
    border-top: 1px solid #e1e4e8;
    color: #586069;
    font-size: 0.9em;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .hero-image {
        order: -1;
    }

    .hero-image img {
        max-width: 200px;
    }

    nav a {
        display: inline-block;
        margin-bottom: 10px;
    }

    h1 {
        font-size: 1.5em !important;
    }

    .cv-metrics {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .cv-entry {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .cv-date {
        font-weight: 700;
    }
}

@media (max-width: 600px) {
    main {
        padding: 15px;
    }

    header h1 {
        font-size: 1.5em;
    }

    nav a {
        display: block;
        margin-bottom: 10px;
    }
}
