/* ==========================================================================
   Tokens
   ========================================================================== */
:root {
    --text: #3d4144;
    --text-strong: #2c3e50;
    --muted: #7a8288;
    --link: #2f6f9f;
    --link-hover: #1c4c73;
    --border: #e6e8ea;
    --bg: #fff;
    --accent: #2c3e50;

    --sidebar-width: 240px;
    --content-max: 760px;
    --masthead-height: 56px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text);
    background-color: var(--bg);
    -webkit-font-smoothing: antialiased;
    overflow-wrap: break-word;
}

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

a:hover { color: var(--link-hover); text-decoration: underline; }

p { margin: 0 0 1.1em; }

/* ==========================================================================
   Masthead
   ========================================================================== */
.masthead {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: saturate(180%) blur(8px);
    border-bottom: 1px solid var(--border);
}

.masthead__inner {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
    min-height: var(--masthead-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.masthead__title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-strong);
    letter-spacing: -0.01em;
}

.masthead__title:hover { text-decoration: none; color: var(--link); }

.masthead__nav {
    display: flex;
    gap: 22px;
    font-size: 0.875rem;
}

.masthead__nav a {
    color: var(--muted);
    font-weight: 500;
    padding: 6px 0;
    border-bottom: 2px solid transparent;
}

.masthead__nav a:hover {
    color: var(--text-strong);
    text-decoration: none;
    border-bottom-color: var(--accent);
}

/* ==========================================================================
   Layout
   ========================================================================== */
#main {
    max-width: 1140px;
    margin: 0 auto;
    padding: 40px 24px 24px;
    display: flex;
    align-items: flex-start;
    gap: 48px;
}

.page {
    flex: 1 1 auto;
    min-width: 0;
    max-width: var(--content-max);
}

/* ==========================================================================
   Sidebar / author profile
   ========================================================================== */
.sidebar {
    flex: 0 0 var(--sidebar-width);
    width: var(--sidebar-width);
    position: sticky;
    top: calc(var(--masthead-height) + 24px);
    font-size: 0.875rem;
}

.author__avatar {
    display: block;
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    border: 1px solid var(--border);
    margin-bottom: 16px;
}

.author__name {
    margin: 0 0 2px;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--text-strong);
}

.author__bio {
    margin: 0 0 16px;
    color: var(--muted);
    font-size: 0.875rem;
}

.author__urls {
    list-style: none;
    margin: 0;
    padding: 14px 0 0;
    border-top: 1px solid var(--border);
}

.author__urls li {
    margin-bottom: 8px;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.author__urls a { color: var(--text); }
.author__urls a:hover { color: var(--link); text-decoration: none; }

.ic {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    fill: currentColor;
    vertical-align: -3px;
}

/* ==========================================================================
   Content
   ========================================================================== */
.page__content h1 {
    font-family: "Lora", Georgia, serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-strong);
    margin: 2.4em 0 0.7em;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
    scroll-margin-top: calc(var(--masthead-height) + 16px);
}

.page__content h1:first-child { margin-top: 0; }

.research-topics {
    list-style: none;
    padding-left: 0;
    margin: 0 0 1.2em;
}

.research-topics li {
    position: relative;
    padding-left: 18px;
    margin-bottom: 0.7em;
}

.research-topics li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.72em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
}

/* News */
.news-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.news-list li { margin-bottom: 0.6em; }

.news-list strong:first-child {
    color: var(--text-strong);
    font-variant-numeric: tabular-nums;
}

.first-author-note {
    color: var(--accent);
    font-weight: 600;
}

.news-disclosure { margin-top: 0.6em; }

.news-disclosure summary {
    cursor: pointer;
    list-style: none;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--muted);
    padding: 4px 0;
}

.news-disclosure summary::-webkit-details-marker { display: none; }
.news-disclosure summary:hover { color: var(--text-strong); }

.news-disclosure .news-disclosure__hide,
.news-disclosure[open] .news-disclosure__show { display: none; }
.news-disclosure[open] .news-disclosure__hide { display: inline; }

.news-disclosure > ul { margin-top: 0.8em; }

/* Experience / education entries */
.exp {
    display: flex;
    gap: 16px;
    margin-bottom: 2em;
}

.exp__logo {
    flex: 0 0 84px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 4px;
}

.exp__logo img {
    max-width: 84px;
    max-height: 34px;
    object-fit: contain;
}

.exp__body { min-width: 0; }

.exp__head {
    margin-bottom: 0.15em;
    color: var(--text-strong);
}

.exp__date {
    float: right;
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 400;
    white-space: nowrap;
    padding-left: 12px;
}

.exp__meta {
    margin-bottom: 0.8em;
    color: var(--muted);
    font-size: 0.9rem;
}

.edu { margin-bottom: 1.6em; }

/* Publications */
.pub-list {
    padding-left: 1.2em;
    margin: 0;
}

.pub-list li { margin-bottom: 0.9em; }

.closing {
    margin-top: 2.4em;
    padding-top: 1.4em;
    border-top: 1px solid var(--border);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.page__footer {
    margin-top: 48px;
    padding: 28px 24px;
    border-top: 1px solid var(--border);
    background: #fafbfc;
    text-align: center;
    color: var(--muted);
    font-size: 0.85rem;
}

.page__footer .social-icons {
    list-style: none;
    margin: 0 0 10px;
    padding: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.page__footer .social-icons a { color: var(--muted); }
.page__footer .social-icons a:hover { color: var(--link); text-decoration: none; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
    #main {
        display: block;
        padding-top: 28px;
    }

    .sidebar {
        position: static;
        width: 100%;
        max-width: none;
        margin-bottom: 32px;
        padding-bottom: 24px;
        border-bottom: 1px solid var(--border);
        text-align: center;
    }

    .author__avatar { margin: 0 auto 14px; }

    .author__urls {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px 22px;
    }

    .author__urls li { margin-bottom: 0; }
}

@media (max-width: 600px) {
    body { font-size: 15px; }

    .masthead__inner {
        flex-direction: column;
        align-items: center;
        gap: 4px;
        padding: 10px 18px;
        text-align: center;
    }

    .masthead__nav {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 6px 16px;
    }

    .masthead__nav a { padding: 2px 0; }

    #main { padding-left: 18px; padding-right: 18px; }

    .page__content h1 { font-size: 1.3rem; }

    .exp { display: block; }

    .exp__logo {
        justify-content: flex-start;
        margin-bottom: 12px;
    }

    .exp__date {
        float: none;
        display: block;
        padding-left: 0;
    }
}
