:root {
    color-scheme: light;
    --bg: #f3f6f9;
    --bg-accent: rgba(0, 102, 204, 0.09);
    --surface: #ffffff;
    --surface-muted: #f7f9fb;
    --surface-hover: #eef5fb;
    --text: #1f2937;
    --text-soft: #667085;
    --heading: #172033;
    --line: #e3e8ef;
    --primary: #0066cc;
    --primary-strong: #004c99;
    --primary-soft: rgba(0, 102, 204, 0.1);
    --success: #1f9d67;
    --header: rgba(255, 255, 255, 0.76);
    --shadow-sm: 0 6px 20px rgba(23, 32, 51, 0.055);
    --shadow-md: 0 14px 38px rgba(23, 32, 51, 0.09);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 22px;
    --header-height: 74px;
    --content-width: 1140px;
    --nav-width: 1240px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0f1620;
    --bg-accent: rgba(62, 152, 243, 0.12);
    --surface: #17212e;
    --surface-muted: #141d29;
    --surface-hover: #1c2b3d;
    --text: #dbe4ee;
    --text-soft: #9dadbd;
    --heading: #f4f7fb;
    --line: #2a394b;
    --primary: #60aaf3;
    --primary-strong: #8bc4fb;
    --primary-soft: rgba(96, 170, 243, 0.13);
    --success: #55c994;
    --header: rgba(15, 22, 32, 0.78);
    --shadow-sm: 0 8px 28px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 20px 56px rgba(0, 0, 0, 0.3);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height) + 24px);
}

body {
    margin: 0;
    min-width: 320px;
    min-height: 100vh;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 8% 12%, var(--bg-accent), transparent 28rem),
        radial-gradient(circle at 92% 88%, var(--bg-accent), transparent 32rem),
        var(--bg);
    color: var(--text);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.75;
    transition: background-color 0.35s ease, color 0.35s ease;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.35;
    background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.32), transparent 58%);
}

body.is-leaving {
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.16s ease, transform 0.16s ease;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: var(--primary);
    text-underline-offset: 0.22em;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button {
    font: inherit;
}

:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--primary) 64%, transparent);
    outline-offset: 3px;
}

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

[data-lang="en"] {
    display: none !important;
}

html[lang="en"] [data-lang="zh"] {
    display: none !important;
}

html[lang="en"] [data-lang="en"] {
    display: inline !important;
}

html[lang="en"] div[data-lang="en"],
html[lang="en"] p[data-lang="en"],
html[lang="en"] section[data-lang="en"] {
    display: block !important;
}

.skip-link {
    position: fixed;
    top: 10px;
    left: 16px;
    z-index: 2000;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    background: var(--primary);
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-150%);
    transition: transform 0.2s ease;
}

.skip-link:focus {
    transform: translateY(0);
}

.site-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 1000;
    height: var(--header-height);
    border-bottom: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
    background: var(--header);
    -webkit-backdrop-filter: blur(16px) saturate(145%);
    backdrop-filter: blur(16px) saturate(145%);
    transition: height 0.3s var(--ease), box-shadow 0.3s ease, background-color 0.35s ease;
    animation: headerDrop 0.65s var(--ease) both;
}

.site-header.is-scrolled {
    height: 64px;
    box-shadow: 0 10px 30px rgba(23, 32, 51, 0.1);
}

.nav-shell {
    width: min(calc(100% - 32px), var(--nav-width));
    height: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 22px;
}

.brand {
    display: none;
    align-items: center;
    gap: 10px;
    color: var(--heading);
    font-weight: 750;
    letter-spacing: 0.01em;
    text-decoration: none;
    white-space: nowrap;
}

.brand-mark {
    width: 40px;
    height: 40px;
    display: inline-grid;
    place-items: center;
    border-radius: 11px;
    background: linear-gradient(145deg, var(--primary), var(--primary-strong));
    box-shadow: 0 7px 18px color-mix(in srgb, var(--primary) 25%, transparent);
    color: #ffffff;
    font-size: 0.74rem;
    letter-spacing: 0.06em;
    transition: transform 0.35s var(--ease), box-shadow 0.35s ease;
}

.brand:hover .brand-mark {
    transform: translateY(-2px) rotate(-5deg) scale(1.04);
    box-shadow: 0 11px 24px color-mix(in srgb, var(--primary) 32%, transparent);
}

.site-nav {
    display: flex;
    grid-column: 2;
    justify-content: center;
    align-items: center;
    gap: 6px;
}

.nav-actions {
    justify-self: end;
}

