:root {
  --bg: #faf7f0;
  --bg-alt: #f2ece1;
  --text: #2b2620;
  --text-muted: #8a8071;
  --accent: #f2660d;
  --accent-dark: #c9540a;
  --border: #e8e0d2;
  --max-width: 42rem;
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1a17;
    --bg-alt: #262320;
    --text: #ece7dc;
    --text-muted: #948b7c;
    --accent: #f6813f;
    --accent-dark: #ffa869;
    --border: #38342d;
  }
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light dark;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a:hover {
  text-decoration: underline;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */

.site-header {
  padding: 3.5rem 0 2rem;
  text-align: center;
}

.site-header a.logo-link {
  display: inline-block;
  text-decoration: none;
}

.site-header .logo {
  width: 56px;
  height: auto;
  display: block;
  margin: 0 auto 1rem;
}

.site-header h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: normal;
  letter-spacing: 0.02em;
}

.site-header h1 a {
  color: var(--text);
}

.site-header h1 a:hover {
  color: var(--accent);
  text-decoration: none;
}

.site-header .tagline {
  margin: 0.5rem 0 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-style: italic;
}

.site-header.compact {
  padding: 2.5rem 0 1.5rem;
}

.site-header.compact .logo {
  width: 40px;
  margin-bottom: 0.75rem;
}

/* Post list */

.post-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.post-list li {
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--border);
}

.post-list li:first-child {
  padding-top: 0.5rem;
}

.post-list time {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.post-list h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: normal;
  font-size: 1.5rem;
  line-height: 1.3;
}

.post-list h2 a {
  color: var(--text);
}

.post-list h2 a:hover {
  color: var(--accent);
  text-decoration: none;
}

.excerpt {
  margin-top: 0.75rem;
  color: var(--text);
}

.excerpt p {
  margin: 0;
}

.excerpt p + p {
  margin-top: 0.75rem;
}

.read-more {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  letter-spacing: 0.01em;
}

.tags {
  margin-top: 0.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-dark);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
}

.empty {
  color: var(--text-muted);
  font-style: italic;
  padding: 2rem 0;
}

/* Featured photo */

.featured-photo {
  margin: 1rem 0 0;
}

.featured-photo img {
  display: block;
  max-width: 100%;
  width: auto;
  height: auto;
  margin: 0 auto;
  border-radius: 4px;
}

.featured-photo figcaption {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  font-style: italic;
  color: var(--text-muted);
  text-align: center;
}

/* Scale photos down to fit the window instead of cropping them. */
.post-list .featured-photo img {
  max-height: min(20rem, 40vh);
}

article > .featured-photo {
  margin: 0 0 2.5rem;
}

article > .featured-photo img {
  max-height: 70vh;
}

/* Article */

article {
  padding-bottom: 2rem;
}

.post-meta {
  text-align: center;
  margin-bottom: 2.5rem;
}

.post-meta time {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

h1.post-title {
  font-family: var(--serif);
  font-weight: normal;
  font-size: 2.25rem;
  line-height: 1.2;
  text-align: center;
  margin: 0.5rem 0 0.75rem;
}

.post-meta .tags {
  justify-content: center;
  margin-top: 0.75rem;
}

.post-body {
  font-size: 1.0625rem;
}

.post-body h1,
.post-body h2,
.post-body h3 {
  font-family: var(--serif);
  font-weight: normal;
  line-height: 1.3;
  margin: 2rem 0 0.75rem;
}

.post-body h1 { font-size: 1.6rem; }
.post-body h2 { font-size: 1.35rem; }
.post-body h3 { font-size: 1.15rem; }

.post-body p,
.post-body ul,
.post-body ol,
.post-body blockquote,
.post-body pre {
  margin: 0 0 1.25rem;
}

.post-body img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  display: block;
  margin: 1.75rem auto;
}

.post-body blockquote {
  margin-left: 0;
  padding-left: 1rem;
  border-left: 3px solid var(--accent);
  color: var(--text-muted);
  font-style: italic;
}

.post-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--bg-alt);
  padding: 0.15em 0.4em;
  border-radius: 3px;
}

.post-body pre {
  background: var(--bg-alt);
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
}

.post-body pre code {
  background: none;
  padding: 0;
}

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

.post-nav {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

/* Footer */

.site-footer {
  text-align: center;
  padding: 3rem 0 4rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.site-footer a {
  color: var(--text-muted);
}

.site-footer a:hover {
  color: var(--accent);
}

.site-footer .sep {
  margin: 0 0.5em;
}
