:root {
    --bg: #f8fafc;
    --text: #0f172a;
    --muted: #6b7280;
    --accent: #2563eb;
}

html,
body {
    height: 100%;
}

body {
    font-family: system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial;
    margin: 0;
    padding: 2rem;
    background: var(--bg);
    color: var(--text);
}

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

header h1 {
    margin: 0;
    font-size: 1.75rem;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

nav {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

nav a {
    font-weight: 500;
}

p.lead {
    color: var(--muted);
    margin-top: 0.25rem;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

section {
    margin-top: 1.25rem;
}

.about-section {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
    align-items: flex-start;
}

.about-left {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.profile-image {
    width: 250px;
    height: 250px;
    border-radius: 8px;
    object-fit: cover;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.social-links a {
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.social-links a i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

.about-right {
    flex: 1;
}

.about-right p {
    text-align: justify;
}

.about-right h2 {
    margin-top: 0;
}

.timeline {
    position: relative;
    padding-left: 9rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 8rem;
    top: 0.75rem;
    bottom: 1rem;
    width: 2px;
    background: #e5e7eb;
}

.experience-item {
    position: relative;
    margin-bottom: 2.5rem;
    padding-bottom: 0;
}

.experience-item:last-child {
    margin-bottom: 0;
}

.timeline-year {
    position: absolute;
    left: -9rem;
    top: 0.35rem;
    width: 7rem;
    text-align: right;
    color: var(--muted);
    font-weight: 500;
    font-size: 0.9rem;
}

.timeline-dot {
    position: absolute;
    left: -1.5rem;
    top: 0.3rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent);
    border: 3px solid var(--bg);
    box-shadow: 0 0 0 2px var(--accent);
    z-index: 1;
}

.experience-content {
    padding-left: 0.5rem;
}

.experience-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.experience-header h3 {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.experience-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text);
}

.experience-header .date {
    color: var(--muted);
    font-weight: 500;
    font-size: 0.95rem;
}

.institution {
    color: var(--muted);
    margin: 0.25rem 0 0.75rem 0;
    font-style: italic;
}

.subject {
    margin: 0.5rem 0 0 0;
    line-height: 1.6;
}

.experience-item ul {
    margin: 0.75rem 0 0 0;
    padding-left: 1.5rem;
}

.experience-item li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.publications-timeline {
    margin-top: 1.5rem;
    padding-left: 5rem;
}

.pub-year-group {
    position: relative;
    margin-bottom: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.pub-year-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.pub-year {
    position: absolute;
    left: -5rem;
    top: 0;
    width: 4rem;
    text-align: right;
    color: var(--accent);
    font-weight: 600;
    font-size: 1.1rem;
}

.pub-year-content {
    padding-left: 0.5rem;
}

.publication-item {
    margin-bottom: 1.5rem;
}

.publication-item:last-child {
    margin-bottom: 0;
}

.pub-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.4;
}

.pub-authors {
    margin: 0.25rem 0;
    color: var(--text);
    font-size: 0.95rem;
}

.pub-venue {
    margin: 0.25rem 0 0.75rem 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.pub-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.pub-links a {
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.view-more {
    margin-top: 2rem;
    text-align: center;
}

.view-more a {
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.subsection-title {
    font-size: 1.3rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text);
    font-weight: 600;
}

.activities-timeline {
    margin-top: 1.5rem;
    padding-left: 5rem;
}

.activity-year-group {
    position: relative;
    margin-bottom: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.activity-year-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.activity-year {
    position: absolute;
    left: -5rem;
    top: 0;
    width: 4rem;
    text-align: right;
    color: var(--accent);
    font-weight: 600;
    font-size: 1.1rem;
}

.activity-year-content {
    padding-left: 0.5rem;
}

.activity-item {
    margin-bottom: 1.5rem;
}

.activity-item:last-child {
    margin-bottom: 0;
}

.activity-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
}

.activity-place {
    margin: 0.25rem 0 0.75rem 0;
    color: var(--muted);
    font-style: italic;
    font-size: 0.95rem;
}

.activity-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.activity-links a {
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

@media (max-width: 768px) {
    .about-section {
        flex-direction: column;
    }
    
    .profile-image {
        width: 150px;
        height: 150px;
    }
    
    .timeline {
        padding-left: 1.5rem;
    }
    
    .timeline::before {
        left: 0.3rem;
    }
    
    .timeline-dot {
        left: -1.2rem;
        width: 12px;
        height: 12px;
    }
    
    .publications-timeline {
        padding-left: 0;
    }
    
    .pub-year {
        position: static;
        display: block;
        width: auto;
        text-align: left;
        margin-bottom: 1rem;
        font-size: 1.05rem;
    }
    
    .pub-year-content {
        padding-left: 0;
    }
    
    .activities-timeline {
        padding-left: 0;
    }
    
    .activity-year {
        position: static;
        display: block;
        width: auto;
        text-align: left;
        margin-bottom: 1rem;
        font-size: 1.05rem;
    }
    
    .activity-year-content {
        padding-left: 0;
    }
}

footer {
    margin-top: 2rem;
    color: #94a3b8;
    font-size: 0.9rem;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0b1220;
        --text: #e6eef8;
        --muted: #94a3b8;
        --accent: #60a5fa;
    }
    body {
        background: var(--bg);
    }
}
