@charset "utf-8";
body {
    font-family: "Lato", sans-serif;
    font-weight: 400;
    padding-top: 5.0rem;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-weight: 700;
}

.card {
    border-radius: 0.8rem!important;
}

.card-img-overlay {
    border-radius: 0.8rem!important;
}

.rounded-xl {
    border-radius: 0.8rem!important;
}

.rounded-xl-bottom {
    border-bottom-right-radius: 0.8rem !important;
    border-bottom-left-radius: 0.8rem !important;
}

.rounded-xl-top {
    border-top-left-radius: 0.8rem !important;
    border-top-right-radius: 0.8rem !important;
}


.text-profile-position {
    font-weight: 400;
}

.text-profile-bio {
    /* font-family: "Raleway"; */
    font-weight: 400;
}

.navbar {
    background-color: rgba(255, 255, 255, 0.6) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.inline-badge {
    height: 16px;
    vertical-align: -10%;
    margin-right: 2px;
    line-break: unset;
}

.no-break {
    white-space: nowrap;
}

.cover-image {
    width: 180px;
    max-height: 120px;
}

.abstract-body {
    min-height: 100px;
}

img.lazy {
    background-image: url('images/loading.gif');
    background-repeat: no-repeat;
    background-position: 50% 50%;
    background-size: 50px 50px;
    min-height: 80px;
}

div.lazy {
    background-image: url('images/loading.gif');
    background-repeat: no-repeat;
    background-position: 50% 50%;
    background-size: 50px 50px;
    min-height: 80px;
}

.badge-publication {
    font-size: 100%;
}

.email-text {
    font-family: Source Code Pro, monospace;
}

.carousel button {
    -webkit-appearance: none;
    appearance: none;
    border-radius: 0;
    box-shadow: none;
}

.carousel button:focus {
    outline: none;
}

.carousel-control-prev,
.carousel-control-next {
    padding: 0;
    background: transparent;
    border: 0;
}

.carousel-indicators button {
    box-sizing: content-box;
    flex: 0 1 auto;
    width: 30px;
    height: 3px;
    padding: 0;
    margin: 0 3px;
    cursor: pointer;
    background-color: #fff;
    background-clip: padding-box;
    border: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    opacity: 0.5;
    transition: opacity 0.6s ease;
}

.carousel-indicators button.active {
    opacity: 1;
}

.carousel-indicators button:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.25);
}

.carousel-control-prev:focus-visible .carousel-control-prev-icon,
.carousel-control-next:focus-visible .carousel-control-next-icon {
    outline: 2px solid #fff;
    outline-offset: 4px;
    border-radius: 2px;
    box-shadow: 0 0 0 6px rgba(0, 0, 0, 0.25);
}

@media (prefers-reduced-motion: reduce) {
    .carousel-indicators button {
        transition: none;
    }
}

/* News: one row per item, date column on the left, year as a section label */
.news-list {
    padding: 0 1.25rem 0.75rem;
}
.news-year {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 0 0.25rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #007bff;
}
.news-year::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e9ecef;
}
.news-item {
    display: flex;
    gap: 1rem;
    padding: 0.6rem 0;
    font-size: 0.92rem;
    line-height: 1.55;
}
.news-item + .news-item {
    border-top: 1px dashed #e9ecef;
}
.news-date {
    flex: 0 0 3.4rem;
    padding-top: 0.08rem;
    font-size: 0.82rem;
    color: #6c757d;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.news-text {
    flex: 1;
    min-width: 0;
    color: #343a40;
}

/* Research levels in About Me: level tag on the left, same rhythm as the news list */
.research-levels {
    margin: 0.25rem 0 0.5rem;
}
.research-level {
    display: flex;
    gap: 1rem;
    padding: 0.7rem 0;
}
.research-level + .research-level {
    border-top: 1px dashed #e9ecef;
}
.level-tag {
    flex: 0 0 4.2rem;
    padding-top: 0.2rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #007bff;
    white-space: nowrap;
}
.level-body {
    flex: 1;
    min-width: 0;
}
@media (max-width: 575.98px) {
    .research-level {
        flex-direction: column;
        gap: 0.15rem;
    }
    .level-tag {
        flex-basis: auto;
    }
}
/* Match the level tags to the research figure's level colours */
.research-level:nth-child(1) .level-tag { color: #1f9e89; }
.research-level:nth-child(2) .level-tag { color: #2f6fde; }
.research-level:nth-child(3) .level-tag { color: #7c5ce0; }

/* ---------- Dark mode (html[data-theme="dark"]) ---------- */
[data-theme="dark"] { color-scheme: dark; }
[data-theme="dark"] body,
[data-theme="dark"] body.bg-light { background-color: #121417 !important; color: #d4d8dd; }
[data-theme="dark"] .bg-white { background-color: #1c1f24 !important; }
[data-theme="dark"] .navbar { background-color: rgba(24, 27, 31, 0.85) !important; }
[data-theme="dark"] .navbar-light .navbar-brand,
[data-theme="dark"] .navbar-light .navbar-nav .active > .nav-link { color: #f1f3f5; }
[data-theme="dark"] .navbar-light .navbar-nav .nav-link,
[data-theme="dark"] .navbar-light .navbar-toggler { color: #a9b1ba; border-color: #3a4048; }
[data-theme="dark"] .navbar-light .navbar-nav .nav-link:hover { color: #f1f3f5; }
[data-theme="dark"] a { color: #6ea8fe; }
[data-theme="dark"] .text-body { color: #d4d8dd !important; }
[data-theme="dark"] .text-muted { color: #959ea8 !important; }
[data-theme="dark"] .border-gray,
[data-theme="dark"] .border-top,
[data-theme="dark"] .border-bottom,
[data-theme="dark"] hr { border-color: #2d3239 !important; }
[data-theme="dark"] .shadow-sm { box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .45) !important; }
[data-theme="dark"] [style*="rgba(255,255,255,0.9)"] { background-color: rgba(28, 31, 36, 0.92) !important; }
[data-theme="dark"] .news-text { color: #cdd2d8; }
[data-theme="dark"] .news-date { color: #8f98a3; }
[data-theme="dark"] .news-year { color: #6ea8fe; }
[data-theme="dark"] .news-year::after { background: #2d3239; }
[data-theme="dark"] .news-item + .news-item,
[data-theme="dark"] .research-level + .research-level { border-top-color: #2d3239; }
[data-theme="dark"] .research-level:nth-child(2) .level-tag { color: #6f9cf2; }
[data-theme="dark"] .research-level:nth-child(3) .level-tag { color: #a08cf2; }
/* white-background figures: invert the research figure, dim photos and paper covers */
[data-theme="dark"] .research-figure svg { filter: invert(0.9) hue-rotate(180deg); }
[data-theme="dark"] main img { filter: brightness(0.85); }
.theme-toggle { cursor: pointer; }

/* keep anchored sections clear of the fixed navbar */
#services { scroll-margin-top: 80px; }
