:root {
    --olive: #66725a;
    --ink: #161616;
    --muted: #5f5f5f;
    --line: #e7e7e4;
    --sheet: #f7f7f5;
    --name: #172016;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    color: var(--ink);
    background: var(--olive);
    font-family: Manrope, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

html:not(.zh) .zh { display: none !important; }
html.zh .en { display: none !important; }

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

a { color: inherit; }

h1, h2, h3 {
    font-family: Archivo, "Arial Narrow", "Segoe UI", "PingFang SC", sans-serif;
    font-weight: 700;
    letter-spacing: -0.045em;
    line-height: 0.92;
    margin: 0;
}

p { margin: 0; }

.layout {
    display: grid;
    grid-template-columns: minmax(340px, 46vw) minmax(0, 1fr);
    gap: 14px;
    padding: 14px;
    min-height: 100vh;
}

.poster {
    position: sticky;
    top: 14px;
    height: calc(100vh - 28px);
    overflow: hidden;
    background: #c5cbb8;
}

.poster-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 8%;
}

.poster-ui {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 22px 24px 28px;
    color: var(--name);
}

.poster-top,
.poster-tools,
.entry-top {
    display: flex;
    align-items: center;
}

.poster-top { justify-content: space-between; }

.poster-tools { gap: 14px; font-size: 0.92rem; }

.icon-btn,
.text-btn,
form button {
    font: inherit;
    color: inherit;
    cursor: pointer;
    background: transparent;
}

.icon-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(23, 32, 22, 0.55);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.45);
}

.icon-btn span {
    display: block;
    width: 14px;
    height: 1.5px;
    background: var(--name);
}

.text-btn { border: 0; padding: 0; }

.poster-nav {
    display: none;
    flex-direction: column;
    gap: 8px;
    margin-top: 28px;
}

.poster-nav.open { display: flex; }

.poster-nav a {
    text-decoration: none;
    font-family: Archivo, "PingFang SC", sans-serif;
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1;
}

.poster-main { margin-top: 3vh; max-width: 92%; }

.poster-nav.open + .poster-main { display: none; }

.poster h1 {
    font-size: clamp(3.8rem, 6.2vw, 6.6rem);
    font-weight: 800;
    max-width: 100%;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
}

html.zh .poster h1 {
    font-family: "Songti SC", "Noto Serif SC", Archivo, serif;
    font-size: clamp(4.8rem, 8vw, 8.6rem);
    letter-spacing: 0.04em;
}

.feed {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.sheet {
    background: var(--sheet);
    padding: 42px 46px 46px;
    scroll-margin-top: 14px;
}

.sheet h2 {
    font-size: clamp(2.6rem, 4vw, 4rem);
    margin-bottom: 18px;
}

.sheet > p + p { margin-top: 14px; }

.lead, .role, .meta-line, .honors, figcaption, .stats span, .entry small {
    color: var(--muted);
}

.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin-top: 36px;
    border-top: 1px solid var(--line);
}

.stats div { padding: 18px 18px 0 0; }

.stats div + div {
    border-left: 1px solid var(--line);
    padding-left: 18px;
}

.stats strong {
    display: block;
    font-family: Archivo, "PingFang SC", sans-serif;
    font-size: clamp(2rem, 3vw, 2.8rem);
    font-weight: 700;
    letter-spacing: -0.05em;
    line-height: 1;
    color: var(--ink);
}

.stats span { display: block; margin-top: 8px; font-size: 0.84rem; }

.entry {
    padding: 26px 0;
    border-top: 1px solid var(--line);
}

.entry-top {
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.84rem;
    letter-spacing: 0.04em;
}

.entry h3 {
    font-size: clamp(1.5rem, 2vw, 2rem);
    margin-bottom: 10px;
}

.role { margin-bottom: 8px; }

.links { display: flex; gap: 18px; margin-top: 12px; }

.links a { text-underline-offset: 3px; }

.wide-photo { margin: 28px 0 0; }

