:root {
    color-scheme: light;
    --bg: #fbfcfc;
    --text: #17272c;
    --muted: #63747a;
    --secondary: #42545a;
    --accent: #0b8298;
    --accent-hover: #075f70;
    --soft-border: #dfeaec;
}

:root[data-color-scheme="dark"] {
    color-scheme: dark;
    --bg: #101719;
    --text: #dbe5e7;
    --muted: #91a2a7;
    --secondary: #b0bec2;
    --accent: #62b3c1;
    --accent-hover: #88cbd5;
    --soft-border: #2c3e43;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.72;
    text-rendering: optimizeLegibility;
}

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

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

a:focus-visible,
.color-scheme-toggle:focus-visible {
    border-radius: 2px;
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.prose a,
.content-description a {
    overflow-wrap: anywhere;
}

.container {
    max-width: 820px;
    margin: 0 auto;
    padding: 72px 24px 56px;
}

.profile {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
    column-gap: 30px;
    align-items: start;
}

.profile>div,
section {
    min-width: 0;
}

h1 {
    margin-bottom: 7px;
    font-size: 32px;
    font-weight: 650;
    line-height: 1.18;
    letter-spacing: 0;
}

.chinese-name {
    color: var(--muted);
    font-size: 21px;
    font-weight: 400;
}

.tagline {
    margin-bottom: 16px;
    color: var(--muted);
    font-size: 16px;
}

.prose {
    max-width: 720px;
}

.prose p+p {
    margin-top: 8px;
}

.profile-photo {
    display: block;
    width: 118px;
    height: 118px;
    margin-top: 2px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
    color: var(--muted);
    font-size: 14px;
    font-style: normal;
}

.profile-links a {
    color: var(--accent);
    text-decoration-thickness: 1.5px;
    text-underline-offset: 3px;
    transition: color 0.15s;
}

.profile-links a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 44px 0 17px;
    color: var(--text);
    font-size: 21px;
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: -0.012em;
    white-space: nowrap;
}

.section-title::after {
    flex: 1 1 auto;
    height: 0;
    border-top: 2px solid var(--soft-border);
    content: "";
}

.content-entry {
    margin-bottom: 20px;
}

.content-entry:last-child {
    margin-bottom: 0;
}

.content-title {
    margin-bottom: 5px;
    font-size: 16.5px;
    font-weight: 500;
    line-height: 1.4;
}

.content-authors {
    color: var(--secondary);
    font-size: 14.5px;
    line-height: 1.55;
}

.content-authors strong {
    color: var(--text);
    font-weight: 600;
}

.content-venue {
    margin-top: 2px;
    color: var(--muted);
    font-size: 13.5px;
    line-height: 1.5;
}

.content-meta {
    color: var(--muted);
    font-size: 14px;
}

.content-description {
    margin-top: 5px;
    font-size: 14px;
    line-height: 1.6;
}

.content-title+.content-description {
    margin-top: 0;
    color: var(--muted);
}

.content-links {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    margin-top: 7px;
    font-size: 13px;
    font-weight: 550;
    line-height: 1.5;
}

.content-links .content-link {
    color: var(--accent);
    overflow-wrap: anywhere;
}

.content-links .content-link::before {
    content: "[";
}

.content-links .content-link::after {
    content: "]";
}

.content-links .content-link:hover {
    color: var(--accent-hover);
    text-decoration: none;
}

footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    max-width: 820px;
    margin: 0 auto;
    padding: 0 24px 34px;
    color: var(--muted);
    font-size: 14px;
}

.color-scheme-toggle {
    padding: 0;
    border: 0;
    background: none;
    color: var(--accent);
    cursor: pointer;
    font: inherit;
}

.color-scheme-toggle:hover {
    color: var(--accent-hover);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.color-scheme-label-light {
    display: none;
}

:root[data-color-scheme="dark"] .color-scheme-label-light {
    display: inline;
}

:root[data-color-scheme="dark"] .color-scheme-label-dark {
    display: none;
}

@media (max-width: 680px) {
    .container {
        padding: 40px 18px 48px;
    }

    .profile {
        grid-template-columns: 1fr;
        gap: 16px;
        padding-bottom: 24px;
    }

    .profile-photo {
        width: 118px;
        height: 118px;
        margin: 0 auto;
    }

    h1 {
        font-size: 27px;
    }

    .chinese-name {
        font-size: 19px;
    }

    .tagline {
        font-size: 15px;
        margin-bottom: 14px;
        overflow-wrap: anywhere;
    }

    .profile-links {
        gap: 8px;
        margin-top: 15px;
    }

    .profile-links a {
        font-size: 14px;
    }

    .section-title {
        margin-top: 32px;
    }

    .content-title {
        font-size: 16px;
    }

    footer {
        padding-right: 18px;
        padding-left: 18px;
    }
}

@media (max-width: 420px) {
    body {
        font-size: 15px;
    }

    h1 {
        font-size: 25px;
    }

    .section-title {
        font-size: 19px;
        white-space: normal;
    }
}
