:root {
  --ink: #20242a;
  --muted: #6c727c;
  --accent: #1a5fb4;
  --rule: #e8e6e1;
  --code-bg: #f6f5f1;
}

* { box-sizing: border-box; }

html { font-size: 18px; }

body {
  font-family: "Iowan Old Style", Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  color: var(--ink);
  line-height: 1.65;
  max-width: 44rem;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 5rem;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

header.site {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-bottom: 1rem;
  margin-bottom: 2.75rem;
  border-bottom: 1px solid var(--rule);
}

header.site .name {
  font-weight: 700;
  color: var(--ink);
  font-size: 1.05rem;
}

nav a {
  margin-left: 1.25rem;
  color: var(--muted);
  font-size: 0.95rem;
}

nav a:hover, nav a.active { color: var(--ink); text-decoration: none; }

h1 { font-size: 1.55rem; line-height: 1.3; margin: 0 0 1rem; }
h2 { font-size: 1.2rem; margin: 2.5rem 0 0.75rem; }
h3 { font-size: 1.05rem; margin: 2rem 0 0.5rem; }

p { margin: 0 0 1.1rem; }

ul, ol { padding-left: 1.5rem; margin: 0 0 1.1rem; }
li { margin-bottom: 0.35rem; }

code {
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82em;
  background: var(--code-bg);
  padding: 0.1em 0.3em;
  border-radius: 3px;
}

pre {
  background: var(--code-bg);
  padding: 1rem 1.15rem;
  border-radius: 6px;
  overflow-x: auto;
  line-height: 1.5;
  margin: 0 0 1.25rem;
}

pre code { background: none; padding: 0; font-size: 0.8rem; }

blockquote {
  margin: 0 0 1.25rem;
  padding: 0.25rem 0 0.25rem 1rem;
  border-left: 3px solid var(--rule);
  color: var(--muted);
}

hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 2.5rem 0;
}

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

/* Feed */

.intro { margin-bottom: 2.5rem; }

.posts { list-style: none; padding: 0; }

.posts li {
  margin-bottom: 2.25rem;
}

.posts time {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 0.15rem;
}

.posts .title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
}

.posts .title:hover { color: var(--accent); text-decoration: none; }

.posts .teaser { margin: 0.25rem 0 0; color: var(--muted); }

/* Article */

.post-meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.subtitle {
  font-size: 1.1rem;
  color: var(--muted);
  margin-top: -0.5rem;
  margin-bottom: 1.5rem;
}

/* Projects */

.project { margin-bottom: 2rem; }
.project .name { font-weight: 700; font-size: 1.1rem; }
.project p { margin: 0.25rem 0 0; color: var(--muted); }

footer {
  margin-top: 4rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

footer a { color: var(--muted); margin-right: 1rem; }
footer a:hover { color: var(--ink); }

img { max-width: 100%; height: auto; }

figure { margin: 0 0 1.5rem; }

a, code { overflow-wrap: break-word; }

@media (max-width: 480px) {
  html { font-size: 16px; }
  body { padding: 1.5rem 1rem 3.5rem; }
  header.site { row-gap: 0.35rem; }
  nav a { margin-left: 0; margin-right: 0.9rem; }
  pre { font-size: 0.85rem; padding: 0.8rem 0.9rem; }
}
