:root {
  --bg: #fbfbfa;
  --text: #1b1b19;
  --muted: #74746f;
  --line: #d9d9d4;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111110;
    --text: #ececea;
    --muted: #91918b;
    --line: #3a3a37;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--text);
  color: var(--bg);
}

.dot-field {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

main {
  max-width: 38rem;
  margin: 0 auto;
  padding: 7rem 1.5rem 5rem;
}

h1 {
  font-size: 1rem;
  font-weight: 550;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 1rem;
}

section,
footer {
  margin-top: 3.5rem;
}

header + section {
  margin-top: 2.5rem;
}

.muted {
  color: var(--muted);
}

.prose p + p {
  margin-top: 1.1rem;
}

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-color 150ms ease;
}

@media (hover: hover) and (pointer: fine) {
  a:hover {
    text-decoration-color: currentColor;
  }
}

a:focus-visible {
  outline: 1.5px solid var(--text);
  outline-offset: 3px;
  border-radius: 2px;
}

.rows {
  list-style: none;
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.7rem 1.25rem;
}

.rows li {
  display: contents;
}

.rows .full {
  grid-column: 1 / -1;
}

.rows strong {
  font-weight: 500;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

section > p + p {
  margin-top: 0.5rem;
}

footer {
  font-size: 0.875rem;
}

footer time {
  font-variant-numeric: tabular-nums;
  margin-left: 0.4rem;
}

.back {
  text-decoration: none;
}

.post {
  margin-top: 3.5rem;
}

.post .prose {
  margin-top: 2.5rem;
}

.post .prose h2 {
  color: var(--text);
  font-weight: 550;
  margin: 2.5rem 0 0.75rem;
}

.post .prose p + p {
  margin-top: 1.25rem;
}

code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.9em;
}

.reveal {
  animation: reveal 700ms var(--ease-out) both;
}

.reveal:nth-child(2) { animation-delay: 60ms; }
.reveal:nth-child(3) { animation-delay: 120ms; }
.reveal:nth-child(4) { animation-delay: 180ms; }
.reveal:nth-child(5) { animation-delay: 240ms; }
.reveal:nth-child(6) { animation-delay: 300ms; }
.reveal:nth-child(7) { animation-delay: 360ms; }

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(6px);
    filter: blur(3px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    animation-name: fade;
  }

  @keyframes fade {
    from {
      opacity: 0;
    }
  }
}

@media (max-width: 560px) {
  main {
    padding-top: 4rem;
  }
}

@media (max-width: 480px) {
  .rows:not(.compact) {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .rows:not(.compact) li {
    display: flex;
    flex-direction: column;
  }
}