.site-nav a {
    position: relative;
    padding: 10px 16px;
    border-radius: 10px;
    color: var(--text-soft);
    font-size: 0.91rem;
    font-weight: 650;
    text-decoration: none;
    transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s var(--ease);
}

.site-nav a::after {
    content: "";
    position: absolute;
    right: 13px;
    bottom: 4px;
    left: 13px;
    height: 2px;
    border-radius: 999px;
    background: var(--primary);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.25s var(--ease);
}

.site-nav a:hover,
.site-nav a.active {
    background: var(--primary-soft);
    color: var(--primary-strong);
    transform: translateY(-1px);
}

.site-nav a:hover::after,
.site-nav a.active::after {
    transform: scaleX(1);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 7px;
}

.icon-button,
.language-button,
.menu-button,
.back-to-top {
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface) 86%, transparent);
    color: var(--text);
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease, transform 0.2s var(--ease);
}

.icon-button,
.language-button,
.menu-button {
    height: 40px;
    border-radius: 11px;
}

.icon-button,
.menu-button {
    width: 40px;
    display: inline-grid;
    place-items: center;
    padding: 0;
}

.language-button {
    min-width: 44px;
    padding: 0 10px;
    font-size: 0.78rem;
    font-weight: 750;
}

.icon-button:hover,
.language-button:hover,
.menu-button:hover,
.back-to-top:hover {
    border-color: color-mix(in srgb, var(--primary) 55%, var(--line));
    background: var(--primary-soft);
    color: var(--primary-strong);
    transform: translateY(-2px);
}

.icon-button svg,
.menu-button svg,
.back-to-top svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

.theme-sun,
:root[data-theme="dark"] .theme-moon {
    display: none;
}

:root[data-theme="dark"] .theme-sun {
    display: block;
}

.menu-button {
    display: none;
}

.site-main {
    width: min(calc(100% - 40px), var(--content-width));
    min-height: calc(100vh - 146px);
    margin: 0 auto;
    padding: calc(var(--header-height) + 36px) 0 52px;
}

.home-layout {
    display: grid;
    grid-template-columns: minmax(290px, 320px) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.profile-card,
.content-card,
.article-card,
.empty-state,
.article-sheet {
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface) 95%, transparent);
    box-shadow: var(--shadow-sm);
    transition: border-color 0.3s ease, background-color 0.35s ease, box-shadow 0.3s ease, transform 0.3s var(--ease);
}

.profile-card {
    position: sticky;
    top: calc(var(--header-height) + 24px);
    height: calc(100vh - var(--header-height) - 64px);
    height: calc(100svh - var(--header-height) - 64px);
    min-height: 0;
    padding: 14px;
    overflow-x: hidden;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    border-radius: var(--radius-lg);
    text-align: center;
    overscroll-behavior: contain;
    scrollbar-color: color-mix(in srgb, var(--primary) 30%, transparent) transparent;
    scrollbar-width: thin;
}

.profile-cover {
    display: none;
}

.profile-body {
    min-height: 0;
    flex: 1;
    padding: 0 8px 10px;
    display: flex;
    flex-direction: column;
}

.profile-photo {
    width: 100%;
    aspect-ratio: 5 / 4;
    height: auto;
    margin: 0 0 20px;
    border: 1px solid color-mix(in srgb, var(--line) 76%, transparent);
    border-radius: 16px;
    background: var(--surface-muted);
    box-shadow: 0 14px 32px rgba(23, 32, 51, 0.11);
    object-fit: cover;
    object-position: center;
    transition: transform 0.45s var(--ease), box-shadow 0.45s ease;
}

.profile-card:hover .profile-photo {
    transform: translateY(-4px) rotate(-1deg);
    box-shadow: 0 20px 38px rgba(23, 32, 51, 0.22);
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--primary);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.profile-card h1 {
    margin: 0;
    color: var(--heading);
    font-size: clamp(1.65rem, 3vw, 1.9rem);
    line-height: 1.25;
}

.profile-role {
    margin: 8px 0 3px;
    color: var(--text);
    font-weight: 650;
}

.profile-school,
.profile-location {
    margin: 1px 0;
    color: var(--text-soft);
    font-size: 0.9rem;
}

.availability {
    width: fit-content;
    margin: 17px auto 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 11px;
    border: 1px solid color-mix(in srgb, var(--success) 25%, var(--line));
    border-radius: 999px;
    background: color-mix(in srgb, var(--success) 8%, transparent);
    color: var(--text-soft);
    font-size: 0.78rem;
}

