/* ──────────────────────────────────────────────────────────────────────
   Atlas Crew — shared chrome
   Tokens, reset, grid-bg, reveal delays, container, nav layout, and
   dropdown plumbing. Nav is now shared — pages should NOT redefine
   .nav, .nav-inner, .nav-brand, or .nav-links.

   Scroll-toggle for the bottom-border on scroll (add once per page):
     window.addEventListener('scroll', () => {
       document.querySelector('.nav')?.classList.toggle('scrolled', scrollY > 20);
     });

   Facet and facet-method override --warm and --muted with their own
   accent palette via a post-link <style> block, so the shared nav
   picks up their brand colors. 404, horizon, linkedin-banner, and
   resume-og-image do NOT use this file. Resume uses its own .site-nav-* prefix.
────────────────────────────────────────────────────────────────────── */

/* ── Design tokens ── */
:root {
  --bg: #0b0d11;
  --bg-raised: #111419;
  --bg-card: #0c1220;
  --bg-hover: #161a20;
  --border: #1e2d44;
  --border-strong: #2a3f5c;
  --text: #e8ecf4;
  --text-secondary: #8899b0;
  --muted: #5a6f8a;
  --blue: #1E90FF;
  --blue-dark: #0B4F8A;
  --coral: #F97316;
  --violet: #8B5CF6;
  --violet-dark: #4C1D95;
  --green: #10B981;
  --red: #EF4444;
  --amber: #F59E0B;
  --warm: #c4a882;
}

/* ── Reset ── */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* ── Grid background (fixed, behind everything) ── */
.grid-bg {
  position: fixed; inset: 0;
  background-image: linear-gradient(rgba(30,144,255,0.02) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(30,144,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px; pointer-events: none; z-index: 0;
}

/* ── Reveal-delay utility classes ── */
.rd1 { transition-delay: .1s; }
.rd2 { transition-delay: .2s; }
.rd3 { transition-delay: .3s; }
.rd4 { transition-delay: .4s; }
.rd5 { transition-delay: .5s; }
.rd6 { transition-delay: .6s; }

/* ── Container ── */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 40px;
  position: relative;
  z-index: 1;
}

/* ── Nav (shared Hero pattern) ──
   Fixed, backdrop-blurred, 15px muted links with warm active state.
   Border-bottom appears when the .scrolled class is toggled (add the
   scroll handler on each page — see top-of-file comment). */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 22px 0;
  background: rgba(11, 13, 17, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.nav.scrolled { border-bottom-color: var(--border); }
.nav-inner {
  max-width: 960px; margin: 0 auto; padding: 0 40px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text);
}
.nav-brand span {
  font-variation-settings: 'wght' 350, 'MONO' 0, 'CASL' 0, 'CRSV' 0.5, 'slnt' 0;
  font-size: 15px; letter-spacing: 4px; text-transform: uppercase;
}
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a, .nav-dropdown-trigger {
  font-variation-settings: 'wght' 500, 'MONO' 1, 'CASL' 0, 'CRSV' 0.5, 'slnt' 0;
  font-size: 15px; color: var(--muted);
  text-decoration: none; transition: color 0.3s;
  letter-spacing: 0.5px;
}
.nav-links a:hover,
.nav-dropdown:hover .nav-dropdown-trigger,
.nav-dropdown:focus-within .nav-dropdown-trigger { color: var(--text); }
.nav-links a.active,
.nav-dropdown-trigger.active { color: var(--warm); }

@media (max-width: 768px) {
  .nav { padding: 16px 0; }
  .nav-links { display: none; }
}

/* ── Nav dropdown (Projects) ──
   Typography (font-size, color, letter-spacing) is NOT set here.
   Each page's own .nav-links a rule should be extended to cover the
   trigger via a selector expansion:
     .nav-links a, .nav-dropdown-trigger { font-size: ...; color: ...; }
   That way the trigger picks up whatever nav-link styling the page
   wants (11px muted on article pages, 14px warm on consulting, etc.)
   without this stylesheet fighting the page's intent. */
.nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.nav-dropdown-trigger {
  cursor: pointer;
  user-select: none;
  transition: color 0.3s;
  display: inline-flex;
  align-items: center;
  line-height: 1;
}
.nav-dropdown-trigger::after {
  content: '▾';
  font-size: 1em;
  margin-left: 6px;
  line-height: 1;
  display: inline-block;
  transition: transform 0.2s ease;
}
.nav-dropdown:hover .nav-dropdown-trigger::after,
.nav-dropdown:focus-within .nav-dropdown-trigger::after {
  transform: rotate(180deg);
}
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: -12px;
  min-width: 150px;
  background: #111419;
  border: 1px solid #1e2d44;
  padding: 6px 0;
  margin-top: 8px;
  z-index: 200;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  display: block;
}
.nav-dropdown-menu a {
  display: block;
  padding: 8px 16px;
  font-size: 11px;
  color: #8899b0;
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: 0.5px;
  transition: color 0.2s;
}
.nav-dropdown-menu a:hover { color: #e8ecf4; }
.nav-dropdown-divider {
  height: 1px;
  background: #1e2d44;
  margin: 6px 0;
}
