/* Theme toggle button */
.theme-toggle {
  position: sticky;
  top: 20px;
  align-self: flex-end;
  right: 20px;
  width: 40px;
  height: 25px;
  padding: 0 4px;
  border-radius: 999px;
  border: 2px solid #000;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  cursor: pointer;
  transition: background 0.3s ease, border-color 0.3s ease;
  z-index: 1000;
}

.theme-toggle::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: -38px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #00B0FF;
  color: #fff;
  padding: 6px 10px;
  border-radius: 5px;
  font-size: 13px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease-in-out, transform 0.2s;
}

.theme-toggle:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(4px);
}

.theme-toggle::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 100%;
  background: #ffb400;
  box-shadow: 0 0 0 4px rgba(255, 180, 0, 0.2);
  transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.theme-toggle.theme-toggle--dark {
  background: #151515;
  border-color: #ffffff;
  justify-content: flex-start;
}

.theme-toggle.theme-toggle--dark::before {
  background: #ffffff;
  box-shadow: -8px 0 0 -2px #151515;
  transform: translateX(2px);
}

/* Dark mode palette */
body.dark-mode {
  background: #0f1014;
}

body.dark-mode header {
  background: transparent;
}

body.dark-mode .nav-icon {
  border-color: #f3f4f6;
}

body.dark-mode .grid .item,
body.dark-mode .item {
  border-color: #f3f4f6;
}

body.dark-mode .tagline {
  color: #f3f4f6;
}
