/* ═══════════════════════════════════════════════════════
   global.css — Devon Tyler Barber / devon-tyler.com
   Founder, Tradesman, Record-Builder
   Shared variables, reset, nav, footer, and utilities.
   All four pages (work, about, contact, resume, 404) link here.
   Redesigned 2026-06-09: world-class nav + footer system.
   ═══════════════════════════════════════════════════════ */

/* ── VARIABLES ────────────────────────────────────────── */
:root {
  /* ── PRIMARY PALETTE ──────────────────────────────────── */
  --navy: #0f1724;
  --navy-mid: #182640;
  --navy-soft: #162038;
  --navy-raised: #1a2a4a;
  --teal: #0a7075;
  --teal-light: #12999f;
  --teal-bg: #f0fafa;
  --teal-border: #c0e4e6;
  --gold: #b8860b;
  --gold-light: #d4a017;
  --gold-soft: rgba(212, 160, 23, 0.18);
  --gold-border: rgba(212, 160, 23, 0.30);
  --gold-bg: #fdf8ef;
  --warm-border: #e2ddd6;
  --ivory: #f4eddf;

  /* ── TEXT ─────────────────────────────────────────────── */
  --text: #1c1c1c;
  --text-mid: #404040;
  --text-light: #6a6a6a;

  /* ── SURFACES ─────────────────────────────────────────── */
  --surface: #ffffff;
  --surface-alt: #f8f7f4;
  --surface-nav: rgba(15, 23, 36, 0.92);

  /* ── FOCUS / ACCENT ────────────────────────────────────── */
  --focus-ring: rgba(212, 160, 23, 0.50);
  --focus-ring-strong: rgba(212, 160, 23, 0.80);
  --link-color: #1a6e72;
  --link-hover: #0d4f52;

  /* ── BUTTON TOKENS ─────────────────────────────────────── */
  --btn-primary-bg: var(--gold-light);
  --btn-primary-text: var(--navy);
  --btn-primary-hover: #c8a820;
  --btn-secondary-bg: transparent;
  --btn-secondary-border: rgba(244, 237, 223, 0.18);
  --btn-secondary-text: rgba(244, 237, 223, 0.80);
  --btn-radius: 999px;

  /* ── NAV TOKENS ────────────────────────────────────────── */
  --nav-height: 56px;
  --nav-bg: rgba(15, 23, 36, 0.88);
  --nav-border: rgba(244, 237, 223, 0.07);
  --nav-blur: 18px;
  --nav-link-color: rgba(244, 237, 223, 0.58);
  --nav-link-active: var(--gold-light);
  --nav-link-hover: rgba(244, 237, 223, 0.92);
  --nav-link-focus-ring: var(--focus-ring);
  --nav-pill-radius: 999px;
  --nav-pill-bg: transparent;
  --nav-pill-bg-hover: rgba(244, 237, 223, 0.06);
  --nav-pill-bg-active: rgba(212, 160, 23, 0.10);
  --nav-pill-border: transparent;
  --nav-pill-border-hover: rgba(244, 237, 223, 0.14);
  --nav-pill-border-active: rgba(212, 160, 23, 0.32);
  --nav-transition: 200ms cubic-bezier(0.22, 0.61, 0.36, 1);

  /* ── FOOTER TOKENS ────────────────────────────────────── */
  --footer-bg: rgba(10, 17, 28, 0.96);
  --footer-border: rgba(244, 237, 223, 0.06);
  --footer-text: rgba(244, 237, 223, 0.35);
  --footer-link: rgba(244, 237, 223, 0.40);
  --footer-link-hover: var(--gold-light);
  --footer-link-active: var(--gold-light);
}

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

/* ── BASE ─────────────────────────────────────────────── */
body {
  font-family:
    "Segoe UI",
    -apple-system,
    BlinkMacSystemFont,
    "Helvetica Neue",
    Arial,
    sans-serif;
  font-feature-settings: "kern" 1;
  line-height: 1.6;
  color: var(--text);
}

