/* Shared header geometry keeps the menu aligned across desktop and mobile. */
.header{--header-height:82px;height:var(--header-height);padding-inline:clamp(20px,3vw,48px);gap:clamp(20px,2.2vw,36px);background:#080b09ed}
.header .brand{flex-shrink:0;gap:0;font-size:21px;min-height:44px}
.header .brand img{width:36px;height:36px;object-fit:contain;margin-right:9px}
.header .brand-wordmark{display:flex;font-weight:800;color:var(--ink)}
.header .brand-wordmark>span{font-weight:500;color:#c4ccbf}
.header nav{display:flex;align-items:center;justify-content:flex-end;gap:clamp(18px,2vw,32px);min-width:0;flex:1;margin-left:auto;font-size:13px}
.header-sections,.header-project{display:flex;align-items:center;gap:clamp(14px,1.6vw,24px)}
.header-sections>a{display:inline-flex;align-items:center;min-height:44px;white-space:nowrap;color:#c9d3c2}
.header-sections .header-menu-extra{display:none}
.header-project{gap:14px;padding-left:clamp(18px,2vw,28px);border-left:1px solid var(--line);flex-shrink:0}
.header-project>a{display:inline-flex;align-items:center;justify-content:center;min-height:44px;white-space:nowrap}
.header .header-github{gap:9px;padding:0 15px;border:1px solid #fff;border-radius:6px;background:#fff;color:#101710;font-weight:700;transition:background .2s,border-color .2s}
.header .header-github:hover{background:#e5eadf;border-color:#e5eadf;color:#101710}
.header-github svg{flex-shrink:0}
.header-github .github-external{font-size:14px;color:#53634b}
.header .header-controls{flex-shrink:0;margin-left:0;gap:8px}
.header .language{width:40px;min-width:40px;min-height:44px;padding:0;color:#b9c6af;font-size:12px}
.header .nav-cta{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:0 17px;margin:0;border:1px solid var(--lime);border-radius:6px;background:var(--lime);color:#14200c;font-size:13px;font-weight:700;white-space:nowrap;transition:background .2s,border-color .2s}
.header .nav-cta:hover{background:#ccff99;border-color:#ccff99;color:#14200c}
.header .menu-toggle{display:none;width:44px;height:44px;flex-shrink:0;padding:12px}
.header a:focus-visible,.header button:focus-visible{outline:2px solid var(--lime);outline-offset:4px;border-radius:4px}
@media(max-width:1250px){
  .header{gap:16px}
  .header .header-controls{margin-left:auto;gap:8px}
  .header nav{display:none;position:absolute;inset:var(--header-height) 0 auto;max-height:calc(100dvh - var(--header-height));overflow-y:auto;overscroll-behavior:contain;align-items:stretch;gap:22px;padding:24px max(24px,3vw) 28px;margin:0;background:#0b120bfa;border-bottom:1px solid #435237;box-shadow:0 22px 40px #0005;backdrop-filter:blur(20px);font-size:15px}
  .header nav.is-open{display:flex;flex-direction:column}
  .header-sections{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px 24px;align-items:stretch}
  .header-sections>a,.header-sections .header-menu-extra{display:flex;min-width:0;padding-block:9px;white-space:normal}
  .header-project{justify-content:flex-start;gap:28px;flex-wrap:wrap;border-left:0;border-top:1px solid var(--line);padding:18px 0 0}
  .header-project>a{min-height:48px}
  .header .menu-toggle{display:flex;flex-direction:column;justify-content:center;gap:6px;background:none;border:0;cursor:pointer}
  .header .menu-toggle span{height:1px;width:20px;background:var(--ink);transition:transform .2s}
  .header .menu-toggle[aria-expanded=true] span:first-child{transform:translateY(3.5px) rotate(45deg)}
  .header .menu-toggle[aria-expanded=true] span:last-child{transform:translateY(-3.5px) rotate(-45deg)}
}
@media(max-width:760px){
  .header{--header-height:74px;padding-inline:20px}
  .header .brand{font-size:19px}
  .header .brand img{width:32px;height:32px;margin-right:7px}
  .header-sections{grid-template-columns:repeat(2,minmax(0,1fr));column-gap:20px}
}
@media(max-width:520px){
  .header{padding-inline:14px;gap:8px}
  .header .brand{width:40px;justify-content:center}
  .header .brand img{margin-right:0;width:36px;height:36px}
  .header .brand-wordmark{display:none}
  .header .header-controls{gap:5px}
  .header .language{width:36px;min-width:36px}
  .header .nav-cta{padding-inline:13px}
  .header nav{padding:18px 22px 24px;gap:18px}
  .header-project{gap:16px 22px}
}
