/* Shared site navigation — use with <link rel="stylesheet" href="site-header.css" /> (root) or href="../site-header.css" (subfolders) */
:root {
  --nav-accent: #0066cc;
  --nav-muted: #3d5a73;
  --nav-orange: #ff6b35;
  --nav-header-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(255, 255, 255, 0.88));
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--nav-header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 2px solid rgba(0, 102, 204, 0.12);
}

/* Home / interactive resume: bar stays on top like the old “HUD” */
.site-header--fixed {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
}

/* Home (fixed header): space for first panel; height fills viewport (border-box) */
body.has-fixed-site-header {
  --header-h: 4.25rem;
}
body.has-fixed-site-header .track-wrap {
  padding-top: var(--header-h);
  box-sizing: border-box;
}

@media (max-width: 1024px) {
  body.has-fixed-site-header { --header-h: 5.25rem; }
}
@media (max-width: 640px) {
  body.has-fixed-site-header { --header-h: 5.5rem; }
}

.site-header .inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.55rem 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  flex-wrap: nowrap;
  min-height: 2.75rem;
}

.site-header .inner.inner--wrap {
  flex-wrap: wrap;
  align-content: center;
}

.site-header a.brand,
.site-header .brand {
  font-family: Outfit, "Segoe UI", system-ui, sans-serif;
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--nav-accent);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.site-header a.brand i,
.site-header .brand i {
  color: var(--nav-orange);
  font-size: 1.05rem;
}

/* Blog post count (optional) */
.site-header__extras {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pill {
  font-size: 0.75rem;
  padding: 0.35rem 0.7rem;
  background: rgba(0, 102, 204, 0.1);
  color: var(--nav-accent);
  border-radius: 999px;
  font-weight: 600;
  white-space: nowrap;
}

/* Horizontal scroll for many links (same on all pages) */
.nav-scroll {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  mask-image: linear-gradient(90deg, #000 90%, transparent);
}

.nav-scroll::-webkit-scrollbar {
  height: 4px;
}
.nav-scroll::-webkit-scrollbar-thumb {
  background: rgba(0, 102, 204, 0.25);
  border-radius: 99px;
}

.nav-links {
  display: flex;
  gap: 0.2rem 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0 0 2px 0;
  flex-wrap: nowrap;
  width: max-content;
  align-items: center;
}

.nav-links a {
  color: var(--nav-muted);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.5rem;
  border-radius: 999px;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
  font-family: "DM Sans", system-ui, sans-serif;
}

.nav-links a:hover {
  color: var(--nav-accent);
  background: rgba(0, 102, 204, 0.08);
}

.nav-links a.active {
  color: #fff;
  background: var(--nav-accent);
}

/* INDEX ONLY — progress + hint beside nav */
.site-header--resume .inner--resume {
  max-width: 100%;
  flex-wrap: wrap;
  row-gap: 0.5rem;
}

.site-header--resume .nav-scroll {
  min-width: min(0, 200px);
  order: 2;
  flex: 1 1 200px;
}

.site-header--resume a.brand {
  order: 0;
  flex: 0 0 auto;
}

.site-header--resume .resume-hud {
  order: 3;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex: 0 0 auto;
  margin-left: auto;
}

.hud-progress {
  width: 120px;
  max-width: 30vw;
  height: 7px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 99px;
  overflow: hidden;
  flex-shrink: 0;
}

.hud-progress i {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--nav-accent), var(--nav-orange));
  border-radius: 99px;
  transition: width 0.35s ease;
}

.hud-hint {
  font-size: 0.65rem;
  color: var(--nav-muted);
  line-height: 1.3;
  max-width: 130px;
  text-align: right;
  font-weight: 600;
}

.hud-hint kbd {
  display: inline-block;
  padding: 0.1em 0.35em;
  font-size: 0.8em;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

@media (max-width: 1200px) {
  .site-header--resume .resume-hud {
    order: 4;
    width: 100%;
    justify-content: flex-end;
    margin-left: 0;
  }
}

@media (max-width: 640px) {
  .hud-progress {
    display: none;
  }
  .hud-hint {
    max-width: 100px;
  }
}

@media (max-width: 480px) {
  .hud-hint {
    display: none;
  }
  body.has-fixed-site-header { --header-h: 4.5rem; }
}
