:root {
    --bg: #f4f7fb;
    --surface: rgba(255, 255, 255, 0.88);
    --surface-solid: #ffffff;
    --text: #172033;
    --muted: #64748b;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-soft: #eaf1ff;
    --accent: #14b8a6;
    --border: #dce5f1;
    --shadow: 0 18px 55px rgba(30, 64, 175, 0.10);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    padding: clamp(16px, 3vw, 42px);
    color: var(--text);
    background:
        radial-gradient(circle at 8% 5%, rgba(37, 99, 235, 0.13), transparent 26rem),
        radial-gradient(circle at 92% 24%, rgba(20, 184, 166, 0.10), transparent 23rem),
        var(--bg);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
    font-size: 17px;
    line-height: 1.75;
}

::selection {
    color: #fff;
    background: var(--primary);
}

#maxname {
    display: grid;
    grid-template-columns: minmax(190px, 0.72fr) minmax(0, 2fr) minmax(230px, 0.9fr);
    grid-template-areas:
        "welcome welcome welcome"
        "menu content right"
        "bottom bottom bottom";
    gap: 18px;
    width: min(1440px, 100%);
    margin: 0 auto;
}

#welcome {
    grid-area: welcome;
    position: relative;
    min-height: 190px;
    padding: clamp(30px, 6vw, 68px);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: calc(var(--radius) + 6px);
    background:
        radial-gradient(circle at 88% 10%, rgba(96, 165, 250, 0.35), transparent 20rem),
        linear-gradient(120deg, #0f172a, #1e40af);
    box-shadow: var(--shadow);
}

#welcome::after {
    position: absolute;
    right: -70px;
    top: -110px;
    width: 300px;
    height: 300px;
    border: 55px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    content: "";
}

h1 {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0;
    color: #fff;
    font-size: clamp(2rem, 5vw, 4.1rem);
    line-height: 1.08;
    letter-spacing: -0.04em;
    text-wrap: balance;
}

.affiliation-strip {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 30px;
}

.affiliation-card {
    display: flex;
    align-items: center;
    min-width: 0;
    min-height: 72px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 15px;
    color: #fff;
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(10px);
}

.affiliation-card:visited,
.affiliation-card:hover {
    color: #fff;
}

.affiliation-card:hover {
    text-decoration: none;
    background: rgba(255, 255, 255, 0.17);
}

.affiliation-card img {
    width: 46px;
    height: 46px;
    margin-right: 10px;
    border-radius: 11px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.92);
}

.affiliation-card img:not([src]) {
    opacity: 0.18;
}

.affiliation-card span {
    display: flex;
    min-width: 0;
    flex-direction: column;
    line-height: 1.25;
}

.affiliation-card b {
    font-size: 0.92rem;
    letter-spacing: 0.04em;
}

.affiliation-card small {
    margin-top: 4px;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.72rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#menu,
#content,
#right,
#bottom {
    border: 1px solid rgba(220, 229, 241, 0.9);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

#menu {
    grid-area: menu;
    align-self: start;
    position: sticky;
    top: 20px;
    padding: 12px;
}

#menuul {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin: 0;
    padding: 0;
    list-style: none;
}

#menuul li {
    margin: 0;
}

a {
    color: var(--primary);
    text-decoration: none;
    text-underline-offset: 3px;
    cursor: pointer;
}

a:visited {
    color: var(--primary);
}

a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.menubar {
    display: block;
    min-height: 48px;
    padding: 10px 13px;
    border-radius: 13px;
    color: #334155;
    font-size: 0.94rem;
    font-weight: 550;
    line-height: 28px;
    transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.menubar:hover,
.menubar:focus-visible {
    color: var(--primary-dark);
    text-decoration: none;
    background: var(--primary-soft);
    transform: translateX(3px);
    outline: none;
}

.menubar.active {
    color: #fff;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), #3b82f6);
}

.menubar.active:hover,
.menubar.active:focus-visible {
    color: #fff;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}

#content {
    grid-area: content;
    min-width: 0;
    min-height: 680px;
    max-height: 920px;
    overflow: auto;
    padding: clamp(20px, 3.5vw, 46px);
    scrollbar-color: #b7c8df transparent;
}

#content:has(> .embedded-page) {
    padding: 0;
}

