/* Local 2026-09-23 update. Do not broaden these selectors to case studies or dialogs. */
#home{display:block;min-height:0;padding:24px 0 0;background:var(--paper);color:var(--hero-text);overflow:visible}
#home::before,#home::after{content:none;display:none;animation:none}
#home .warm-hero-panel{position:relative;display:block;isolation:isolate;width:min(1180px,calc(100% - 40px));min-height:0;margin-inline:auto;padding:44px 40px 16px;background:var(--hero-card);border-radius:20px;overflow:visible}
#home .hero-top{position:relative;z-index:1;display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr);gap:36px;align-items:center;width:100%}
#home .hero-copy{padding-bottom:0}
#home .hero-copy,#home .hero-visual,#home .hero-copy>*,#home .profile-frame{animation:none;opacity:1;transform:none;filter:none}
#home .hero-visual{min-width:0;width:100%;max-width:none;margin:0;justify-self:stretch}
#home .profile{width:100%;min-width:0;transform:none}
#home .profile-copy{min-width:0;align-self:center}
#home .profile-copy strong,#home h1,#home .role-list{color:var(--hero-text)}
#home .profile-copy p{color:var(--hero-muted)}
#home .hero-kicker,#home .role-label{color:var(--teal)}
#home .profile-frame{isolation:isolate;border-color:rgba(244,239,232,.14);box-shadow:none;background:var(--hero-card)}
#home .profile-frame::before{content:"";display:block;position:absolute;inset:-48px;z-index:-1;width:auto;height:auto;transform:none;border:0;border-radius:0;box-shadow:none;filter:none;animation:none;pointer-events:none;background:radial-gradient(ellipse,rgba(255,139,114,.14),rgba(255,139,114,.04) 40%,transparent 70%)}
#home .profile-frame::after{content:none;display:none;animation:none}
#home .warm-hero-decor{position:absolute;inset:0;z-index:0;overflow:hidden;border-radius:inherit;pointer-events:none}
#home .hero-flow-lines{display:block;width:100%;height:100%;opacity:0}
#home .hero-flow-lines.geometry-ready{opacity:1}
#home .flow-line{vector-effect:non-scaling-stroke;stroke-width:1.2px;stroke:var(--hero-muted);stroke-opacity:.23}
#home .flow-main{stroke:var(--teal);stroke-opacity:.36}
#home .flow-signal{fill:var(--teal);fill-opacity:.7;stroke:none}
#home .btn-hero-primary{background:var(--teal);color:var(--ink);border-color:var(--teal);transition:color .2s,background-color .2s;transform:none;box-shadow:none}
#home .btn-hero-primary::before,#home .btn-hero-primary::after{content:none;display:none}
#home .btn-hero-primary:hover,#home .btn-hero-primary:focus-visible{background:var(--hero-hot);color:var(--ink);transform:none;box-shadow:none}
#home .hero-arrow{transition:transform .2s}
#home .btn-hero-primary:hover .hero-arrow,#home .btn-hero-primary:focus-visible .hero-arrow{transform:translateX(3px)}
#home :is(button,a):focus-visible{outline:2px solid var(--teal);outline-offset:4px}

/* Navigation: palette only; keep its current geometry, animation and event handlers. */
.topbar{background:var(--hero-card);border-bottom-color:rgba(244,239,232,.14)}
.topbar::after{background:rgba(255,139,114,.16)}
.topbar .brand-title{color:var(--hero-text)}
.topbar .nav-links a,.topbar .nav-links a[href="#projects"]{color:var(--hero-muted)}
.topbar .nav-links a:hover,.topbar .nav-links a:focus-visible,.topbar .nav-links a[aria-current="location"]{color:var(--teal);background:rgba(255,139,114,.1);box-shadow:inset 0 0 0 1px rgba(255,139,114,.14)}
.topbar .nav-links .nav-resume{color:var(--teal);background:transparent;box-shadow:none}
.topbar .menu-toggle{color:var(--hero-text);background:var(--hero-card);border-color:rgba(244,239,232,.14)}