.availability-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 5px color-mix(in srgb, var(--success) 13%, transparent);
    animation: breathe 2.2s ease-in-out infinite;
}

.profile-summary {
    margin: 16px 0 0;
    padding-top: 15px;
    border-top: 1px solid var(--line);
    color: var(--text-soft);
    font-size: 0.82rem;
    line-height: 1.65;
    text-align: left;
}

.profile-keywords {
    margin-top: 13px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 7px;
}

.profile-keywords span {
    padding: 4px 9px;
    border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--line));
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary-strong);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.social-links {
    margin-top: auto;
    padding-top: 20px;
    display: flex;
    justify-content: center;
    gap: 9px;
}

.social-links a {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.25s var(--ease), box-shadow 0.25s ease;
}

.social-links a:hover {
    border-color: color-mix(in srgb, var(--primary) 50%, var(--line));
    background: var(--primary-soft);
    transform: translateY(-4px);
    box-shadow: 0 10px 22px color-mix(in srgb, var(--primary) 14%, transparent);
}

.social-links img {
    width: 23px;
    height: 23px;
}

:root[data-theme="dark"] .social-links img {
    filter: brightness(0) invert(1) opacity(0.86);
}

.content-stack {
    display: grid;
    gap: 18px;
}

.content-card {
    padding: clamp(24px, 3.5vw, 32px);
    border-radius: 18px;
}

.content-card:hover,
.article-card:hover {
    border-color: color-mix(in srgb, var(--primary) 24%, var(--line));
    box-shadow: 0 10px 30px rgba(23, 32, 51, 0.08);
}

.section-heading {
    margin: 0 0 18px;
    display: flex;
    align-items: center;
    gap: 11px;
    color: var(--heading);
    font-size: clamp(1.25rem, 2.4vw, 1.52rem);
    line-height: 1.35;
}

.section-heading::before {
    content: "";
    width: 5px;
    height: 1.1em;
    flex: 0 0 auto;
    border-radius: 999px;
    background: linear-gradient(to bottom, var(--primary), var(--primary-strong));
}

.lead {
    margin: 0;
    color: var(--text);
    font-size: clamp(1rem, 2.2vw, 1.08rem);
}

.lead + .lead {
    margin-top: 12px;
}

.home-layout .content-card div[data-lang="zh"] > .lead {
    text-indent: 2em;
}

.text-link {
    color: var(--primary);
    font-weight: 650;
    text-decoration: none;
}

.text-link:hover {
    text-decoration: underline;
}

.tag-list {
    margin: 22px 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    list-style: none;
}

.tag,
.meta-chip {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary-strong);
    font-weight: 700;
}

.tag {
    padding: 6px 12px;
    font-size: 0.78rem;
}

.intro-actions {
    margin-top: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.section-description {
    max-width: 650px;
    margin: -4px 0 22px;
    color: var(--text-soft);
    font-size: 0.9rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px;
}

.skill-card {
    position: relative;
    overflow: hidden;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: var(--surface-muted);
    opacity: 0;
    transform: translateY(18px) scale(0.985);
    transition: opacity 0.6s var(--ease), transform 0.6s var(--ease), border-color 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

.skill-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), #78c3ff);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s var(--ease);
}

#skills.is-visible .skill-card {
    opacity: 1;
    transform: translateY(0) scale(1);
}

#skills.is-visible .skill-card:nth-child(2) { transition-delay: 0.08s; }
#skills.is-visible .skill-card:nth-child(3) { transition-delay: 0.16s; }
#skills.is-visible .skill-card:nth-child(4) { transition-delay: 0.24s; }

.skill-card:hover {
    border-color: color-mix(in srgb, var(--primary) 38%, var(--line));
    background: var(--surface-hover);
    box-shadow: 0 13px 28px color-mix(in srgb, var(--primary) 9%, transparent);
    transform: translateY(-4px) scale(1.005) !important;
    transition-delay: 0s !important;
}

.skill-card:hover::before {
    transform: scaleX(1);
}

.skill-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.skill-icon {
    width: 43px;
    height: 43px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: var(--primary-soft);
    color: var(--primary);
    transition: transform 0.35s var(--ease), background-color 0.3s ease;
}

.skill-card:hover .skill-icon {
    transform: rotate(-6deg) scale(1.08);
    background: color-mix(in srgb, var(--primary) 18%, transparent);
}

.skill-icon svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
}

