:root {
    --bg:#f8f9f6;
    --ink:#202923;
    --muted:#68716b;
    --line:#dfe4dd;
    --green:#397853;
    --surface:#fff;
    --soft:#edf1e9}
* {
    box-sizing:border-box}
html {
    scroll-behavior:smooth;
    scroll-padding-top:32px}
body {
    margin:0;
    background:var(--bg);
    color:var(--ink);
    font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;
    line-height:1.7}
a {
    color:inherit;
    text-decoration:none}
button,a {
    -webkit-tap-highlight-color:transparent}
a:focus-visible {
    outline:3px solid var(--green);
    outline-offset:6px}
a:hover {
    color:var(--green)}
.wrap {
    width:min(1120px,calc(100% - 80px));
    margin-inline:auto}
.site-header {
    height:80px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    border-bottom:1px solid var(--line)}
.brand {
    display:flex;
    align-items:center;
    font-size:18px;
    font-weight:650;
    letter-spacing:-.7px}
.brand-dot,.period {
    color:var(--green)}
.site-header nav {
    display:flex;
    gap:34px;
    font-size:14px;
    color:var(--muted)}
.header-github {
    border:1px solid var(--line);
    border-radius:7px;
    padding:7px 15px;
    font-size:13px}
.header-github span {
    margin-left:14px}
.hero {
    display:grid;
    grid-template-columns:1.3fr 1fr;
    gap:40px;
    align-items:center;
    padding:32px 0}
h1 {
    font-size:clamp(36px,4vw,48px);
    line-height:1.22;
    letter-spacing:-2.5px;
    font-weight:650;
    margin:10px 0}
h1>span {
    white-space:nowrap}
.hero-detail {
    font-size:13px;
    line-height:1.9;
    color:var(--muted)}
.hero-actions {
    display:flex;
    gap:12px;
    margin-top:18px}
.button {
    display:inline-flex;
    align-items:center;
    gap:24px;
    padding:11px 19px;
    border:1px solid var(--line);
    border-radius:6px;
    font-size:13px;
    transition:transform .2s,background .2s}
.button:hover {
    transform:translateY(-2px)}
.primary {
    background:var(--green);
    border-color:var(--green);
    color:white}
.primary:hover {
    background:#2c6041;
    color:white}
.secondary {
    background:var(--surface)}
.hero-visual {
    position:relative;
    max-width:220px;
    justify-self:center;
    transform:rotate(3deg);
    padding:8px;
    background:#e5ebdf;
    border:1px solid #d7dfd0;
    border-radius:5px;
    box-shadow:6px 8px 0 #ecf0e7}
.portrait-frame {
    position:relative;
    overflow:hidden;
    border-radius:3px}
.portrait-frame img {
    display:block;
    width:100%;
    height:200px;
    object-fit:cover;
    object-position:center 42%;
    filter:saturate(.65)}
.intro-strip {
    display:flex;
    justify-content:space-between;
    gap:20px;
    border-block:1px solid var(--line);
    padding:12px 0;
    font-size:12px;
    color:var(--muted)}
.intro-strip>div {
    display:flex;
    gap:28px}
section[id] {
    scroll-margin-top:30px}
.projects-section {
    padding:36px 0}
.section-heading {
    display:flex;
    justify-content:space-between;
    align-items:flex-end;
    gap:20px;
    margin-bottom:18px}
h2 {
    font-size:25px;
    line-height:1.4;
    letter-spacing:-.8px;
    font-weight:600;
    margin:0}
.text-link {
    font-size:12px;
    color:var(--muted);
    white-space:nowrap}
.text-link span {
    margin-left:12px}
.projects-grid {
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:12px}
.project-card {
    display:flex;
    align-items:flex-start;
    gap:10px;
    padding:12px 14px;
    border:1px solid var(--line);
    border-radius:6px;
    background:var(--surface);
    transition:border-color .2s,background .2s;
}
.project-card:hover { color:var(--ink); border-color:#9bb59f; background:var(--soft); }
.featured { background:var(--soft); border-color:#cbd8c7; }
.project-copy { flex:1; min-width:0; }
.project-card h3 { margin:0 0 4px; font-size:14px; line-height:1.4; overflow-wrap:anywhere; }
.project-card p { margin:0; color:var(--muted); font-size:12px; line-height:1.6; }
.project-card .arrow { color:var(--muted); font-size:12px; }
.about-section {
    border-top:1px solid var(--line);
    padding:32px 0;
    display:grid;
    grid-template-columns:1fr 1.25fr;
    gap:32px}
.about-copy p {
    font-size:14px;
    color:var(--muted);
    margin:0;
    line-height:1.7}
.contact-section {
    background:#edf1e9;
    border:1px solid #dce4d6;
    border-radius:10px;
    padding:24px 28px;
    display:flex;
    justify-content:space-between;
    gap:30px;
    align-items:center}
.contact-section h2 {
    font-size:25px}
.contact-section p {
    font-size:13px;
    color:var(--muted);
    margin:13px 0}
.email-link {
    font-size:21px;
    letter-spacing:-.6px}
.email-link span {
    margin-left:15px;
    color:var(--green)}
.contact-links {
    display:flex;
    gap:24px;
    margin-top:12px;
    font-size:12px;
    color:var(--muted)}
.wechat-card {
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:10px;
    font-size:10px;
    color:var(--muted);
    flex-shrink:0}
.wechat-card img {
    background:white;
    object-fit:contain;
    border-radius:5px}
.site-footer {
    border-top:1px solid var(--line);
    padding:10px 0 24px;
    display:flex;
    justify-content:space-between;
    gap:15px;
    color:var(--muted);
    font-size:10px}
.site-footer>span:last-child {
    display:flex;
    gap:22px}
.skip-link {
    position:fixed;
    left:16px;
    top:-100px;
    padding:10px;
    background:var(--surface);
    z-index:10}
.skip-link:focus {
    top:10px}
@media(min-width:1400px) {
    .hero {
    padding-block:36px}
}
@media(max-width:900px) {
    .wrap {
    width:calc(100% - 48px)}
.hero {
    gap:35px}
.hero-visual {
    max-width:200px}
.portrait-frame img {
    height:180px}
.projects-grid {
    grid-template-columns:repeat(2,minmax(0,1fr))}
.about-section {
    gap:35px}
.hero-actions {
    gap:8px}
.button {
    padding:10px 13px;
    gap:12px}
}
@media(max-width:620px) {
    .wrap {
    width:calc(100% - 40px)}
.site-header {
    height:80px}
.brand {
    font-size:15px}
.header-github {
    display:none}
.site-header nav {
    gap:18px;
    font-size:12px}
.hero {
    grid-template-columns:1fr;
    padding:24px 0 28px;
    gap:20px}
h1 {
    font-size:49px}
.hero-detail {
    font-size:12px}
.hero-visual {
    width:150px;
    justify-self:center}
.portrait-frame img {
    height:145px}
.intro-strip {
    flex-direction:column;
    gap:10px;
    padding:10px 0}
.intro-strip>div {
    gap:21px;
    font-size:11px}
.projects-section {
    padding:28px 0}
.section-heading {
    align-items:flex-start;
    flex-direction:column;
    gap:10px}
h2 {
    font-size:23px}
.projects-grid {
    grid-template-columns:1fr}
.project-card {
    padding:12px;
    gap:10px}
.project-card p {
    font-size:13px}
.about-section {
    grid-template-columns:1fr;
    gap:25px;
    padding:24px 0}
.contact-section {
    padding:20px;
    align-items:flex-start;
    flex-direction:column;
    gap:18px}
.contact-section h2 {
    font-size:24px}
.email-link {
    font-size:19px}
.wechat-card {
    flex-direction:row;
    gap:20px}
.wechat-card img {
    width:74px;
    height:auto}
.contact-links {
    gap:19px}
.site-footer {
    flex-direction:column;
    gap:8px}
.site-footer>span:last-child {
    flex-wrap:wrap;
    gap:12px}
}
@media(prefers-reduced-motion:reduce) {
    html {
    scroll-behavior:auto}
*,*::before,*::after {
    transition:none!important}
}

/* Language selection uses a native control for keyboard and mobile support. */
.header-actions {
    display:flex;
    align-items:center;
    gap:12px;
}
.language-switch {
    display:flex;
    align-items:center;
    gap:7px;
    color:var(--muted);
    font-size:12px;
}
.language-switch[hidden] {
    display:none;
}
.language-switch select {
    font:inherit;
    color:var(--ink);
    background:var(--surface);
    border:1px solid var(--line);
    border-radius:7px;
    padding:9px 5px;
    max-width:155px;
    cursor:pointer;
}
.language-switch select:focus-visible {
    outline:3px solid var(--green);
    outline-offset:3px;
}
h1 > span[data-i18n] {
    white-space:normal;
}
.intro-strip > div,.contact-links,.hero-actions {
    flex-wrap:wrap;
}
@media(max-width:900px) {
    .site-header nav {
        gap:20px;
    }
    .header-github {
        display:none;
    }
}
@media(max-width:620px) {
    .site-header {
        height:auto;
        min-height:80px;
        padding-block:12px;
        display:grid;
        grid-template-columns:1fr auto;
        gap:8px;
    }
    .site-header nav {
        grid-column:1 / -1;
        grid-row:2;
        justify-content:center;
        gap:28px;
    }
    .language-switch {
        gap:4px;
        font-size:11px;
    }
    .language-switch select {
        max-width:125px;
        padding-block:8px;
    }
    .header-actions {
        gap:0;
    }
    h1 {
        font-size:clamp(36px,11.5vw,49px);
    }
    .intro-strip > div {
        gap:8px 20px;
    }
}
/* Inline GitHub counts, retaining the existing dynamic-data hooks. */
.github-section { padding:0 0 32px; }
.github-layout { display:flex; align-items:center; gap:12px; }
.github-stats { flex:1; min-width:0; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); border:1px solid var(--line); border-radius:6px; background:var(--surface); overflow:hidden; }
.github-stat { display:flex; align-items:center; justify-content:space-between; gap:8px; min-width:0; padding:8px 12px; transition:background .2s; }
.github-stat:not(:last-child) { border-right:1px solid var(--line); }
.github-stat:hover { background:var(--soft); }
.stat-label { min-width:0; color:var(--muted); font-size:11px; }
.github-stat strong { flex-shrink:0; font-size:18px; line-height:1.4; font-weight:600; font-variant-numeric:tabular-nums; }
.trend-card { display:inline-flex; align-items:center; gap:10px; padding:8px 12px; border:1px solid var(--line); border-radius:6px; color:var(--green); font-size:12px; white-space:nowrap; }
.trend-card:hover { border-color:var(--green); }
.github-updated { color:var(--muted); font-size:10px; margin:6px 0 0; }
.github-stat:focus-visible { outline-offset:-4px; }
@media(max-width:900px) {
    .github-layout { flex-wrap:wrap; }
    .github-stats { flex-basis:100%; }
}
@media(max-width:620px) {
    .github-section { padding-bottom:24px; }
    .github-stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .github-stat { padding:8px 10px; }
    .github-stat:nth-child(2) { border-right:0; }
    .github-stat:nth-child(-n+2) { border-bottom:1px solid var(--line); }
}

/* Compact sponsorship and affiliate links. */
.partners-section { padding-bottom:32px; }
.partners-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.partner-card { min-width:0; display:flex; flex-wrap:wrap; align-items:center; gap:12px 18px; padding:18px; border:1px solid var(--line); border-radius:8px; background:var(--surface); }
.sponsor-card { background:var(--soft); }
.partner-card h3 { margin:0; font-size:16px; font-weight:600; }
.partner-actions { display:flex; flex-wrap:wrap; gap:8px; margin-left:auto; }
.partner-card .button { padding:7px 12px; gap:10px; font-size:12px; }
.affiliate-label { margin-left:6px; color:var(--muted); font-size:11px; font-weight:400; white-space:nowrap; }
.contact-section { margin-bottom:28px; }
@media(max-width:900px) { .partners-grid { grid-template-columns:1fr; } }
@media(max-width:620px) { .partners-section { padding-bottom:24px; } .partner-card { padding:14px 16px; } }

/* Native disclosure gives immediate feedback without relying on anchor scrolling. */
.sponsor-contact { position:relative; }
.sponsor-contact summary { cursor:pointer; list-style:none; }
.sponsor-contact summary::-webkit-details-marker { display:none; }
.sponsor-contact summary:focus-visible { outline:3px solid var(--green); outline-offset:4px; }
.contact-chevron { transition:transform .2s; }
.sponsor-contact[open] .contact-chevron { transform:rotate(180deg); }
.sponsor-contact-panel { position:absolute; top:calc(100% + 8px); right:0; z-index:2; padding:12px 14px; border:1px solid var(--line); border-radius:6px; background:var(--surface); box-shadow:0 6px 18px #20292316; white-space:nowrap; }
.sponsor-contact-panel>span { display:block; color:var(--muted); font-size:11px; }
.sponsor-contact-panel a { display:block; padding:4px 0; font-size:14px; color:var(--green); }