/* ── LINKS ─────────────────────────────────────────────── */
a {
  color: var(--link-color);
  text-decoration: none;
  transition: color 0.15s;
}
a:hover {
  color: var(--link-hover);
}
a:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ── BUTTON RESET ─────────────────────────────────────────── */
button:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ══════════════════════════════════════════════════════════
   NAV — World-class glassmorphic header
   ══════════════════════════════════════════════════════════ */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--nav-height);
  padding: 0 28px;
  background: var(--nav-bg);
  backdrop-filter: blur(var(--nav-blur)) saturate(1.2);
  -webkit-backdrop-filter: blur(var(--nav-blur)) saturate(1.2);
  border-bottom: 1px solid var(--nav-border);
  transition: background var(--nav-transition), border-color var(--nav-transition);
}

/* ── Brand cluster ───────────────────────────────────────── */
nav .brand-cluster {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

nav .brand {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 2.8px;
  text-transform: uppercase;
  color: var(--ivory);
  text-decoration: none;
  transition: color var(--nav-transition);
  white-space: nowrap;
}
nav .brand:hover {
  color: var(--gold-light);
}
nav .brand:focus-visible {
  outline: 2px solid var(--nav-link-focus-ring);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ── Desktop links ───────────────────────────────────────── */
nav .links {
  display: flex;
  align-items: center;
  gap: 6px;
}

nav .links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--nav-link-color);
  text-decoration: none;
  border-radius: var(--nav-pill-radius);
  border: 1px solid var(--nav-pill-border);
  background: var(--nav-pill-bg);
  transition:
    color var(--nav-transition),
    border-color var(--nav-transition),
    background var(--nav-transition);
}

nav .links a:hover {
  color: var(--nav-link-hover);
  border-color: var(--nav-pill-border-hover);
  background: var(--nav-pill-bg-hover);
}

nav .links a:focus-visible {
  color: var(--ivory);
  outline: 2px solid var(--nav-link-focus-ring);
  outline-offset: 2px;
  border-radius: var(--nav-pill-radius);
}

nav .links a[aria-current="page"] {
  color: var(--nav-link-active);
  border-color: var(--nav-pill-border-active);
  background: var(--nav-pill-bg-active);
}

/* ── Hamburger button ────────────────────────────────────── */
nav .hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  padding: 0;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  transition: background var(--nav-transition), border-color var(--nav-transition);
  -webkit-tap-highlight-color: transparent;
}
nav .hamburger:hover {
  background: rgba(244, 237, 223, 0.06);
  border-color: rgba(244, 237, 223, 0.08);
}
nav .hamburger:focus-visible {
  outline: 2px solid var(--nav-link-focus-ring);
  outline-offset: 2px;
  border-radius: 8px;
}
nav .hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: rgba(244, 237, 223, 0.6);
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
  transform-origin: center;
}
nav .hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
  background: var(--gold-light);
}
nav .hamburger.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
nav .hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
  background: var(--gold-light);
}

/* ── Mobile drawer ────────────────────────────────────────── */
nav .drawer {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(10, 17, 28, 0.96);
  backdrop-filter: blur(var(--nav-blur)) saturate(1.2);
  -webkit-backdrop-filter: blur(var(--nav-blur)) saturate(1.2);
  padding: 8px 28px 16px;
  z-index: 99;
  border-bottom: 1px solid var(--nav-border);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
nav .drawer.open {
  display: flex;
  flex-direction: column;
  gap: 0;
  opacity: 1;
  transform: translateY(0);
}
nav .drawer a {
  display: flex;
  align-items: center;
  min-height: 46px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--nav-link-color);
  text-decoration: none;
  padding: 8px 0;
  border-bottom: 1px solid rgba(244, 237, 223, 0.06);
  transition: color var(--nav-transition);
}
nav .drawer a:last-child {
  border-bottom: none;
}
nav .drawer a:hover {
  color: var(--nav-link-hover);
}
nav .drawer a:focus-visible {
  color: var(--ivory);
  outline: 2px solid var(--nav-link-focus-ring);
  outline-offset: -2px;
}
nav .drawer a[aria-current="page"] {
  color: var(--nav-link-active);
}