/* One warm-dark lead card, three warm-white supporting cards; preserve every dimension. */
#github{background:var(--paper);color:var(--ink);overflow:visible}
#github::before,#github::after,#github .tool-card::before,#github .tool-card::after{content:none;display:none;animation:none}
#github .section-head,#github .section-head h2{transform:none;transition:none}
#github h2,#github h3,#github strong,#github b,#github .section-head>div>p:last-child{color:var(--ink)}
#github p,#github li,#github figcaption,#github .tool-card .tool-description{color:var(--muted)}
#github .eyebrow,#github .tool-card .tool-kicker{color:var(--muted)}
#github .tool-card,#github .tool-card:hover{background:var(--white);color:var(--ink);border-color:var(--line);box-shadow:none;backdrop-filter:none;transform:none;transform-style:flat;transition:none}
#github .tool-card .tool-role{color:var(--muted)!important}
#github .tool-card .tool-role b{color:var(--ink)!important}
#github .tool-visual{background:transparent;border-color:var(--line)}
#github .tool-features,#github .tool-process,#github .tool-features li,#github .tool-process li{border-color:var(--line);background:transparent;color:var(--muted)}
#github .tool-process li>span{color:var(--accent)}
#github .tool-actions .text-link,#github .tools-head>.text-link{color:var(--accent);border-color:rgba(200,77,59,.3);transition:color .2s}
#github .tool-actions .text-link:hover,#github .tools-head>.text-link:hover{color:var(--ink)}
#github .tool-actions .text-link>span{display:inline-block;transition:transform .2s}
#github .tool-actions .text-link:hover>span,#github .tool-actions .text-link:focus-visible>span{transform:translateX(3px)}
#github #tool-shiwei,#github #tool-shiwei:hover{background:var(--hero-card);color:var(--hero-text);border-color:rgba(244,239,232,.14)}
#github #tool-shiwei h3,#github #tool-shiwei strong,#github #tool-shiwei b{color:var(--hero-text)}
#github #tool-shiwei p,#github #tool-shiwei li,#github #tool-shiwei figcaption,#github #tool-shiwei .tool-description,#github #tool-shiwei .tool-kicker{color:var(--hero-muted)}
#github #tool-shiwei .tool-role{color:var(--hero-muted)!important}
#github #tool-shiwei .tool-role b{color:var(--hero-text)!important}
#github #tool-shiwei .tool-features,#github #tool-shiwei .tool-features li{border-color:rgba(244,239,232,.14)}
#github #tool-shiwei .text-link{color:var(--teal)}
#github #tool-shiwei .text-link:hover{color:var(--hero-text)}
#github :is(button,a):focus-visible{outline:2px solid var(--accent);outline-offset:4px}
#github #tool-shiwei :is(button,a):focus-visible{outline-color:var(--teal)}
/* Total distance from the last core cover to the tools eyebrow, not two stacked gaps. */
#projects{padding-bottom:0}
#projects>.wrap>.case:last-child{margin-bottom:0}
#github{padding-top:84px}
/* Only normal-height desktop Hero fills the remaining viewport. Navigation is counted once. */
@media(min-width:961px) and (min-height:700px){
 #home{display:flex;flex-direction:column;min-height:0;padding-bottom:24px}
 #home .warm-hero-panel{display:flex;flex-direction:column;min-height:min(680px,calc(100svh - var(--occupied-nav-height,77px) - 48px))}
 #home .hero-top{margin-block:auto}
}
@media(max-width:960px){
 #github{padding-top:64px}
 #home .hero-top{grid-template-columns:minmax(0,1fr);gap:28px}
 #home .hero-visual{width:100%}
 #home .profile{max-width:560px}
}
@media(max-width:720px){
 #github{padding-top:48px}
 #home{padding-top:16px}
 #home .warm-hero-panel{width:calc(100% - 32px);padding:28px 20px;border-radius:16px}
 #home .hero-top{gap:26px}
 #home .profile{grid-template-columns:116px minmax(0,1fr);gap:14px}
 #home .flow-edge,#home .flow-signal{display:none}
 .topbar .nav-links{background:var(--hero-card)}
}
@media(prefers-reduced-motion:reduce){
 #home .hero-arrow,#github .tool-actions .text-link>span{transform:none!important;transition:none}
 #home .btn-hero-primary,#github .text-link{transition:none}
 #home .flow-signal{display:none}
}
