/* Shared shell for the inner pages (blog, contact, links, posts):
   the home field band, topbar, nav, language switch and footer.
   Copied from the home styles in src/index.html; keep them in step.
   Each page defines the tokens (--bg, --fg, --muted, --border,
   --accent, --shadow, --max, --font-*). */

#gl {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  display: block;
  z-index: 0;
}
.gl-fallback {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: 0;
  display: none;
  background:
    radial-gradient(ellipse 80% 60% at 22% 18%, rgba(200,214,235,0.10), transparent 55%),
    radial-gradient(ellipse 70% 50% at 78% 30%, rgba(160,175,200,0.08), transparent 50%),
    radial-gradient(ellipse 60% 40% at 50% 82%, rgba(120,135,160,0.06), transparent 55%),
    linear-gradient(180deg, #04050c 0%, #090b14 50%, #04050c 100%);
}
body.no-gl .gl-fallback { display: block; }
body.no-gl #gl { display: none; }

.vignette {
  position: absolute;
  inset: 0 0 auto;
  height: 100svh;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(to top, var(--bg) 0%, transparent 24%);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 100;
  background: var(--accent);
  color: #061018;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
}
.skip-link:focus { left: 20px; text-decoration: none; }

.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px clamp(16px, 4vw, 40px);
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }

.brand {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  min-height: 44px;
  gap: 12px;
  color: var(--fg);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.brand-mark {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.55), rgba(110,240,255,0.15) 40%, rgba(255,90,214,0.25)),
    linear-gradient(320deg, #1a2238, #0a0d18);
  border: 1px solid rgba(255,255,255,0.28);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.45),
    0 8px 24px rgba(110,240,255,0.15);
  position: relative;
  overflow: hidden;
}
.brand span { font-size: 14px; }
.brand em {
  font-style: normal;
  color: var(--muted);
  font-weight: 500;
  margin-left: 2px;
}

.nav {
  display: none;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(8,10,20,0.96);
  border: 1px solid var(--border);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: var(--shadow);
}
@media (min-width: 860px) { .nav { display: flex; } }
.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color .2s, background .2s;
}
.nav a:hover { color: var(--fg); background: rgba(255,255,255,0.08); }
.nav a.current { color: var(--accent); }

.menu-btn {
  display: none;
  align-items: center;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(8,10,20,0.96);
  color: var(--fg);
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}
.menu-btn:hover { background: rgba(255,255,255,0.08); }

@media (max-width: 859px) {
  .menu-btn { display: inline-flex; }
  .nav.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 66px;
    left: 16px;
    right: 16px;
    padding: 10px;
    border-radius: 18px;
    background: rgba(8,10,20,0.92);
  }
  .nav.open a { padding: 13px 16px; }
}

.lang-switch {
  display: flex;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(8,10,20,0.96);
  border: 1px solid var(--border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.lang-switch a { text-decoration: none; padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--muted);
  transition: color .2s, background .2s;
}
.lang-switch a.active {
  color: #061018;
  background: var(--accent);
}
.lang-switch a:hover:not(.active) { color: var(--fg); }

footer {
  position: relative;
  z-index: 5;
  border-top: 1px solid var(--border);
  padding: 26px 0;
}
footer .container {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  justify-content: space-between;
}
footer p { margin: 0; }
footer p, footer .foot-links a {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.01em;
  color: var(--muted);
  text-decoration: none;
}
footer .foot-links { display: flex; gap: 8px; }
footer .foot-links a { padding: 11px 8px; }
footer .foot-links a:hover { color: var(--accent); text-decoration: none; }

@media (max-width: 767px) {
  .topbar { padding: 14px 16px; }
}
@media (max-width: 380px) {
  .topbar { gap: 8px; }
  .brand { gap: 6px; }
  .brand span { font-size: 12px; }
  .menu-btn { padding-inline: 12px; }
}

@media print {
  nav, .menu-btn, #gl, .gl-fallback, .vignette { display: none !important; }
  .topbar { position: static; }
}
