@charset "utf-8";
/* Phone and small-tablet layout. Desktop (md and up) keeps the original theme;
   these rules only reflow content on narrow screens. */

/* Author-list folding controls (authors.js): only ever shown on phones. */
.pub-author-gap,
.pub-authors-toggle { display: none; }

.pub-authors-toggle {
    margin: 0 .2rem;
    padding: 0 .55rem;
    border: 0;
    border-radius: 999px;
    color: var(--accent-text);
    background-color: rgba(var(--accent-rgb), .08);
    font-size: .75rem;
    line-height: 1.6;
    vertical-align: baseline;
}
.pub-authors-toggle:focus { outline: none; }
.pub-authors-toggle:focus-visible { box-shadow: 0 0 0 2px rgba(var(--accent-rgb), .35); }

@media (max-width: 767.98px) {
    body { padding-top: 4.25rem; }

    /* Profile hero: avatar on top, name centred under it */
    .profile-hero {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .profile-avatar { order: -1; margin-bottom: 1.1rem; }
    .profile-avatar-ring img { width: 96px; height: 96px; border-width: 3px; }
    .profile-name {
        margin-bottom: .9rem;
        font-size: clamp(1.85rem, 8.2vw, 2.4rem);
        line-height: 1.15;
    }
    .text-profile-bio { font-size: 1.02rem; line-height: 1.7; }
    .text-profile-bio p { margin-bottom: .85rem; }
    .js .profile-divider { transform-origin: center; }
    .profile-links { justify-content: center; }
    .profile-link { padding: .5rem 1.05rem; }

    /* Publications: cover on top as a banner, then the text */
    .pub-cover img,
    .pub-cover svg {
        max-height: 190px;
        object-fit: contain;
        background-color: #fff;
    }
    .pub-title { font-size: 1.08rem; line-height: 1.4; }
    .pub-item .small { font-size: 85%; line-height: 1.55; }

    /* Long author lists fold behind a toggle (authors.js) */
    .pub-authors.is-collapsible:not(.is-expanded) .pub-author--extra { display: none; }
    .pub-authors.is-collapsible:not(.is-expanded) .pub-author-gap { display: inline; }
    .pub-authors.is-collapsible .pub-authors-toggle { display: inline-block; }

    /* Back-to-top sits a little tighter to the corner */
    .back-to-top { right: .9rem; bottom: .9rem; width: 44px; height: 44px; }
}

@media (max-width: 575.98px) {
    .profile-card .card-body { padding: 1.75rem 1.25rem !important; }

    /* Education / experience: the date drops under the position */
    .exp-item { margin-bottom: .6rem !important; }
    .exp-item .exp-logo { width: 34px; margin-right: .65rem !important; }
    .exp-meta { flex-wrap: wrap; }
    .exp-meta .exp-date {
        flex-basis: 100%;
        margin-top: .05rem !important;
        margin-left: 0 !important;
        color: #6c757d;
    }

    /* News: the year becomes a label, each date leads its line */
    .news-year-group { display: block; }
    .news-year {
        margin: .55rem 0 .15rem !important;
        font-size: .78rem;
        font-weight: 700;
        letter-spacing: .08em;
    }
    .news-item { align-items: baseline; }
    .news-item .news-date {
        order: -1;
        flex: 0 0 3.3rem;
        margin: 0 .5rem 0 0 !important;
        font-size: .8rem;
    }

    /* Footer: stack and centre */
    .footer .text-muted { font-size: .9rem; }
}
