@charset "utf-8";
:root {
    --page-bg: #f8f9fa;
    --surface: #ffffff;
    --surface-muted: #f8f9fa;
    --text: #212529;
    --text-muted: #6c757d;
    --border: #dee2e6;
    --link: #276fbf;
    --link-hover: #0056b3;
    --nav-bg: rgba(255, 255, 255, 0.78);
}

[data-theme="dark"] {
    --page-bg: #0f141b;
    --surface: #171e27;
    --surface-muted: #202936;
    --text: #e7edf5;
    --text-muted: #aab6c5;
    --border: #344052;
    --link: #72b7ff;
    --link-hover: #a6d2ff;
    --nav-bg: rgba(15, 20, 27, 0.82);
}

html {
    color-scheme: light;
}

html[data-theme="dark"] {
    color-scheme: dark;
    background-color: var(--page-bg);
}

body {
    font-family: "Lato", sans-serif;
    font-weight: 400;
    padding-top: 5.0rem;
    color: var(--text);
    background-color: var(--page-bg) !important;
    transition: color 0.2s ease, background-color 0.2s ease;
}

body.no-navbar {
    padding-top: 1rem;
}

.no-navbar .profile-sidebar {
    top: 1rem !important;
}

.no-navbar .page-section {
    scroll-margin-top: 1rem;
}

html {
    scroll-behavior: smooth;
}

.page-section {
    scroll-margin-top: 5.5rem;
}

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

.panel-title {
    font-family: "Fira Sans", "Lato", sans-serif;
    font-size: 1.5rem !important;
    letter-spacing: 0.025em;
    margin-bottom: 1rem !important;
}

.panel-title.border-bottom {
    margin-bottom: 0 !important;
}

.panel-title > i {
    margin-right: 0.45rem;
    color: #276fbf;
    font-size: 0.82em;
}

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

.profile-figure {
    text-align: center;
}

.profile-portrait {
    display: block;
    margin: 0 auto;
    max-width: 70px;
    width: 100%;
}

.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;
}

.text-profile-bio p:last-child {
    margin-bottom: 0;
}

.navbar {
    background-color: var(--nav-bg) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.theme-toggle {
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 50%;
    cursor: pointer;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
    color: var(--link);
    background-color: var(--surface-muted);
    outline: none;
}

.theme-toggle-sidebar {
    width: 100%;
    height: auto;
    padding: 0.6rem 0.75rem;
    color: #495057;
    background-color: #f8f9fa;
    border-color: #e9ecef;
    border-radius: 0.55rem;
    font-size: 0.9rem;
    font-weight: 700;
}

.theme-toggle-sidebar i {
    width: 1rem;
    margin-right: 0.35rem;
    text-align: center;
}

[data-theme="dark"] .navbar-light .navbar-brand,
[data-theme="dark"] .navbar-light .navbar-nav .nav-link,
[data-theme="dark"] .navbar-light .navbar-toggler {
    color: var(--text);
}

[data-theme="dark"] .navbar-light .navbar-nav .nav-link:hover,
[data-theme="dark"] .navbar-light .navbar-nav .active > .nav-link {
    color: var(--link);
}

[data-theme="dark"] body.bg-light {
    background-color: var(--page-bg) !important;
}

[data-theme="dark"] .card,
[data-theme="dark"] .bg-white,
[data-theme="dark"] .list-group-item,
[data-theme="dark"] .dropdown-menu,
[data-theme="dark"] .modal-content {
    color: var(--text);
    background-color: var(--surface) !important;
    border-color: var(--border);
}

[data-theme="dark"] .text-dark { color: var(--text) !important; }
[data-theme="dark"] .text-muted { color: var(--text-muted) !important; }
[data-theme="dark"] .border,
[data-theme="dark"] .border-top,
[data-theme="dark"] .border-bottom { border-color: var(--border) !important; }
[data-theme="dark"] a { color: var(--link); }
[data-theme="dark"] a:hover { color: var(--link-hover); }

[data-theme="dark"] .shadow-sm,
[data-theme="dark"] .shadow {
    box-shadow: 0 0.25rem 0.8rem rgba(0, 0, 0, 0.35) !important;
}

[data-theme="dark"] .badge-light {
    color: var(--text);
    background-color: var(--surface-muted);
}

[data-theme="dark"] .form-control {
    color: var(--text);
    background-color: var(--surface-muted);
    border-color: var(--border);
}

[data-theme="dark"] .form-control:focus {
    color: var(--text);
    background-color: var(--surface-muted);
    border-color: var(--link);
}

[data-theme="dark"] .section-nav { border-color: var(--border); }
[data-theme="dark"] .section-nav-link {
    color: var(--text-muted);
    background-color: var(--surface-muted);
    border-color: var(--border);
}

[data-theme="dark"] .section-nav-link:hover,
[data-theme="dark"] .section-nav-link.active {
    color: var(--link-hover);
    background-color: #182d43;
    border-color: #31577d;
}

[data-theme="dark"] .theme-toggle-sidebar {
    color: var(--text-muted);
    background-color: var(--surface-muted);
    border-color: var(--border);
}

[data-theme="dark"] .theme-toggle-sidebar:hover,
[data-theme="dark"] .theme-toggle-sidebar:focus-visible {
    color: var(--link-hover);
    background-color: #182d43;
    border-color: #31577d;
}

[data-theme="dark"] .experience-description,
[data-theme="dark"] .experience-description strong,
[data-theme="dark"] .project-description {
    color: var(--text);
}

@media (max-width: 575.98px) {
    .theme-toggle {
        margin: 0.5rem 0;
    }
}

.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%;
}

