/* Print rules for the blog — post pages and the post index.
 * Linked with media="print" after print.css.
 *
 * Kept separate from the homepage's print-resume.css because the structure
 * is different: no numbered section column, but there is a title block, a
 * table of contents, code samples and a footer nav that only makes sense on
 * screen.
 */

.post-header {
  margin-bottom: 1.2rem;
  padding-bottom: 0.6rem;
  border-bottom: 0.5pt solid var(--rule);
  break-after: avoid;
}

.post-header h1 {
  font-size: 15pt;
  margin: 0 0 0.25rem;
}

.post-header time {
  font-size: 9pt;
  color: #555;
}

/* The on-screen "on this page" list is a navigation aid; on paper it is
   redundant with the document and just wastes the top of page one. */
.toc {
  display: none;
}

.post-body h2 {
  /* Keep a heading with the text it introduces. */
  break-after: avoid;
  margin: 1.2rem 0 0.4rem;
}

.post-body p,
.post-body li {
  color: #000;
}

/* Never split a code sample across a page, and never let it overflow. */
.post-body pre {
  background: #f4f4f4;
  border: 0.5pt solid #ccc;
  padding: 0.5rem 0.6rem;
  font-size: 8.5pt;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
  break-inside: avoid;
}

.post-body code {
  background: #f4f4f4;
  font-size: 0.9em;
}

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

/* Blog index: each entry is a small document of its own. */
.post {
  padding: 0.6rem 0;
  break-inside: avoid;
}

.post + .post {
  border-top: 0.5pt solid var(--rule);
}

.post-title {
  font-size: 11pt;
}

.post-date {
  font-size: 8.5pt;
  color: #555;
}

.post-excerpt {
  margin: 0.25rem 0 0;
  font-size: 9pt;
  color: #333;
}

.page-title {
  font-size: 15pt;
  margin: 0 0 1rem;
}

.empty {
  color: #333;
}

/* 404: keep the message and its links on one page. */
main {
  min-height: 0;
}

.code {
  font-size: 9pt;
  margin: 0 0 0.3rem;
}

h1 {
  font-size: 14pt;
}

.links a {
  text-decoration: underline;
}