/* mlarson.org — minimal stylesheet */

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

:root {
  --text: #1a1a1a;
  --bg: #fff1e5;
  --link: #0e6ba8;
  --link-hover: #d4426a;
  --link-visited: #555;
  --muted: #6b6259;
  --border: #d9c9bc;
  --max-width: 680px;
}

html { font-size: 18px; }

body {
  font-family: Georgia, 'Times New Roman', serif;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  margin: 0;
  padding: 0;
}

a { color: inherit; }

.nav-links a,
.pagination a,
.page-content a,
.post-content a {
  color: var(--link);
}

.nav-links a:hover,
.pagination a:hover,
.page-content a:hover,
.post-content a:hover {
  color: var(--link-hover);
}

.nav-links a:visited,
.pagination a:visited,
.page-content a:visited,
.post-content a:visited {
  color: var(--link-visited);
}

/* ---- Layout / Chrome ---- */

.container {
  width: 100%;
  max-width: calc(var(--max-width) + 3rem);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.site-header {
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
}

.site-nav {
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.site-name {
  font-size: 1.1rem;
  font-weight: bold;
  text-decoration: none;
  color: var(--text);
}

.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.9rem;
}

.site-main { margin: 2rem 0; }

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

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 3rem;
}

.site-footer p { margin: 0; }

.page-content > :first-child { margin-top: 0; }
.page-content > :last-child { margin-bottom: 0; }

/* ---- Components ---- */

/* Structural hooks for full-post views. */
.post { min-width: 0; }

.post-header { margin-bottom: 1.5rem; }

.post-title {
  font-size: 1.5rem;
  margin: 0 0 0.25rem;
  line-height: 1.3;
}

.post-title a {
  color: inherit;
  text-decoration: none;
}

.post-title a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

.post-meta {
  font-size: 0.85rem;
  color: var(--muted);
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.post-format {
  background: #e8d9cc;
  padding: 0.1em 0.4em;
  border-radius: 3px;
  font-size: 0.8rem;
  font-family: sans-serif;
  line-height: 1.2;
}

.post-content {
  margin-bottom: 2rem;
  min-width: 0;
}

/* ---- Prose / Content ---- */

.post-content > :first-child { margin-top: 0; }
.post-content > :last-child { margin-bottom: 0; }

.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
  line-height: 1.3;
  margin: 2rem 0 0.75rem;
}

.post-content h2 { font-size: 1.35rem; }
.post-content h3 { font-size: 1.15rem; }
.post-content h4,
.post-content h5,
.post-content h6 { font-size: 1rem; }

.post-content p,
.post-content ul,
.post-content ol,
.post-content blockquote,
.post-content pre,
.post-content figure,
.post-content table,
.post-content audio,
.post-content .embed-video {
  margin: 1.25rem 0;
}

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

.post-content ul,
.post-content ol {
  padding-left: 1.4rem;
}

.post-content li + li { margin-top: 0.35rem; }

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

.post-content figure { min-width: 0; }

.post-content figure img,
.post-content .wp-block-image img,
.post-content .wp-block-gallery .wp-block-image img,
.post-content .tiled-gallery__item img {
  display: block;
}

.post-content blockquote {
  border-left: 3px solid var(--border);
  padding: 0 1rem;
  color: var(--muted);
}

.post-content blockquote > :first-child { margin-top: 0; }
.post-content blockquote > :last-child { margin-bottom: 0; }

.post-content pre {
  background: #ece0d8;
  padding: 1rem;
  overflow-x: auto;
  font-size: 0.85rem;
}

.post-content code {
  font-size: 0.9em;
  background: #ece0d8;
  padding: 0.1em 0.3em;
  border-radius: 2px;
}

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

.post-content table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.post-content th,
.post-content td {
  padding: 0.5rem 0.65rem;
  vertical-align: top;
  border-top: 1px solid var(--border);
}

.post-content tr:first-child td,
.post-content tr:first-child th { border-top: none; }

.post-content audio {
  display: block;
  width: 100%;
}

.embed-video {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
}

.embed-video iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: 0;
}

/* ---- Legacy Imported Content ---- */

.post-content .aligncenter { margin-left: auto; margin-right: auto; }

.post-content .wp-block-image,
.post-content .wp-block-audio,
.post-content .wp-block-gallery,
.post-content .wp-block-jetpack-tiled-gallery {
  margin-left: 0;
  margin-right: 0;
}

.post-content .wp-block-image img,
.post-content .wp-block-gallery .wp-block-image img,
.post-content .tiled-gallery__item img {
  width: 100%;
}

.post-content .wp-block-audio audio { margin: 0; }

.post-content .wp-block-gallery {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.post-content .wp-block-gallery > .wp-block-image,
.post-content .wp-block-gallery > .wp-block-gallery {
  margin: 0;
}

.post-content .wp-block-jetpack-tiled-gallery { width: 100%; }

.post-content .tiled-gallery__gallery {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.post-content .tiled-gallery__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.post-content .tiled-gallery__col {
  flex: 1 1 14rem;
  min-width: 0;
}

.post-content .tiled-gallery__item { margin: 0; }

.post-footer {
  font-size: 0.85rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.post-footer > * { margin: 0; }
.post-footer-label { color: var(--text); font-weight: 600; }

.post-tags,
.post-categories,
.post-attribution {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: baseline;
}

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

.post-card {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.post-card-link {
  color: var(--link);
  text-decoration: none;
  align-self: flex-start;
}

.post-card-link:hover { color: var(--link-hover); text-decoration: underline; }
.post-card-link:visited { color: var(--link-visited); }

.post-card-meta a,
.post-footer a,
.site-footer a {
  color: inherit;
}

.post-card-meta a:hover,
.post-footer a:hover,
.site-footer a:hover {
  color: var(--link-hover);
}

.post-card-meta a:visited,
.post-footer a:visited,
.site-footer a:visited {
  color: inherit;
}

.post-card-title {
  font-size: 1rem;
  color: inherit;
  line-height: 1.4;
}

.post-card-meta {
  font-size: 0.8rem;
  color: var(--muted);
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  font-size: 0.9rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.category-list, .tag-list {
  columns: 2;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.9rem;
  column-gap: 1.5rem;
}

.category-list li, .tag-list li { margin-bottom: 0.3rem; }

.archive-year { margin-top: 2rem; }

.archive-year-heading {
  font-size: 1.2rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.25rem;
  margin: 0 0 0.75rem;
}

@media (max-width: 600px) {
  html { font-size: 16px; }
  .category-list, .tag-list { columns: 1; }
}