/* ══════════════════════════════════════════════════════════
   FOOTER — As above, so below
   ══════════════════════════════════════════════════════════ */
footer {
  background: var(--footer-bg);
  border-top: 1px solid var(--footer-border);
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

footer .footer-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
}

footer .footer-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--footer-link);
  text-decoration: none;
  border-radius: var(--nav-pill-radius);
  border: 1px solid transparent;
  background: transparent;
  transition:
    color var(--nav-transition),
    border-color var(--nav-transition),
    background var(--nav-transition);
}
footer .footer-nav a:hover {
  color: var(--footer-link-hover);
  border-color: rgba(244, 237, 223, 0.10);
  background: rgba(244, 237, 223, 0.04);
}
footer .footer-nav a:focus-visible {
  color: var(--ivory);
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: var(--nav-pill-radius);
}
footer .footer-nav a[aria-current="page"] {
  color: var(--footer-link-active);
  border-color: var(--gold-border);
  background: var(--gold-soft);
}

footer .brand-cluster {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

footer .brand-cluster span:first-child {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--footer-text);
}

/* ══════════════════════════════════════════════════════════
   ECOSYSTEM FOOTER — Professional founder-hub grid
   ══════════════════════════════════════════════════════════ */
.ecosystem-footer {
  background: var(--footer-bg);
  border-top: 1px solid var(--footer-border);
  padding: 44px 32px 28px;
}

.ef-grid {
  max-width: 1080px;
  margin: 0 auto 28px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px 24px;
}

.ef-brand {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ef-name {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--ivory);
  margin: 0;
}

.ef-byline {
  font-size: 11px;
  color: rgba(244, 237, 223, 0.52);
  margin: 0;
}

.ef-location {
  font-size: 10px;
  color: rgba(244, 237, 223, 0.35);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.ef-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ef-col-title {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: rgba(244, 237, 223, 0.28);
  margin: 0 0 2px;
}

.ef-col a {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: var(--footer-link);
  text-decoration: none;
  transition: color var(--nav-transition);
  width: fit-content;
}

.ef-col a:hover {
  color: var(--footer-link-hover);
}

.ef-col a:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: 2px;
}

.ef-bottom {
  max-width: 1080px;
  margin: 0 auto;
  padding-top: 20px;
  border-top: 1px solid rgba(244, 237, 223, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 10px;
  color: var(--footer-text);
}

.ef-bottom .flag-group {
  opacity: 0.65;
}

@media (max-width: 760px) {
  .ef-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px 20px;
  }
  .ef-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 480px) {
  .ef-grid {
    grid-template-columns: 1fr;
  }
  .ecosystem-footer {
    padding: 32px 20px 24px;
  }
}

/* ── SKIP NAV ─────────────────────────────────────────── */
.skip-nav {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy);
  color: #fff;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  z-index: 200;
  border-radius: 0 0 4px 0;
}
.skip-nav:focus {
  left: 0;
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

/* ── SHARED PAGE HERO ────────────────────────────────── */
.hero-banner {
  background:
    radial-gradient(ellipse at 20% 20%, rgba(212, 160, 23, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 80%, rgba(10, 112, 117, 0.06) 0%, transparent 50%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-soft) 100%);
  padding: 52px 32px 44px;
  text-align: center;
  color: #fff;
  border-bottom: 1px solid var(--nav-border);
}
.hero-banner h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.hero-banner .subtitle {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

/* ── SHARED PAGE SHELL ───────────────────────────────── */
.page-shell {
  max-width: 960px;
  margin: 0 auto;
  padding: 48px 16px 64px;
}

.page-panel {
  background: var(--surface);
  border: 1px solid var(--warm-border);
  border-radius: 8px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.05);
}

/* ── ARIA CURRENT ─────────────────────────────────────── */
/* Active nav state handled in nav section above via
   nav .links a[aria-current="page"] and
   nav .drawer a[aria-current="page"] selectors */

/* ── HOME FOOTER NAV ──────────────────────────────────── */
.home-footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.home-footer-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--footer-link);
  text-decoration: none;
  border-radius: var(--nav-pill-radius);
  border: 1px solid transparent;
  background: transparent;
  transition:
    color var(--nav-transition),
    border-color var(--nav-transition),
    background var(--nav-transition);
}
.home-footer-links a:hover {
  color: var(--footer-link-hover);
  border-color: rgba(244, 237, 223, 0.10);
  background: rgba(244, 237, 223, 0.04);
}
.home-footer-links a:focus-visible {
  color: var(--ivory);
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: var(--nav-pill-radius);
}

