@import url("https://fonts.googleapis.com/css2?family=Google+Sans+Code:wght@400;700&family=Source+Code+Pro:wght@400;600;700&display=swap");

:root {
  color-scheme: light dark;
  --background: #fdfdfd;
  --foreground: #111;
  --muted: #666;
  --accent: #2563eb;
  --border: #e5e5e5;
  --page-transition-duration: 240ms;
  --page-transition-easing: cubic-bezier(0.33, 1, 0.68, 1);
  font-family: "Source Code Pro", "Fira Code", "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
}

@keyframes fade-page-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes content-float-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--background);
  color: var(--foreground);
  display: flex;
  justify-content: center;
  padding: 2rem 1rem 4rem;
  opacity: 0;
  animation: fade-page-in var(--page-transition-duration) var(--page-transition-easing) forwards;
}

main {
  max-width: 720px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  will-change: opacity, transform;
  animation: content-float-in calc(var(--page-transition-duration) * 1.15) var(--page-transition-easing) both;
}

.site-header h1 {
  margin-bottom: 0.25rem;
  font-family: "Google Sans Code", "Courier New", Courier, "Roboto Mono", monospace;
}

.site-header .subhead {
  color: var(--muted);
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0.08em;
}

section {
  padding-top: 0.5rem;
}

ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

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

a:hover,
a:focus {
  opacity: 0.75;
}

li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.post-date {
  color: var(--muted);
  font-size: 0.875rem;
}

.post-date:empty {
  display: none;
}

article {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  line-height: 1.6;
}

article figure {
  margin: 0;
}

article img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.25rem;
}

article figcaption {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.post-header {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.post-header h1 {
  margin: 0;
}

.post-header .post-date {
  margin: 0;
}

article time {
  color: var(--muted);
  font-size: 0.875rem;
}

nav {
  margin-bottom: 2rem;
}

nav a {
  font-size: 0.95rem;
}

@media (prefers-reduced-motion: reduce) {
  body {
    animation: none;
    opacity: 1;
  }

  main {
    animation: none;
  }
}
