@media(max-width:1120px){.desktop-nav{display:none}.menu-toggle{display:grid}.hero-layout{grid-template-columns:1fr .85fr;gap:35px}.hero-title{font-size:clamp(3.2rem,7vw,5.5rem)}.capability-grid{grid-template-columns:repeat(2,1fr)}.capability-card:nth-child(2){border-right:0}.capability-card:nth-child(-n+2){border-bottom:1px solid var(--line)}.lab-specs{grid-template-columns:repeat(3,1fr)}.lab-specs div:nth-child(3){border-right:0}.lab-specs div:nth-child(-n+3){border-bottom:1px solid var(--line)}.topology{grid-template-columns:1fr 40px 1fr 40px 1.2fr}.topology .branch{display:none}.guest-grid{grid-column:1/-1;margin-top:18px}.about-layout{grid-template-columns:.75fr 1fr}.about-layout .section-heading{position:static;grid-column:1/-1;margin-bottom:0}.desktop-only{display:none!important}}
@media(max-width:860px){:root{--header:66px}.section{padding:80px 0}.section-heading.split{grid-template-columns:1fr;gap:18px}.section-heading h2{font-size:clamp(2.35rem,8vw,3.8rem)}.hero{min-height:auto;padding-bottom:35px}.hero-layout{grid-template-columns:1fr}.hero-copy{padding-top:28px}.hero-system{min-height:560px;max-width:560px;width:100%;margin-inline:auto}.identity-rail{grid-template-columns:repeat(2,1fr)}.identity-rail>div:nth-child(2){border-right:0}.identity-rail>div:nth-child(-n+2){border-bottom:1px solid var(--line)}.about-layout{grid-template-columns:.75fr 1.25fr}.capability-card{min-height:340px}.capability-card>svg{margin-top:35px}.skills-grid{grid-template-columns:repeat(2,1fr)}.projects-grid{grid-template-columns:1fr}.featured-grid{grid-template-columns:1fr}.featured-card{min-height:auto}.lab-specs{grid-template-columns:repeat(2,1fr)}.lab-specs div,.lab-specs div:nth-child(3){border-right:1px solid var(--line);border-bottom:1px solid var(--line)}.lab-specs div:nth-child(2n){border-right:0}.lab-specs div:last-child{grid-column:1/-1;border-bottom:0}.topology{grid-template-columns:1fr;justify-items:stretch;gap:0;padding:35px 15px}.topology-link{width:1px;height:35px;justify-self:center}.topology-link::after{top:0;left:-2px;animation:none}.topology-node{width:min(100%,320px);justify-self:center}.guest-grid{grid-column:auto;width:100%;margin-top:0}.environment-layout,.experience-grid,.github-layout,.contact-layout{grid-template-columns:1fr;gap:45px}.services-grid{grid-template-columns:1fr}.service-card{border-right:0}.service-card:nth-last-child(-n+2){border-bottom:1px solid var(--line)}.service-card:last-child{border-bottom:0}.philosophy-line{grid-template-columns:repeat(2,1fr)}.philosophy-line span:nth-child(2){border-right:0}.philosophy-line span:nth-child(-n+2){border-bottom:1px solid rgba(1,20,30,.25)}.footer-layout{grid-template-columns:1fr;justify-items:center;gap:20px}.footer-layout>p{justify-self:auto}.contact-copy h2{font-size:clamp(2.6rem,10vw,4.3rem)}}
@media(max-width:620px){.container{width:min(calc(100% - 28px),var(--container))}.filter-row{scrollbar-width:none}.filter-row::-webkit-scrollbar{display:none}.brand-copy small{display:none}.nav-actions{gap:5px}.icon-btn{width:39px;height:39px}.hero{padding-top:calc(var(--header) + 32px)}.availability{font-size:.6rem}.hero-kicker{margin-top:28px}.hero-title{font-size:clamp(2.8rem,14vw,4.3rem)}.hero-role{font-size:.75rem;line-height:1.7}.hero-actions{display:grid}.hero-actions .btn{width:100%}.hero-system{min-height:470px}.system-frame{width:min(77%,300px)}.system-card{padding:9px 10px}.system-card>svg{width:30px;height:30px}.system-card strong{font-size:.65rem}.system-card small{font-size:.47rem}.card-code{left:-2%;top:11%}.card-infra{right:-1%;top:47%}.card-sec{left:0;bottom:7%}.identity-rail{grid-template-columns:1fr}.identity-rail>div{border-right:0;border-bottom:1px solid var(--line)!important}.identity-rail>div:last-child{border-bottom:0!important}.about-layout{grid-template-columns:1fr}.about-photo{max-width:360px}.capability-grid{grid-template-columns:1fr}.capability-card{min-height:auto;border-right:0!important;border-bottom:1px solid var(--line)!important}.capability-card:last-child{border-bottom:0!important}.capability-card>svg{margin-top:28px}.skills-grid{grid-template-columns:1fr}.project-toolbar{align-items:stretch;flex-direction:column}.filter-row{flex-wrap:nowrap;overflow-x:auto;padding-bottom:6px}.filter-btn{flex:0 0 auto}.project-search input{width:100%}.project-search{width:100%}.project-head{align-items:flex-start}.project-body{padding:20px}.lab-body{padding:13px}.lab-header small{display:none}.lab-specs{grid-template-columns:1fr}.lab-specs div,.lab-specs div:nth-child(2n),.lab-specs div:last-child{grid-column:auto;border-right:0;border-bottom:1px solid var(--line)}.lab-specs div:last-child{border-bottom:0}.guest-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.github-stats{grid-template-columns:1fr}.github-stats div{border-right:0;border-bottom:1px solid var(--line)}.github-stats div:last-child{border-bottom:0}.github-repos{grid-template-columns:1fr}.form-row{grid-template-columns:1fr;gap:0}.contact-form{padding:21px}.philosophy-line{grid-template-columns:1fr}.philosophy-line span{border-right:0;border-bottom:1px solid rgba(1,20,30,.25)!important}.philosophy-line span:last-child{border-bottom:0!important}.palette{padding:10vh 12px 12px}.palette-foot{gap:10px;flex-wrap:wrap}.terminal{padding:12px}.terminal-head{grid-template-columns:1fr auto}.terminal-head>strong{display:none}.terminal-body{min-height:260px}.terminal-input-row{display:grid;gap:5px}.terminal-launcher span{display:none}.terminal-launcher{padding:11px}.back-to-top{bottom:16px;right:14px}.terminal-launcher{bottom:16px;left:14px}.modal{padding:20px}.modal-links>a{grid-template-columns:38px 1fr auto;padding:12px}.modal-links small{font-size:.62rem}}
@media(max-width:350px){.brand-mark{width:36px;height:36px}.brand-copy strong{font-size:.78rem}.theme-toggle{display:none}.hero-title{font-size:2.65rem}.system-card{display:none}.hero-system{min-height:410px}.system-frame{width:90%}.section-heading h2{font-size:2.15rem}}

