/* Navbar consumes tokens from theme-tokens.css */

.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.navbar {
  height: 56px; max-width: 1200px; margin: 0 auto; padding: 0 16px;
  display: grid; grid-template-columns: auto auto 1fr auto; gap: 12px; align-items: center;
}

/* Buttons */
.nav-btn, .theme-toggle {
  border: 1px solid var(--border);
  background: color-mix(in oklab, var(--surface) 90%, var(--bg));
  color: var(--text);
  font: inherit; padding: 8px 12px; border-radius: 10px; cursor: pointer;
  transition: background .15s ease, transform .02s ease-in;
}
.nav-btn:hover, .theme-toggle:hover { background: color-mix(in oklab, var(--surface) 80%, var(--bg)); }
.nav-btn:active, .theme-toggle:active { transform: translateY(1px); }

.menu-btn { display: inline-flex; align-items: center; gap: 8px; }
.menu-caret {
  width: 10px; height: 10px; display: inline-block;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg); opacity: .7; margin-left: 2px;
}

.brand a { color: var(--primary); font-weight: 700; text-decoration: none; }
.brand a:hover { text-decoration: underline; }

.dropdown { position: relative; }
.menu-panel {
  position: absolute; top: calc(100% + 10px); left: 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  min-width: 220px; padding: 8px; box-shadow: var(--shadow); display: none;
}
.menu-panel.open { display: block; }

.menu-group { display: grid; gap: 4px; }
.menu-link {
  display: block; padding: 10px 12px; border-radius: 8px;
  color: var(--text); text-decoration: none; font-weight: 500;
}
.menu-link:hover { background: color-mix(in oklab, var(--accent) 14%, transparent); }

.theme-toggle { display: inline-flex; align-items: center; gap: 10px; padding: 8px 10px; }
.theme-toggle svg { width: 20px; height: 20px; }

/*Toggle dark/ light button based on theme*/
/*Colors*/
.theme-toggle .sun path { fill: #f5e6c8; }   /* light cream */
.theme-toggle .moon path { fill: #b0b7c3; }  /* silver */
/*Visability*/
/*Light Mode*/
.theme-toggle .sun { display: inline; }
.theme-toggle .moon {display: none; }
/*Dark Mode*/
html.dark .theme-toggle .sun { display: none; }
html.dark .theme-toggle .moon { display: inline; }

@media (max-width: 640px) {
  .navbar { grid-template-columns: auto auto 1fr auto; gap: 8px; }
}
