/*
 * Yongcheng Huang · research portfolio, 2026
 * Deep navy atmosphere, editorial research layout, TU Delft cyan details.
 * Loaded after style.css. The interactive research views use their original
 * layouts with a dark shell and tuned contrast near the end of this file.
 */

:root {
    --bg-color: #0a0b0e;
    --surface-color: #111317;
    --surface-soft: #171b22;
    --text-color: #f3f7fb;
    --secondary-color: #969da8;
    --line-color: rgba(211, 225, 245, 0.12);
    --accent-color: #00a6d6;
    --accent-strong: #a8c8ed;
    --glow-color: rgba(0, 166, 214, 0.22);
    --font-primary: 'DM Sans', system-ui, sans-serif;
    --font-display: 'DM Sans', system-ui, sans-serif;
    --font-mono: ui-monospace, 'SFMono-Regular', Consolas, monospace;
}

html {
    color-scheme: dark;
    scroll-padding-top: 12px;
}

body {
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

::selection {
    background: rgba(0, 166, 214, 0.5);
    color: #fff;
}

.container {
    max-width: 1280px;
    padding-inline: clamp(22px, 4.2vw, 54px);
}

.skip-link {
    position: fixed;
    z-index: 500;
    top: -80px;
    left: 24px;
    padding: 12px 18px;
    border-radius: 10px;
    background: var(--accent-color);
    color: #06111a;
    font-weight: 700;
    text-decoration: none;
}

.skip-link:focus-visible {
    top: 12px;
}

a:focus-visible,
button:focus-visible,
.animation-thumbnail:focus-visible {
    outline: 2px solid #8be7ff;
    outline-offset: 5px;
}

/* A quiet navigation bar over the full-width atmosphere. */
header {
    top: 0;
    left: 0;
    width: 100%;
    min-height: 80px;
    padding: 0;
    transform: none;
    border: 0;
    border-bottom: 1px solid rgba(214, 230, 255, 0.06);
    border-radius: 0;
    background: rgba(10, 15, 24, 0.42);
    box-shadow: none;
    -webkit-backdrop-filter: blur(22px);
    backdrop-filter: blur(22px);
}

nav {
    max-width: 1280px;
    min-height: 80px;
    padding: 0 clamp(22px, 4.2vw, 54px);
}

.logo {
    display: inline-flex;
    align-items: baseline;
    color: var(--text-color);
    font-family: var(--font-display);
    font-size: 1.32rem;
    font-weight: 700;
    letter-spacing: -0.045em;
    text-decoration: none;
    white-space: nowrap;
}

.logo::after {
    content: none;
}

.logo-dot,
.hero-period {
    color: var(--accent-color);
}

.logo-descriptor {
    padding-left: 7px;
    color: #98a9b9;
    font-family: var(--font-primary);
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.025em;
}

.links {
    display: flex;
    align-items: center;
    gap: clamp(18px, 2vw, 30px);
}

.links a {
    margin: 0;
    color: #a9b8c8;
    font-size: 0.79rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.links a:hover,
.links a:focus-visible {
    color: #fff;
}

.links .nav-contact {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    min-height: 38px;
    margin-left: 7px;
    padding: 0 17px;
    border: 1px solid rgba(201, 228, 244, 0.2);
    border-radius: 999px;
    color: var(--text-color);
    transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.links .nav-contact:hover {
    border-color: var(--accent-color);
    background: rgba(0, 166, 214, 0.12);
    transform: translateY(-1px);
}

/* Overall editorial rhythm */
.container > main > section {
    padding: clamp(82px, 8vw, 112px) 0;
    border-bottom: 1px solid var(--line-color);
    scroll-margin-top: 0;
}

.section-header {
    max-width: 740px;
    margin-bottom: clamp(36px, 5vw, 62px);
    border: 0;
}

.section-kicker,
.card-label {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 22px;
    color: #8995a5;
    font-family: var(--font-primary);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.17em;
    text-transform: uppercase;
}

.section-kicker::before { content: none; }

.section-header h2 {
    color: var(--text-color);
    font-family: var(--font-display);
    font-size: clamp(2.1rem, 3.5vw, 3rem);
    font-weight: 500;
    letter-spacing: -0.045em;
    line-height: 1.16;
    text-wrap: balance;
}

.section-intro {
    max-width: 640px;
    margin-top: 25px;
    color: var(--secondary-color);
    font-size: 1.04rem;
    line-height: 1.8;
}

.section-header-split {
    max-width: none;
}

/* Full-width light field, fading into the editorial page. */
.container > main > #hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(38px, 6vw, 84px);
    min-height: 780px;
    min-height: max(740px, 100svh);
    padding: 170px 0 160px;
    border-bottom: 0;
    overflow: visible;
    isolation: isolate;
    text-align: left;
}

#hero::before,
.hero-atmosphere {
    position: absolute;
    z-index: -2;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 100vw;
    height: auto;
    border: 0;
    border-radius: 0;
    aspect-ratio: auto;
    transform: translateX(-50%);
    pointer-events: none;
}

#hero::before {
    background:
        radial-gradient(ellipse at 50% 0%, rgba(63, 107, 163, .45), transparent 64%),
        radial-gradient(ellipse at 88% 28%, rgba(47, 89, 139, .4), transparent 47%),
        linear-gradient(180deg, #14263d 0%, #142234 36%, #0e1621 68%, #0a0b0e 100%);
    content: '';
}

.hero-atmosphere {
    z-index: -1;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(#000 15%, rgba(0,0,0,.8) 55%, transparent 95%);
    mask-image: linear-gradient(#000 15%, rgba(0,0,0,.8) 55%, transparent 95%);
}

.hero-atmosphere::before {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(196,215,246,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(196,215,246,.035) 1px, transparent 1px);
    background-size: 90px 90px;
    content: '';
}

.light-ribbon {
    position: absolute;
    width: 1100px;
    height: 400px;
    left: 27%;
    top: -200px;
    border: 46px solid rgba(194, 220, 241, .29);
    border-radius: 50%;
    filter: blur(22px);
    transform: rotate(26deg);
    animation: light-drift 24s ease-in-out infinite alternate;
}

.light-ribbon-secondary {
    top: 190px;
    left: 31%;
    width: 800px;
    height: 300px;
    border-width: 30px;
    border-color: rgba(171, 204, 222, .21);
    transform: rotate(-19deg);
    animation-delay: -12s;
}

.particle-field {
    position: absolute;
    inset: 130px 13% 170px 34%;
    background-image: radial-gradient(circle, rgba(206,224,244,.38) 1px, transparent 1.7px);
    background-size: 9px 9px;
    -webkit-mask-image: radial-gradient(ellipse at center, #000, transparent 67%);
    mask-image: radial-gradient(ellipse at center, #000, transparent 67%);
    transform: rotate(-14deg);
    opacity: .55;
}

@keyframes light-drift {
    to { translate: -35px 35px; opacity: .65; }
}

#hero::after { content: none; }
#bg-canvas { display: none; }

#hero .hero-content {
    position: relative;
    z-index: 1;
    max-width: 650px;
    margin: 0;
}

#hero .eyebrow {
    gap: 11px;
    margin-bottom: 27px;
    color: #c4cfdf;
    font-family: var(--font-primary);
    font-size: .82rem;
    font-weight: 400;
    letter-spacing: .02em;
    text-transform: none;
}

#hero .status-dot { width: 5px; height: 5px; background: #bddaff; box-shadow: 0 0 12px #8ec6ff; }
.card-label .status-dot { display: none; }
.eyebrow-divider { color: #6f839f; }

#hero h1 {
    margin: 0;
    color: #f6f8fc;
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 4.8vw, 4.05rem);
    font-weight: 500;
    letter-spacing: -.065em;
    line-height: 1.08;
}
#hero h1::before, #hero h1::after { display: none; }
.hero-period { color: #a7c3e4; }

#hero .subtitle {
    margin: 12px 0 32px;
    color: #9cacc2;
    font-family: var(--font-primary);
    font-size: .9rem;
    font-weight: 400;
    letter-spacing: .25em;
}

#hero .hero-lede {
    max-width: 470px;
    margin: 0 0 20px;
    color: #f0f3f8;
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 2.4vw, 2rem);
    font-weight: 400;
    letter-spacing: -.035em;
    line-height: 1.25;
}
#hero .hero-lede span { display: block; color: #a9bcd7; }
#hero .tagline { max-width: 500px; margin: 0; color: #9eafc4; font-size: .95rem; line-height: 1.8; }
#hero .tagline strong { color: #c4cedb; font-weight: 400; white-space: nowrap; }
.hero-actions { gap: 12px; margin-top: 32px; }

.research-window {
    position: relative;
    width: 100%;
    margin-top: 26px;
    border: 1px solid rgba(220,234,255,.16);
    border-radius: 12px;
    background: linear-gradient(130deg, rgba(36,49,68,.72), rgba(13,22,35,.64));
    box-shadow: 0 25px 90px rgba(0,0,0,.15), inset 0 1px rgba(255,255,255,.06);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    font-family: var(--font-mono);
}
.window-topbar { display: flex; align-items: center; gap: 16px; padding: 16px 21px; border-bottom: 1px solid rgba(214,228,252,.1); color: #adbacb; font-size: .66rem; }
.window-dots { display: flex; gap: 5px; }
.window-dots i { width: 6px; height: 6px; border-radius: 50%; background: #5c6b80; }
.window-dots i:first-child { background: #99acc4; }
.window-language { margin-left: auto; color: #6e7e94; }
.code-example { padding: 29px 28px 22px; }
.code-caption { display: flex; gap: 11px; margin-bottom: 15px; color: #abb7c8; font-size: .67rem; font-family: var(--font-primary); letter-spacing: .01em; }
.code-caption > span { color: #647a99; font-family: var(--font-mono); }
.code-example pre { overflow: auto; color: #c7d2e2; font-size: .84rem; line-height: 1.9; }
.code-example code { font-family: var(--font-mono); }
.syntax-keyword { color: #a7bcde; }
.code-before .code-identifier { color: #b9c7d9; }
.code-after .code-identifier { color: #c5e7ed; background: rgba(128,206,228,.08); border-bottom: 1px solid rgba(163,220,239,.25); }
.code-transition { display: flex; align-items: center; gap: 12px; padding: 0 28px; color: #93a8c3; font-size: .64rem; }
.code-transition > span:first-child { font-size: 1rem; }
.transition-line { flex: 1; height: 1px; background: linear-gradient(90deg, rgba(178,204,241,.17), transparent); }
.code-after { padding-top: 20px; padding-bottom: 33px; }
.window-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 21px; border-top: 1px solid rgba(214,228,252,.1); color: #a1aec0; font-family: var(--font-primary); font-size: .61rem; }
.window-footer a { color: #b4c6dd; font-size: 1.2rem; text-decoration: none; }
.hero-scroll { position: absolute; bottom: 36px; left: 0; display: flex; align-items: center; gap: 22px; color: #768398; font-size: .65rem; text-decoration: none; letter-spacing: .04em; }
.hero-scroll:hover { color: #c9d6e5; }

.btn,
.btn.btn-primary {
    gap: 17px;
    min-height: 49px;
    padding: 11px 19px;
    border: 1px solid rgba(198, 222, 240, 0.3);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.035);
    color: var(--text-color);
    font-family: var(--font-primary);
    font-size: 0.84rem;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    box-shadow: none;
    transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.btn.btn-primary {
    border-color: #e4e9ef;
    background: #f2f4f7;
    color: #061827;
}

.btn:not(.btn-primary):hover,
.btn:not(.btn-primary):focus-visible {
    border-color: #7fd9f4;
    background: rgba(0, 166, 214, 0.15);
    color: #fff;
    transform: translateY(-2px);
}

.btn.btn-primary:hover,
.btn.btn-primary:focus-visible {
    border-color: #fff;
    background: #fff;
    color: #061827;
    transform: translateY(-2px);
}

.btn:disabled {
    opacity: 0.68;
    transform: none;
}

.text-link {
    color: var(--accent-strong);
    font-size: 0.84rem;
    font-weight: 600;
}

.text-link:hover,
.text-link:focus-visible {
    color: #d5f7ff;
}

.hero-meta { display: flex; flex-wrap: wrap; gap: 32px; margin-top: 42px; padding: 0; border: 0; }
.hero-meta p { display: grid; gap: 4px; color: #8c9eb6; font-size: .7rem; }
.hero-meta p span { color: #62758f; font-size: .59rem; letter-spacing: .08em; text-transform: uppercase; }

/* About */
.about-profile { display: flex; align-items: center; gap: 20px; margin-bottom: 28px; }
.about-profile img { display: block; width: 76px; height: 86px; object-fit: cover; object-position: 50% 27%; border-radius: 6px; filter: saturate(.5) brightness(.88); }
.about-profile p { margin-bottom: 6px; font-size: 1rem; color: #e0e4eb; }
.about-profile p span { margin-left: 10px; font-size: .75rem; color: #7d8796; }
.about-profile div > span { font-size: .77rem; color: #818b9a; }

.two-column-layout {
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
    gap: clamp(56px, 9vw, 130px);
}

.intro-text {
    max-width: 690px;
    margin-bottom: 55px;
    color: #c4d0dc;
    font-size: 1.02rem;
    line-height: 1.85;
}

.intro-text strong {
    color: #fff;
    font-weight: 600;
}

.stats-row {
    gap: 21px;
    margin-bottom: 35px;
}

.stat-item {
    padding-top: 16px;
    border-top: 1px solid rgba(160, 204, 231, 0.23);
}

.stat-number {
    color: #eaf6fb;
    font-size: 2.55rem;
    font-weight: 500;
}

.stat-label {
    color: #92a4b4;
    font-size: 0.68rem;
}

.timeline {
    border-left-color: rgba(160, 204, 231, 0.2);
}

.timeline-item::before {
    border-color: #667d91;
    background: var(--bg-color);
}

.timeline-item.timeline-current::before {
    background: var(--accent-color);
}

.timeline-item .year {
    color: var(--accent-strong);
    font-size: 0.7rem;
}

.timeline-item h4 {
    color: #f2f7fb;
    font-size: 1.25rem;
    font-weight: 500;
}

.timeline-item span,
.timeline-item .supervisor {
    color: #9bacbb;
}

/* Research covers with a single, consistent reading order. */
.research-interests-container { gap: 9px 22px; max-width: 900px; }
.interest-pill { padding: 0; border: 0; border-radius: 0; background: none; color: #7e8fa5; font-size: .73rem; box-shadow: none; }
.interest-pill::before { content: '/'; margin-right: 9px; color: #465365; }
.interest-pill:hover { background: none; color: #c8d4e3; transform: none; }
.selected-work-header { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin: 60px 0 25px; padding-bottom: 17px; border-bottom: 1px solid var(--line-color); }
.selected-work-header h3 { font-size: 1rem; font-weight: 500; letter-spacing: -.01em; }
.selected-work-header p { color: #6f7b8d; font-size: .72rem; }
.research-list { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 32px 24px; }
.animation-thumbnail { grid-column: span 2; min-height: 265px; aspect-ratio: 1.25; border: 1px solid rgba(185,208,241,.12); border-radius: 8px; background: #101720; box-shadow: none; }
.animation-thumbnail:nth-child(-n+2) { grid-column: span 3; min-height: 310px; aspect-ratio: 1.65; }
.animation-thumbnail:hover, .animation-thumbnail:focus-visible { border-color: rgba(176,206,247,.4); box-shadow: none; transform: none; }
.thumbnail-canvas { opacity: .78; filter: saturate(.65); transition: opacity 300ms, filter 300ms; }
.animation-thumbnail:hover .thumbnail-canvas, .animation-thumbnail:focus-visible .thumbnail-canvas { opacity: .95; filter: saturate(.9); }
.thumbnail-info { padding: 38px 25px 22px; background: linear-gradient(0deg, rgba(10,14,20,.99), rgba(10,14,20,.84) 53%, transparent); }
.thumbnail-info .research-tag, .thumbnail-info .research-tag.workshop-tag, .thumbnail-info .research-tag.publication-tag, .thumbnail-info .research-tag.thesis-tag, .thumbnail-info .research-tag.honor-tag { padding: 0; border: 0; border-radius: 0; background: none; color: #8fa5c3; font-family: var(--font-primary); font-size: .6rem; font-weight: 400; letter-spacing: .12em; text-transform: uppercase; }
.thumbnail-info h4 { margin: 10px 0 4px; color: #f0f2f6; font-family: var(--font-display); font-size: 1.2rem; font-weight: 500; letter-spacing: -.025em; }
.animation-thumbnail:nth-child(-n+2) h4 { font-size: 1.5rem; }
.thumbnail-info p { color: #929eaf; font-size: .76rem; }
.thumbnail-hint { top: 17px; right: 17px; bottom: auto; left: auto; display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 1px solid rgba(177,202,238,.18); border-radius: 50%; background: rgba(10,15,22,.3); color: #afc1d7; opacity: 1; transform: none; font-size: 1rem; }

/* Publications and Scholar metrics */
.scholar-overview { gap: 30px; margin-bottom: 64px; padding: 26px 0; border: 0; border-top: 1px solid var(--line-color); border-bottom: 1px solid var(--line-color); border-radius: 0; background: none; box-shadow: none; }
.scholar-summary .card-label { margin-bottom: 8px; font-size: .64rem; letter-spacing: .08em; }
.scholar-copy { font-size: .78rem; }
.data-freshness { margin-top: 10px; font-size: .66rem; }
.citation-history { min-height: 110px; }
.history-bar-wrap { grid-template-rows: 17px 70px 18px; }
.history-bar { width: 17px; border-radius: 3px 3px 0 0; }
.metric-value { font-size: 2.4rem; }

.scholar-copy,
.data-freshness,
.metric-label,
.history-value,
.history-year {
    color: #9eafbf;
}

.data-freshness.is-stale {
    color: #f2c67e;
}

.metric {
    border-left-color: var(--line-color);
}

.metric-value {
    color: #f1f8fc;
    font-weight: 500;
}

.citation-history {
    border-left-color: var(--line-color);
}

.history-bar {
    background: linear-gradient(180deg, #8baed3, #465c77);
}

.group-heading {
    border-bottom-color: rgba(185, 213, 232, 0.32);
}

.group-heading h4 {
    color: #e9f2f8;
    font-size: 1.1rem;
    font-weight: 500;
}

.group-heading > span,
.publication-index {
    color: #7f93ad;
}

.publication-item {
    border-bottom-color: var(--line-color);
}

.publication-meta {
    color: var(--accent-strong);
}

.publication-body h4,
.thesis-card h4 {
    color: #f2f7fb;
    font-weight: 500;
}

.publication-authors,
.publication-links span {
    color: #a8b7c6;
}

.publication-authors strong {
    color: #eaf4f9;
}

.publication-links a {
    color: #a8c8ed;
}

.thesis-card {
    padding: 28px 0;
    border: 0;
    border-bottom: 1px solid var(--line-color);
    border-radius: 0;
    background: none;
}

/* Academic service and projects */
.service-list {
    border-top-color: var(--line-color);
}

.service-item {
    border-bottom-color: var(--line-color);
    color: var(--text-color);
}

.service-item:hover,
.service-item:focus-visible {
    background: rgba(255, 255, 255, 0.025);
}

.service-year,
.service-role {
    color: #93a9ba;
}

.service-role,
.service-arrow {
    color: #8599b2;
}

.service-name {
    color: #e9f2f8;
}

.project-list {
    gap: 18px;
}

.project-item { min-height: 0; padding: 25px 0 0; border: 0; border-top: 1px solid var(--line-color); border-radius: 0; background: none; box-shadow: none; }
.project-item:hover { border-color: rgba(191,211,239,.3); background: none; }

.project-item h4 {
    color: #f1f7fb;
    font-weight: 500;
}

.project-item p {
    color: #aabac7;
}

/* An open, typographic closing. */
.container > main > #contact { position: relative; margin: 0; padding: 110px 0 88px; border: 0; border-radius: 0; background: none; }
#contact .section-header { max-width: 730px; margin-bottom: 35px; }
#contact .section-header h2 { font-size: clamp(2.6rem, 4.7vw, 4rem); }
#contact .section-intro { font-size: .92rem; }
.social-links { display: flex; align-items: center; flex-wrap: wrap; gap: 26px; }
.contact-email { display: flex; align-items: center; gap: 35px; width: 100%; margin-bottom: 18px; color: #dbe8f8; font-size: clamp(1.2rem, 2.5vw, 1.8rem); letter-spacing: -.03em; text-decoration: none; }
.contact-email span { color: #6e8db4; }
.contact-social { color: #91a0b4; font-size: .8rem; text-decoration: none; }
.contact-social:hover, .contact-email:hover { color: #fff; }

footer {
    border-top-color: var(--line-color);
    color: #8295a7;
}

footer a {
    color: var(--accent-strong);
}

/* Standalone privacy page */
.policy-page {
    max-width: 860px;
    padding-top: clamp(75px, 10vw, 130px);
}

.policy-page .logo {
    margin-bottom: clamp(75px, 11vw, 130px);
    color: #f1f8fc;
}

.policy-page .logo::after {
    content: none;
}

.policy-page h1 {
    color: #f3f8fc;
    font-weight: 500;
}

.policy-lede {
    color: #b4c3d0;
}

.policy-section {
    border-top-color: var(--line-color);
}

.policy-section h2 {
    color: #edf5fa;
    font-weight: 500;
}

.policy-section p,
.policy-section li {
    color: #abbac8;
}

.policy-section a,
.policy-back {
    color: var(--accent-strong);
}

/* Interactive research views retain their layout in a dark, readable shell. */
.animation-modal {
    --bg-color: #f4f8fa;
    --surface-color: #ffffff;
    --surface-soft: #eaf6fa;
    --text-color: #102a32;
    --secondary-color: #526b73;
    --line-color: #cfe1e7;
    --accent-color: #00a6d6;
    --accent-strong: #007d9f;
    color-scheme: dark;
    background: rgba(7, 13, 22, 0.985);
    color: #eaf4f9;
}

.animation-modal .modal-close {
    border-color: rgba(175, 214, 236, 0.25);
    background: rgba(19, 34, 48, 0.92);
    color: #e4f2f8;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.animation-modal .modal-close:hover,
.animation-modal .modal-close:focus-visible {
    border-color: #7cdcf6;
    background: rgba(0, 166, 214, 0.25);
    color: #fff;
}

.animation-modal .modal-header h2 {
    color: #f4f9fd;
    font-family: var(--font-display);
    font-weight: 500;
    letter-spacing: -0.055em;
}

.animation-modal .modal-subtitle {
    color: #b6c8d6;
}

.animation-modal .modal-abstract {
    border-color: rgba(167, 207, 229, 0.2);
    border-left-color: var(--accent-color);
    background: rgba(34, 59, 77, 0.36);
}

.animation-modal .modal-abstract p,
.animation-modal .modal-left .legend-item,
.animation-modal .babel-legend .legend-item,
.animation-modal .coverage-legend .legend-item,
.animation-modal .scroll-hint,
.animation-modal .stat-desc,
.animation-modal .rank-label,
.animation-modal .slogan-en,
.animation-modal .dfusion-hint,
.animation-modal .babel-hint,
.animation-modal .coverage-hint {
    color: #b3c5d3;
}

.animation-modal .modal-left .stat-value,
.animation-modal .slogan-cn {
    color: #eaf7fb;
}

.animation-modal .step-indicator,
.animation-modal .rank-number {
    color: #7ee1f7;
}

.animation-modal .modal-left .research-tag {
    border-color: rgba(109, 213, 241, 0.45);
    background: rgba(0, 166, 214, 0.14);
    color: #91e4f6;
}

.animation-modal .dfusion-slogan,
.animation-modal .babel-legend,
.animation-modal .coverage-legend,
.animation-modal .taxonomy-language-bar,
.animation-modal .taxonomy-category-summary {
    border-color: rgba(178, 214, 235, 0.2);
}

.animation-modal .taxonomy-lang-item {
    border-color: rgba(178, 214, 235, 0.22);
    background: rgba(255, 255, 255, 0.035);
    color: #bfd0dc;
}

.animation-modal .taxonomy-lang-item:hover,
.animation-modal .taxonomy-lang-item.active {
    border-color: rgba(105, 211, 240, 0.6);
    background: rgba(0, 166, 214, 0.16);
    color: #a2ebfa;
}

.animation-modal .summary-name,
.animation-modal .summary-value {
    color: #b9cbd8;
}

/* The taxonomy tree is a data panel; keep it dark and legible as a whole. */
.animation-modal .taxonomy-right-panel {
    border-color: rgba(178, 214, 235, 0.2);
    background: #111e2b;
    color: #d7e5ed;
}

.animation-modal .taxonomy-category-header {
    background: #1a2b3a;
}

.animation-modal .taxonomy-category-name,
.animation-modal .taxonomy-category-value,
.animation-modal .taxonomy-item-value,
.animation-modal .taxonomy-subitem .taxonomy-item-value {
    color: #e4f2f8;
}

.animation-modal .taxonomy-category-percent,
.animation-modal .taxonomy-item-name,
.animation-modal .taxonomy-subitem .taxonomy-item-name {
    color: #adbfcd;
}

.animation-modal .taxonomy-item-code,
.animation-modal .taxonomy-subitem .taxonomy-item-code {
    color: #83d9f1;
}

.animation-modal .taxonomy-children {
    border-color: rgba(178, 214, 235, 0.18);
}

.animation-modal .taxonomy-item:hover {
    background: rgba(90, 154, 192, 0.12);
}

.animation-modal .taxonomy-item-bar {
    background: #32485a;
}

/* Responsive */
@media (max-width: 1080px) {
    .links { gap: 19px; }
    .links a { font-size: .75rem; }
    .container > main > #hero { gap: 32px; }
    .code-example { padding-inline: 20px; }
    .code-transition { padding-inline: 20px; }
    .window-topbar { padding-inline: 16px; gap: 10px; }
    .code-example pre { font-size: .72rem; }
    .window-language { display: none; }
    .project-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
    header { min-height: 68px; }
    nav { min-height: 68px; }
    .menu-toggle { display: inline-flex; min-height: 40px; padding: 0 5px; color: #d9e4f3; }
    .links, .links.is-open { top: 68px; right: 0; left: 0; gap: 0; padding: 12px 30px 24px; border: 0; border-bottom: 1px solid var(--line-color); border-radius: 0; background: rgba(12,19,30,.98); box-shadow: 0 20px 40px rgba(0,0,0,.2); }
    .links { display: none; }
    .links.is-open { display: flex; }
    .links a { padding: 12px 0; color: #c4d3df; font-size: .91rem; }
    .links .nav-contact { justify-content: space-between; margin: 10px 0 0; padding: 0 15px; }
    .no-js .links { display: flex; top: 68px; overflow-x: auto; white-space: nowrap; }
    .container > main > #hero { min-height: auto; padding: 140px 0 130px; gap: 26px; }
    #hero h1 { font-size: 2.8rem; }
    #hero .hero-lede { font-size: 1.55rem; }
    #hero .tagline { font-size: .87rem; }
    .hero-actions { flex-wrap: wrap; }
    .hero-actions .btn { min-height: 43px; padding: 9px 14px; font-size: .73rem; }
    .research-window { margin-top: 0; }
    .window-footer { font-size: .56rem; padding-inline: 16px; }
    .code-example pre { font-size: .66rem; }
    .two-column-layout, .thesis-grid { grid-template-columns: 1fr; gap: 42px; }
    .scholar-overview { grid-template-columns: 1fr 1fr; }
    .citation-history { grid-column: 1/-1; justify-content: flex-start; border-left: 0; border-top: 1px solid var(--line-color); }
    .section-header-split { align-items: flex-start; flex-direction: column; }
    .research-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
    .animation-thumbnail, .animation-thumbnail:nth-child(-n+2) { grid-column: auto; min-height: 280px; aspect-ratio: 1.15; }
    .animation-thumbnail:last-child { grid-column: 1 / -1; min-height: 250px; aspect-ratio: 2.4; }
    .animation-thumbnail:nth-child(-n+2) h4 { font-size: 1.2rem; }
}
@media (max-width: 650px) {
    .container { padding-inline: 24px; }
    nav { padding-inline: 24px; }
    .logo-descriptor { font-size: .64rem; }
    .container > main > section { padding: 74px 0; }
    .container > main > #hero { grid-template-columns: 1fr; gap: 50px; padding: 128px 0 105px; }
    #hero h1 { font-size: clamp(2.65rem, 10.6vw, 4rem); }
    #hero .eyebrow { font-size: .75rem; margin-bottom: 24px; }
    #hero .subtitle { margin-bottom: 27px; }
    #hero .hero-lede { max-width: 390px; font-size: 1.62rem; }
    #hero .tagline { font-size: .92rem; }
    .hero-meta { margin-top: 30px; gap: 20px; }
    .hero-actions { gap: 10px; flex-direction: row; }
    .hero-actions .btn { font-size: .76rem; }
    .research-window { max-width: 440px; justify-self: center; }
    .code-example { padding: 23px; }
    .code-example pre { font-size: clamp(.7rem, 2.75vw, .86rem); }
    .window-footer { font-size: .61rem; }
    .hero-scroll { bottom: 30px; }
    .light-ribbon { left: -35%; }
    .light-ribbon-secondary { left: -45%; top: 340px; }
    .particle-field { inset: 100px -10% 200px 10%; }
    .section-header h2 { font-size: 2.2rem; }
    .section-header h2 br { display: none; }
    .section-intro { font-size: .96rem; }
    .about-profile p span { display: block; margin: 2px 0 0; }
    .stats-row { gap: 16px; }
    .stat-number { font-size: 2rem; }
    .stat-label { font-size: .58rem; }
    .selected-work-header { margin-top: 44px; align-items: flex-start; flex-direction: column; gap: 5px; }
    .research-list, .project-list, .scholar-overview { grid-template-columns: 1fr; }
    .animation-thumbnail, .animation-thumbnail:nth-child(-n+2), .animation-thumbnail:last-child { grid-column: auto; min-height: 280px; aspect-ratio: 1.3; }
    .metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .metric { padding: 14px 4px 0; border-top: 1px solid var(--line-color); border-left: 0; }
    .metric-value { font-size: 2.2rem; }
    .citation-history { grid-column: auto; }
    .publication-item { grid-template-columns: 28px 1fr; gap: 10px; }
    .publication-body h4 { font-size: 1.16rem; }
    .service-item { grid-template-columns: 1fr 24px; }
    .service-year, .service-role, .service-name { grid-column: 1; grid-row: auto; }
    .service-arrow { grid-column: 2; grid-row: 1/4; }
    .container > main > #contact { padding: 78px 0 68px; }
    footer { align-items: flex-start; flex-direction: column; }
    .policy-page { padding-inline: 24px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
