/* ===================================
   SHARED COMPONENTS
   Navigation, footer, and theme toggle
   =================================== */

/* ===== NAVIGATION ===== */
nav {
  background: var(--nav-bg);
  color: var(--text-primary);
  padding: 20px 0;
  border-bottom: 1px solid var(--nav-border);
  position: sticky;
  top: 0;
  z-index: 10;
  margin-bottom: 4em;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  backdrop-filter: blur(8px);
  overflow-x: hidden;
}

nav .nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 48px;
}

nav .logo-mark {
  width: 180px;
  height: auto;
  flex-shrink: 0;
}

nav .logo-mark text {
  transition: fill 0.3s ease;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 40px;
  align-items: center;
}

nav a {
  color: var(--link-color);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.3s;
  position: relative;
  padding-bottom: 2px;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  right: 50%;
  height: 1px;
  background: var(--gold);
  transition: left 0.3s ease, right 0.3s ease;
}

nav a:hover {
  color: var(--link-hover);
}

nav a:hover::after {
  left: 0;
  right: 0;
}

/* Active navigation state */
nav a[aria-current="page"] {
  color: var(--gold);
  font-weight: 600;
}

nav a[aria-current="page"]::after {
  left: 0;
  right: 0;
}

/* ===== THEME TOGGLE ===== */
.theme-toggle {
  background: transparent;
  border: 1.5px solid var(--gold);
  border-radius: 24px;
  padding: 8px 16px 8px 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--gold);
  font-weight: 500;
  transition: all 0.3s ease;
  font-family: 'Outfit', sans-serif;
  box-shadow: 0 2px 8px rgba(184, 134, 11, 0.1);
}

.theme-toggle:hover {
  background: var(--gold);
  color: var(--paper);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(184, 134, 11, 0.2);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.theme-toggle:hover svg {
  transform: rotate(180deg);
}

/* Make sun icon warmer gold in light mode */
[data-theme="light"] #sunIcon {
  stroke: #B8860B;
}

/* ===== FOOTER ===== */
footer {
  background: var(--footer-bg);
  color: var(--muted);
  padding: 80px 20px 32px;
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--card-border);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

[data-theme="dark"] footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

footer .footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 80px;
  align-items: start;
}

footer .footer-about {
  max-width: 360px;
}

footer .footer-about p {
  margin: 12px 0 0;
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
  transition: color 0.3s ease;
}

[data-theme="dark"] footer .footer-about p {
  color: rgba(255, 255, 255, 0.5);
}

footer h3 {
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  margin: 0 0 20px;
  font-family: ui-serif, Georgia, "Times New Roman", serif;
  transition: color 0.3s ease;
}

[data-theme="dark"] footer h3 {
  color: rgba(255, 255, 255, 0.9);
}

footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

footer li {
  margin-bottom: 14px;
}

footer li:last-child {
  margin-bottom: 0;
}

footer a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s;
  position: relative;
}

footer a:hover {
  color: var(--gold);
}

footer .footer-bottom {
  margin-top: 80px;
  padding-top: 32px;
  border-top: 1px solid var(--card-border);
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  transition: border-color 0.3s ease, color 0.3s ease;
}

[data-theme="dark"] footer .footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.4);
}

footer .footer-bottom p {
  margin: 0;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  nav .nav-inner {
    flex-wrap: wrap;
    gap: 20px;
  }
  
  nav .logo-mark {
    width: 140px;
  }
  
  nav ul {
    margin-left: auto;
    gap: 24px;
  }
  
  nav a {
    font-size: 13px;
  }
  
  footer {
    padding: 60px 20px 32px;
  }
  
  footer .footer-inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  
  footer .footer-about {
    max-width: 100%;
  }
  
  footer .footer-bottom {
    margin-top: 60px;
  }
}
