/* Topo: logo, menu, seletor de idioma e botão de tema. */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-block: 20px;
  flex-wrap: wrap;
}

.logo {
  font-family: var(--f-display);
  font-size: 1.15rem;
  text-decoration: none;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.logo svg {
  width: 26px;
  height: 26px;
}

.topbar-end {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* menu */
.menu ul {
  list-style: none;
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.menu a {
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 700;
  font-size: 0.92rem;
  padding: 6px 12px;
  border-radius: 999px;
}

.menu a:hover,
.menu a[aria-current='true'] {
  background: var(--paper-2);
  color: var(--rose);
}

/* A seção atual ganha também um contorno, para não depender só da cor. */
.menu a[aria-current='true'] {
  box-shadow: inset 0 0 0 2px var(--line);
}

/* idioma */
.lang {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--sticker);
}

.lang-link {
  font-family: var(--f-mono);
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1;
  padding: 9px 10px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--ink-soft);
}

.lang-link:hover {
  color: var(--rose);
}

.lang-link[aria-current='true'] {
  background: var(--rose);
  color: var(--paper);
}

/* tema */
.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: var(--sticker);
  color: var(--rose);
  cursor: pointer;
}

.theme-toggle:hover {
  border-color: var(--rose);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
}

.theme-toggle[aria-pressed='true'] .i-moon,
.theme-toggle[aria-pressed='false'] .i-sun {
  display: none;
}

/* No celular o menu some; idioma e tema continuam. */
@media (width <= 560px) {
  .menu {
    display: none;
  }
}
