:root {
  color-scheme: dark;
  --background: #07111f;
  --surface: #0b1728;
  --text: #e8f0f8;
  --muted: #94a8bc;
  --accent: #7dd3fc;
  --line: #21344a;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--background);
  color: var(--text);
  font-family:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  font-size: 1rem;
  line-height: 1.7;
}

a {
  color: var(--accent);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-thickness: 2px;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 2px;
}

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

.page {
  width: min(100% - 2.5rem, 46rem);
  margin-inline: auto;
  padding-block: clamp(2.5rem, 8vw, 6.5rem) 2.5rem;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: clamp(4.5rem, 12vw, 8rem);
}

.brand {
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.03em;
}

nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
}

nav a {
  color: var(--muted);
}

.language-picker {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: 8.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  color: var(--muted);
  transition:
    border-color 160ms ease,
    color 160ms ease,
    background-color 160ms ease;
}

.language-picker:hover {
  border-color: #36516d;
  background: var(--surface);
  color: var(--text);
}

.language-picker:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.language-picker > svg:first-of-type {
  position: absolute;
  left: 0.7rem;
  width: 1rem;
  height: 1rem;
  pointer-events: none;
}

.language-picker svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.language-chevron {
  position: absolute;
  right: 0.65rem;
  width: 0.8rem;
  height: 0.8rem;
  pointer-events: none;
}

.language-select {
  width: 100%;
  padding: 0.42rem 2rem 0.42rem 2.15rem;
  border: 0;
  border-radius: inherit;
  appearance: none;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.8125rem;
  line-height: 1.5;
  cursor: pointer;
}

.language-select:focus-visible {
  outline: none;
}

main {
  display: grid;
  gap: clamp(4.5rem, 11vw, 7rem);
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--accent);
  font-size: 0.875rem;
}

h1,
h2 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.15;
}

h1 {
  max-width: 12ch;
  font-size: clamp(2.5rem, 9vw, 5.25rem);
}

h2 {
  font-size: clamp(1.45rem, 4vw, 2rem);
}

.intro {
  max-width: 39rem;
  margin: 1.75rem 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.125rem);
}

.intro strong {
  color: var(--text);
  font-weight: 500;
}

.notes-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.empty-note {
  margin-top: 1.25rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--surface);
}

.notes-list {
  display: grid;
  gap: 1rem;
}

.note {
  padding-block: 1.25rem;
  border-bottom: 1px solid var(--line);
}

.note time {
  color: var(--muted);
  font-size: 0.8125rem;
}

.note h3 {
  margin: 0.25rem 0 0.45rem;
  color: var(--text);
  font-size: 1.125rem;
  line-height: 1.35;
}

.note p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

.note a {
  color: inherit;
}

.prose {
  max-width: 42rem;
}

.prose h1 {
  max-width: 15ch;
}

.prose time {
  display: block;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.prose :is(h2, h3) {
  margin-top: 2.5rem;
}

.prose :is(p, ul, ol) {
  color: var(--muted);
}

.prose :is(p, ul, ol) + :is(p, ul, ol) {
  margin-top: 1.25rem;
}

.empty-note p {
  margin: 0;
}

.empty-note p + p {
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  margin-top: clamp(5rem, 14vw, 9rem);
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8125rem;
}

footer p {
  margin: 0;
}

.heart {
  color: #ff5d6c;
}

@media (max-width: 34rem) {
  .page {
    width: min(100% - 2rem, 46rem);
  }

  header {
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    flex-wrap: wrap;
    gap: 0.75rem 1.1rem;
  }

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