.publication-authors,
.publication-venue {
    font-size: 0.95rem;
    line-height: 1.45;
}

.publication-mobile-surface {
    background-color: rgba(255, 255, 255, 0.9);
}

[data-theme="dark"] .publication-authors .text-body,
[data-theme="dark"] .publication-venue,
[data-theme="dark"] .publication-venue strong {
    color: var(--text) !important;
}

[data-theme="dark"] .publication-mobile-surface {
    background-color: rgba(23, 30, 39, 0.94);
}

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

.section-nav {
    display: grid;
    gap: 0.45rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e9ecef;
}

.section-nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-width: 0;
    padding: 0.55rem 0.75rem;
    color: #495057;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 0.55rem;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    text-decoration: none !important;
    transition: color 0.2s ease, background-color 0.2s ease,
                border-color 0.2s ease, transform 0.2s ease,
                box-shadow 0.2s ease;
}

.section-nav-link i {
    width: 1rem;
    text-align: center;
}

.section-nav-link:hover,
.section-nav-link.active {
    color: #0056b3;
    background-color: #eef5ff;
    border-color: #cfe2ff;
}

.section-nav-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 0.2rem 0.45rem rgba(0, 0, 0, 0.06);
}

.section-nav-link.active {
    box-shadow: none;
}

.experience-description {
    color: #495057;
    font-size: 90%;
    line-height: 1.5;
}

.experience-description.prose-description {
    max-width: 75ch;
}

.experience-description ul {
    margin: 0;
    padding-left: 1.25rem;
    list-style-type: disc;
}

.experience-description li + li {
    margin-top: 0.35rem;
}

.experience-description strong {
    color: #212529;
    font-weight: 900;
}

.teaching-list {
    margin-top: 0.15rem;
    margin-bottom: 0;
    padding-left: 1.25rem;
}

.teaching-list li + li {
    margin-top: 0.2rem;
}

.teaching-item {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 0.2rem 0;
}

.teaching-date {
    color: inherit;
    font-style: italic;
    white-space: nowrap;
}

@media (max-width: 767.98px) {
    .profile-sidebar {
        position: static !important;
    }

    .section-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.5rem;
    }

    .section-nav-link {
        justify-content: center;
        padding: 0.6rem 0.4rem;
        font-size: 0.85rem;
    }

    .teaching-item {
        display: block;
    }

    .teaching-date {
        display: block;
        margin-top: 0.1rem;
        white-space: normal;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .section-nav-link {
        transition: none;
    }
}

.experience-card {
    font-size: 1.1rem;
}

.experience-card h6 {
    font-size: 1.25rem;
}

.experience-card .small,
.experience-card .experience-description {
    font-size: 0.9rem;
}

.projects-card {
    font-size: 1.1rem;
}

.projects-card h6 {
    font-size: 1.25rem;
}

.project-heading {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1.2;
}

.project-description {
    color: #212529;
    font-size: 0.95rem;
    line-height: 1.45;
    margin-top: 0.55rem;
}

.project-description ul {
    margin: 0;
    padding-left: 1.25rem;
    list-style-type: disc;
}

.project-description li + li {
    margin-top: 0.35rem;
}

.project-media {
    margin: 1rem auto 0;
    max-width: 28rem;
}

.project-media img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 0.55rem;
}

.project-links {
    font-size: 0.95rem;
    margin-top: 0.35rem;
}

.service-card {
    font-size: 1.1rem;
}

.service-content {
    font-size: 0.95rem;
    line-height: 1.45;
}

.service-group + .service-group {
    margin-top: 1.4rem;
}

.service-group h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.service-group ul {
    list-style-type: disc;
    margin: 0;
    padding-left: 1.3rem;
}

.service-group li + li {
    margin-top: 0.3rem;
}
