/* ======================================================
   TECHIN 510 – Site Navigation Bar
   ====================================================== */

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 48px;
  background: rgba(10, 15, 10, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1rem, 2vw, 2rem);
  z-index: 2000;
  border-bottom: 1px solid rgba(193, 167, 120, 0.1);
}

.site-nav-brand {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gold);
  text-decoration: none;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.site-nav-brand:hover {
  color: var(--gold-bright);
}

.site-nav-links {
  display: flex;
  align-items: center;
  gap: clamp(0.3rem, 0.8vw, 0.8rem);
}

.site-nav-links a {
  font-family: var(--font-sans);
  font-size: clamp(0.65rem, 1vw, 0.8rem);
  font-weight: 500;
  color: var(--fg-dim);
  text-decoration: none;
  padding: 0.3em 0.5em;
  border-radius: 3px;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}

.site-nav-links a:hover {
  color: var(--fg);
  background: rgba(193, 167, 120, 0.08);
}

.site-nav-links a.active {
  color: var(--gold);
  background: rgba(193, 167, 120, 0.12);
}

/* --- Hamburger Toggle (mobile) --- */
.site-nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--gold);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 0.2em;
  line-height: 1;
}

@media (max-width: 640px) {
  .site-nav-toggle {
    display: block;
  }

  .site-nav-links {
    display: none;
    position: absolute;
    top: 48px;
    left: 0;
    right: 0;
    background: rgba(10, 15, 10, 0.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    flex-direction: column;
    padding: 0.8rem 1rem;
    gap: 0.2rem;
    border-bottom: 1px solid rgba(193, 167, 120, 0.1);
  }

  .site-nav-links.open {
    display: flex;
  }

  .site-nav-links a {
    padding: 0.5em 0.8em;
    font-size: 0.85rem;
    width: 100%;
  }
}

/* === Theme Toggle Button === */
.theme-toggle {
  background: none;
  border: 1px solid rgba(193, 167, 120, 0.2);
  border-radius: 4px;
  color: var(--gold);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.2em 0.4em;
  line-height: 1;
  transition: background 0.2s, border-color 0.2s;
  margin-left: clamp(0.3rem, 0.8vw, 0.6rem);
}

.theme-toggle:hover {
  background: rgba(193, 167, 120, 0.1);
  border-color: rgba(193, 167, 120, 0.35);
}

/* === Light Theme Nav Overrides === */
[data-theme="light"] .site-nav {
  background: rgba(245, 242, 235, 0.92);
  border-bottom-color: rgba(154, 125, 78, 0.15);
}

[data-theme="light"] .site-nav-links a:hover {
  background: rgba(154, 125, 78, 0.1);
}

[data-theme="light"] .site-nav-links a.active {
  background: rgba(154, 125, 78, 0.15);
}

[data-theme="light"] .theme-toggle {
  border-color: rgba(154, 125, 78, 0.25);
}

[data-theme="light"] .theme-toggle:hover {
  background: rgba(154, 125, 78, 0.1);
}

@media (max-width: 640px) {
  [data-theme="light"] .site-nav-links {
    background: rgba(245, 242, 235, 0.96);
    border-bottom-color: rgba(154, 125, 78, 0.15);
  }
}
