:root {
    --bg: #f5f2ea;
    --surface: rgba(255, 252, 246, 0.86);
    --surface-strong: #fffdf8;
    --surface-soft: #f4efe4;
    --text: #16263b;
    --muted: #5b6777;
    --primary: #113f78;
    --primary-strong: #0b2c52;
    --accent: #b58a32;
    --accent-soft: rgba(181, 138, 50, 0.12);
    --border: rgba(21, 48, 86, 0.12);
    --shadow-soft: 0 16px 36px rgba(14, 35, 60, 0.08);
    --shadow-card: 0 24px 60px rgba(14, 35, 60, 0.14);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --container: 1120px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
    line-height: 1.74;
    color: var(--text);
    background:
        radial-gradient(circle at 10% 12%, rgba(181, 138, 50, 0.16), transparent 28%),
        radial-gradient(circle at 92% 14%, rgba(17, 63, 120, 0.12), transparent 26%),
        linear-gradient(180deg, #f7f4ec 0%, #f4f2ee 48%, #f7f6f2 100%);
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: linear-gradient(rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.28));
    pointer-events: none;
    z-index: -3;
}

.bg-grid {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(17, 63, 120, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(17, 63, 120, 0.04) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 78%);
    pointer-events: none;
    z-index: -2;
}

.bg-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(44px);
    pointer-events: none;
    opacity: 0.58;
    z-index: -1;
}

.bg-orb-a {
    width: 300px;
    height: 300px;
    top: -110px;
    left: -70px;
    background: rgba(181, 138, 50, 0.36);
}

.bg-orb-b {
    width: 360px;
    height: 360px;
    right: -140px;
    top: 26%;
    background: rgba(117, 151, 209, 0.32);
}

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 30px 20px 28px;
}

.hero {
    margin-bottom: 34px;
}

.hero-panel {
    display: grid;
    grid-template-columns: 1fr;
    margin-bottom: 24px;
}

.profile,
section,
nav ul {
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(12px);
}

.profile {
    background: rgba(255, 251, 244, 0.82);
    border-radius: var(--radius-xl);
}

.profile {
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 32px;
    box-shadow: var(--shadow-card);
}

.profile-img {
    width: 164px;
    height: 164px;
    border-radius: 28px;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.92);
    box-shadow: 0 18px 34px rgba(13, 39, 73, 0.16);
}

.eyebrow,
.glance-label,
.glance-label {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.76rem;
}

.eyebrow {
    color: var(--accent);
    font-weight: 800;
    margin-bottom: 10px;
}

.profile-text h1,
section h2,
.glance-card h3 {
    font-family: "Fraunces", "Georgia", serif;
}

.profile-text h1 {
    font-size: clamp(2.6rem, 4vw, 4rem);
    line-height: 0.96;
    margin-bottom: 14px;
    color: var(--primary-strong);
}

.subtitle {
    font-size: 1.12rem;
    color: #32455a;
    max-width: 720px;
    margin-bottom: 10px;
}

.profile-meta {
    color: #485668;
    max-width: 720px;
    margin-bottom: 18px;
}

.hero-badges,
.profile-links,
.social-links,
.pub-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hero-badges span {
    display: inline-flex;
    align-items: center;
    padding: 9px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(17, 63, 120, 0.1);
    color: #24405f;
    font-size: 0.93rem;
    font-weight: 600;
}

.hero-badges a,
.experience-advisor a {
    color: var(--primary);
    font-weight: 800;
    text-decoration-color: rgba(181, 138, 50, 0.52);
    text-decoration-thickness: 1.5px;
    text-underline-offset: 3px;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.hero-badges a {
    margin-left: 4px;
}

.hero-badges a:hover,
.experience-advisor a:hover {
    color: var(--accent);
    text-decoration-color: currentColor;
}

.hero-badges a:focus-visible,
.experience-advisor a:focus-visible {
    outline: 3px solid rgba(181, 138, 50, 0.3);
    outline-offset: 3px;
    border-radius: 3px;
}

.profile-links a,
.social-links a,
.pub-links a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--primary);
    font-weight: 700;
}

.profile-links a:hover,
.social-links a:hover,
.pub-links a:hover {
    color: var(--primary-strong);
}

nav {
    position: sticky;
    top: 10px;
    z-index: 20;
}

nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    padding: 10px;
    border-radius: 18px;
    background: rgba(255, 252, 246, 0.82);
}

