/* ========================================================================== nav.css — header-only styles for the shared cross-site nav (nav.js). This is a SCOPED subset of site.css: only the design tokens + header / menu / language-dropdown rules. It deliberately omits site.css's base element rules (body, p, a, h*, input, button, section…) so dropping the shared nav onto a sibling site does NOT restyle that site's own content. Keep header-related rules here in sync with site.css. See nav.js. ========================================================================== */ /* ---- Design tokens (from site.css :root). Scoped to the header (all nav elements are descendants) so we never clobber a host site's own CSS vars. ---- */ header.site-header { --bg: #000000; --ink: #8b0000; --muted: #8b0000; --accent: #a00000; --gold: #8b0000; --border: #3a0000; --shadow: rgba(0, 0, 0, .40); --glow-color: 160, 0, 0; --glow-strong: 0 0 0 1px rgba(var(--glow-color), .55), 0 0 6px rgba(var(--glow-color), .65), 0 0 18px rgba(var(--glow-color), .55), 0 0 48px rgba(var(--glow-color), .35), inset 0 0 12px rgba(var(--glow-color), .18); --r: 6px; --wrap: 960px; --space-xs: 0.25rem; --space-sm: 0.5rem; --space-md: 0.75rem; --space-lg: 1rem; --space-xl: 1.35rem; --space-2xl: 1.75rem; --fs-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.85rem); --fs-sm: clamp(0.8rem, 0.75rem + 0.25vw, 0.9rem); --fs-lg: clamp(0.95rem, 0.9rem + 0.25vw, 1.05rem); --fs-xl: clamp(1.05rem, 1rem + 0.25vw, 1.15rem); } /* Header should always look like www (Inter), not inherit the host body font. */ header.site-header { font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; line-height: 1.6; } .header-button:hover, .header-button:focus-visible, #menu-toggle:hover, #menu-toggle:focus-visible { text-shadow: none; } /* ---- Header ---- */ header.site-header { background: var(--bg); border-bottom: 1px solid var(--border); position: fixed; top: 0; left: 0; right: 0; z-index: 1000; } /* Offset the host page so the fixed header doesn't overlap its content. */ body:has(header.site-header) { padding-top: var(--site-header-height, 76px); } .header-inner { max-width: var(--wrap); margin: 0 auto; padding: var(--space-md) var(--space-lg); display: flex; align-items: center; justify-content: space-between; gap: var(--space-lg); flex-wrap: wrap; } .brand { display: flex; align-items: center; gap: var(--space-md); min-width: 240px; } .logo { display: inline-flex; align-items: center; justify-content: center; border-radius: var(--r); } .logo img { height: 48px; width: 48px; object-fit: contain; border: 2px solid var(--border); border-radius: var(--r); transition: border-color .25s ease, box-shadow .35s ease, transform .35s ease; } header.site-header .logo:hover img, header.site-header .logo:focus-visible img { border-color: rgba(var(--glow-color), .9); box-shadow: var(--glow-strong); animation: logo-pulse 2.4s ease-in-out infinite; } @keyframes logo-pulse { 0%, 100% { box-shadow: 0 0 0 1px rgba(var(--glow-color), .55), 0 0 6px rgba(var(--glow-color), .65), 0 0 18px rgba(var(--glow-color), .55), 0 0 48px rgba(var(--glow-color), .35), inset 0 0 12px rgba(var(--glow-color), .18); } 50% { box-shadow: 0 0 0 1px rgba(var(--glow-color), .8), 0 0 10px rgba(var(--glow-color), .9), 0 0 28px rgba(var(--glow-color), .75), 0 0 64px rgba(var(--glow-color), .5), inset 0 0 18px rgba(var(--glow-color), .28); } } @media (prefers-reduced-motion: reduce) { header.site-header .logo:hover img, header.site-header .logo:focus-visible img { animation: none; } } .brand-text { display: flex; flex-direction: column; line-height: 1.2; } .brand-text strong { font-size: var(--fs-lg); color: var(--gold); letter-spacing: .2px; } .brand-text span { font-size: var(--fs-sm); color: var(--muted); } .header-controls { display: flex; align-items: center; gap: var(--space-sm); } .header-button { font-size: var(--fs-sm); border: 1px solid var(--border); padding: 4px 8px; border-radius: var(--r); color: var(--gold); text-decoration: none; background: var(--bg); cursor: pointer; font-family: inherit; display: inline-flex; align-items: center; justify-content: center; transition: background .15s, color .15s, border-color .15s, box-shadow .25s; } .header-button:hover { background: var(--accent); color: var(--ink); border-color: rgba(var(--glow-color), .9); box-shadow: 0 0 0 1px rgba(var(--glow-color), .4), 0 0 12px rgba(var(--glow-color), .55), 0 0 28px -4px rgba(var(--glow-color), .4); } nav.site-nav[hidden], .lang-menu[hidden] { display: none !important; } .header-icon-button { width: 36px; min-width: 36px; height: 36px; padding: 0; font-size: 1.05rem; line-height: 1; } .visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; } .protocol-pills { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; } .protocol-pill { --protocol-accent: var(--accent); display: inline-flex; align-items: center; min-height: 34px; padding: 5px 10px; border: 1px solid var(--protocol-accent); border-radius: 999px; background: rgba(var(--glow-color), .06); color: var(--protocol-accent); font-family: "JetBrains Mono", "IBM Plex Mono", "Fira Code", "Source Code Pro", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.88rem; font-weight: 700; line-height: 1.15; letter-spacing: 0; box-shadow: inset 0 0 10px rgba(var(--glow-color), .08); } .protocol-pill:hover, .protocol-pill:focus-visible { background: var(--protocol-accent); color: #050000; text-shadow: none; box-shadow: 0 0 0 1px var(--protocol-accent), 0 0 16px color-mix(in srgb, var(--protocol-accent) 65%, transparent); } .protocol-pill--gemini { --protocol-accent: #2fd7b5; } .protocol-pill--gopher { --protocol-accent: #d8a735; } .protocol-pill--tor { --protocol-accent: #a579d6; } .protocol-pill--i2p { --protocol-accent: #ff7b2c; } /* ---- Menu ---- */ .menu-wrapper { position: relative; } #menu-toggle { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; font-size: 22px; line-height: 1; border: 1px solid var(--border); border-radius: var(--r); background: var(--bg); color: var(--ink); padding: 0; transition: transform .25s ease, background .15s, color .15s, border-color .15s, box-shadow .25s; } #menu-toggle:hover { background: var(--accent); color: var(--ink); border-color: rgba(var(--glow-color), .9); box-shadow: 0 0 0 1px rgba(var(--glow-color), .4), 0 0 14px rgba(var(--glow-color), .6), 0 0 32px -4px rgba(var(--glow-color), .4); } #menu-toggle.active { transform: rotate(90deg); background: var(--bg); color: var(--ink); border-color: var(--border); } #menu-toggle.active:hover { background: var(--accent); color: var(--ink); border-color: var(--accent); } nav.site-nav { position: absolute; right: 0; top: calc(100% + var(--space-xs)); background: var(--bg); border: 1px solid var(--ink); border-radius: var(--r); padding: var(--space-md) var(--space-md); min-width: 200px; box-shadow: 0 10px 22px var(--shadow); z-index: 1200; max-height: calc(100vh - 80px); overflow-y: auto; } nav.site-nav ul { list-style: none; margin: 0; padding: 0; } nav.site-nav li { margin: var(--space-sm) 0; } nav.site-nav a { display: block; padding: var(--space-xs) var(--space-xs); transition: background .15s, color .15s; color: var(--gold); font-size: var(--fs-xl); margin: 0; text-decoration: none; } nav.site-nav a:hover { background: var(--accent); color: var(--ink); } nav.site-nav .nav-section { margin-bottom: var(--space-sm); } nav.site-nav .nav-section:last-child { margin-bottom: 0; } nav.site-nav .nav-section+.nav-section { border-top: 1px solid var(--border); padding-top: var(--space-sm); } nav.site-nav .nav-label { font-size: var(--fs-xs); font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: var(--space-xs); padding: var(--space-xs); } /* ---- Language dropdown ---- */ .lang { position: relative; } .lang-toggle-wrapper { display: inline-block; } .lang-menu { position: absolute; right: 0; top: calc(100% + var(--space-xs)); background: var(--bg); border: 1px solid var(--border); border-radius: var(--r); box-shadow: 0 10px 22px var(--shadow); min-width: 160px; padding: var(--space-sm); z-index: 1200; } .lang-menu a { display: block; padding: var(--space-sm) var(--space-sm); color: var(--gold); text-decoration: none; transition: background .15s; } .lang-menu a:hover { background: var(--accent); color: var(--ink); } /* ---- Light-mode header (driven by body.light-mode from site.js) ---- */ body.light-mode header.site-header { --bg: #fff8f1; --ink: #2a1212; --muted: #7a4545; --accent: #8b0000; --gold: #8b0000; --border: #e8c8c8; --shadow: rgba(139, 0, 0, .12); --glow-color: 139, 0, 0; background: rgba(255, 248, 241, .96); } body.light-mode .header-button, body.light-mode #menu-toggle, body.light-mode nav.site-nav, body.light-mode .lang-menu { --bg: #fff8f1; --ink: #2a1212; --muted: #7a4545; --accent: #8b0000; --gold: #8b0000; --border: #e8c8c8; background: #ffffff; } body.light-mode .header-button:hover, body.light-mode #menu-toggle:hover, body.light-mode nav.site-nav a:hover, body.light-mode .lang-menu a:hover { background: #8b0000; color: #ffffff; text-shadow: none; } body.light-mode .protocol-pill { background: #ffffff; } body.light-mode .protocol-pill:hover, body.light-mode .protocol-pill:focus-visible { color: #ffffff; } /* ---- Responsive (header only) ---- */ @media (max-width: 720px) { .header-inner { gap: var(--space-sm); } .brand { min-width: 0; flex: 1 1 auto; } .header-controls { flex-wrap: wrap; justify-content: flex-end; gap: var(--space-sm); row-gap: var(--space-xs); } .protocol-pills { order: 4; flex-basis: 100%; justify-content: flex-end; } #lang-toggle { white-space: nowrap; } } @media (max-width: 600px) { .brand-text span { display: none; } } @media (max-width: 520px) { .header-inner { position: relative; padding: var(--space-sm) var(--space-md); } nav.site-nav { min-width: 200px; max-width: calc(100vw - 2 * var(--space-md)); } .lang-menu { right: auto; left: 0; max-width: calc(100vw - 32px); } .header-button { padding: 4px 6px; } .header-icon-button { width: 34px; min-width: 34px; height: 34px; padding: 0; } .protocol-pills { justify-content: flex-start; } .protocol-pill { min-height: 32px; padding-inline: 9px; font-size: 0.82rem; } } @media (max-width: 380px) { .header-button { font-size: var(--fs-xs); padding: 3px 5px; } } @media (prefers-reduced-motion: reduce) { #menu-toggle.active { transform: none; } }