@@ -84,24 +84,24 @@ body{
8484 .row {
8585 height : var (--nav-pill-height-desktop );
8686 }
87- .nav-inner ::before {
88- content : "" ;
89- position : absolute;
90- top : 50% ;
91- left : 0 ;
92- right : 0 ;
93- transform : translateY (-50% );
94- margin-inline : auto;
95- width : min (720px , 100% - 160px );
87+ /* Menu pill is now applied to .menu itself so it fits content width */
88+ .nav-inner ::before { content : none; }
89+
90+ .menu {
9691 height : var (--nav-pill-height-desktop );
97- box-sizing : border-box;
98- border-radius : calc (var (--nav-pill-height-desktop ) / 2 );
92+ align-items : center;
93+ /* Padding chosen so outer pill margins match the thumb margins when the thumb is at the ends */
94+ --menu-thumb-pad : 10px ;
95+ --menu-thumb-h : 32px ;
96+ --menu-pill-pad : calc (var (--menu-thumb-pad ) + (var (--nav-pill-height-desktop ) - var (--menu-thumb-h )) * 0.5 );
97+ padding : 0 var (--menu-pill-pad );
98+
9999 border : 1px solid var (--nav-border );
100+ border-radius : calc (var (--nav-pill-height-desktop ) / 2 );
100101 background : rgba (20 , 24 , 32 , .52 );
101102 backdrop-filter : saturate (170% ) blur (18px );
102103 -webkit-backdrop-filter : saturate (170% ) blur (18px );
103104 box-shadow : 0 14px 40px rgba (0 , 0 , 0 , .28 );
104- z-index : -1 ;
105105 }
106106}
107107.row {
@@ -131,6 +131,9 @@ body{
131131 font-size : .95rem ;
132132 position : relative;
133133 isolation : isolate;
134+ /* Defaults (desktop block above overrides/uses these) */
135+ --menu-thumb-pad : 10px ;
136+ --menu-thumb-h : 32px ;
134137}
135138.nav-right {
136139 display : flex;
@@ -213,10 +216,18 @@ body{
213216
214217
215218.menu a {
216- color : # e8e9ec ;
219+ color : rgba (232 , 233 , 236 , .72 );
220+ font-weight : 500 ;
217221 text-decoration : none;
218- padding : 6px 10 px ; /* reduced vertical padding for a thinner pill */
222+ padding : 6px 12 px ; /* a bit wider so the thumb feels less "tight" */
219223 border-radius : 12px ;
224+ transition : color .18s linear;
225+ }
226+
227+ /* Current/hovered item reads fully opaque */
228+ .menu a .is-current { color : rgba (232 , 233 , 236 , 1 ); }
229+ @media (hover : hover) and (pointer : fine){
230+ .menu a : hover { color : rgba (232 , 233 , 236 , 1 ); }
220231}
221232.nav-toggle {
222233 display : none;
@@ -340,11 +351,11 @@ body{
340351 position : absolute;
341352 top : 50% ;
342353 left : 0 ;
343- height : 32 px ;
354+ height : var ( --menu-thumb-h ) ;
344355 width : var (--menu-thumb-w , 0px );
345356 transform : translateY (-50% ) translateX (var (--menu-thumb-x , 0px ));
346- border-radius : 999 px ;
347- background : rgba (255 , 255 , 255 , .14 );
357+ border-radius : calc ( var ( --menu-thumb-h ) / 2 ) ;
358+ background : rgba (255 , 255 , 255 , .16 );
348359 opacity : var (--menu-thumb-o , 0 );
349360 transition :
350361 transform .45s cubic-bezier (.22 , 1 , .36 , 1 ),
@@ -362,6 +373,9 @@ body{
362373
363374 /* Keep press feedback subtle without fighting the thumb */
364375 .menu a : active { background : rgba (255 , 255 , 255 , .06 ); }
376+
377+ /* JS can add .thumb-init to disable the first-frame transition (prevents "grow from left") */
378+ .menu .thumb-init ::before { transition : none !important ; }
365379}
366380
367381/* Reduced motion: stop the thumb animation */
0 commit comments