@charset "utf-8";
:root {
    --evan-navbar-bg: rgba(255, 255, 255, 0.90);
    --evan-navbar-link: #495057;
    --evan-navbar-link-hover: #111111;
    --evan-navbar-active: #111111;
    --publication-title-font-size: 1.15rem;
}

body {
    font-family: "Lato", sans-serif;
    font-weight: 400;
    padding-top: 5.0rem;
    position: relative;
    background: linear-gradient(180deg, #f9fbff 0%, #eef3f9 100%);
}

body.site-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-main {
    flex: 1 0 auto;
}

.site-footer {
    background: transparent;
    border-top: 0;
}

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

.experience-section-title {
    font-size: 1.1rem;
}

.navbar {
    background-color: var(--evan-navbar-bg) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: none !important;
}

.navbar-light .navbar-nav .nav-link {
    color: var(--evan-navbar-link);
}

.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link:focus,
.navbar-light .navbar-brand:hover,
.navbar-light .navbar-brand:focus {
    color: var(--evan-navbar-link-hover);
}

.navbar-light .navbar-nav .nav-item.active .nav-link,
.navbar .nav-item.active .nav-link {
    color: var(--evan-navbar-active);
    font-weight: 600;
}

.navbar-light .navbar-brand,
.navbar-light .navbar-brand strong {
    color: var(--evan-navbar-link);
}

.navbar-light .navbar-toggler,
.navbar-light .navbar-toggler:focus {
    color: var(--evan-navbar-link);
    border-color: rgba(127, 161, 133, 0.35);
    box-shadow: none;
}

/* Site-wide language visibility */
html.lang-active-en .lang-zh,
html.lang-active-zh .lang-en {
    display: none !important;
}

.lang-en {
    line-height: 1.6;
}

.lang-zh {
    font-family: "LXGW WenKai", "Kaiti SC", "STKaiti", serif;
    line-height: 1.7;
}

.profile-name-text {
    line-height: inherit;
}

.profile-name-zh {
    font-family: "Zhi Mang Xing", cursive;
    font-size: 1.3em;
    font-weight: 400;
    line-height: 0.9;
}

html.lang-active-zh .profile-name-heading {
    margin-bottom: 0.1rem;
}

/* Compact segmented language control in the top-right corner */
.lang-toggle {
    display: inline-flex;
    align-items: center;
    height: 2rem;
    border: 0;
    background: transparent;
}

.lang-toggle-label {
    position: relative;
    top: 1px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 2rem;
    min-width: 1.8rem;
    padding: 0.1rem 0.3rem;
    border: 0;
    background: transparent;
    color: #9299a1;
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: color 0.18s ease;
}

.lang-toggle-label:hover {
    color: #1f4f78;
}

.lang-toggle-label:focus-visible {
    position: relative;
    z-index: 1;
    outline: 2px solid #477aa5;
    outline-offset: -2px;
}

.lang-toggle-label.lang-toggle-active {
    background: transparent;
    color: #315f86;
    font-weight: 800;
}

.lang-toggle-divider {
    width: 1px;
    height: 0.75rem;
    background: rgba(73, 80, 87, 0.18);
}

.navbar-actions {
    flex: 0 0 auto;
    height: 2rem;
}

@media (min-width: 576px) {
    .navbar-actions {
        padding-left: 0.8rem;
    }

    .navbar .navbar-collapse,
    .navbar .navbar-nav {
        align-items: center;
    }

    .navbar-light .navbar-nav .nav-link {
        display: inline-flex;
        align-items: center;
        height: 2rem;
        padding-top: 0;
        padding-bottom: 0;
        line-height: 1.25rem;
    }
}

@media (max-width: 575.98px) {
    .navbar-brand {
        max-width: calc(100% - 9.5rem);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .navbar-toggler {
        padding: 0.35rem 0.5rem;
        font-size: 0.875rem;
    }
}

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

.publication-cover-stack {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.publication-cover-image {
    display: block;
    height: auto;
    object-fit: contain;
}

.cover-motion {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #111;
}

.cover-motion video,
.cover-motion canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.publication-cover-stack-mobile {
    width: 100%;
}

.publication-title {
    font-size: var(--publication-title-font-size);
}

.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-note {
    display: block;
    color: #234AE2;
    font-size: 90%;
    font-weight: 700;
    line-height: 1.2;
    margin-top: 3px;
    margin-bottom: 3px;
}

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

.experience-inline-logo {
    height: 24px;
    width: auto;
    flex-shrink: 0;
}

/* Showcase hub */
.showcase-content-10 { width: 83.333333%; margin-right: auto; margin-left: auto; }
.showcase-intro { overflow: hidden; }
.showcase-kicker { color: #6d7f91; font-size: .76rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.showcase-intro .lead { font-size: 1.08rem; line-height: 1.8; }
.showcase-portal { display: block; height: 390px; overflow: hidden; position: relative; border-radius: .8rem; color: #fff; box-shadow: 0 .3rem 1rem rgba(24, 35, 48, .12); }
.showcase-portal-compact { height: 320px; }
.showcase-portal:hover { color: #fff; text-decoration: none; }
.showcase-portal img { width: 100%; height: 100%; object-fit: cover; transition: transform .55s ease; }
.showcase-portal-projects img { object-position: center; }
.showcase-portal:hover img { transform: scale(1.035); }
.showcase-portal-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7,15,25,.05) 25%, rgba(7,15,25,.9) 100%); }
.showcase-portal-content { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 2.25rem; }
.showcase-portal-index { position: absolute; top: 2rem; left: 2.25rem; font: 700 .85rem "Source Code Pro", monospace; letter-spacing: .12em; }
.showcase-portal-title { font-size: 2.35rem; font-weight: 800; }
.showcase-portal-compact .showcase-portal-title { font-size: 1.75rem; line-height: 1.15; }
.showcase-portal-description { max-width: 390px; margin: .5rem 0 1.4rem; color: rgba(255,255,255,.82); }
.showcase-portal-link, .project-card-link { font-weight: 700; }

/* Project and portfolio collections */
.collection-header { max-width: 760px; padding: 1.5rem 0 2.25rem; }
.collection-back { color: #5f6d7a; font-weight: 700; }
.collection-back:hover { color: #111; text-decoration: none; }
.project-card { height: 100%; overflow: hidden; color: inherit; transition: transform .25s ease, box-shadow .25s ease; }
.project-card:hover { color: inherit; text-decoration: none; transform: translateY(-4px); box-shadow: 0 .7rem 1.6rem rgba(24,35,48,.15) !important; }
.project-card-media { height: 190px; overflow: hidden; background: #e8edf3; }
.project-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.project-card-video { height: 100%; }
.project-card:hover img { transform: scale(1.025); }
.project-card-meta { color: #718096; font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.project-detail { max-width: 1040px; margin: 1.5rem auto 0; }
.project-detail-header { max-width: 820px; padding: 3rem 0 2rem; }
.project-hero { width: 100%; max-height: 620px; object-fit: contain; background: #fff; }
.project-detail-body { max-width: 820px; margin: 2rem auto; padding: 2.5rem; font-size: 1.05rem; line-height: 1.75; }
.project-detail-body h2 { margin-top: 2rem; font-size: 1.45rem; }
.globe-section { position: relative; min-height: 540px; margin-bottom: 2.5rem; overflow: hidden; border-radius: .8rem; background: radial-gradient(circle at 48% 44%, #182d43 0, #0b1724 48%, #050b12 100%); box-shadow: 0 .5rem 1.8rem rgba(6,16,26,.22); }
.globe-stage { height: 540px; }
.globe-stage svg { display: block; width: 100%; height: 100%; cursor: grab; }
.globe-stage svg:active { cursor: grabbing; }
.globe-loading { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255,255,255,.55); font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; }
.globe-ocean { fill: #102c46; stroke: rgba(125,190,230,.4); stroke-width: 1.2; }
.globe-country { fill: #31556c; stroke: #7091a5; stroke-width: .45; }
.globe-marker { cursor: pointer; outline: none; }
.globe-marker-core { fill: #ffd84a; stroke: #fff5bc; stroke-width: 1.5; }
.globe-marker-pulse { fill: rgba(255,216,74,.22); stroke: rgba(255,216,74,.75); stroke-width: 1; transform-box: fill-box; transform-origin: center; animation: globePulse 2s ease-out infinite; }
.globe-marker text { fill: #fff; font-size: 13px; font-weight: 700; paint-order: stroke; stroke: #07111b; stroke-width: 3px; opacity: 0; pointer-events: none; transition: opacity .2s ease; }
.globe-marker:hover text, .globe-marker:focus text, .globe-marker.active text { opacity: 1; }
.globe-marker.active .globe-marker-core { fill: #fff; stroke: #ffd84a; stroke-width: 3; }
@keyframes globePulse { 0% { transform: scale(.45); opacity: 1; } 80%, 100% { transform: scale(1.4); opacity: 0; } }
.globe-city-list { position: absolute; top: 1.25rem; left: 1.25rem; z-index: 2; display: flex; flex-direction: column; gap: .45rem; }
.globe-city-list button { display: flex; align-items: center; gap: .7rem; min-width: 170px; padding: .65rem .8rem; border: 1px solid rgba(255,255,255,.12); border-radius: .55rem; background: rgba(5,13,22,.55); backdrop-filter: blur(8px); color: #fff; text-align: left; transition: background .2s ease, border-color .2s ease; }
.globe-city-list button:hover, .globe-city-list button.active { background: rgba(35,57,73,.88); border-color: #ffd84a; }
.globe-city-list small { display: block; color: rgba(255,255,255,.58); font-size: .7rem; }
.city-marker-dot { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: #ffd84a; box-shadow: 0 0 0 4px rgba(255,216,74,.15); }
.globe-hint { position: absolute; right: 1.25rem; bottom: 1rem; margin: 0; color: rgba(255,255,255,.58); font-size: .78rem; }
.city-section { margin-bottom: 4rem; }
.city-section[hidden] { display: none !important; }
.city-heading { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin-bottom: 1.5rem; }
.city-heading h2 { font-size: 2.5rem; }
.city-heading > p { max-width: 460px; color: #6c757d; }
.portfolio-grid { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: 250px; gap: 1rem; }
.portfolio-photo { grid-column: span 4; position: relative; overflow: hidden; margin: 0; border-radius: .8rem; background: #dfe5eb; }
.portfolio-photo-wide { grid-column: span 8; }
.portfolio-photo-tall { grid-row: span 2; }
.portfolio-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.portfolio-photo:hover img { transform: scale(1.035); }
.portfolio-photo figcaption { position: absolute; inset: auto 0 0; display: flex; flex-direction: column; padding: 3rem 1.25rem 1.15rem; color: #fff; background: linear-gradient(transparent, rgba(5,10,15,.8)); }
.portfolio-photo figcaption span { margin-top: .2rem; color: rgba(255,255,255,.75); font-size: .9rem; }
.portfolio-empty { min-height: 220px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: .8rem; color: #8a98a6; }
.portfolio-empty i { font-size: 2rem; }

@media (max-width: 767.98px) {
    .showcase-content-10 { width: 100%; }
    .showcase-portal { height: 340px; }
    .showcase-portal-content { padding: 1.5rem; }
    .showcase-portal-index { top: 1.5rem; left: 1.5rem; }
    .showcase-portal-title { font-size: 2rem; }
    .project-card-media { height: 210px; }
    .project-detail-body { padding: 1.5rem; }
    .city-heading { display: block; }
    .portfolio-grid { display: block; }
    .portfolio-photo { height: 430px; margin-bottom: 1rem; }
    .globe-section { min-height: 470px; }
    .globe-stage { height: 470px; }
    .globe-city-list { top: .8rem; left: .8rem; }
    .globe-city-list button { min-width: 145px; padding: .5rem .65rem; }
    .globe-hint { right: .8rem; bottom: .7rem; left: .8rem; text-align: right; }
}
