:root[data-theme="dark"] {
  --color-page: #101010;
  --color-paper: #f2f0ed;
  --color-graphite: #b9b7b3;
  --color-line: #ffffff26;
  color: var(--color-paper);
  color-scheme: dark;
}

:root[data-theme="dark"] :is([data-header], .text-ink) {
  color: var(--color-paper);
}

:root[data-theme="dark"] .btn-solid:not(:hover) {
  border-color: var(--color-paper);
  background: var(--color-paper);
  color: var(--color-ink);
}

:root[data-theme="dark"] .bg-ink\/5 {
  background-color: #ffffff0a;
}

:root[data-theme="dark"] .project-preview {
  background-color: #25282b;
}

:root[data-theme="dark"] .project-preview--studio {
  background-color: #292723;
}

:root[data-theme="dark"] .project-preview--startup {
  background-color: #302722;
}

header[data-header] .theme-nav-actions {
  gap: clamp(0.375rem, 1.4vw, 1.25rem);
}

.theme-toggle {
  box-sizing: border-box;
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  flex: 0 0 auto;
  place-items: center;
  padding: 10px;
  border-radius: 50%;
  color: inherit;
  cursor: pointer;
}

.theme-toggle[hidden] {
  display: none;
}

.theme-toggle:hover {
  background: #80808026;
}

.theme-toggle:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.theme-toggle__sun {
  position: relative;
  display: none;
  width: 1.375rem;
  height: 1.375rem;
  place-items: center;
  background:
    linear-gradient(currentColor 0 0) top / 2px 4px no-repeat,
    linear-gradient(currentColor 0 0) bottom / 2px 4px no-repeat,
    linear-gradient(currentColor 0 0) left / 4px 2px no-repeat,
    linear-gradient(currentColor 0 0) right / 4px 2px no-repeat;
}

.theme-toggle__sun::before {
  width: 0.625rem;
  height: 0.625rem;
  border: 2px solid currentColor;
  border-radius: 50%;
  content: "";
}

.theme-toggle__sun::after {
  position: absolute;
  inset: 0;
  transform: rotate(45deg);
  background: inherit;
  content: "";
}

.theme-toggle__moon {
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 50%;
  background: currentColor;
  mask-image: radial-gradient(circle at 70% 30%, transparent 0.38rem, #000 0.41rem);
}

:root[data-theme="dark"] .theme-toggle__sun {
  display: grid;
}

:root[data-theme="dark"] .theme-toggle__moon {
  display: none;
}
