.nav-shell{
  max-width:calc(100vw - 48px);
}
.brand-logo{
  display:inline-flex;
  align-items:center;
  flex:0 0 auto;
  width:clamp(124px,12vw,168px);
  height:38px;
  overflow:hidden;
}
.brand-logo-img{
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
  object-position:left center;
}
.brand-logo-on-light{
  display:none;
}
html[data-theme="light"] .brand-logo-on-dark{
  display:none;
}
html[data-theme="light"] .brand-logo-on-light{
  display:block;
}
#site-nav{
  min-width:0;
}
.menu-toggle{
  flex:0 0 44px;
  min-width:44px;
  min-height:44px;
  border-radius:8px;
}
.actions a,
.search button,
.contact-form button{
  min-height:46px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  color:#ffffff;
  background:linear-gradient(135deg,rgba(76,125,255,.5),rgba(86,216,255,.2));
  box-shadow:0 14px 36px rgba(76,125,255,.18);
}
.actions a:hover,
.search button:hover,
.contact-form button:hover{
  border-color:rgba(86,216,255,.5);
  transform:translateY(-1px);
}
.hero .subtitle{
  color:#edf5ff;
}
.hero .rotator{
  color:#f2b7ff;
}
.hero-inner{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(240px,340px);
  align-items:center;
  gap:clamp(28px,6vw,72px);
  width:100%;
}
.hero-copy{
  min-width:0;
}
.hero-inner-solo{
  grid-template-columns:minmax(0,1fr);
}
.hero h1{
  font-size:clamp(48px,9vw,128px);
  max-width:1180px;
}
.card h3 a,
.card h2 a{
  color:inherit;
  text-decoration:none;
}
.card h3 a:hover,
.card h2 a:hover{
  color:var(--cyan);
}
.journey-stack{
  display:grid;
  grid-template-columns:1fr;
  gap:18px;
  width:100%;
  max-width:980px;
  position:relative;
  padding-left:34px;
}
.journey-stack::before{
  content:"";
  position:absolute;
  left:8px;
  top:8px;
  bottom:8px;
  width:2px;
  border-radius:999px;
  background:linear-gradient(180deg,var(--cyan),var(--magenta));
  opacity:.72;
}
.timeline .journey-stack article{
  margin:0;
  min-height:136px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  position:relative;
}
.timeline .journey-stack article::before{
  content:"";
  position:absolute;
  left:-34px;
  top:24px;
  display:block;
  width:14px;
  height:14px;
  border:3px solid rgba(244,248,255,.95);
  border-radius:50%;
  background:var(--cyan);
  box-shadow:0 0 0 6px rgba(86,216,255,.12),0 0 24px rgba(86,216,255,.38);
}
.timeline .journey-stack time{
  display:inline-flex;
  align-self:flex-start;
  border:1px solid rgba(86,216,255,.24);
  border-radius:999px;
  padding:6px 10px;
  background:rgba(86,216,255,.08);
}
.timeline .journey-stack h3{
  margin:14px 0 8px;
}
.timeline .journey-stack p{
  margin:0;
}
.about-side{
  display:grid;
  gap:18px;
}
.stats{
  max-width:420px;
  justify-self:end;
}
.stats strong,
.stats span{
  padding:14px 16px;
}
.stats strong{
  font-size:clamp(28px,3vw,34px);
  line-height:1;
}
.stats span{
  font-size:13px;
  line-height:1.35;
}
.profile-portrait{
  margin:0;
  position:relative;
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:8px;
  background:rgba(7,17,31,.72);
  box-shadow:0 20px 50px rgba(3,7,18,.22);
}
.profile-portrait::before{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(180deg,transparent 58%,rgba(3,7,18,.5));
  pointer-events:none;
}
.profile-portrait img{
  display:block;
  width:100%;
  aspect-ratio:1;
  object-fit:cover;
}
.hero-portrait{
  justify-self:end;
  width:min(32vw,340px);
  min-width:240px;
  transform:translateY(8px);
  border:0;
  background:transparent;
  box-shadow:none;
}
.hero-portrait::before{
  display:none;
}
@media(max-width:900px){
  .nav-shell{
    left:20px!important;
    right:auto!important;
    max-width:calc(100vw - 40px)!important;
    width:calc(100vw - 40px)!important;
    padding-right:66px;
  }
  .brand-logo{
    width:134px;
    height:34px;
  }
  .menu-toggle{
    display:grid!important;
    place-items:center;
    position:absolute;
    top:50%;
    right:12px;
    transform:translateY(-50%);
    color:#ffffff;
    background:rgba(255,255,255,.06);
    border:1px solid var(--line);
  }
  .menu-toggle::before{
    content:"☰";
    font-size:24px;
    line-height:1;
  }
  .menu-toggle{
    font-size:0;
  }
  #site-nav{
    max-height:calc(100vh - 110px);
    overflow:auto;
  }
}
@media(max-width:700px){
  .panel{
    min-height:auto;
    padding-bottom:64px;
  }
  .hero{
    min-height:100svh;
    justify-content:center;
  }
  .hero-inner{
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    gap:20px;
    padding-top:20px;
  }
  .hero-portrait{
    order:-1;
    align-self:center;
    width:min(54vw,210px);
    min-width:150px;
    max-width:210px;
    transform:none;
  }
  .hero h1{
    max-width:100%;
    font-size:clamp(34px,10vw,50px);
    line-height:.92;
    overflow-wrap:normal;
  }
  .hero .subtitle{
    max-width:100%;
    font-size:21px;
    line-height:1.35;
    overflow-wrap:normal;
  }
  .hero .rotator{
    color:#dfe7f7;
  }
  .hero .actions{
    width:100%;
    max-width:100%;
    margin-left:0;
    padding-left:0;
    padding-right:20px;
  }
  .hero .actions a{
    color:#ffffff;
    background:linear-gradient(135deg,rgba(76,125,255,.62),rgba(86,216,255,.26));
    border-color:rgba(170,210,255,.28);
  }
  .stats{
    max-width:100%;
    justify-self:stretch;
  }
  .stats strong,
  .stats span{
    padding:12px;
  }
  .stats strong{
    font-size:26px;
  }
  .stats span{
    font-size:12px;
  }
  .journey-stack{
    grid-template-columns:1fr;
    gap:12px;
    padding-left:28px;
  }
  .timeline .journey-stack article{
    min-height:130px;
    padding:18px;
  }
  .timeline .journey-stack article::before{
    left:-28px;
  }
  .scroll-cue{
    left:24px;
    right:24px;
    display:flex;
    justify-content:space-between;
    gap:14px;
  }
  .profile-portrait{
    max-width:280px;
  }
}
html[data-theme="light"] .actions a,
html[data-theme="light"] .search button,
html[data-theme="light"] .contact-form button{
  color:#0f172a;
  background:linear-gradient(135deg,rgba(36,87,214,.18),rgba(0,119,182,.12));
}
html[data-theme="light"] .hero .subtitle,
html[data-theme="light"] .hero .rotator{
  color:#26384f;
}
html[data-theme="light"] .profile-portrait{
  background:rgba(255,255,255,.82);
  box-shadow:0 18px 45px rgba(30,60,95,.12);
}
html[data-theme="light"] .profile-portrait::before{
  background:linear-gradient(180deg,transparent 64%,rgba(255,255,255,.42));
}

