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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    background: #fff;
}

a {
    color: #8c1916;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ── Main container ── */
.container {
    max-width: 840px;
    margin: 0 auto;
    padding: 52px 22px 60px;
}

/* ── About section ── */
.about-section {
    display: flex;
    gap: 32px;
    align-items: flex-start;
    margin-bottom: 44px;
}

.about-photo {
    flex-shrink: 0;
}

.profile-photo {
    width: 190px;
    height: 190px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #dce2ea;
    display: block;
    cursor: pointer;
    transition: opacity 0.15s;
}

.profile-photo:hover {
    opacity: 0.88;
}

.about-content h1 {
    font-size: 26px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 12px;
    letter-spacing: -0.3px;
}

.about-content p {
    color: #444;
    margin-bottom: 22px;
    text-align: justify;
    line-height: 1.75;
    font-size: 14px;
}

.social-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #8c1916;
    color: #fff;
    padding: 9px 18px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s;
}

.social-btn:hover {
    background: #701411;
    color: #fff;
    text-decoration: none;
}

.icon {
    width: 1em;
    height: 1em;
    fill: currentColor;
    vertical-align: -0.125em;
    flex-shrink: 0;
}

/* ── Education bubbles ── */
.edu-section {
    display: flex;
    gap: 32px;
    align-items: flex-start;
    margin-bottom: 36px;
}

.edu-label {
    width: 190px;
    flex-shrink: 0;
    text-align: right;
    padding-top: 13px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #aaa;
}

.edu-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.edu-card {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: linear-gradient(135deg, #fff 65%, rgba(140,25,22,0.03));
    border: 1px solid #e4e8ed;
    border-radius: 12px;
    padding: 12px 13px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    transition: box-shadow 0.2s, border-color 0.2s;
}

.edu-card:hover {
    box-shadow: 0 4px 14px rgba(0,0,0,0.10);
    border-color: rgba(140,25,22,0.22);
}

.edu-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #8c1916;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 13px;
}

.edu-text {
    min-width: 0;
}

.edu-degree {
    font-size: 12px;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.35;
    margin-bottom: 2px;
}

.edu-year {
    font-size: 11px;
    color: #8c1916;
    font-weight: 500;
    margin-bottom: 2px;
}

.edu-institution {
    font-size: 11px;
    color: #777;
}

.edu-degree--accent {
    color: #8c1916;
}

/* ── Section tabs ── */
.section-tabs {
    display: flex;
    border-bottom: 2px solid #e0e4ea;
    margin-bottom: 6px;
}

.section-tab {
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 12px 30px;
    cursor: pointer;
    font-size: 15px;
    color: #666;
    margin-bottom: -2px;
    transition: color 0.15s, border-color 0.15s;
    font-family: inherit;
}

.section-tab:hover {
    color: #8c1916;
}

.section-tab.active {
    color: #8c1916;
    border-bottom-color: #8c1916;
    font-weight: 600;
}

/* ── Tab content ── */
.tab-content.hidden {
    display: none;
}

/* ── Timeline ── */
.timeline {
    padding-top: 22px;
}

.timeline-year {
    display: flex;
    gap: 20px;
    margin-bottom: 8px;
}

.year-label {
    width: 50px;
    flex-shrink: 0;
    font-size: 22px;
    font-weight: 700;
    color: #2d3a4a;
    padding-top: 12px;
    text-align: right;
}

.year-papers {
    flex: 1;
    border-left: 2px solid #8c1916;
    padding-left: 22px;
    padding-bottom: 18px;
}

/* ── Paper / Talk cards ── */
.paper-card {
    border: 1px solid #dde2ea;
    border-radius: 8px;
    padding: 14px 18px;
    margin: 8px 0;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.paper-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
    line-height: 1.45;
}

.paper-title a {
    color: #8c1916;
}

.paper-title a:hover {
    text-decoration: underline;
}

.paper-authors {
    font-size: 13px;
    color: #555;
    margin-bottom: 3px;
    line-height: 1.5;
}

.paper-venue {
    font-size: 13px;
    color: #888;
}

.paper-links {
    margin-top: 10px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.paper-link {
    font-size: 12px;
    color: #8c1916;
    border: 1px solid #8c1916;
    padding: 2px 10px;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.paper-link:hover {
    background: #8c1916;
    color: #fff;
    text-decoration: none;
}

/* ── Badges ── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 9px;
    border-radius: 12px;
    white-space: nowrap;
    vertical-align: middle;
}

.badge.award {
    background: #fff8dc;
    color: #7a5800;
    border: 1px solid #f0c040;
}

/* ── Lightbox ── */
#lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.88);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

#lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 4px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.6);
}

/* ── Footer ── */
.site-footer {
    text-align: center;
    padding: 18px 22px;
    font-size: 12px;
    color: #aaa;
}

.site-footer a {
    color: #aaa;
}

/* ── Responsive ── */
@media (max-width: 620px) {
    .about-section {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .about-content p {
        text-align: left;
    }

    .social-buttons {
        justify-content: center;
    }

    .year-label {
        font-size: 17px;
        width: 36px;
    }

    .section-tab {
        padding: 10px 18px;
        font-size: 14px;
    }

    .edu-section {
        flex-direction: column;
        gap: 10px;
    }

    .edu-label {
        width: auto;
        text-align: left;
        padding-top: 0;
    }

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