.skill-index {
    display: block;
    color: var(--primary);
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.skill-card h3 {
    margin: 1px 0 0;
    color: var(--heading);
    font-size: 1rem;
}

.skill-card > p {
    margin: 13px 0 0;
    color: var(--text-soft);
    font-size: 0.84rem;
    line-height: 1.65;
}

.skill-tags {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.skill-tags span {
    padding: 3px 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text-soft);
    font-size: 0.67rem;
    font-weight: 650;
    transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s var(--ease);
}

.skill-tags span:hover {
    border-color: var(--primary);
    color: var(--primary-strong);
    transform: translateY(-2px);
}

.experience-timeline {
    position: relative;
    display: grid;
}

.experience-timeline::before {
    content: "";
    position: absolute;
    top: 9px;
    bottom: 12px;
    left: 71px;
    width: 1px;
    background: linear-gradient(to bottom, var(--primary), var(--line));
}

.experience-item {
    position: relative;
    padding: 0 0 25px;
    display: grid;
    grid-template-columns: 55px minmax(0, 1fr);
    gap: 34px;
    opacity: 0;
    transform: translateX(14px);
    transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.experience-item:last-child {
    padding-bottom: 0;
}

#experience.is-visible .experience-item {
    opacity: 1;
    transform: translateX(0);
}

#experience.is-visible .experience-item:nth-child(2) { transition-delay: 0.1s; }
#experience.is-visible .experience-item:nth-child(3) { transition-delay: 0.2s; }

.experience-marker {
    position: absolute;
    top: 5px;
    left: 65px;
    width: 13px;
    height: 13px;
    border: 3px solid var(--surface);
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-soft);
}

.experience-date {
    padding-top: 1px;
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 800;
    text-align: right;
}

.experience-copy h3 {
    margin: 0;
    color: var(--heading);
    font-size: 1rem;
    line-height: 1.5;
}

.experience-copy p {
    margin: 7px 0 0;
    color: var(--text-soft);
    font-size: 0.84rem;
    line-height: 1.65;
}

.experience-copy .experience-org {
    margin-top: 2px;
    color: var(--primary-strong);
    font-size: 0.76rem;
    font-weight: 700;
}

.section-link-row {
    margin-top: 22px;
    padding-top: 17px;
    border-top: 1px solid var(--line);
    text-align: right;
}

.project-section {
    padding-top: 16px;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.project-card {
    position: relative;
    overflow: hidden;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 17px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.65s var(--ease), transform 0.65s var(--ease), border-color 0.3s ease, box-shadow 0.3s ease;
}

.project-card::after {
    content: "";
    position: absolute;
    right: -45px;
    bottom: -65px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--primary-soft), transparent 68%);
    opacity: 0;
    transform: scale(0.7);
    transition: opacity 0.35s ease, transform 0.5s var(--ease);
}

.project-section.is-visible .project-card {
    opacity: 1;
    transform: translateY(0);
}

.project-section.is-visible .project-card:nth-child(2) { transition-delay: 0.1s; }
.project-section.is-visible .project-card:nth-child(3) { transition-delay: 0.18s; }

.project-card:hover {
    border-color: color-mix(in srgb, var(--primary) 36%, var(--line));
    box-shadow: var(--shadow-md);
    transform: translateY(-4px) !important;
    transition-delay: 0s !important;
}

.project-card:hover::after {
    opacity: 1;
    transform: scale(1);
}

.project-card-featured {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, var(--surface), color-mix(in srgb, var(--primary) 6%, var(--surface)));
}

.project-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.project-role {
    color: var(--text-soft);
    font-size: 0.72rem;
    font-weight: 700;
}

.project-card h3 {
    position: relative;
    z-index: 1;
    margin: 15px 0 8px;
    color: var(--heading);
    font-size: clamp(1.05rem, 2.2vw, 1.3rem);
    line-height: 1.45;
}

.project-card p {
    position: relative;
    z-index: 1;
    margin: 0;
    color: var(--text-soft);
    font-size: 0.88rem;
    line-height: 1.7;
}

.project-tags {
    position: relative;
    z-index: 1;
    margin-top: 17px;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.project-tags span {
    padding: 4px 9px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface-muted);
    color: var(--text-soft);
    font-size: 0.68rem;
    font-weight: 650;
}

.direction-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.direction-card {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface-muted);
    transition: border-color 0.25s ease, background-color 0.25s ease, transform 0.25s var(--ease);
}

.direction-card:hover {
    border-color: color-mix(in srgb, var(--primary) 30%, var(--line));
    background: var(--surface-hover);
    transform: translateY(-2px);
}

.direction-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    margin-bottom: 15px;
    border-radius: 13px;
    background: var(--primary-soft);
    color: var(--primary);
}

