.footer span {
  display: none !important;
}

/* Related Posts Section — vertical list with a small thumbnail on the left */
.related-posts {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color, #e0e0e0);
}

.related-posts h3 {
  margin-bottom: 1.25rem;
  font-size: 1.25rem;
}

.related-posts-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.related-post-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: inherit;
  padding: 0.5rem;
  border-radius: 8px;
  transition: background 0.2s ease;
}

.related-post-item:hover {
  background: var(--card-background, #f8f8f8);
}

.related-post-thumb {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  border-radius: 6px;
  background-size: cover;
  background-position: center;
  background-color: var(--border-color, #e0e0e0);
}

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

.related-post-content h4 {
  margin: 0 0 0.25rem 0;
  font-size: 1rem;
  line-height: 1.35;
}

.related-post-date {
  font-size: 0.85rem;
  opacity: 0.7;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .related-posts {
    border-top-color: #444;
  }

  .related-post-item:hover {
    background: #2a2a2a;
  }

  .related-post-thumb {
    background-color: #444;
  }
}

/* Gokarna dark theme class support */
body.dark .related-posts {
  border-top-color: #444;
}

body.dark .related-post-item:hover {
  background: #2a2a2a;
}

body.dark .related-post-thumb {
  background-color: #444;
}

/* Chess diagram */
img[src*="chess"] {
  max-width: 280px;
  height: auto;
}

/* Newsletter subscription form — compact */
.newsletter {
  margin-top: 2.5rem;
  padding: 1rem 1.1rem;
  max-width: 520px;
  border: 1px solid var(--dark-tertiary-color, #e0e0e0);
  border-radius: 8px;
  background: var(--dark-secondary-color, #f8f8f8);
  color: var(--dark-text-color, #111);
}

.newsletter-follow {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  opacity: 0.85;
}

.newsletter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.newsletter-input {
  flex: 1 1 180px;
  padding: 0.45rem 0.7rem;
  font-size: 0.9rem;
  border: 1px solid var(--dark-tertiary-color, #e0e0e0);
  border-radius: 6px;
  background: var(--dark-secondary-color, #fff);
  color: var(--dark-text-color, #111);
}

.newsletter-button {
  padding: 0.45rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  background: var(--accent-color, #007bff);
  color: #fff;
  transition: opacity 0.2s ease;
}

.newsletter-button:hover {
  opacity: 0.9;
}

.newsletter-button:disabled {
  opacity: 0.6;
  cursor: default;
}

.newsletter-message {
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
  min-height: 1.2em;
}

.newsletter-message.ok {
  color: #1a7f37;
}

.newsletter-message.error {
  color: #cf222e;
}

.newsletter-input::placeholder {
  opacity: 0.55;
}

/* "All articles" archive section on each post (SEO internal linking) */
.all-posts {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color, #e0e0e0);
}

.all-posts > h3 {
  margin-bottom: 1.25rem;
  font-size: 1.25rem;
}

@media (prefers-color-scheme: dark) {
  .all-posts {
    border-top-color: #444;
  }
}

body.dark .all-posts {
  border-top-color: #444;
}

/* Year headings on the home page and the all-articles archive */
.home-posts .post-year,
.all-posts .post-year {
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.4rem;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  opacity: 0.65;
  border-bottom: 1px solid var(--border-color, #e0e0e0);
}

.home-posts .post-year:first-child,
.all-posts .post-year:first-child {
  margin-top: 1rem;
}

@media (prefers-color-scheme: dark) {
  .home-posts .post-year,
  .all-posts .post-year {
    border-bottom-color: #444;
  }
}

body.dark .home-posts .post-year,
body.dark .all-posts .post-year {
  border-bottom-color: #444;
}

/* Home page post filters (All / Blog / X) */
.post-filters {
  display: flex;
  gap: 0.5rem;
  margin: 0 0 1rem;
}

.post-filter {
  padding: 0.3rem 0.85rem;
  font-size: 0.9rem;
  border: 1px solid var(--border-color, #e0e0e0);
  border-radius: 999px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s ease, background 0.2s ease;
}

.post-filter:hover {
  opacity: 1;
}

.post-filter.is-active {
  opacity: 1;
  font-weight: 600;
  background: var(--accent-color, #007bff);
  color: #fff;
  border-color: transparent;
}

/* "Originally posted on X" note */
.x-origin {
  margin: 1.5rem 0 0;
  font-size: 0.9rem;
  opacity: 0.7;
}

@media (prefers-color-scheme: dark) {
  .post-filter {
    border-color: #444;
  }
}

body.dark .post-filter {
  border-color: #444;
}
