.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--toggle-border, var(--border, var(--line, rgba(0, 0, 0, 0.2))));
  background: var(--toggle-bg, rgba(255, 255, 255, 0.08));
  color: var(--toggle-fg, currentColor);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.theme-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

.theme-toggle:focus-visible {
  outline: 2px solid color-mix(in srgb, currentColor 60%, transparent);
  outline-offset: 2px;
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  display: none;
}

[data-theme="dark"] .theme-toggle {
  --toggle-bg: rgba(255, 255, 255, 0.08);
  --toggle-fg: #f8fafc;
  --toggle-border: rgba(255, 255, 255, 0.2);
}

[data-theme="light"] .theme-toggle {
  --toggle-bg: #ffffff;
  --toggle-fg: #1b1d24;
  --toggle-border: rgba(24, 29, 38, 0.14);
}

[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

[data-theme="light"] .theme-toggle .icon-moon {
  display: block;
}

[data-theme="light"] .footer-links a {
  border-bottom-color: rgba(24, 29, 38, 0.2);
}

[data-theme="dark"] .footer-links a {
  border-bottom-color: rgba(255, 255, 255, 0.18);
}