.direction-icon svg {
    width: 21px;
    height: 21px;
    stroke: currentColor;
}

.direction-card h3 {
    margin: 0 0 7px;
    color: var(--heading);
    font-size: 1rem;
    line-height: 1.45;
}

.direction-card p {
    margin: 0;
    color: var(--text-soft);
    font-size: 0.88rem;
    line-height: 1.65;
}

.status-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.status-list li {
    display: grid;
    grid-template-columns: 10px 1fr;
    gap: 12px;
    align-items: start;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

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

.status-list li::before {
    content: "";
    width: 7px;
    height: 7px;
    margin-top: 0.65em;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-soft);
}

.page-hero {
    margin-bottom: 30px;
    padding: 24px 2px 30px;
    position: relative;
    border-bottom: 1px solid var(--line);
}

.page-hero::after {
    display: none;
}

.page-hero > * {
    position: relative;
    z-index: 1;
}

.page-hero h1 {
    max-width: 720px;
    margin: 0;
    color: var(--heading);
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    line-height: 1.22;
    letter-spacing: -0.025em;
}

.page-hero p:not(.eyebrow) {
    max-width: 620px;
    margin: 11px 0 0;
    color: var(--text-soft);
    font-size: clamp(0.95rem, 2vw, 1.08rem);
}

.page-content {
    display: grid;
    gap: 20px;
}

.research-section {
    padding: 4px 0 8px;
}

.research-section .section-heading {
    margin-bottom: 18px;
}

.update-note {
    padding: 24px 26px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: color-mix(in srgb, var(--surface) 82%, transparent);
}

.update-note .empty-state-icon {
    margin: 0;
}

.update-note-copy h2 {
    margin: 0;
    color: var(--heading);
    font-size: 1.06rem;
}

.update-note-copy p {
    margin: 4px 0 0;
    color: var(--text-soft);
    font-size: 0.86rem;
}

.update-note .button-row {
    margin-top: 0;
    flex-wrap: nowrap;
}

