/* A quiet second palette, shared by every page. */
:root {
  color-scheme: light;
  --star-color: #467ca8;
  --star-glow: #84b1d244;
  --star-opacity: .48;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #dce7ef;
  --blue: #a8cfe9;
  --muted: #a7b6c3;
  --line: #2a4053;
  --pale: #172a3c;
  --paper: #101a24;
  --star-color: #bddfff;
  --star-glow: #87bce74a;
  --star-opacity: .62;
}

html[data-theme="dark"] ::selection {
  background: #294e6a;
  color: #f3f8fc;
}

html[data-theme="dark"] .work-row h3 a,
html[data-theme="dark"] .cv-entry h3 a {
  border-bottom-color: #587b96;
}

body {
  position: relative;
  isolation: isolate;
}

.sheet {
  position: relative;
  z-index: 1;
}

.site-nav {
  align-items: center;
}

.site-nav nav {
  align-items: center;
}

.theme-toggle {
  appearance: none;
  flex: 0 0 44px;
  width: 44px;
  min-width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: var(--blue);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.theme-toggle:hover {
  background: var(--pale);
  border-color: var(--line);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.theme-toggle svg {
  display: block;
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* The sky exists at rest. Only its perspective responds to the pointer. */
.pointer-stars {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  contain: strict;
}

.pointer-star {
  position: absolute;
  border-radius: 50%;
  background: var(--star-color);
  opacity: calc(var(--star-opacity) * var(--star-strength));
}

.pointer-star.is-bright {
  box-shadow: 0 0 4px 1px var(--star-glow);
}

@media (max-width: 959px), (pointer: coarse), (hover: none) {
  .pointer-stars {
    display: none;
  }
}

@media print {
  :root,
  html[data-theme="dark"] {
    color-scheme: light !important;
    --ink: #1e2b36;
    --blue: #003366;
    --muted: #617180;
    --line: #d5e2ed;
    --pale: #edf5fb;
    --paper: #fff;
  }
  .theme-toggle,
  .pointer-stars {
    display: none;
  }
}
