/* Shared styling for the homepage, blog.html, and posts under /blog/.
   Loaded alongside style.css, which defines the theme variables. */

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  margin-bottom: 28px;
}

.writing-list {
  display: flex;
  flex-direction: column;
}

#writing-status:empty {
  display: none;
}

.writing-card {
  overflow-wrap: anywhere;
  padding: 24px 0;
  border-bottom: 1px dashed var(--rule-color);
}

.writing-card:first-child {
  padding-top: 0;
}

.writing-card:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.writing-card h3 {
  margin-bottom: 6px;
}

.writing-card h3 a {
  text-decoration: none;
}

.writing-card h3 a:hover,
.writing-card h3 a:focus-visible {
  text-decoration: underline;
}

.writing-meta {
  color: var(--secondary-color);
  font-size: 12px;
  letter-spacing: 0.02em;
  margin-bottom: 10px;
}

.writing-meta .dot {
  margin: 0 8px;
}

.writing-excerpt {
  margin-bottom: 10px;
}

/* Post body typography. blog.js renders Markdown into .prose at load time. */
.prose {
  max-width: 720px;
  overflow-wrap: anywhere;
}

.prose[data-state="loading"],
.prose[data-state="error"] {
  color: var(--secondary-color);
}

.prose > * + * {
  margin-top: 20px;
}

.prose h2 {
  font-size: 21px;
  letter-spacing: -0.02em;
  margin-top: 12px;
}

.prose h3 {
  font-size: 16px;
  margin-top: 8px;
}

.prose ul,
.prose ol {
  padding-left: 1.3em;
}

.prose li + li {
  margin-top: 6px;
}

.prose pre {
  font-size: 13px;
  overflow-x: auto;
  overflow-wrap: normal;
}

.prose table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
}

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

.prose figure {
  margin: 0;
}

.post-header {
  margin-bottom: 44px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--rule-color);
}

.post-header h1 {
  padding-bottom: 10px;
  overflow-wrap: anywhere;
}

.post-header .writing-meta {
  margin-bottom: 0;
}

.post-footer {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px dashed var(--rule-color);
}

@media (max-width: 600px) {
  .prose h2 {
    font-size: 19px;
  }
}
