:root {
  --paper: #ffffff;
  --ink: #080808;
  --muted: #6e6e6e;
  --line: #dddddd;
  --closing: #2a2a2a;
  --surface: rgba(255, 255, 255, 0.82);
  --runner-soft: rgba(8, 8, 8, 0.14);
  --runner-strong: rgba(8, 8, 8, 0.72);
  --runner-shadow: rgba(0, 0, 0, 0.16);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --paper: #090909;
  --ink: #f5f5f1;
  --muted: #a5a5a0;
  --line: #2c2c2a;
  --closing: #c7c7c1;
  --surface: rgba(9, 9, 9, 0.82);
  --runner-soft: rgba(245, 245, 241, 0.16);
  --runner-strong: rgba(245, 245, 241, 0.76);
  --runner-shadow: rgba(255, 255, 255, 0.10);
}

html,
body,
.page-shell {
  background: var(--paper);
  color: var(--ink);
}

body,
.project-link,
.theme-toggle,
.social-link,
.signal-live-link {
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease, opacity 180ms ease;
}

.closing-copy {
  color: var(--closing) !important;
}

.theme-toggle {
  position: fixed;
  top: 22px;
  right: 22px;
  z-index: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

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

.theme-toggle-icon {
  width: 15px;
  height: 15px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-toggle .theme-moon,
html[data-theme="dark"] .theme-toggle .theme-sun {
  display: none;
}

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

.project-link[href] {
  text-decoration: none;
}

.project-link[href]::selection,
.project-link::selection {
  background: var(--ink);
  color: var(--paper);
}

.signal-live-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  margin: 1px 0 13px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  color: #ffffff;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.10em;
  text-decoration: none;
  text-transform: uppercase;
}

.signal-live-link:hover,
.signal-live-link:focus-visible {
  background: #ffffff;
  color: #080808;
  border-color: #ffffff;
}

.signal-live-link[hidden] {
  display: none !important;
}

.footer {
  align-items: flex-end;
  flex-wrap: wrap;
}

.footer-identity {
  display: grid;
  gap: 5px;
}

.footer-identity p:last-child {
  color: var(--muted);
  font-weight: 500;
}

.social-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 7px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0;
  text-decoration: none;
}

.social-link:hover,
.social-link:focus-visible {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.social-logo {
  width: 15px;
  height: 15px;
  display: block;
  fill: currentColor;
  flex: 0 0 auto;
}

.runner-figure {
  stroke: var(--ink) !important;
  filter: drop-shadow(0 1px 0 color-mix(in srgb, var(--paper) 88%, transparent)) !important;
}

.runner-head {
  fill: var(--paper) !important;
  stroke: var(--ink) !important;
}

.runner-hand {
  fill: var(--ink) !important;
}

.runner-shadow {
  background: var(--runner-shadow) !important;
}

.runner-rope {
  background: linear-gradient(to bottom, var(--runner-soft), var(--runner-strong)) !important;
}

.runner-rope::after {
  background: var(--ink) !important;
}

@media (max-width: 760px) {
  .theme-toggle {
    min-height: 34px;
    padding: 7px 9px;
  }

  .theme-toggle-label {
    display: none;
  }

  .footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .social-links {
    justify-content: flex-start;
  }

  .social-link span {
    display: none;
  }

  .social-link {
    justify-content: center;
    width: 34px;
    padding: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  body,
  .page-shell,
  .project-link,
  .theme-toggle,
  .social-link,
  .signal-live-link {
    transition: none !important;
  }
}