/* ============================================================
   glick.run — shared site chrome (nav, sub-nav, transitions)
   Single source of truth. Linked from every page as /site.css.
   Nav palette is hard-coded here (not via per-page vars) so the
   menubar renders identically regardless of each page's theme.
   ============================================================ */

/* ---- Cross-document view transitions ---- */
@view-transition { navigation: auto; }

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 200ms;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
}
::view-transition-old(root) { animation-name: gr-fade-out; }
::view-transition-new(root) { animation-name: gr-fade-in; }
@keyframes gr-fade-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes gr-fade-in  { from { opacity: 0; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root) { animation: none !important; }
}

/* ---- Primary (portfolio) nav ---- */
.site-nav {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  height: 56px; padding: 0 40px;
  background: rgba(8, 8, 12, 0.8);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  backdrop-filter: blur(18px) saturate(1.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-family: 'JetBrains Mono', 'SF Mono', ui-monospace, monospace;
  view-transition-name: site-nav;
}
.site-nav-brand {
  font-size: 14px; font-weight: 600; letter-spacing: -0.02em;
  color: #e4e4ef; text-decoration: none;
}
.site-nav-brand span { color: #6b6b80; }
.site-nav-links { display: flex; gap: 4px; align-items: center; }
.site-nav-link {
  font-size: 12px; color: #8a8a98; text-decoration: none;
  padding: 6px 14px; border-radius: 6px;
  border: 1px solid transparent; white-space: nowrap;
  transition: color .2s, background .2s, border-color .2s;
}
.site-nav-link:hover {
  color: #e4e4ef; background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.10);
}
.site-nav-link.active {
  color: #e4e4ef; background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}
.site-nav-gh {
  font-size: 12px; color: #8a8a98; text-decoration: none;
  padding: 6px 14px; border-radius: 6px; margin-left: 8px;
  border: 1px solid rgba(255, 255, 255, 0.10); white-space: nowrap;
  transition: color .2s, border-color .2s;
}
.site-nav-gh:hover { color: #e4e4ef; border-color: rgba(255, 255, 255, 0.22); }

/* ---- Secondary (AppCrane section) sub-nav ---- */
.site-subnav {
  position: sticky; top: 56px; z-index: 99;
  display: flex; justify-content: center; padding: 0 24px;
  background: rgba(8, 8, 12, 0.9);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  font-family: 'JetBrains Mono', 'SF Mono', ui-monospace, monospace;
}
.site-subnav-inner {
  display: flex; align-items: center; gap: 2px;
  max-width: 1060px; width: 100%;
  overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none;
}
.site-subnav-inner::-webkit-scrollbar { display: none; }
.site-subnav-label {
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: #f5a623; opacity: 0.85;
  padding-right: 14px; margin-right: 6px;
  border-right: 1px solid rgba(255, 255, 255, 0.10); white-space: nowrap;
}
.site-subnav-link {
  font-size: 12px; color: #8a8a98; text-decoration: none;
  padding: 12px 14px; border-bottom: 2px solid transparent; white-space: nowrap;
  transition: color .2s, border-color .2s;
}
.site-subnav-link:hover { color: #e4e4ef; }
.site-subnav-link.active { color: #f5a623; border-bottom-color: #f5a623; }

/* ---- Responsive ---- */
@media (max-width: 768px) { .site-nav { padding: 0 20px; } }
@media (max-width: 560px) {
  .site-subnav { padding: 0 12px; }
  .site-subnav-label { display: none; }
  .site-subnav-link { padding: 11px 11px; font-size: 11px; }
}
@media (max-width: 480px) {
  .site-nav-link { padding: 6px 10px; font-size: 11px; }
}