.wide-photo img {
    width: 100%;
    height: 380px;
    object-fit: cover;
    object-position: center 30%;
}

.plain-list { display: grid; gap: 18px; margin-top: 8px; }

.plain-list h3 { font-size: 1.35rem; margin: 4px 0; }

.plain-list b, .meta-line { font-weight: 500; font-size: 0.92rem; }

.meta-line { margin-top: 16px; }

figcaption { margin-top: 8px; font-size: 0.82rem; }

.honors {
    margin: 8px 0 0;
    padding-left: 18px;
}

.honors li + li { margin-top: 8px; }

.life-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.life-grid img {
    width: 100%;
    height: 280px;
    object-fit: cover;
}

.life-grid .wide { grid-column: 1 / -1; }

.life-grid .wide img { height: 420px; }

.site-end {
    color: #f6f7f2;
    padding: 54px 28px 0;
    scroll-margin-top: 14px;
}

.end-top {
    display: grid;
    grid-template-columns: 1.3fr auto minmax(180px, 280px);
    gap: 28px 40px;
    align-items: end;
}

.big-mail {
    display: inline-block;
    margin-top: 12px;
    font-family: Archivo, "PingFang SC", sans-serif;
    font-size: clamp(1.8rem, 3.4vw, 3.1rem);
    font-weight: 700;
    letter-spacing: -0.045em;
    line-height: 1;
    text-decoration: none;
}

.end-phone {
    display: block;
    margin-top: 10px;
    text-decoration: none;
    opacity: 0.85;
}

.bubbles {
    display: flex;
    gap: 10px;
    margin: 22px 0 16px;
}

.bubbles a {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(246, 247, 242, 0.55);
    border-radius: 50%;
    display: grid;
    place-items: center;
}

.bubbles svg { width: 18px; height: 18px; }
.bubbles .mail { fill: none; stroke: currentColor; stroke-width: 1.6; }
.bubbles .gh { fill: currentColor; }

.end-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-bottom: 8px;
}

.end-links a { text-decoration: none; }

.end-photo {
    margin: 0;
    justify-self: end;
    width: 100%;
}

.end-photo img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    object-position: center 20%;
    border-radius: 18px 18px 28px 28px;
}

.end-mark {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: end;
    gap: 12px;
    margin-top: 18px;
}

.up {
    width: 68px;
    height: 68px;
    margin-bottom: 18px;
    border-radius: 50%;
    background: #f7f7f5;
    color: #243024;
    display: grid;
    place-items: center;
    text-decoration: none;
    font-size: 1.5rem;
}

.end-word {
    margin: 0;
    font-family: Archivo, "Arial Narrow", sans-serif;
    font-weight: 800;
    font-size: clamp(4.8rem, 14vw, 12.5rem);
    line-height: 0.76;
    letter-spacing: -0.06em;
    white-space: nowrap;
    overflow: hidden;
}

html.zh .end-word {
    font-family: "Songti SC", "Noto Serif SC", serif;
    letter-spacing: 0.02em;
    font-size: clamp(4.6rem, 13vw, 11rem);
}

.handle {
    margin-bottom: 22px;
    text-decoration: none;
    white-space: nowrap;
}

:focus-visible { outline: 2px solid var(--olive); outline-offset: 3px; }

@media (max-width: 980px) {
    .layout { grid-template-columns: 1fr; padding: 10px; }
    .poster { position: relative; top: 0; height: 92vh; }
    .sheet { padding: 28px 22px 32px; }
    .stats, .life-grid, .end-top, .end-mark { grid-template-columns: 1fr; }
    .end-photo { max-width: 280px; }
    .end-word { font-size: 4.2rem; }
    html.zh .end-word { font-size: 3.6rem; }
    .handle, .up { margin-bottom: 0; }
    .stats div + div { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); margin-top: 14px; }
    .life-grid .wide { grid-column: auto; }
    .life-grid img, .life-grid .wide img { height: 240px; }
    .poster h1, html.zh .poster h1 { font-size: 3.5rem; }
    .poster-main { margin-top: 2vh; }
}

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