:root {
  color-scheme: light;
  scrollbar-width: none;
  --blue: #3333ff;
  --ink: #171717;
  --background: #fff;
  --selection: var(--blue);
  --selection-ink: #fff;
  --header-offset: clamp(5rem, 23vh, 15rem);
  font-family: "Courier New", Courier, monospace;
  color: var(--ink);
  background: var(--background);
}

:root::-webkit-scrollbar { display: none; }

:root[data-theme="dark"] {
  color-scheme: dark;
  --background: #282a36;
  --ink: #f8f8f2;
  --blue: #bd93f9;
  --selection: #44475a;
  --selection-ink: #f8f8f2;
}

* { box-sizing: border-box; }
body { margin: 0; }

.site {
  width: min(24rem, calc(100% - 3rem));
  margin: 0 auto;
  padding: var(--header-offset) 0 4rem;
}

.masthead {
  position: sticky;
  top: var(--header-offset);
  z-index: 2;
  text-align: center;
}
.masthead::before {
  content: "";
  position: absolute;
  inset: calc(0px - var(--header-offset)) -1rem -1rem;
  z-index: -1;
  background: var(--background);
  pointer-events: none;
}
.name {
  margin: 0;
  min-height: 4.375rem;
  display: flex;
  align-items: flex-end;
  width: max-content;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  color: var(--blue);
  font-family: inherit;
  font-size: min(0.625rem, var(--ascii-fit, 1.6vw));
  font-weight: 400;
  font-style: normal;
  letter-spacing: normal;
  line-height: 1;
}
.name a { display: block; color: inherit; text-decoration: none; }
.name a:hover { color: inherit; text-decoration: none; }
.ascii-name { position: relative; display: block; white-space: pre; text-align: left; font-kerning: none; }
.ascii-name.theme-sweep { color: var(--sweep-from); }
.ascii-name.theme-sweep::after {
  content: attr(data-ascii);
  position: absolute;
  inset: 0;
  color: var(--sweep-to);
  pointer-events: none;
  animation: name-color-sweep 1300ms step-end both;
}
@keyframes name-color-sweep {
  /* Extra vertical room includes underscores below the final line box. */
  0%   { clip-path: inset(-0.5em 100% -0.5em -0.1em); }
  5%   { clip-path: inset(-0.5em 97% -0.5em -0.1em); }
  13%  { clip-path: inset(-0.5em 92% -0.5em -0.1em); }
  17%  { clip-path: inset(-0.5em 90% -0.5em -0.1em); }
  25%  { clip-path: inset(-0.5em 80% -0.5em -0.1em); }
  30%  { clip-path: inset(-0.5em 76% -0.5em -0.1em); }
  39%  { clip-path: inset(-0.5em 72% -0.5em -0.1em); }
  43%  { clip-path: inset(-0.5em 60% -0.5em -0.1em); }
  50%  { clip-path: inset(-0.5em 57% -0.5em -0.1em); }
  58%  { clip-path: inset(-0.5em 48% -0.5em -0.1em); }
  62%  { clip-path: inset(-0.5em 44% -0.5em -0.1em); }
  71%  { clip-path: inset(-0.5em 33% -0.5em -0.1em); }
  75%  { clip-path: inset(-0.5em 30% -0.5em -0.1em); }
  83%  { clip-path: inset(-0.5em 18% -0.5em -0.1em); }
  88%  { clip-path: inset(-0.5em 14% -0.5em -0.1em); }
  95%  { clip-path: inset(-0.5em 5% -0.5em -0.1em); }
  100% { clip-path: inset(-0.5em -0.1em -0.5em -0.1em); }
}
@media (prefers-reduced-motion: reduce) {
  .ascii-name.theme-sweep { color: var(--blue); }
  .ascii-name.theme-sweep::after { animation: none; }
}
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

.dateline {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5em;
  margin: 1rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}
time:empty { display: none; }

.menu {
  margin: 3.5rem 0 0;
  font-size: 0.875rem;
  line-height: 1.5;
}
ul { list-style: none; margin: 0; padding: 0; }
.menu li + li { margin-top: 0.5rem; }
.menu a { display: inline-block; padding: 0.25rem 0; }
.email { margin: 2.5rem 0 0; font-size: 0.875rem; line-height: 1.5; overflow-wrap: anywhere; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--blue); text-decoration: underline; text-underline-offset: 0.2em; }
a:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }

.content { margin-top: 3.5rem; font-size: 1rem; line-height: 1.7; }
.content h1 { margin: 0 0 1rem; color: var(--blue); font-size: 1rem; font-weight: normal; }
.content p { margin: 0 0 1.5rem; }
.back { display: inline-block; margin-top: 1.5rem; font-size: 0.875rem; }
::selection { background: var(--selection); color: var(--selection-ink); }

.theme-toggle {
  position: fixed;
  bottom: max(1rem, env(safe-area-inset-bottom));
  left: max(1rem, env(safe-area-inset-left));
  z-index: 1;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--ink);
  background: var(--background);
  cursor: pointer;
}
.theme-toggle[hidden] { display: none; }
.theme-toggle:hover { color: var(--blue); }
.theme-toggle:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.theme-toggle svg { width: 1.25rem; height: 1.25rem; }
.theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
