/* Shared header — linked from index, addons, work */
:root {
  --site-header-height: 84px;
}

header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: transparent;
  border-bottom: 1px solid rgba(var(--text-rgb), 0.1);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  max-width: 1120px;
  margin: 0 auto;
  position: relative;
  gap: 16px;
  min-height: var(--site-header-height);
  box-sizing: border-box;
}

.brand {
  font-family: 'Space Grotesk', sans-serif;
  color: rgb(var(--text-rgb));
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1;
  gap: 0;
  flex-shrink: 0;
}

.brand .base {
  font-size: 2.15rem;
  font-weight: 700;
  color: var(--link-blue);
  letter-spacing: -0.02em;
  line-height: 1;
  display: block;
}

.brand .websites {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(var(--text-rgb), 0.75);
  margin-top: 2px;
  padding-left: 0.15em;
  line-height: 1.1;
  display: block;
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 1.02rem;
}

.nav-links a {
  text-decoration: none;
  color: rgba(var(--text-rgb), 0.8);
  transition: color 0.15s ease;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  color: rgb(var(--text-rgb));
}

.nav-cta {
  background: var(--accent);
  color: #fff;
  padding: 12px 20px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.15s ease;
  flex-shrink: 0;
}

.nav-cta:hover {
  background: #2F62F0;
}

.nav-social {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.nav-fb,
.nav-ig {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: rgba(var(--text-rgb), 0.06);
  border: 1px solid rgba(var(--text-rgb), 0.15);
  color: rgba(var(--text-rgb), 0.85);
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
  flex-shrink: 0;
}

.nav-fb:hover,
.nav-ig:hover {
  border-color: var(--accent);
  color: var(--link-blue);
  background: rgba(29, 78, 216, 0.12);
}

.nav-fb svg,
.nav-ig svg {
  width: 19px;
  height: 19px;
}

.theme-toggle {
  background: rgba(var(--text-rgb), 0.06);
  border: 1px solid rgba(var(--text-rgb), 0.15);
  border-radius: 999px;
  width: 44px;
  height: 44px;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
  line-height: 1;
}

.theme-toggle:hover {
  border-color: var(--accent);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  flex-direction: column;
  gap: 5px;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: rgb(var(--text-rgb));
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 720px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--page-bg);
    border-top: 1px solid rgba(var(--text-rgb), 0.1);
    border-bottom: 1px solid rgba(var(--text-rgb), 0.1);
    padding: 8px 24px 16px;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    padding: 14px 0;
    border-bottom: 1px solid rgba(var(--text-rgb), 0.06);
  }

  .nav-links li:last-child a {
    border-bottom: none;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-cta {
    padding: 10px 14px;
    font-size: 0.88rem;
  }

  .nav-fb,
  .nav-ig {
    width: 38px;
    height: 38px;
  }

  .nav-fb svg,
  .nav-ig svg {
    width: 17px;
    height: 17px;
  }

  .theme-toggle {
    width: 40px;
    height: 40px;
  }

  .nav-links a {
    font-size: 1rem;
  }

  .nav {
    padding: 14px 18px;
  }
}
