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

/* the fixed navbar is shorter on small screens */
@media (max-width: 575.98px) {
    body {
        padding-top: 4rem;
    }
}

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

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

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

.navbar {
    opacity: 0.95;
}

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

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

.email-text {
    font-family: Courier, monospace;
}

.text-black {
  color: #000 !important;
}

a.text-black:link,
a.text-black:visited{
  color: #000;
  text-decoration: none;
}
a.text-black:hover,
a.text-black:active{
  color: #000;
  text-decoration: none;
}

/* ===== i18n Language Toggle ===== */
.lang-fr {
    display: none !important;
}

html.lang-active-fr .lang-en {
    display: none !important;
}

html.lang-active-fr .lang-fr {
    display: inline !important;
}

/* Language toggle switch */
.lang-toggle {
    display: inline-flex;
    align-items: center;
    border: 1px solid #d0dde8;
    border-radius: 4px;
    overflow: hidden;
    font-size: 0.8rem;
    margin-left: 0.75rem;
    cursor: pointer;
    vertical-align: middle;
}

.lang-toggle-label {
    padding: 0.2rem 0.5rem;
    color: #999;
    transition: all 0.2s ease;
    user-select: none;
    line-height: 1.4;
}

.lang-toggle-label:hover {
    color: #4a7298;
}

.lang-toggle-active {
    background-color: #4a7298;
    color: #fff !important;
    font-weight: 500;
}

.lang-toggle-divider {
    width: 1px;
    background-color: #d0dde8;
    height: 1rem;
}

/* ===== Dark theme toggle button ===== */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d0dde8;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-left: 0.5rem;
    padding: 0.2rem 0.5rem;
    color: #999;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    line-height: 1.4;
}

.theme-toggle:hover {
    color: #4a7298;
}

/* ===== Dark theme (html.theme-dark) =====
   GitHub/YouTube-style: near-black page, dark-grey cards, light text. */
html.theme-dark body,
html.theme-dark body.bg-light {
    background-color: #000 !important;
    color: #e2e2e2;
}

html.theme-dark .navbar.bg-light {
    background-color: #141414 !important;
}

html.theme-dark .navbar-light .navbar-brand,
html.theme-dark .navbar-light .navbar-nav .nav-link,
html.theme-dark .navbar-light .navbar-toggler {
    color: #d6d6d6;
}

html.theme-dark .navbar-light .navbar-brand:hover,
html.theme-dark .navbar-light .navbar-nav .nav-link:hover,
html.theme-dark .navbar-light .navbar-nav .active > .nav-link {
    color: #fff;
}

html.theme-dark .navbar-light .navbar-toggler {
    border-color: #3a3a3a;
}

html.theme-dark .card,
html.theme-dark .bg-white {
    background-color: #1a1a1a !important;
    color: #e2e2e2;
}

html.theme-dark .text-black,
html.theme-dark a.text-black:link,
html.theme-dark a.text-black:visited,
html.theme-dark a.text-black:hover,
html.theme-dark a.text-black:active {
    color: #e8e8e8 !important;
}

html.theme-dark .text-muted {
    color: #9aa0a6 !important;
}

html.theme-dark a:not(.btn):not(.nav-link):not(.text-black) {
    color: #7cb3e8;
}

html.theme-dark blockquote {
    background: #0e1c28;
    color: #b8c4cc;
}

html.theme-dark hr {
    border-top-color: #333;
}

html.theme-dark .shadow-sm {
    box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .7) !important;
}

html.theme-dark .btn-outline-dark {
    color: #d6d6d6;
    border-color: #6a6a6a;
}

html.theme-dark .btn-outline-dark:hover,
html.theme-dark .btn-outline-dark:not(:disabled):not(.disabled).active,
html.theme-dark .btn-dark {
    color: #111;
    background-color: #e8e8e8;
    border-color: #e8e8e8;
}

html.theme-dark .lang-toggle,
html.theme-dark .theme-toggle {
    border-color: #3a3a3a;
}

html.theme-dark .lang-toggle-divider {
    background-color: #3a3a3a;
}

/* CV items (education / experience) */
html.theme-dark .cv-item {
    border-bottom-color: #2a2a2a;
}

html.theme-dark .cv-item:hover {
    background: #222;
}

html.theme-dark .cv-dept,
html.theme-dark .cv-pos em {
    color: #98a2b3;
}