.resume-panel {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.resume-toolbar {
    padding: 20px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    border-bottom: 1px solid var(--line);
}

.resume-toolbar h2 {
    margin: 0;
    color: var(--heading);
    font-size: 1.08rem;
    line-height: 1.4;
}

.resume-meta {
    margin: 4px 0 0;
    color: var(--text-soft);
    font-size: 0.8rem;
}

.resume-actions {
    margin-top: 0;
    flex: 0 0 auto;
    flex-wrap: nowrap;
}

.resume-viewer {
    height: min(78vh, 900px);
    min-height: 640px;
    padding: 12px;
    background: #262d36;
}

.resume-pdf {
    width: 100%;
    height: 100%;
    display: block;
    border: 0;
    border-radius: 8px;
    background: #ffffff;
}

.resume-fallback {
    height: 100%;
    padding: 32px;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 14px;
    color: #1f2937;
    text-align: center;
}

.resume-fallback p {
    margin: 0;
}

.resume-mobile-card {
    display: none;
}

.resume-document-icon {
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: var(--primary-soft);
    color: var(--primary);
}

.resume-document-icon svg {
    width: 27px;
    height: 27px;
    stroke: currentColor;
}

.article-list {
    display: grid;
    gap: 18px;
}

.article-card {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    min-height: 190px;
    overflow: hidden;
    border-radius: var(--radius-lg);
}

.article-card-text {
    grid-template-columns: 1fr;
    min-height: 0;
}

.article-card:hover {
    transform: translateY(-4px);
}

.article-card-media {
    overflow: hidden;
    background: var(--surface-muted);
}

.article-card-media.note-cover {
    min-height: 190px;
    padding: 18px;
    display: grid;
    place-items: stretch;
    color: #ffffff;
    text-decoration: none;
    background:
        radial-gradient(circle at 24% 22%, rgba(255, 255, 255, 0.34), transparent 34%),
        linear-gradient(135deg, color-mix(in srgb, var(--primary) 88%, #182b52), #10243d 78%);
    background-size: 150% 150%;
    transition: background-position 0.65s var(--ease), transform 0.65s var(--ease);
}

.article-card-media.note-cover-featured {
    background:
        radial-gradient(circle at 16% 20%, rgba(255, 255, 255, 0.36), transparent 34%),
        radial-gradient(circle at 82% 78%, rgba(120, 195, 255, 0.38), transparent 32%),
        linear-gradient(135deg, #005ec2, #11365a 78%);
}

.article-card-media.note-cover-system {
    background:
        radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.32), transparent 32%),
        radial-gradient(circle at 82% 78%, rgba(127, 230, 188, 0.38), transparent 34%),
        linear-gradient(135deg, #28566f, #1d3b42 76%);
}

.article-card:hover .article-card-media.note-cover {
    background-position: 100% 100%;
}

.note-cover-inner {
    position: relative;
    overflow: hidden;
    min-height: 154px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.note-cover-inner::after {
    content: "";
    position: absolute;
    right: -30px;
    bottom: -38px;
    width: 112px;
    height: 112px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 50%;
}

.note-cover-mark {
    position: relative;
    z-index: 1;
    width: fit-content;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.12em;
}

.note-cover-title {
    position: relative;
    z-index: 1;
    font-size: 1.32rem;
    font-weight: 850;
    letter-spacing: -0.02em;
}

.article-card-media img {
    width: 100%;
    height: 100%;
    min-height: 190px;
    object-fit: cover;
    transition: transform 0.65s var(--ease), filter 0.35s ease;
}

.article-card:hover .article-card-media img {
    transform: scale(1.045);
}

.article-card-body {
    min-width: 0;
    padding: 24px 26px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    color: var(--text-soft);
    font-size: 0.78rem;
}

.meta-chip {
    padding: 4px 9px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.article-card h2,
.article-card h3 {
    margin: 10px 0 7px;
    color: var(--heading);
    font-size: clamp(1.12rem, 3vw, 1.42rem);
    line-height: 1.4;
}

.article-card p {
    margin: 0;
    color: var(--text-soft);
    font-size: 0.92rem;
}

.article-card-link {
    margin-top: 16px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    width: fit-content;
    color: var(--primary);
    font-size: 0.88rem;
    font-weight: 750;
    text-decoration: none;
}

.article-card-link span:last-child {
    transition: transform 0.2s var(--ease);
}

.article-card-link:hover span:last-child {
    transform: translateX(4px);
}

.empty-state {
    padding: 42px 28px;
    border-style: dashed;
    border-radius: var(--radius-lg);
    text-align: center;
}

.empty-state-icon {
    width: 54px;
    height: 54px;
    margin: 0 auto 14px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: var(--primary-soft);
    color: var(--primary);
}

.empty-state-icon svg {
    width: 25px;
    height: 25px;
    stroke: currentColor;
}

.empty-state h2 {
    margin: 0;
    color: var(--heading);
    font-size: 1.2rem;
}

.empty-state p {
    max-width: 520px;
    margin: 8px auto 0;
    color: var(--text-soft);
    font-size: 0.9rem;
}

.button-row {
    margin-top: 22px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.button {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 15px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--surface);
    color: var(--text);
    font-size: 0.86rem;
    font-weight: 750;
    text-decoration: none;
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease, transform 0.2s var(--ease), box-shadow 0.2s ease;
}

.button:hover {
    border-color: var(--primary);
    color: var(--primary-strong);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.button-primary {
    border-color: var(--primary);
    background: var(--primary);
    color: #ffffff;
}

.button-primary:hover {
    background: var(--primary-strong);
    color: #ffffff;
}

.article-sheet {
    max-width: 860px;
    margin: 0 auto;
    padding: clamp(24px, 5vw, 48px);
    border-radius: var(--radius-lg);
}

.article-header {
    margin-bottom: 34px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--line);
}

.article-header h1 {
    margin: 12px 0 16px;
    color: var(--heading);
    max-width: 760px;
    font-size: clamp(1.7rem, 4vw, 2.4rem);
    line-height: 1.25;
    letter-spacing: -0.025em;
}

.article-lead {
    margin: 0;
    color: var(--text-soft);
    font-size: 1.03rem;
}

.article-body {
    color: var(--text);
}

.article-body h2 {
    margin: 38px 0 12px;
    color: var(--heading);
    font-size: 1.32rem;
}

.article-body h3 {
    margin: 25px 0 10px;
    color: var(--heading);
    font-size: 1.06rem;
}

.article-body p {
    margin: 12px 0;
}

.article-body ul,
.article-body ol {
    padding-left: 1.35em;
}

.article-body li {
    margin: 7px 0;
}

.article-body code {
    padding: 0.12em 0.36em;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface-muted);
    color: var(--heading);
    font-size: 0.9em;
}

.article-body .code-panel {
    overflow-x: auto;
    margin: 16px 0 20px;
    padding: 16px 18px;
    border: 1px solid color-mix(in srgb, var(--primary) 20%, var(--line));
    border-radius: 12px;
    background: #101820;
    color: #eaf2f1;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.article-body .code-panel code {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: inherit;
    font-size: 0.88rem;
    line-height: 1.7;
    white-space: pre;
}

.paper-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 22px 0 28px;
}

.paper-summary-item {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface-muted);
}

.paper-summary-item strong {
    display: block;
    margin-bottom: 5px;
    color: var(--heading);
    font-size: 0.92rem;
}

.paper-summary-item span {
    display: block;
    color: var(--text-soft);
    font-size: 0.84rem;
    line-height: 1.65;
}

.note-callout {
    margin: 24px 0;
    padding: 18px 20px;
    border: 1px solid color-mix(in srgb, var(--primary) 24%, var(--line));
    border-radius: 16px;
    background: var(--primary-soft);
}

.note-callout p {
    margin: 0;
}

.note-pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0 0;
}

.note-pill-row span {
    padding: 5px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface-muted);
    color: var(--text-soft);
    font-size: 0.72rem;
    font-weight: 700;
}

