/* /blog/ pages (layouts/blog/*). Colours come from tokens.css. */

.blog-page main {
  line-height: 1.6;
}

.blog-page main a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.blog-subnav {
  margin-block-start: 0.5rem;
  color: var(--text-subtle);
  font-size: 0.875rem;
  line-height: 1.6;
}

.blog-subnav ul,
.blog-subnav li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  list-style: none;
}

.blog-subnav a {
  padding-block: 0.2rem;
}

.blog-subnav a:hover,
.blog-subnav a[aria-current] {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.blog-subnav a[aria-current] {
  font-weight: 600;
}

/* Posts (list and single); divided-list spacing comes from pages.css. */
.blog-page main article .p-name,
.blog-page .post-list .p-name {
  font-size: 1.15rem;
  margin-bottom: var(--space-small);
}

.post-body > * + :not(.section-separator) {
  margin-top: var(--space-content);
}

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

/* Long link text wraps instead of overflowing narrow screens. */
.post-body a {
  overflow-wrap: anywhere;
}

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

.post-body ul,
.post-body ol {
  padding-left: 1.25rem;
}

/* Link preview card (list and single) */
.link-preview {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.75rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: inherit;
}

.blog-page main a.link-preview {
  text-decoration: none;
}

.link-preview:hover {
  background: var(--surface);
}

/* Square thumbnail: a quarter of the card, 5–8rem. */
.link-preview img {
  flex: none;
  align-self: flex-start;
  width: clamp(5rem, 25%, 8rem);
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 4px;
}

.link-preview-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  line-height: 1.4;
}

.link-preview-host {
  font-size: 0.8rem;
  color: var(--text-subtle);
}

.link-preview-title,
.link-preview-desc {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.link-preview-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.post-date {
  margin-top: var(--space-small);
  font-size: 0.875rem;
  color: var(--text-subtle);
}

.blog-page main .post-date a {
  text-decoration: none;
}

.blog-page main .post-date a:hover {
  color: var(--text);
}

/* The network icon follows the date: "→ Aug 4, 2026 · 2:45 PM · 🦋".
   blog/replies.html and assets/js/replies.js own the markup. */

.replies-status {
  color: var(--text-subtle);
  font-size: 0.9em;
}

.replies-status:not(:empty) {
  margin-top: var(--space-content);
}

/* Archive */
.archive-list time {
  color: var(--text-subtle);
  font-size: 0.875rem;
  margin-right: 0.5rem;
}

/* Photos */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
  gap: 0.75rem;
}

.photo-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
}
