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

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

a {
    color: #2563eb;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.container {
    display: flex;
    max-width: 1100px;
    margin: 0 auto;
    min-height: 100vh;
}

/* ── Sidebar ── */

.sidebar {
    width: 260px;
    flex-shrink: 0;
    background: #fff;
    border-right: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-content {
    padding: 2.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.sidebar-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    border: 3px solid #e5e7eb;
}

.sidebar-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.sidebar-title {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 0.1rem;
}

.sidebar-affiliation {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 1.5rem;
}

.sidebar-nav {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 1.5rem;
}

.nav-link {
    display: block;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #475569;
    transition: background 0.15s, color 0.15s;
}

.nav-link:hover {
    background: #f1f5f9;
    color: #1e293b;
    text-decoration: none;
}

.nav-link.active {
    background: #eff6ff;
    color: #2563eb;
    font-weight: 600;
}

.sidebar-social {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #f1f5f9;
    transition: background 0.15s;
}

.social-icon:hover {
    background: #e2e8f0;
    text-decoration: none;
}

.social-icon img {
    width: 18px;
    height: 18px;
    opacity: 0.65;
}

/* ── Main content ── */

.main-content {
    flex: 1;
    padding: 2.5rem 3rem;
    background: #fff;
    min-width: 0;
}

.content-section {
    margin-bottom: 2.5rem;
}

.publications-section {
    margin-bottom: 0.5rem !important;
}

.section-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
}

.full-list-link {
    font-size: 0.75em;
    font-weight: 400;
    margin-left: 0.4rem;
    color: #2563eb;
}

.section-text {
    line-height: 1.7;
    color: #475569;
}

/* ── Publications ── */

.pub-item {
    padding-bottom: 3%;
}

.pub-item:last-child {
    border-bottom: none;
}

.pub-title {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.pub-title a {
    color: #1e293b;
}

.pub-title a:hover {
    color: #2563eb;
}

.pub-authors {
    font-size: 0.88rem;
    color: #64748b;
    margin-bottom: 0.2rem;
}

.pub-venue {
    font-size: 0.88rem;
    color: #2563eb;
    font-style: italic;
    margin-bottom: 0.35rem;
}

.pub-venue a {
    color: #2563eb;
}

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

.pub-links a {
    font-size: 0.82rem;
    padding-right: 1px;
    transition: all 0.15s;
}

/* .pub-links a:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    text-decoration: none;
} */

/* ── Education ── */

.edu-item {
    border-left: 3px solid #e5e7eb;
    padding-left: 1rem;
    margin-bottom: 0.75rem;
}

.edu-degree {
    font-weight: 600;
    color: #1e293b;
}

.edu-school {
    font-size: 0.92rem;
    color: #475569;
}

.edu-school a {
    color: #2563eb;
}

.edu-period {
    font-size: 0.85rem;
    color: #94a3b8;
}

.edu-details {
    font-size: 0.88rem;
    color: #64748b;
    margin-top: 0.15rem;
}

.edu-details a {
    color: #2563eb;
}

/* ── Experience ── */

.exp-item {
    border-left: 3px solid #e5e7eb;
    padding-left: 1rem;
    margin-bottom: 0.75rem;
}

.exp-title {
    font-weight: 600;
    color: #1e293b;
}

.exp-company {
    font-size: 0.92rem;
    color: #475569;
}

.exp-company a {
    color: #2563eb;
}

.exp-period {
    font-size: 0.85rem;
    color: #94a3b8;
}

.exp-desc {
    font-size: 0.88rem;
    color: #64748b;
    margin-top: 0.15rem;
}

.exp-desc a {
    color: #2563eb;
}

/* ── Academic service ── */

.service-list {
    list-style: disc;
    padding-left: 1.5rem;
    color: #475569;
    line-height: 1.8;
}

.service-list li {
    margin-bottom: 0.3rem;
}

/* ── Footer ── */

.page-footer {
    text-align: center;
    padding: 1.5rem;
    font-size: 0.82rem;
    color: #94a3b8;
    border-top: 1px solid #e5e7eb;
    background: #fff;
    max-width: 1100px;
    margin: 0 auto;
}

.page-footer a {
    color: #64748b;
}

/* ── Publications list page (pubcnt table) ── */

.pubcnt {
    counter-reset: rowNumber 0;
    border-collapse: separate;
    border-spacing: 0.8em;
    width: 100%;
    line-height: 1.5;
}

.pubcnt tr {
    counter-increment: rowNumber;
}

.pubcnt tr td:first-child::before {
    content: "[" counter(rowNumber) "]";
    min-width: 0.5em;
    margin-right: 0;
    white-space: nowrap;
}

.pubcnt td {
    vertical-align: top;
}

.btn {
    display: inline-block;
    padding: 1px 5px;
    font-size: 12px;
    line-height: 1.5;
    border: 1px solid #cbd5e1;
    border-radius: 3px;
    color: #475569;
    background: transparent;
    text-decoration: none;
    transition: all 0.15s;
    cursor: pointer;
}

.btn:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    text-decoration: none;
}

/* ── Responsive ── */

@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: static;
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
    }

    .sidebar-content {
        padding: 1.5rem 1rem;
    }

    .sidebar-photo {
        width: 100px;
        height: 100px;
    }

    .sidebar-nav {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 4px;
    }

    .nav-link {
        padding: 0.4rem 0.7rem;
        font-size: 0.82rem;
    }

    .main-content {
        padding: 1.5rem 1rem;
    }

    .page-footer {
        max-width: 100%;
    }
}