.embedded-page {
    display: block;
    width: 100%;
    min-height: 72svh;
    border: 0;
    background: transparent;
}

.d2,
.d3 {
    width: 100%;
    margin: 0 auto;
}

.d2 {
    text-align: center;
}

.d3 {
    text-align: left;
}

#selfintro {
    margin: 0 0 1rem;
    padding: 0;
    color: #334155;
    font-size: clamp(1rem, 1.5vw, 1.18rem);
    text-align: left;
}

.subtitle,
#infotitle {
    display: inline-block;
    margin-top: 1rem;
    color: var(--text);
    font-size: clamp(1.45rem, 2.5vw, 2rem);
    font-weight: 750;
    letter-spacing: -0.025em;
}

.subsubtitle {
    display: block;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    color: #334155;
    font-size: 1rem;
    font-weight: 600;
    background: linear-gradient(135deg, #fff, #f7faff);
}

.pubs {
    padding-left: 1.35rem;
}

.pubs li {
    margin: 0.45rem 0;
    padding: 0.6rem 0 0.6rem 0.25rem;
    border-bottom: 1px solid #edf2f7;
    font-family: Georgia, "Times New Roman", serif;
}

table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
}

th,
td {
    padding: 12px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

th {
    color: #334155;
    background: #f1f5f9;
}

#right {
    grid-area: right;
    align-self: start;
    position: sticky;
    top: 20px;
    min-height: 320px;
    max-height: 920px;
    overflow: auto;
    padding: 24px;
    font-family: Georgia, "Times New Roman", "Songti SC", serif;
}

#right p,
#right a {
    overflow-wrap: anywhere;
}

#right > .c {
    margin-top: 0;
}

#abstract {
    color: #475569;
    font-size: 0.98rem !important;
    line-height: 1.7;
}

#hyperlink:not(:empty) {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    margin-top: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    color: #fff;
    font-family: Inter, "Microsoft YaHei", sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    background: var(--primary);
}

#hyperlink:not(:empty):hover {
    text-decoration: none;
    background: var(--primary-dark);
}

#bottom {
    grid-area: bottom;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 32px;
    padding: 18px 24px;
    color: var(--muted);
    text-align: center;
}

#bottom p {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0;
}

#bottom img {
    width: 20px;
    height: 20px;
}

.l {
    text-align: left;
}

.c {
    text-align: center;
}

@media (max-width: 1050px) {
    #maxname {
        grid-template-columns: 210px minmax(0, 1fr);
        grid-template-areas:
            "welcome welcome"
            "menu content"
            "right right"
            "bottom bottom";
    }

    #right {
        position: static;
        width: 100%;
        min-height: 180px;
        max-height: none;
    }

    .affiliation-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    body {
        padding: 12px;
        font-size: 16px;
    }

    #maxname {
        display: block;
    }

    #welcome {
        min-height: 155px;
        margin-bottom: 12px;
        padding: 30px 24px;
    }

    .affiliation-strip {
        grid-template-columns: 1fr 1fr;
        gap: 7px;
        margin-top: 22px;
    }

    .affiliation-card {
        min-height: 58px;
        padding: 8px;
    }

    .affiliation-card img {
        width: 36px;
        height: 36px;
        margin-right: 7px;
    }

    .affiliation-card small {
        font-size: 0.66rem;
    }

    #menu {
        position: sticky;
        top: 8px;
        z-index: 10;
        margin-bottom: 12px;
        padding: 7px;
        overflow-x: auto;
    }

    #menuul {
        flex-direction: row;
        width: max-content;
        max-width: none;
    }

    .menubar {
        min-height: 42px;
        padding: 7px 12px;
        white-space: nowrap;
    }

    .menubar:hover,
    .menubar:focus-visible {
        transform: none;
    }

    #content,
    #right,
    #bottom {
        margin-bottom: 12px;
    }

    #content {
        min-height: 520px;
        max-height: none;
        padding: 22px 18px;
        overflow-x: auto;
    }

    #content:has(> .embedded-page) {
        padding: 0;
    }

    .embedded-page {
        min-height: 78svh;
    }

    #right {
        position: static;
        padding: 20px;
    }

    #bottom {
        align-items: center;
        flex-direction: column;
        padding: 18px 14px;
    }

    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
