/* flackerweb — shared chrome
   Nav and footer only. Each page retains its own styling.
   -------------------------------------------------------- */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;600&display=swap');

/* ── SIDEBAR NAV ── */

:root {
  --sidebar-w: 160px;
}

#site-nav {
  position: fixed;
  left: 0;
  top: 0;
  width: var(--sidebar-w);
  height: 100vh;
  z-index: 1000;
  background: rgba(8, 10, 14, 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-right: 1px solid rgba(255,255,255,0.07);
  padding: 1.5rem 0.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  overflow-y: auto;
  box-sizing: border-box;
}

#site-nav .nav-home {
  color: #58a6ff;
  text-decoration: none;
  letter-spacing: 0.05em;
  font-weight: 600;
  white-space: nowrap;
  padding: 0.35rem 0.5rem;
  margin-bottom: 0.75rem;
  display: block;
}

#site-nav .nav-home:hover { color: #a0c8ff; }

/* separator not needed in sidebar layout */
#site-nav .nav-sep { display: none; }

#site-nav a.nav-link {
  color: rgba(255,255,255,0.45);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
  letter-spacing: 0.02em;
  padding: 0.35rem 0.5rem;
  border-radius: 4px;
  display: block;
  width: 100%;
  margin-bottom: 0.1rem;
  box-sizing: border-box;
}

#site-nav a.nav-link:hover {
  color: rgba(255,255,255,0.85);
  background: rgba(255,255,255,0.05);
}

#site-nav a.nav-link.active {
  color: rgba(255,255,255,0.9);
  background: rgba(255,255,255,0.08);
  pointer-events: none;
}

/* Push page content right to clear the sidebar.
   Using html body for specificity to win over any * { margin:0 } resets
   in individual page stylesheets. */
html body {
  margin-left: var(--sidebar-w);
}

/* ── FOOTER ── */
#site-footer {
  margin-top: 4rem;
  padding: 1.25rem 2rem;
  border-top: 1px solid rgba(255,255,255,0.07);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

#site-footer a {
  color: rgba(255,255,255,0.25);
  text-decoration: none;
}

#site-footer a:hover { color: rgba(255,255,255,0.5); }

/* ── MOBILE: collapse to top bar ── */
@media (max-width: 640px) {
  :root { --sidebar-w: 0px; }

  #site-nav {
    position: sticky;
    top: 0;
    width: 100%;
    height: 44px;
    flex-direction: row;
    align-items: center;
    padding: 0 1rem;
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    overflow-x: auto;
    overflow-y: hidden;
    gap: 0;
  }

  #site-nav .nav-sep {
    display: inline;
    color: rgba(255,255,255,0.15);
    margin-right: 1rem;
    user-select: none;
  }

  #site-nav .nav-home {
    margin-bottom: 0;
    margin-right: 1rem;
    padding: 0;
    flex-shrink: 0;
  }

  #site-nav a.nav-link {
    margin-bottom: 0;
    margin-right: 1rem;
    padding: 0;
    width: auto;
    border-radius: 0;
    background: none !important;
    flex-shrink: 0;
  }

  html body { margin-left: 0; }
}
