/* Screenshot-guided UI chrome and hero composition.
   Page identity uses the same accent in header, active sidebar, launcher,
   breadcrumb and the viewport scrollbar. */
:root{
 --chrome-page-accent:#87e880;
 --chrome-page-tint:rgba(76,153,68,.22);
 --chrome-page-border:rgba(123,211,115,.45);
}
body[data-page="about"]{
 --chrome-page-accent:#5586ed;
 --chrome-page-tint:rgba(68,96,170,.28);
 --chrome-page-border:rgba(87,132,223,.52);
}
body[data-page="work"]{
 --chrome-page-accent:#e2536a;
 --chrome-page-tint:rgba(170,61,79,.27);
 --chrome-page-border:rgba(222,79,104,.55);
}
body[data-page="contact"]{
 --chrome-page-accent:#80bad3;
 --chrome-page-tint:rgba(74,136,160,.25);
 --chrome-page-border:rgba(110,189,208,.47);
}
body[data-page="achievements"]{
 --chrome-page-accent:#dab76a;
 --chrome-page-tint:rgba(155,115,54,.24);
 --chrome-page-border:rgba(211,169,99,.49);
}

body .top .brandname span {color:var(--chrome-page-accent)!important;}
body .bottom {
 border-top:1px solid rgba(148,152,152,.31)!important;
 background:rgba(13,14,16,.85)!important;
 color:#b8b8bc!important;
}
body .bottom-left {
 display:flex!important;
 width:190px!important;min-width:190px!important;
 align-self:stretch!important;gap:0!important;
 padding:0!important;
 background:linear-gradient(95deg,var(--chrome-page-tint),rgba(20,23,30,.48))!important;
 border-right:1px solid var(--chrome-page-border)!important;
}
body .bottom-left .quick-open{
 width:40px!important;min-width:40px!important;
 height:100%!important;
 display:flex!important;align-items:center!important;justify-content:center!important;
 background:var(--chrome-page-accent)!important;
 color:#111823!important;
 box-shadow:none!important;
 border:0!important;border-right:1px solid var(--chrome-page-border)!important;
}
body .bottom-left .quick-open svg{
 display:block!important;
 width:17px!important;height:17px!important;
 stroke:currentColor!important;stroke-width:1.8!important;
 fill:none!important;
}
body .bottom-left .quick-open::before{display:none!important}
body .bottom-left .quick-open:hover,
body .bottom-left .quick-open:focus-visible{
 filter:brightness(1.13)!important;
 outline:1px solid var(--chrome-page-accent);
 outline-offset:-2px;
}
body .bottom-left #page-label {
 display:flex!important;align-items:center!important;
 height:100%;flex:1;gap:8px;min-width:0;
 padding:0 11px!important;
 font:500 12px/1.2 var(--font)!important;
 color:#d3d2db!important;
 text-transform:lowercase;
 overflow:hidden;
}
body .bottom-left .breadcrumb-home{
 display:inline-flex;align-items:center;justify-content:center;
 width:17px;height:21px;color:#adb2bd;
 text-decoration:none;
}
body .bottom-left .breadcrumb-home:hover{color:var(--chrome-page-accent)}
body .bottom-left .breadcrumb-home svg{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:1.65}
body .bottom-left .breadcrumb-chevron{color:#8e98aa;font-size:17px}
body .bottom-left .breadcrumb-current{color:#e0e0e4;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body .side-nav a.active{
 color:var(--chrome-page-accent)!important;
 background:var(--chrome-page-tint)!important;
 border-left:1px solid var(--chrome-page-accent);
}
body .side-nav a:hover{color:var(--chrome-page-accent)!important;}
body .side-nav a.active::before{display:none!important}
body #frame-content::-webkit-scrollbar{width:5px!important;background:rgba(5,6,9,.12)!important;}
body #frame-content::-webkit-scrollbar-thumb{
 background:var(--chrome-page-accent)!important;border-radius:7px!important;
}
body #frame-content{scrollbar-color:var(--chrome-page-accent) transparent!important;scrollbar-width:thin;}
body .bottom-right{gap:0!important;align-items:center!important}
body .bottom-right .bottom-social-links{
 display:flex;align-items:center;gap:12px;
 height:100%;margin-right:14px;
}
body .bottom-social-links a{
 display:flex;align-items:center;justify-content:center;
 width:19px;height:23px;
 color:#acacb1;transition:color .2s,transform .2s;
}
body .bottom-social-links a:hover{color:var(--chrome-page-accent);transform:translateY(-2px)}
body .bottom-social-links svg{width:15px;height:15px;stroke:currentColor;stroke-width:1.65;fill:none}
body .bottom-social-links a.github-link svg{fill:currentColor;stroke:none}
body .bottom-right .bottom-github{display:none!important}
body .bottom-right .bottom-contact{
 display:flex!important;align-items:center!important;justify-content:center!important;
 border:1px solid #494c53!important;border-radius:3px!important;
 min-width:179px!important;height:29px!important;
 margin:0 13px 0 0!important;
 font-size:12px!important;
 background:rgba(8,9,11,.22)!important;color:#e7e8eb!important;
}
body .bottom-right .bottom-contact:hover{
 background:var(--chrome-page-tint)!important;
 border-color:var(--chrome-page-accent)!important;
}
body .top{border-bottom-color:rgba(149,149,153,.28)!important}
body .brandmark{color:#f0f2f5!important}
body .menu-toggle:hover{color:var(--chrome-page-accent)!important}
body .side-nav{border-right-color:rgba(141,141,145,.30)!important}

/* Layered hero typography: the reference deliberately lets the context line
   recede while the current statement sits brightly in front. */
body[data-page="about"] .route-hero h1,
body[data-page="work"] .route-hero h1{
 position:relative!important;z-index:5!important;
 font-size:clamp(56px,6.25vw,96px)!important;
 line-height:1!important;
 margin:15px auto 12px!important;
 width:min(1040px,100%)!important;max-width:1040px!important;
 letter-spacing:-.052em!important;
}
body .route-hero h1 .hero-context-line{
 display:block;
 font:inherit;line-height:1;
 color:rgba(169,168,177,.23);
 opacity:1!important;
 transform:translate3d(-4px,0,0);
 filter:blur(.4px);
 animation:context-rise 1.65s .32s cubic-bezier(.22,1,.36,1) both;
}
body .route-hero h1 .hero-primary-line{
 display:block;position:relative;
 color:#f5f6f5!important;
 opacity:1!important;
 transform:translateZ(0);
 animation:hero-primary-rise 1.05s .10s cubic-bezier(.22,1,.36,1) both;
}
body[data-page="about"] .route-hero h1 em{color:#5085ee!important}
body[data-page="work"] .route-hero h1 em{color:#e6536e!important}
body[data-page="about"] .route-hero>.route-eyebrow,
body[data-page="work"] .route-hero>.route-eyebrow{
 translate:0 -30px;
 font:500 12px/1.2 var(--font)!important;
 text-transform:uppercase!important;letter-spacing:.035em!important;
 color:#777982!important;position:relative;z-index:5;
}
body[data-page="about"] .route-hero>h1,
body[data-page="work"] .route-hero>h1{translate:0 -30px}
body[data-page="about"] .route-hero>p,
body[data-page="work"] .route-hero>p{
 translate:0 -30px;
 font:400 15px/1.58 var(--mono)!important;
 max-width:580px!important;
 color:#a9adb3!important;
 position:relative;z-index:5;
}
body[data-page="about"] .route-hero .hero-wordmark,
body[data-page="work"] .route-hero .hero-wordmark{
 position:absolute;top:16%;left:6%;
 width:89%;max-width:1400px;
 pointer-events:none;overflow:hidden;
 z-index:0;
 font:800 clamp(250px,29vw,490px)/1.07 var(--font);
 letter-spacing:-.115em;
 color:rgba(8,9,12,.29);
 text-align:center;
 white-space:nowrap;
 user-select:none;
}
body[data-page="about"] .route-hero .hero-wordmark{color:rgba(4,6,13,.48)}
body[data-page="work"] .route-hero .hero-wordmark{color:rgba(5,3,6,.46)}
body[data-page] .route-scene-layer{z-index:2!important}
body[data-page="about"] .route-hero::before,
body[data-page="work"] .route-hero::before{display:none!important;}
body[data-page="about"] #frame-content .route-hero,
body[data-page="work"] #frame-content .route-hero{isolation:isolate!important;}
body[data-page="about"] #frame-content .route-hero h1,
body[data-page="work"] #frame-content .route-hero h1{z-index:4!important}
@keyframes context-rise{
 from{opacity:0;color:rgba(169,168,177,.12);filter:blur(8px);translate:0 38px}
 46%{opacity:1;color:rgba(169,168,177,.27);filter:blur(2px);translate:0 18px}
 to{opacity:1;color:#f3f4f5;filter:blur(0);translate:0 0}
}
@keyframes hero-primary-rise{
 from{opacity:0;filter:blur(7px);translate:0 42px}
 to{opacity:1;filter:blur(0);translate:0 0}
}
@media(max-width:650px){
 body .bottom-left{width:145px!important;min-width:145px!important}
 body .bottom-left #page-label{padding:0 6px!important;font-size:10px!important;gap:4px!important}
 body .bottom-right .bottom-social-links{gap:7px;margin-right:7px}
 body .bottom-social-links a{width:17px}
 body .bottom-right .bottom-contact{min-width:125px!important;width:125px!important;padding:0 6px!important;font-size:9px!important;margin-right:5px!important}
 body .bottom-center{display:none!important}
 body[data-page="about"] .route-hero h1,
 body[data-page="work"] .route-hero h1{
  font-size:clamp(45px,12.45vw,50px)!important;
  line-height:1!important;
  margin:14px auto 14px!important;
 }
 body[data-page="about"] .route-hero .hero-wordmark,
 body[data-page="work"] .route-hero .hero-wordmark{
  font-size:130px;left:-10%;width:120%;top:20%;
 }
 body[data-page="about"] .route-hero>p,
 body[data-page="work"] .route-hero>p{font-size:12px!important;max-width:315px!important}
}
@media(max-width:370px){
 body .bottom-left{width:122px!important;min-width:122px!important}
 body .bottom-left .quick-open{width:35px!important;min-width:35px!important}
 body .bottom-right .bottom-social-links{gap:5px;margin-right:5px}
 body .bottom-right .bottom-contact{width:108px!important;min-width:108px!important;font-size:8px!important}
}
@media(prefers-reduced-motion:reduce){
 body .route-hero h1 .hero-context-line,
 body .route-hero h1 .hero-primary-line{animation:none!important;filter:none!important}
}
/* Both lines resolve to bright text after the entrance, as on the reference.
   The darker ghost state is temporal rather than permanently dimmed. */
body[data-page="about"] .route-hero h1 .hero-context-line,
body[data-page="work"] .route-hero h1 .hero-context-line{
 animation-fill-mode:forwards!important;
}
body[data-page="about"] .route-hero h1 .hero-primary-line,
body[data-page="work"] .route-hero h1 .hero-primary-line{
 animation-duration:1.4s!important;
 animation-delay:.13s!important;
}
@media(prefers-reduced-motion:reduce){
 body[data-page="about"] .route-hero h1 .hero-context-line,
 body[data-page="work"] .route-hero h1 .hero-context-line{
  color:#f3f4f5!important;opacity:1!important;animation:none!important;
 }
}


/* Hero measurements from real desktop/mobile rendering, without overriding
 * the entrance animation's own translate property. */
@media(min-width:651px){
 body[data-page="about"] .route-hero h1,
 body[data-page="work"] .route-hero h1{left:-5px!important}
 body[data-page="about"] .route-hero>h1{top:3px!important}
 body[data-page="work"] .route-hero>h1{top:-8px!important}
}
@media(max-width:650px){
 body[data-page="about"] .route-hero h1,
 body[data-page="work"] .route-hero h1{
  width:calc(100vw - 50px)!important;
  max-width:none!important;left:0!important;
 }
 body[data-page="about"] .route-hero h1 .hero-primary-line em,
 body[data-page="work"] .route-hero h1 .hero-primary-line em{
  display:block!important;
 }
 body[data-page="about"] .route-hero>h1{top:-19px!important}
 body[data-page="work"] .route-hero>h1{top:-30px!important}
}


/* Responsive window safety: keep the portfolio usable when the actual
   browser window is resized or the desktop frame is toggled smaller. */
@media (max-width:1100px) and (min-width:601px) {
  #frame-content .home-flow .about-cards,
  #frame-content .about-cards {
    width:min(970px,100%)!important;
    max-width:100%!important;
    transform:none!important;
  }
  #frame-content .about-main {left:8%!important;width:68%!important;}
  #frame-content .about-portrait {left:auto!important;right:0!important;width:29%!important;}
  #frame-content .about-place {left:0!important;width:38%!important;}
  #frame-content .about-interests {left:32%!important;width:31%!important;}
  #frame-content .about-links {left:auto!important;right:0!important;width:31%!important;}
  #frame-content .section-heading h2 {max-width:100%;white-space:normal!important;}
  #frame-content .home-flow .about-code p {font-size:clamp(11px,1.18vw,15px)!important;}
  .bottom-center {min-width:0!important;overflow:hidden;text-overflow:ellipsis;}
}
@media (max-width:760px) {
  .bottom-center {display:none!important;}
  .bottom-right {min-width:0!important;margin-left:auto;}
  body .bottom-left {width:155px!important;min-width:155px!important;}
  .bottom-social-links {gap:8px!important;}
  #frame-content .hero-content {width:calc(100% - 30px)!important;max-width:100%!important;}
  #frame-content .hero h1 {width:100%!important;max-width:100%!important;overflow-wrap:break-word;}
  #frame-content .work-name {min-width:0;}
  #frame-content .work-name strong {font-size:clamp(23px,5vw,48px)!important;}
  #frame-content .work-row {min-width:0;}
  #frame-content .chips {flex-wrap:wrap;}
}
@media (min-width:601px) and (max-width:760px) {
  #frame-content .home-flow .about-cards,
  #frame-content .about-cards {display:flex!important;flex-direction:column!important;gap:16px!important;height:auto!important;overflow:visible!important;}
  #frame-content .about-main,#frame-content .about-place,#frame-content .about-portrait,
  #frame-content .about-interests,#frame-content .about-links {
    position:relative!important;inset:auto!important;left:auto!important;right:auto!important;
    top:auto!important;bottom:auto!important;width:100%!important;height:auto!important;min-height:0!important;
  }
  #frame-content .about-main {order:1}
  #frame-content .about-portrait {order:2}
  #frame-content .about-place {order:3}
  #frame-content .about-interests {order:4}
  #frame-content .about-links {order:5}
  #frame-content .about {min-height:0!important;padding-bottom:95px!important;}
  #frame-content .home-flow .about-code p {font-size:13px!important;}
  #frame-content .about-portrait .portrait-art {height:200px!important;}
}
@media (max-width:600px) {
  #frame-content .home-flow .about-cards,
  #frame-content .about-cards {transform:none!important;width:100%!important;max-width:100%!important;}
  #frame-content .about-main,#frame-content .about-place,#frame-content .about-portrait,
  #frame-content .about-interests,#frame-content .about-links {
    position:relative!important;left:auto!important;right:auto!important;top:auto!important;
    bottom:auto!important;width:100%!important;height:auto!important;min-height:0!important;
  }
  #frame-content .hero h1 {font-size:clamp(30px,9vw,49px)!important;}
  #frame-content .scene {max-width:100%;}
  body .bottom-left {width:120px!important;min-width:120px!important;}
  .bottom-social-links {display:none!important;}
  .bottom-contact {min-width:0!important;margin-right:4px!important;max-width:125px!important;font-size:10px!important;}
  .overlay,.site-search {max-width:calc(100vw - 16px);}
}
@media (max-height:650px) and (min-width:601px) {
  #frame-content .hero {min-height:min(480px,calc(100dvh - 98px))!important;}
  #frame-content .hero h1 {font-size:clamp(34px,5vw,66px)!important;}
  #frame-content .hero-content {gap:12px!important;}
  #frame-content .down-cue {bottom:14px!important;}
}

/* Compact is an in-place responsive variant, NEVER a simulated OS window. */
body.window-resized{background:#0d0f0e!important}
body.window-resized .border{inset:8px!important}
body.window-resized .top{right:8px!important}
body.window-resized .side-nav{bottom:49px!important}
body.window-resized .bottom{right:8px!important;bottom:8px!important}
body.window-resized #frame-content{right:8px!important;bottom:49px!important}
body.window-resized .site-search{bottom:49px!important;width:min(922px,calc(100vw - 56px))!important}
body.window-compact #frame-content .scene{max-width:100%}
body.window-compact #frame-content .hero h1{font-size:clamp(40px,5.5vw,76px)!important}
body.window-compact #frame-content .hero-content{width:min(860px,calc(100% - 44px))!important}
body.window-compact #frame-content .section-heading h2{font-size:clamp(32px,4vw,58px)!important;white-space:normal!important}
body.window-compact #frame-content .about-cards{transform:none!important;max-width:100%!important;width:min(970px,100%)!important}
@media(max-width:760px){body.window-compact #frame-content .hero h1{font-size:clamp(30px,8vw,48px)!important}}

/* Compact layout: reflow floating windows instead of shrinking the viewport. */
body.window-compact #frame-content .home-flow #about{min-height:0!important;padding-bottom:110px!important}
body.window-compact #frame-content .home-flow #about .about-cards{
 position:relative!important;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
 gap:16px!important;align-items:stretch!important;width:min(870px,calc(100% - 36px))!important;
 height:auto!important;max-width:100%!important;margin:52px auto 0!important;
 transform:none!important;
}
body.window-compact #frame-content .home-flow #about .about-cards>.window{
 position:relative!important;left:auto!important;right:auto!important;top:auto!important;bottom:auto!important;
 width:100%!important;height:auto!important;min-height:0!important;transform:none!important;
}
body.window-compact #frame-content .home-flow #about .about-main{grid-column:1/-1;order:1}
body.window-compact #frame-content .home-flow #about .about-portrait{order:2}
body.window-compact #frame-content .home-flow #about .about-place{order:3}
body.window-compact #frame-content .home-flow #about .about-interests{order:4}
body.window-compact #frame-content .home-flow #about .about-links{order:5}
body.window-compact #frame-content .home-flow #about .about-portrait .portrait-art{height:220px!important}
body.window-compact #frame-content .home-flow #about .about-code p{font:13px/1.7 var(--font)!important;margin-bottom:10px!important}
@media(max-width:700px){
 body.window-compact #frame-content .home-flow #about .about-cards{grid-template-columns:minmax(0,1fr)!important}
 body.window-compact #frame-content .home-flow #about .about-main{grid-column:1}
}


/* Shared chrome UI, loaded by both route pages and the Markdown blog.
   Search/controls are injected by global-nav.js and must never render
   as unstyled document content. */
.site-search{position:fixed;z-index:88;top:49px;bottom:49px;left:48px;width:min(922px,calc(100vw - 56px));padding:62px 45px 40px;background:rgba(12,12,12,.985);border-right:1px solid #494949;opacity:0;visibility:hidden;transform:translateX(-22px);pointer-events:none;transition:opacity .28s,transform .28s,visibility .28s;overflow-y:auto;backdrop-filter:blur(18px)}
.site-search.open{opacity:1;visibility:visible;transform:none;pointer-events:auto}
.site-search-close{position:absolute;top:15px;right:20px;border:0;background:none;color:#a1a1a1;font:24px/1 var(--font);padding:2px 5px}
.site-search-close:hover{color:#8fff86}
.site-search h2{text-align:center;font:400 clamp(45px,4.5vw,64px)/1.1 var(--font);letter-spacing:-.055em;color:#fff;margin:3px 0 62px}
.site-search h2 em{font-style:normal;color:#8fff86}
.site-search-box{display:flex;align-items:center;gap:12px;width:min(384px,100%);height:48px;margin:0 auto 64px;border:1px solid #8fff86;border-radius:4px;padding:0 16px;background:#0f0f0f;color:#9d9d9d}
.site-search-box span{font:25px/1 Arial,sans-serif}
.site-search-box input{flex:1;min-width:0;border:0;outline:0;background:transparent;color:#fff;font:18px/1.2 var(--font)}
.site-search-box input::placeholder{color:#9d9d9d}
.site-search-results{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.site-search-card{min-height:132px;border:1px solid #494949;border-radius:4px;background:rgba(14,14,14,.5);padding:20px 24px;display:flex;flex-direction:column;gap:21px;transition:background .2s,border-color .2s}
.site-search-card:hover,.site-search-card:focus-visible{background:rgba(52,80,50,.26);border-color:#8fff86}
.site-search-card[hidden]{display:none}
.site-search-card-title{display:flex;align-items:center;gap:18px;color:#dedede}
.site-search-card-title svg{width:23px;height:23px;stroke:currentColor;stroke-width:1.8;fill:none;stroke-linecap:round;stroke-linejoin:round}
.site-search-card-title strong{font:400 23px/1 var(--font);letter-spacing:-.045em}
.site-search-card-description{font:400 15px/1.5 var(--font);color:#999}
.site-search-empty{margin:20px 0;color:#aaa;font:15px var(--font);text-align:center}
@media(max-width:900px){.site-search{width:calc(100vw - 56px);padding:55px 26px 35px}.site-search-results{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.site-search{left:8px;right:8px;top:49px;bottom:49px;width:auto;padding:45px 18px 35px;border-right:0}.site-search h2{font-size:43px;margin-bottom:40px}.site-search-box{margin-bottom:40px}.site-search-results{grid-template-columns:1fr}.site-search-card{min-height:100px;gap:12px;padding:16px 19px}.site-search-card-title strong{font-size:21px}.site-search-card-description{font-size:13px}}
@media(prefers-reduced-motion:reduce){.site-search{transition:none}}
.site-search.has-query .site-search-results{display:none}
.site-search-matches{display:flex;flex-direction:column;gap:16px;max-height:calc(100% - 290px);overflow-y:auto;padding-right:7px}
.site-search-matches[hidden]{display:none}
.site-search-result{display:flex;align-items:center;gap:18px;min-height:66px;padding:0 24px;border:1px solid #494949;border-radius:4px;background:rgba(11,12,11,.65);color:#d4d4d4;transition:border-color .2s,background .2s}
.site-search-result:hover,.site-search-result:focus-visible{border-color:#8fff86;background:rgba(37,64,39,.46)}
.site-search-result small{font:12px 'DM Mono',monospace;color:#8f948f}
.site-search-result strong{font:400 23px/1.2 var(--font);letter-spacing:-.045em;text-transform:lowercase}
.site-search-result span{margin-left:auto;border:1px solid #454545;border-radius:20px;padding:5px 12px;color:#999;font:12px 'DM Mono',monospace;white-space:nowrap}
@media(max-width:600px){.site-search-matches{max-height:calc(100% - 220px);gap:10px}.site-search-result{min-height:60px;padding:0 13px;gap:10px}.site-search-result strong{font-size:17px}.site-search-result span{font-size:9px;padding:4px 6px}}

@media(min-width:601px){
 .top .menu-toggle{display:none!important}
 .top .window-controls{
  position:absolute;right:12px;top:0;height:40px;
  display:flex;align-items:center;gap:4px;z-index:4;
 }
 .top .window-controls button{
  appearance:none;-webkit-appearance:none;
  display:grid;place-items:center;flex:0 0 24px;
  width:24px;height:27px;padding:0;margin:0;
  border:1px solid transparent;border-radius:3px;
  background:transparent!important;color:#8b918b!important;
  font:17px/1 Arial,sans-serif!important;
  box-shadow:none;outline-offset:2px;
 }
 .top .window-controls button:hover,.top .window-controls button:focus-visible{
  background:rgba(143,255,134,.11)!important;border-color:rgba(143,255,134,.28);
  color:#8fff86!important;
 }
}
@media(max-width:600px){
 .top .window-controls{display:none!important}
 .top .menu-toggle{display:flex!important;opacity:1!important}
 .top .menu-toggle::before{content:none!important}
 .top .menu-toggle span{display:block!important}
 .top .menu-toggle i{display:block!important}
 .site-search{left:9px;right:9px;width:auto;top:49px;bottom:49px}
}

/* Global popovers; shared by every route. */
.leave-popover,.share-popover{position:fixed;z-index:96;background:rgba(14,17,14,.96);border:1px solid #555;border-radius:4px;box-shadow:0 20px 50px rgba(0,0,0,.35);color:#a4a4a4}
.leave-popover[hidden],.share-popover[hidden]{display:none}
.leave-popover{right:calc(10vw + 40px);top:74px;width:384px;min-height:176px;padding:28px 32px;border-top:2px solid #8fff86;font:15px/1.6 var(--font)}
.leave-popover p{margin:0 0 8px}.leave-close{position:absolute;right:12px;top:6px;border:0;background:transparent;color:#aaa;font-size:20px}
.leave-links{display:flex;gap:20px;margin-top:18px}.leave-links a{font:12px 'DM Mono',monospace;color:#d4e7d2}.leave-links a:hover{color:#8fff86}
.share-popover{right:8px;bottom:8px;width:min(572px,calc(100vw - 16px));height:235px}
.share-head{height:40px;border-bottom:1px solid #494949;display:flex;align-items:center;justify-content:space-between;padding:0 16px;color:#fff;font:12px 'DM Mono',monospace}.share-head button{border:0;background:transparent;font-size:20px;color:#aaa}
.share-actions{display:flex;align-items:center;justify-content:center;gap:32px;height:150px;font:15px var(--font)}.share-actions button{border:0;background:transparent;color:#aaa}.share-actions a{color:#aaa}.share-actions button:hover,.share-actions a:hover{color:#8fff86}.share-status{position:absolute;bottom:10px;left:20px;margin:0;font:10px 'DM Mono',monospace;color:#8fff86}
@media(max-width:600px){.window-controls{display:none}.leave-popover{right:16px;left:16px;top:65px;width:auto}.share-popover{right:8px;bottom:8px;height:180px}.share-actions{gap:14px;height:110px;font-size:12px}}

/* Fix overlay paint and state leakage on pages without route-specific CSS. */
.site-search:not(.open){visibility:hidden!important;opacity:0!important;pointer-events:none!important}
.leave-popover[hidden],.share-popover[hidden]{display:none!important}
@media(max-width:600px){
 .top .menu-toggle{right:0;top:0;height:40px;width:66px!important;justify-content:center}
 .top .menu-toggle span{font:11px var(--mono);margin-right:15px}
 .top .menu-toggle i{right:11px!important;background:#c3ccc3}
}


/* Single window model — preserve desktop typography and scene composition.
   The outer page is a desktop surface, the inner frame is a clipped viewport.
   No zoom, font-size changes, or alternate About grid when minimized. */
@media (min-width:601px) {
 body.window-resized {
   background:#0b0d0b!important;
   background-image:radial-gradient(ellipse 53% 70% at 90% 36%,rgba(62,129,65,.42),transparent 85%)!important;
 }
 body.window-resized[data-page="about"] {
   background-image:radial-gradient(ellipse 53% 70% at 90% 36%,rgba(62,89,153,.27),transparent 85%)!important;
 }
 body.window-resized[data-page="work"] {
   background-image:radial-gradient(ellipse 53% 70% at 90% 36%,rgba(145,56,73,.24),transparent 85%)!important;
 }
 body.window-resized .border {
   inset:8px max(25vw,120px) max(14vh,70px) 8px!important;
   border-radius:5px!important;
 }
 body.window-resized .top {
   left:48px!important;right:max(25vw,120px)!important;top:8px!important;
 }
 body.window-resized .side-nav {
   left:8px!important;top:49px!important;bottom:calc(max(14vh,70px) + 41px)!important;
 }
 body.window-resized .bottom {
   left:48px!important;right:max(25vw,120px)!important;
   bottom:max(14vh,70px)!important;
 }
 body.window-resized #frame-content {
   inset:49px max(25vw,120px) calc(max(14vh,70px) + 41px) 48px!important;
   overflow-x:hidden!important;
   contain:paint;
 }
 body.window-resized .overlay {
   inset:49px max(25vw,120px) calc(max(14vh,70px) + 41px) 48px!important;
 }
 body.window-resized .site-search {
   bottom:calc(max(14vh,70px) + 41px)!important;
   width:min(700px,calc(75vw - 60px))!important;
 }
 body.window-resized .share-popover {
   right:max(25vw,120px)!important;
   bottom:max(14vh,70px)!important;
   max-width:calc(75vw - 60px);
 }
 body.window-resized .leave-popover{right:calc(max(25vw,120px) + 35px)!important}
 body.window-resized #frame-content .scene{
   width:100%;max-width:none!important;
 }
 body.window-resized #frame-content > .route-scene-layer.motion-stage,
 body.window-resized #frame-content > canvas#three-canvas.motion-stage-canvas,
 body.window-resized #frame-content::before{clip-path:none!important}
 body.window-resized .bottom-center{display:none!important}
 body.window-resized .bottom-right .bottom-social-links{display:none!important}
 body.window-resized .bottom-right{margin-left:auto;gap:8px}
 body.window-resized .top .window-controls button{background:transparent!important}
 /* No reflow: the reference's reduced window is a view into the same scene. */
 body.window-resized[data-page="about"] #about-bio .about-cards{
   display:block!important;transform:none!important;
 }
}