/* ── SUB-PAGE FOOTER NAV ──────────────────────────────── */
/* Merged into footer .footer-nav above for consistency */

/* ── UTILITIES ────────────────────────────────────────── */
.no-print {
  /* used to hide elements in print mode */
}

/* ── RESPONSIVE ───────────────────────────────────────── */
@media (max-width: 640px) {
  nav {
    padding: 0 16px;
    height: 52px;
  }
  nav .links {
    display: none;
  }
  nav .hamburger {
    display: flex;
  }
  nav .brand {
    font-size: 10px;
    letter-spacing: 2px;
  }
  nav .brand-cluster .flag-group {
    display: none;
  }
  .hero-banner {
    padding: 36px 20px 28px;
  }
  .hero-banner h1 {
    font-size: 22px;
    letter-spacing: 2px;
  }
  .page-shell {
    padding: 24px 16px 48px;
  }
  footer {
    padding: 24px 20px;
    gap: 14px;
  }
  footer .footer-nav {
    gap: 4px;
  }
  footer .brand-cluster {
    gap: 8px;
  }
  .home-footer-links {
    gap: 4px;
  }
}

/* ── GLASS CARD ───────────────────────────────────────── */
.glass-card {
  background: rgba(37, 54, 88, 0.55);
  backdrop-filter: blur(8px) saturate(1.15);
  -webkit-backdrop-filter: blur(8px) saturate(1.15);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
  transition:
    background 0.2s,
    box-shadow 0.2s;
}
.glass-card:hover {
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 8px 30px rgba(212, 160, 23, 0.12);
}

/* ── BADGE SYSTEM ─────────────────────────────────────── */
.badge-available,
.badge-teal,
.badge-muted {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 3px;
  line-height: 1;
}
.badge-available {
  background: var(--gold-light);
  color: var(--navy);
}
.badge-teal {
  background: var(--teal);
  color: #fff;
}
.badge-muted {
  background: transparent;
  border: 1px solid var(--warm-border);
  color: var(--text-light);
}

/* ── CREDENTIAL STRIP ─────────────────────────────────── */
.cred-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

/* ── PRINT ────────────────────────────────────────────── */
@media print {
  .no-print {
    display: none !important;
  }
  nav {
    display: none !important;
  }
  footer {
    display: none !important;
  }
  .glass-card {
    background: #fff !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: 1px solid var(--warm-border) !important;
    box-shadow: none !important;
  }
  .badge-available,
  .badge-teal,
  .badge-muted {
    background: none !important;
    border: 1px solid currentColor !important;
    color: var(--text) !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .flag-group {
    display: none !important;
  }
  .home-footer-links {
    display: none !important;
  }
  footer .footer-nav {
    display: none !important;
  }
}

/* ── FLAG EMBLEMS ─────────────────────────────────────── */
.flag-group {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  line-height: 1;
  vertical-align: middle;
  user-select: none;
}
.flag-row {
  display: flex;
  align-items: center;
  gap: 5px;
}
.flag-img {
  display: block;
  width: auto;
}
.flag-img--primary {
  height: 22px;
}
.flag-img--secondary {
  height: 18px;
  opacity: 0.9;
}
.brand-cluster .flag-group {
  opacity: 0.78;
  transition: opacity 0.2s;
}
.brand-cluster .flag-group:hover {
  opacity: 1;
}
.brand-cluster .flag-img--primary {
  height: 16px;
}
.brand-cluster .flag-img--secondary {
  height: 12px;
}

/* ── REDUCED MOTION (subpages) ────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
