:root {
  --ink: #211d1a;
  --muted: #6d625a;
  --paper: #fffaf2;
  --panel: #fff3df;
  --line: #e6d7c4;
  --red: #a7342c;
  --green: #27644a;
  --mustard: #d79d2a;
  --deep: #163b34;
  --shadow: 0 18px 45px rgba(55, 38, 22, 0.14);
}

body.menu-open {
  overflow: hidden;
}

/* =========================================
   1. BASE HEADER (TRANSPARENT DEFAULT)
   ========================================= */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);

  /* Strip all theme backgrounds/blurs */
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: none !important;
  border: none !important;

  color: #ffffff;
  padding: 1.5rem 0;
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* =========================================
   2. DESKTOP SPLIT NAVIGATION
   ========================================= */
.side-nav {
  flex: 1;
  display: flex;
}

.left-nav {
  justify-content: flex-start;
}
.right-nav {
  justify-content: flex-end;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2.5rem;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  color: inherit;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  position: relative;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.nav-links a::after {
  content: "";
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: var(--mustard);
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%) scale(0);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: translateX(-50%) scale(1);
}

/* =========================================
   3. CENTERED BRANDING
   ========================================= */
.brand {
  flex: 0 0 auto;
  text-align: center;
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s ease;
  padding: 0 3rem;
  white-space: nowrap;
}

.brand:hover {
  transform: scale(1.03);
}

.brand strong {
  font-size: 2rem;
  font-family: "Georgia", "Times New Roman", serif;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.brand .highlight {
  background: transparent !important;
  color: var(--mustard);
  font-style: italic;
  font-weight: 400;
  padding: 0 !important;
}

/* =========================================
   4. SCROLLED STATE (Sticky with Theme Colors)
   ========================================= */
.site-header.scrolled {
  background: var(--paper) !important;
  color: var(--ink);
  box-shadow: var(--shadow) !important;
  padding: 1rem 0;
}

.site-header.scrolled .nav-links a:hover,
.site-header.scrolled .nav-links a.active {
  color: var(--red);
}

.site-header.scrolled .nav-links a::after {
  background-color: var(--red);
}

.site-header.scrolled .brand .highlight {
  color: var(--red);
}

/* =========================================
   5. MOBILE ELEMENTS (Hidden on Desktop)
   ========================================= */
/* FIX: Hides mobile elements so they don't appear on desktop */
.mobile-toggle,
.mobile-nav,
.nav-overlay {
  display: none;
}

.mobile-toggle {
  background: transparent;
  border: none;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
  height: 20px;
  width: 30px;
  padding: 0;
  z-index: 1003;
}

.mobile-toggle .bar {
  width: 100%;
  height: 2px;
  background-color: #ffffff;
  transition:
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.3s ease,
    background-color 0.3s ease;
  border-radius: 2px;
}

.site-header.scrolled .mobile-toggle .bar {
  background-color: var(--ink);
}

.site-header.menu-open .mobile-toggle .bar {
  background-color: var(--ink) !important;
}

.site-header.menu-open .mobile-toggle .bar:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}
.site-header.menu-open .mobile-toggle .bar:nth-child(2) {
  opacity: 0;
}
.site-header.menu-open .mobile-toggle .bar:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* =========================================
   6. MOBILE RESPONSIVE LAYOUT (< 950px)
   ========================================= */
@media (max-width: 950px) {
  .side-nav {
    display: none;
  }

  /* FIX: Grid layout creates 3 strict columns to prevent overlap */
  .header-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 1rem 1.5rem;
  }

  .mobile-toggle {
    display: flex;
    justify-self: start; /* Locks menu to the far left column */
  }

  .brand {
    justify-self: center; /* Locks logo to the center column */
    padding: 0;
  }

  /* Overlay */
  .nav-overlay {
    display: block; /* Turns it back on for mobile */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(33, 29, 26, 0.6);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    z-index: 1001;
  }

  /* Mobile Drawer Container */
  .mobile-nav {
    display: block; /* Turns it back on for mobile */
    position: fixed;
    top: 0;
    left: -100%;
    width: 320px;
    max-width: 85vw;
    height: 100vh;
    background: var(--paper);
    z-index: 1002;
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 5px 0 25px rgba(0, 0, 0, 0.15);
  }

  .mobile-nav-inner {
    padding: 7rem 2rem 3rem;
    height: 100%;
    overflow-y: auto;
  }

  .mobile-nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  .mobile-nav-links a {
    text-decoration: none;
    color: var(--ink) !important;
    font-size: 1.3rem;
    font-weight: 700;
    font-family: "Georgia", serif;
    display: block;
    padding: 1.2rem 1.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
  }

  .mobile-nav-links a.active,
  .mobile-nav-links a:hover {
    background: var(--panel);
    color: var(--red) !important;
    padding-left: 2rem;
  }

  /* Open States */
  .site-header.menu-open .mobile-nav {
    left: 0;
  }
  .site-header.menu-open .nav-overlay {
    opacity: 1;
    visibility: visible;
  }
}