@media(max-width:980px){.now-grid{grid-template-columns:1fr 1fr}.now-grid>div{border-bottom:1px solid var(--line)}.now-grid>div:nth-child(2){border-right:0}.now-grid>div:nth-last-child(-n+2){border-bottom:0}.now-grid>div:first-child{padding-left:22px}}
@media(max-width:620px){.now-strip{padding:10px 0}.now-grid{grid-template-columns:1fr}.now-grid>div,.now-grid>div:first-child,.now-grid>div:last-child{padding:12px 4px;border-right:0;border-bottom:1px solid var(--line)}.now-grid>div:last-child{border-bottom:0}.hero-actions{grid-template-columns:1fr}.skill-level{font-size:.61rem}.skill-bar-val{display:none}}

/* A single host fans out to three compact guests on phones and tablets. */
@media(max-width:860px){
  .topology{padding:28px 0}
  .topology .branch{display:block;height:24px}
  .guest-grid{position:relative;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding-top:20px;max-width:360px;justify-self:center}
  .guest-grid::before{content:"";position:absolute;top:0;left:calc((100% - 16px)/6);right:calc((100% - 16px)/6);height:1px;background:var(--line-strong)}
  .guest-grid>div{position:relative;min-width:0;padding:10px 3px;border-radius:8px}
  .guest-grid>div::before{content:"";position:absolute;left:50%;top:-21px;width:1px;height:20px;background:var(--line-strong)}
  .guest-grid>div::after{content:"";position:absolute;left:calc(50% - 2px);top:-21px;width:5px;height:5px;border-radius:50%;background:var(--accent);animation:guestFlow 3.6s linear infinite;animation-delay:var(--node-delay,0s)}
  .guest-grid small{font-size:.75rem;letter-spacing:0}
  .guest-grid strong{font-size:.75rem}
  .topology-node{width:min(100%,230px)}
  .topology small{font-size:.75rem}
  .topology-node span{font-size:.875rem}
}