@media(max-width:700px){
  .hero .actions{
    display:flex;
    flex-wrap:nowrap;
    justify-content:flex-start;
    gap:10px;
    width:calc(100vw - 24px);
    max-width:none;
    margin-left:-12px;
    padding:4px 12px 14px;
    overflow-x:auto;
    overflow-y:hidden;
    scroll-snap-type:x mandatory;
    overscroll-behavior-x:contain;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:none;
  }
  .hero .actions::-webkit-scrollbar{
    display:none;
  }
  .hero .actions a{
    flex:0 0 clamp(150px,54vw,220px);
    min-width:0;
    white-space:nowrap;
    scroll-snap-align:start;
  }
  #popular-projects .grid,
  #blog .grid{
    display:grid;
    grid-template-columns:none;
    grid-auto-flow:column;
    grid-auto-columns:min(82vw,330px);
    grid-template-rows:minmax(220px,auto);
    gap:16px;
    overflow-x:auto;
    overflow-y:hidden;
    padding:4px 24px 18px;
    margin-left:-24px;
    margin-right:-24px;
    scroll-snap-type:x mandatory;
    overscroll-behavior-x:contain;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:none;
  }
  #popular-projects .grid::-webkit-scrollbar,
  #blog .grid::-webkit-scrollbar{
    display:none;
  }
  #popular-projects .grid > *,
  #blog .grid > *{
    min-height:220px;
    scroll-snap-align:start;
  }
  #popular-projects .grid > *:last-child,
  #blog .grid > *:last-child{
    margin-right:24px;
  }
}