nav ul li a {
    display: inline-block;
    padding: 10px 14px;
    border-radius: 12px;
    text-decoration: none;
    color: #31506f;
    font-weight: 700;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

nav ul li a:hover {
    background: rgba(17, 63, 120, 0.08);
    color: var(--primary-strong);
    transform: translateY(-1px);
}

nav ul li a.active {
    background: linear-gradient(120deg, #113f78, #245e9f);
    color: #ffffff;
}

section {
    background: var(--surface);
    padding: 30px;
    margin-bottom: 22px;
    border-radius: var(--radius-lg);
}

section h2 {
    margin-bottom: 18px;
    color: var(--primary-strong);
    font-size: 1.72rem;
}

section h2::after {
    content: "";
    display: block;
    width: 76px;
    height: 3px;
    border-radius: 999px;
    margin-top: 10px;
    background: linear-gradient(90deg, var(--accent), rgba(181, 138, 50, 0.2));
}

.about-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.9fr);
    gap: 20px;
}

.about-copy p + p {
    margin-top: 14px;
}

.glance-card {
    padding: 22px;
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, rgba(17, 63, 120, 0.04), rgba(181, 138, 50, 0.06));
    border: 1px solid rgba(17, 63, 120, 0.08);
}

.glance-card h3 {
    margin-bottom: 16px;
    color: var(--primary-strong);
    font-size: 1.3rem;
}

.glance-list {
    list-style: none;
    display: grid;
    gap: 14px;
}

.glance-list li {
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(17, 63, 120, 0.1);
}

.glance-list li:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.glance-label {
    display: block;
    color: var(--accent);
    font-weight: 800;
    margin-bottom: 6px;
}

.news-list,
.publication-list,
.experience-list {
    list-style: none;
}

.news-item {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 16px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(17, 63, 120, 0.08);
}

.news-item:last-child,
.experience-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.news-date {
    color: var(--accent);
    font-weight: 800;
}

.publication-list li.pub-highlight {
    display: flex;
    gap: 18px;
    background: linear-gradient(180deg, rgba(17, 63, 120, 0.04), rgba(181, 138, 50, 0.05));
    padding: 22px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(17, 63, 120, 0.08);
}

.pub-year {
    min-width: 60px;
    font-weight: 800;
    color: var(--accent);
}

.pub-title {
    font-weight: 800;
    margin-bottom: 4px;
}

.pub-authors,
.pub-journal,
.pub-note {
    margin-bottom: 4px;
}

.pub-journal,
.pub-note {
    color: var(--muted);
}

.pub-links {
    margin-top: 10px;
}

.experience-item {
    display: flex;
    align-items: flex-start;
    gap: 22px;
    margin-bottom: 22px;
    padding-bottom: 22px;
    border-bottom: 1px solid rgba(17, 63, 120, 0.08);
}

.experience-logo {
    flex-shrink: 0;
    width: 74px;
    height: 74px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(17, 63, 120, 0.08);
}

.logo-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.logo-img-hkust {
    transform: scale(1.16);
}

.experience-title {
    font-weight: 800;
    font-size: 1.08rem;
    color: var(--text);
    margin-bottom: 4px;
}

.experience-org {
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}

.experience-time {
    color: var(--muted);
    font-size: 0.95rem;
    margin-bottom: 6px;
}

.experience-advisor,
.experience-note,
.news-content,
.contact-info p {
    color: #425163;
}

.contact-info {
    max-width: 720px;
}

.contact-info p {
    margin-bottom: 12px;
}

.contact-info i {
    width: 18px;
    margin-right: 8px;
    color: var(--accent);
}

.social-links {
    margin-top: 14px;
}

footer {
    text-align: center;
    padding: 18px 20px 30px;
    color: #52606f;
    font-size: 0.93rem;
}

a:focus-visible {
    outline: 3px solid rgba(141, 191, 255, 0.92);
    outline-offset: 2px;
    border-radius: 8px;
}

.reveal {
    opacity: 0;
    transform: translateY(20px);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

@media (max-width: 980px) {
    .hero-panel,
    .about-grid {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 768px) {
    .container {
        padding-top: 20px;
    }

    .profile {
        flex-direction: column;
        align-items: flex-start;
        padding: 24px;
        gap: 22px;
    }

    .profile-img {
        width: 138px;
        height: 138px;
        border-radius: 24px;
    }

    .profile-text h1 {
        font-size: clamp(2.2rem, 9vw, 3rem);
    }

    nav {
        top: 6px;
    }

    nav ul {
        gap: 6px;
        padding: 8px;
    }

    nav ul li a {
        padding: 10px 12px;
        font-size: 0.95rem;
    }

    section {
        padding: 22px;
    }

    .publication-list li.pub-highlight {
        flex-direction: column;
        gap: 8px;
    }

    .experience-item {
        gap: 16px;
        margin-bottom: 18px;
        padding-bottom: 18px;
    }

    .news-item {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

@media (max-width: 520px) {
    .profile {
        align-items: center;
        text-align: center;
    }

    .profile-links,
    .hero-badges,
    .social-links {
        justify-content: center;
    }

    .experience-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .experience-details {
        width: 100%;
    }
}

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

    * {
        animation: none !important;
        transition: none !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}
