/* Plain pages in the spirit of newaesthetics.art: one centered column of text,
   the system font, a single pink accent for headings, and underlined links.
   No JavaScript, no framework. */

:root {
  --background: hsl(0 0% 100%);
  --foreground: hsl(0 0% 10%);
  --muted: hsl(0 0% 96%);
  --muted-foreground: hsl(0 0% 45%);
  --heading: hsl(332.6 84.5% 43.1%);
  --rule: hsl(0 0% 10% / 0.2);
  --link: #0864c7;
  --sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji",
    "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}

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

html {
  -webkit-text-size-adjust: 100%;
  line-height: 1.5;
  font-family: var(--sans);
  /* Keep room for the scrollbar on every page, so short pages don't sit a few
     pixels off from long ones. */
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  background-color: var(--background);
  color: var(--foreground);
  font-size: 16px;
  line-height: inherit;
}

main {
  min-height: 100vh;
}

article {
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
  padding: 3rem 1.5rem;
}

/* The small line of links at the top of every page except home */
nav {
  margin-bottom: 2rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: var(--muted-foreground);
}

nav a {
  margin-right: 1rem;
}

/* The arrow after the two links that leave this site */
.ext {
  margin-left: 0.2em;
}

/* Headings */
h1 {
  margin: 0 0 2rem;
  font-size: 1.5rem;
  line-height: 2rem;
  font-weight: 600;
  color: var(--heading);
}

h1.tight {
  margin-bottom: 0.25rem;
}

h2 {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.75rem;
  font-weight: 600;
  color: var(--heading);
}

p {
  margin: 0;
}

/* Links are blue, with no underline */
a {
  color: var(--link);
  text-decoration: none;
}

strong {
  font-weight: 600;
}

/* A short gray line, like a date */
.meta {
  margin: 0 0 2rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: var(--muted-foreground);
}

/* Lists of posts and projects: the title on the left, the date flush right,
   so each line spans the full column like a paragraph does. */
.row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.row .meta {
  margin: 0;
  white-space: nowrap;
}

/* In the projects list, the date sits flush right on the title's line. */
li > .meta {
  float: right;
  margin: 0 0 0 1rem;
  line-height: 1.5rem;
  white-space: nowrap;
}

/* The opening paragraph above the figure */
.lead {
  margin-bottom: 2rem;
}

/* Figure */
figure {
  margin: 0 0 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

figure img {
  display: block;
  width: 75%;
  height: auto;
  max-width: 100%;
}

figcaption {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-style: italic;
  text-align: center;
  color: var(--muted-foreground);
}

/* Vertical rhythm: every block in the body is 1.5rem apart. */
.flow > * + * {
  margin-top: 1.5rem;
}

/* Lists */
ul,
ol {
  margin: 0;
  padding-left: 1.5rem;
}

ul {
  list-style: disc;
}

ol {
  list-style: decimal;
}

/* Lists of posts and projects have no bullets. */
ul.plain {
  padding-left: 0;
  list-style: none;
}

li + li {
  margin-top: 0.5rem;
}

/* 404 */
.notfound {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  background-color: var(--muted);
  text-align: center;
}

.notfound h1 {
  margin-bottom: 1rem;
  font-size: 2.25rem;
  line-height: 2.5rem;
  font-weight: 700;
  color: var(--foreground);
}

.notfound p {
  margin-bottom: 1rem;
  font-size: 1.25rem;
  line-height: 1.75rem;
  color: var(--muted-foreground);
}
