@font-face {
  font-family: 'Cascadia Code';
  src: url('/CascadiaCode.woff2') format('woff2');
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Cascadia Code';
  src: url('/CascadiaCodeItalic.woff2') format('woff2');
  font-style: italic;
  font-display: swap;
}

:root {
  --bg: #0b0b0f;
  --bg-raised: #16161e;
  --bg-sunken: #08080b;

  --border: rgb(255 255 255 / 0.08);
  --border-strong: rgb(255 255 255 / 0.16);

  --text: rgba(255, 255, 255, 0.87);
  --text-dim: rgb(255 255 255 / 0.5);
  --text-faint: rgb(255 255 255 / 0.3);

  --accent: #a78bfa;
  --accent-2: #22d3ee;
  --accent-soft: rgb(167 139 250 / 0.12);
  --accent-border: rgb(167 139 250 / 0.4);

  --success: #4ade80;
  --danger: #f87171;
  --warn: #fbbf24;

  font-family: 'Cascadia Code', 'Courier New', Courier, monospace;
  line-height: 1.5;
  font-weight: 400;

  color-scheme: dark;
  color: var(--text);
  background-color: var(--bg);
  transition: background-color 2s ease;

  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

:root[data-tod='dawn']    { background-color: #100d16; }
:root[data-tod='day']     { background-color: #0c0f16; }
:root[data-tod='dusk']    { background-color: #140e16; }
:root[data-tod='evening'] { background-color: #110d14; }
:root[data-tod='night']   { background-color: #0b0b0f; }

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

body {
  display: flex;
  justify-content: center;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: clip;
}

a {
  color: inherit;
  text-decoration: inherit;
}

#app {
  max-width: min(680px, 100vw);
  width: 100%;
  margin: 0 auto;
  padding: 4rem 2rem 2rem;
  gap: 1.5em;

  display: flex;
  flex-direction: column;
  justify-content: center;

  min-height: 100vh;
  overflow-x: clip;
}

section {
  display: flex;
  flex-direction: column;
  gap: 0.2em;
}

section > h1 {
  font-size: 2em;
  line-height: 1.1;
}
section > h1::before {
  content: "# ";
  opacity: 0.5;
  color: var(--accent);
}

section > h2 {
  font-size: 1.5em;
  line-height: 1.1;
}
section > h2::before {
  content: "## ";
  opacity: 0.5;
  color: var(--accent);
}

hr {
  height: 1px;
  margin: 1em 0;
  border: none;
  background: linear-gradient(
    to right,
    transparent 0%,
    var(--border-strong) 20%,
    var(--accent-border) 50%,
    var(--border-strong) 80%,
    transparent 100%
  );
}

.text-large {
  font-size: clamp(1.5rem, 5vw, 3em);
  line-height: 1em;
  color: var(--accent-2);
}

.text-small {
  font-size: 0.8em;
}

.text-half-visible {
  opacity: 0.3;
}

.info-line {
  font-size: 0.9em;
  color: var(--text);
  line-height: 1.7;
}

.info-label {
  color: var(--text-dim);
  margin-right: 0.2em;
}

.rich-link {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--accent-border);
  text-underline-offset: 2px;
}

.with-note {
  position: relative;
}

.with-note[data-note]::after {
  content: attr(data-note);

  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;

  transform: translateX(-50%) translateY(4px);

  padding: 4px 8px;
  border-radius: 4px;

  font-size: 0.7rem;
  line-height: 1.3;

  max-width: min(280px, 90vw);
  width: max-content;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-all;
  text-align: center;

  background: var(--bg-raised);
  color: var(--text);
  border: 1px solid var(--accent-border);
  box-shadow: 0 4px 12px rgb(0 0 0 / 0.4);

  pointer-events: none;
  opacity: 0;

  transition: opacity 150ms ease, transform 150ms ease;
}

.with-note[data-note]:hover::after,
.with-note[data-note]:focus::after,
.with-note[data-note]:focus-within::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.with-note[tabindex] {
  -webkit-tap-highlight-color: transparent;
}

.with-note[tabindex]:focus,
.with-note[tabindex]:focus-visible {
  outline: none;
}

footer {
  font-size: 0.8em;
  font-weight: 300;
  opacity: 0.5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  margin-top: 2em;
}