.reference-list {
    margin-top: 18px;
    padding-left: 1.35em;
    color: var(--text-soft);
    font-size: 0.88rem;
}

.reference-list a {
    font-weight: 700;
    text-decoration: none;
}

.reference-list a:hover {
    text-decoration: underline;
}

.article-figure {
    margin: 28px 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface-muted);
}

.article-figure img {
    width: 100%;
    border-radius: 10px;
}

.article-figure-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.article-figure figcaption {
    padding: 9px 4px 0;
    color: var(--text-soft);
    font-size: 0.8rem;
    text-align: center;
}

.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1500;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), #62b5ff);
    box-shadow: 0 0 14px color-mix(in srgb, var(--primary) 55%, transparent);
}

.site-footer {
    width: min(calc(100% - 40px), var(--content-width));
    margin: 0 auto;
    padding: 22px 0 30px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    border-top: 1px solid var(--line);
    color: var(--text-soft);
    font-size: 0.8rem;
}

.site-footer p {
    margin: 0;
}

.footer-beian a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-beian a:hover {
    color: var(--primary);
}

.footer-beian svg {
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
    stroke: currentColor;
}

.back-to-top {
    position: fixed;
    right: max(20px, calc((100vw - var(--content-width)) / 2 - 56px));
    bottom: 24px;
    z-index: 800;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    padding: 0;
    border-radius: 13px;
    box-shadow: var(--shadow-sm);
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
}

.back-to-top.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 {
    transition-delay: 0.08s;
}

.reveal-delay-2 {
    transition-delay: 0.16s;
}

@keyframes breathe {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(0.82); opacity: 0.72; }
}

