:root body header:has(nav) nav,:root body header:has(nav) nav a,:root body header:has(nav) nav a span,:root body header:has(nav) nav a:visited,:root body header:has(nav) nav a:hover,:root body header:has(nav) nav a[aria-current="page"]{color:#ffffff!important;-webkit-text-fill-color:#ffffff!important;opacity:1!important}

/* Eight navigation items with a compact menu on narrower screens. */
:root body header > div:first-child > .max-w-site { display:flex; justify-content:space-between; gap:24px!important; max-width:1400px; }
:root body header nav { gap:28px!important; font-size:15px!important; letter-spacing:0!important; justify-self:end; }
:root body header a[aria-label="James Portfolio — Home"] { flex:0 0 218px; width:218px; display:flex; align-items:center; justify-content:center; }
:root body header a[aria-label="James Portfolio — Home"] img { width:100%; max-width:100%; height:auto; object-fit:contain; }
@media(min-width:1151px){ :root body header nav {display:flex!important} :root body header button[aria-label="Menu"]{display:none!important} }
@media(max-width:1150px){
 :root body header a[aria-label="James Portfolio — Home"] { flex:0 1 251px; width:251px; }
 :root body header nav {display:none!important}
 :root body header button[aria-label="Menu"]{display:block!important;margin-left:auto;color:#fff}
 :root body header > div.border-t {display:block!important;background:#273d57!important;max-height:calc(100dvh - 96px);overflow:auto}
 :root body header > div.border-t a {color:#fff!important;display:block;padding:10px 12px;font-size:17px;line-height:1.4}
}
@media(max-width:599px){
 :root body header > div:first-child > .max-w-site { min-height:96px; height:auto; gap:16px!important; align-items:center; padding-block:16px; }
 :root body header a[aria-label="James Portfolio — Home"] { max-width:calc(100% - 60px); justify-content:flex-start; }
 :root body header a[aria-label="James Portfolio — Home"] img { width:auto; max-height:64px; }
 :root body header button[aria-label="Menu"] { flex:0 0 44px; }
}

/* Keep the expanded navigation equally readable at compact widths. */
@media(max-width:1150px){
 :root body > header > div[class~="border-t"] > div { gap:8px!important; }
 :root body > header > div[class~="border-t"] a { font-size:17px!important; }
}