/* logos are transparent PNGs with dark text: give them a white tile */
html.theme-dark .cv-logo img {
    background: #fff;
    border-radius: 6px;
    padding: 5px 8px;
    box-sizing: content-box;
}

html.theme-dark .cv-date {
    color: #8fb9e8;
    background: #16243f;
    border-color: #2a3f63;
    box-shadow: none;
}

html.theme-dark .cv-date-now {
    color: #5fd0a0;
    background: #0e2a1f;
    border-color: #1e4a37;
}

/* chips & badges */
html.theme-dark .blog-chip {
    color: #aab4c8;
    background: #242424;
    border-color: #3a3a3a;
}

html.theme-dark .pub-badge {
    color: #8fb9e8;
    background: #16243f;
}

/* publications list */
html.theme-dark .pub-item {
    border-bottom-color: #2a2a2a;
}

html.theme-dark .pub-item:hover {
    background: #222;
}

html.theme-dark .pub-venue,
html.theme-dark .pub-abstract {
    color: #98a2b3;
}

html.theme-dark .pub-cover-placeholder {
    color: #5d6878;
    background: linear-gradient(135deg, #20242c, #181b21);
}

html.theme-dark .pub-links a {
    color: #8fb9e8;
    border-color: #2a3f63;
}

html.theme-dark .pub-links a:hover {
    background: #2b4acb;
    color: #fff;
}

html.theme-dark .pub-year-card {
    box-shadow: 0 4px 16px rgba(0, 0, 0, .55);
}

/* highlighted self-author in publication author lists */
.author-self {
    font-weight: 700;
}

html.theme-dark .text-body {
    color: #e2e2e2 !important;
}

html.theme-dark mark {
    background-color: #3a3320;
    color: #e2e2e2;
}

/* ===== Playground (dark) ===== */
/* canvases whose renderers are theme-aware (JS picks light colors on dark) */
html.theme-dark #gol-canvas,
html.theme-dark #gd-canvas {
    background: #101216 !important;
}

html.theme-dark .cf-canvas,
html.theme-dark .wv-canvas,
html.theme-dark .dg-canvas {
    background: #101216 !important;
    box-shadow: 0 6px 22px rgba(0, 0, 0, .5) !important;
}

/* output canvases waiting for content */
html.theme-dark #ddpm-canvas,
html.theme-dark #style-out {
    background: #26282d !important;
}

html.theme-dark #style-src,
html.theme-dark #style-out,
html.theme-dark #style-painting {
    border-color: #3a3a3a !important;
}

/* the symmetry canvas intentionally stays white: it is the drawing paper */

/* side panels */
html.theme-dark .dg-panel,
html.theme-dark .st-panel,
html.theme-dark .wv-panel {
    background: #222 !important;
    border-color: #333 !important;
}

html.theme-dark #dog-area .dg-row:hover {
    background: #2b2b2b;
}

html.theme-dark #dog-area .dg-row input[type=range] {
    background: #3a3f4a;
}

html.theme-dark #dog-area .dg-progress,
html.theme-dark #style-area .st-progress,
html.theme-dark #w2v-area .wv-bar {
    background: #333;
}

html.theme-dark #w2v-area .wv-chip {
    background: #2a2a2a;
    border-color: #3a3a3a;
    color: #d6d6d6;
}

html.theme-dark #style-area .st-thumb {
    border-color: #3a3a3a !important;
}

/* ===== Mobile layout (phones) ===== */
@media (max-width: 575.98px) {
    /* tighter cards: the p-4 padding wastes a third of a phone screen */
    .card-body.p-4 {
        padding: 1.1rem !important;
    }

    h1, .h1 {
        font-size: 2rem;
    }

    /* education / experience rows: small logo, title + date wrap */
    .cv-item {
        gap: .6rem;
        padding: .7rem .15rem;
    }

    .cv-logo {
        flex: 0 0 64px;
    }

    .cv-logo img {
        height: 40px;
        max-width: 64px;
    }

    .cv-title {
        font-size: .92rem;
    }

    .cv-body > .d-flex {
        flex-wrap: wrap;
    }

    .cv-date {
        margin-left: 0;
        margin-top: .3rem;
        order: 2;
    }

    /* publications: stack the cover above the text */
    .pub-item {
        flex-direction: column;
    }

    .pub-cover {
        flex: 0 0 auto;
        text-align: center;
    }

    .pub-cover img {
        width: 100%;
        max-width: 240px;
    }
}