@keyframes headerDrop {
    from { opacity: 0; transform: translateY(-14px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes gradientDrift {
    from { background-position: 0% 50%; }
    to { background-position: 100% 50%; }
}

@media (max-height: 700px) and (min-width: 761px) {
    .profile-cover {
        display: none;
    }

    .profile-body {
        padding: 0 4px 6px;
    }

    .profile-photo {
        width: 100%;
        aspect-ratio: 5 / 4;
        height: auto;
        margin: 0 0 14px;
        border-radius: 14px;
    }

    .profile-card h1 {
        font-size: 1.55rem;
    }

    .profile-role {
        margin-top: 5px;
        font-size: 0.88rem;
    }

    .profile-school,
    .profile-location {
        font-size: 0.8rem;
    }

    .availability {
        margin-top: 11px;
        padding-block: 4px;
    }

    .profile-summary {
        display: none;
    }

    .profile-keywords {
        margin-top: 10px;
    }

    .social-links {
        padding-top: 12px;
    }

    .social-links a {
        width: 37px;
        height: 37px;
    }
}

@media (max-width: 980px) {
    .nav-shell {
        gap: 14px;
    }

    .site-nav a {
        padding-inline: 9px;
        font-size: 0.86rem;
    }

    .home-layout {
        grid-template-columns: minmax(250px, 275px) minmax(0, 1fr);
    }
}

@media (max-width: 760px) {
    :root {
        --header-height: 64px;
    }

    .nav-shell,
    .site-main,
    .site-footer {
        width: min(calc(100% - 28px), var(--content-width));
    }

    .nav-shell {
        grid-template-columns: 1fr;
        gap: 9px;
    }

    .nav-actions {
        width: 100%;
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: 36px 1fr auto 36px;
        align-items: center;
        justify-self: stretch;
        gap: 7px;
    }

    .menu-button {
        grid-column: 1;
        justify-self: start;
    }

    .language-button {
        grid-column: 3;
        justify-self: end;
    }

    .icon-button {
        grid-column: 4;
        justify-self: end;
    }

    .brand-name {
        display: none;
    }

    .site-nav {
        position: absolute;
        grid-column: auto;
        top: calc(100% + 9px);
        left: 14px;
        width: min(240px, calc(100% - 28px));
        padding: 10px;
        display: grid;
        gap: 3px;
        visibility: hidden;
        border: 1px solid var(--line);
        border-radius: 16px;
        background: color-mix(in srgb, var(--surface) 96%, transparent);
        box-shadow: var(--shadow-md);
        opacity: 0;
        transform: translateY(-8px) scale(0.98);
        transform-origin: top;
        transition: opacity 0.22s ease, transform 0.22s var(--ease), visibility 0.22s;
    }

    .site-nav.is-open {
        visibility: visible;
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    .site-nav a {
        padding: 10px 13px;
        text-align: left;
    }

    .site-nav a::after {
        display: none;
    }

    .menu-button {
        display: inline-grid;
    }

    .language-button,
    .icon-button,
    .menu-button {
        height: 36px;
    }

    .language-button {
        min-width: 40px;
    }

    .icon-button,
    .menu-button {
        width: 36px;
    }

    .site-main {
        padding-top: calc(var(--header-height) + 26px);
        padding-bottom: 40px;
    }

    .home-layout {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .profile-card {
        position: static;
        height: auto;
        overflow: hidden;
        display: block;
    }

    .profile-cover {
        display: none;
    }

    .profile-photo {
        width: 100%;
        aspect-ratio: 5 / 4;
        height: auto;
        margin-top: 0;
    }

    .profile-body {
        display: block;
    }

    .social-links {
        margin-top: 20px;
        padding-top: 0;
    }

    .content-stack {
        gap: 18px;
    }

    .content-card {
        padding: 23px 20px;
    }

    .article-figure-grid {
        grid-template-columns: 1fr;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .project-grid {
        grid-template-columns: 1fr;
    }

    .project-card-featured {
        grid-column: auto;
    }

    .experience-timeline::before {
        left: 6px;
    }

    .experience-item {
        padding: 0 0 24px 29px;
        display: block;
    }

    .experience-marker {
        left: 0;
    }

    .experience-date {
        margin-bottom: 4px;
        text-align: left;
    }

    .section-link-row {
        text-align: left;
    }

    .page-hero {
        margin-bottom: 18px;
        padding: 18px 2px 24px;
    }

    .direction-grid {
        grid-template-columns: 1fr;
    }

    .article-card {
        grid-template-columns: 1fr;
    }

    .article-card-media {
        aspect-ratio: 16 / 9;
    }

    .article-card-media.note-cover {
        min-height: 0;
    }

    .note-cover-inner {
        min-height: 0;
    }

    .article-card-media img {
        min-height: 0;
    }

    .article-card-body {
        padding: 21px;
    }

    .article-sheet {
        padding: 26px 20px;
    }

    .paper-summary-grid {
        grid-template-columns: 1fr;
    }

    .update-note {
        grid-template-columns: auto minmax(0, 1fr);
        padding: 20px;
    }

    .update-note .button-row {
        grid-column: 1 / -1;
        margin-top: 2px;
    }

    .resume-toolbar {
        padding: 18px;
        align-items: flex-start;
        flex-direction: column;
        gap: 15px;
    }

    .resume-actions {
        width: 100%;
    }

    .resume-actions .button {
        flex: 1;
    }

    .resume-viewer {
        display: none;
    }

    .resume-mobile-card {
        padding: 28px 20px;
        display: grid;
        justify-items: center;
        gap: 14px;
        background: var(--surface-muted);
        text-align: center;
    }

    .resume-mobile-card p {
        max-width: 460px;
        margin: 0;
        color: var(--text-soft);
        font-size: 0.9rem;
    }

    .resume-mobile-card .button-row {
        width: min(100%, 360px);
        margin-top: 2px;
    }

    .site-footer {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .back-to-top {
        right: 16px;
        bottom: 16px;
    }
}

@media (max-width: 430px) {
    .button-row {
        align-items: stretch;
        flex-direction: column;
    }

    .button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

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

@media print {
    .site-header,
    .back-to-top,
    .reading-progress,
    .site-footer,
    .button-row {
        display: none !important;
    }

    body,
    .article-sheet {
        background: #ffffff;
        color: #111111;
        box-shadow: none;
    }

    .site-main {
        width: 100%;
        padding: 0;
    }
}
