:root {
    color-scheme: light;
    --page: #f5f7f4; --text: #213b33; --muted: #5e7067; --subtle: #626f66;
    --accent: #246b56; --on-accent: #fff;
    --accent-soft: #eaf2ec; --line: #dce4dc;
}
[data-theme="dark"] {
    color-scheme: dark;
    --page: #0f1816; --text: #e8efe8; --muted: #adbcaf; --subtle: #9eafa2;
    --accent: #add9bd; --on-accent: #163d2a;
    --accent-soft: #23392c; --line: #2b3b30;
}
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { background: var(--page); -webkit-text-size-adjust: 100%; }
body { min-width: 280px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; background: var(--page); color: var(--text); line-height: 1.7; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
a, button { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
svg { display: block; flex: none; }
img { display: block; max-width: 100%; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 10; padding: 10px 18px; border-radius: 6px; background: var(--page); transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* 全屏双栏：风景铺满左侧，资料随屏幕宽度舒展。 */
.wrapper { display: grid; grid-template-columns: 48% minmax(0, 1fr); width: 100%; min-height: 100vh; min-height: 100svh; }
.left-side { position: sticky; top: 0; min-width: 0; height: 100vh; height: 100svh; }
.visual-inner { position: relative; height: 100%; overflow: hidden; isolation: isolate; background: #3d5356; }
.bg-image { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 48% center; }
.visual-inner::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(transparent 65%, rgb(8 27 30 / 65%)); }
.scene-caption { position: absolute; right: 32px; bottom: 28px; left: 32px; color: #fff; font-size: 11px; letter-spacing: .04em; }
.right-side {
    --panel-gutter: clamp(36px, 5vw, 96px);
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 100vh;
    min-height: 100svh;
    padding: 32px var(--panel-gutter) 24px;
}
.theme-toggle {
    position: absolute;
    top: 24px;
    right: var(--panel-gutter);
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: var(--muted);
    background: transparent;
}
.theme-toggle:hover { color: var(--accent); background: var(--accent-soft); }
.theme-sun { display: none; }
[data-theme="dark"] .theme-sun { display: block; }
[data-theme="dark"] .theme-moon { display: none; }
.content-box { width: 100%; margin: auto 0; padding: 48px 0; text-align: center; outline-offset: 12px; }
.profile-heading { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.avatar-ring { position: relative; display: grid; place-items: center; flex: none; width: 80px; height: 80px; border-radius: 50%; background: var(--accent-soft); }
.avatar-fallback { position: absolute; font-size: 13px; font-weight: 600; color: var(--accent); }
.avatar { position: relative; width: 80px; height: 80px; border-radius: 50%; object-fit: cover; background: var(--accent-soft); }
.profile-identity { min-width: 0; }
.name { font-size: clamp(36px, 3vw, 48px); font-weight: 650; line-height: 1.3; letter-spacing: -.035em; overflow-wrap: anywhere; }
.location { display: flex; align-items: center; justify-content: center; gap: 5px; margin-top: 5px; color: var(--subtle); font-size: 12px; }
.location .icon { width: 14px; height: 14px; }
.action-group {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    max-width: 680px;
    margin: 32px auto 0;
}
.site-link { display: flex; align-items: center; justify-content: center; gap: 9px; min-width: 0; min-height: 52px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; font-weight: 500; }
.site-link:hover { border-color: var(--accent); background: var(--accent-soft); }
.poem-container { max-width: 32em; margin: 28px auto 0; }
.poem-line { font-family: "Songti SC", "STSong", "SimSun", serif; color: var(--muted); font-size: 16px; line-height: 1.9; overflow-wrap: anywhere; }
.poem-source { margin-top: 8px; color: var(--subtle); font-size: 11px; overflow-wrap: anywhere; }
.social-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; }
.social-links a { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 0 10px; border-radius: 6px; color: var(--muted); font-size: 12px; }
.social-links a:hover { color: var(--accent); background: var(--accent-soft); }
.social-links .icon { width: 16px; height: 16px; }
.panel-footer { padding-top: 16px; color: var(--subtle); font-size: 10px; line-height: 1.8; }
.icp-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 2px 14px; }
.icp-links a { display: inline-flex; align-items: center; gap: 4px; min-height: 28px; text-underline-offset: 3px; }
.icp-links a:hover { color: var(--accent); text-decoration: underline; }
.icp-links img { flex: none; width: 12px; height: 12px; }

@media (max-width: 800px) {
    .wrapper { grid-template-columns: minmax(0, 1fr); align-content: start; }
    .left-side { position: relative; width: 100%; height: clamp(220px, 36vw, 320px); }
    .bg-image { object-position: center 62%; }
    .scene-caption { bottom: 20px; left: 28px; font-size: 10px; }
    .right-side { min-height: calc(100vh - clamp(220px, 36vw, 320px)); min-height: calc(100svh - clamp(220px, 36vw, 320px)); padding-bottom: max(24px, env(safe-area-inset-bottom)); }
    .theme-toggle { top: 18px; }
    .content-box { margin: 0; padding: 0 0 24px; }
    .avatar-ring, .avatar { width: 64px; height: 64px; }
    .action-group { margin-top: 24px; gap: 10px; }
    .site-link { min-height: 48px; }
    .social-links { margin-top: 12px; }
    .poem-container { margin-top: 22px; }
    .poem-line { font-size: 15px; }
    .panel-footer { margin-top: auto; padding-top: 8px; }
}
@media (max-width: 480px) {
    .right-side { --panel-gutter: 24px; }
    .scene-caption { left: 24px; }
    .avatar-ring, .avatar { width: 56px; height: 56px; }
    .theme-toggle { width: 40px; height: 40px; }
    .name { font-size: 30px; }
    .poem-line { font-size: 14px; }
}
@media (max-width: 360px) {
    .right-side { --panel-gutter: 20px; }
    .scene-caption { left: 20px; }
    .avatar-ring, .avatar { width: 48px; height: 48px; }
    .avatar-fallback { font-size: 11px; }
    .profile-heading { gap: 10px; }
    .name { font-size: 28px; }
    .location { font-size: 11px; }
    .location .icon { width: 12px; height: 12px; }
    .site-link { gap: 6px; padding: 9px 6px; font-size: 13px; }
}
@media (forced-colors: active) { .site-link, .theme-toggle { border: 1px solid ButtonText; } .site-link .icon { color: LinkText; } }
