/* Sepoysite's visual language, adapted for Eleventy's blog templates.
   Keep these rules after the rich-content and vendor stylesheets. */
body main { flex: 1; padding: 4rem 0 0; min-width: 0; }
body .container, body .container-wide { padding-inline: 1rem; }
body .site-header .header-inner {
  display: flex; flex-direction: row; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 1.5rem; padding-block: 1rem;
}
body .site-logo { color: var(--accent); font-weight: 700; white-space: nowrap; }
.site-section-label { color: var(--muted); font-size: .875rem; font-weight: 400; margin-left: .5rem; }
body .site-nav { gap: 1.5rem; flex-wrap: wrap; }
body .site-nav a { font-weight: 400; font-size: .875rem; padding-block: .25rem; }
body .site-nav a[aria-current="page"] { color: var(--fg); font-weight: 500; border-bottom: 2px solid var(--accent); }
body .site-nav a:hover { color: var(--fg); opacity: .75; }
body .site-nav a[href^="http"]::after { content: none; }
.theme-switcher { position: relative; }
.theme-switcher summary {
  display: flex; align-items: center; gap: .5rem; padding: .5rem .75rem;
  border-radius: .5rem; background: var(--surface); cursor: pointer; list-style: none;
}
.theme-switcher summary::-webkit-details-marker { display: none; }
.theme-options {
  position: absolute; top: calc(100% + .5rem); right: 0; z-index: 110;
  width: max-content; max-width: calc(100vw - 2rem); padding: .5rem;
  background: var(--bg); border: 1px solid var(--border); border-radius: .5rem; box-shadow: var(--shadow-lg);
}
.theme-options button {
  display: flex; align-items: center; gap: .75rem; width: 100%; border: 0;
  padding: .5rem .75rem; border-radius: .375rem; font: inherit; font-size: .875rem;
  text-align: left; cursor: pointer; color: var(--fg); background: transparent;
}
.theme-options button:hover, .theme-options button[aria-pressed="true"] { background: var(--surface); }
.palette-swatches { display: flex; gap: .25rem; }
.palette-swatches span { width: .75rem; height: .75rem; border: 1px solid var(--border); border-radius: 50%; }
body .site-footer { padding-block: 2rem; color: var(--muted); text-align: left; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.5rem; }
body .footer-links a { color: var(--fg); text-decoration: none; }
body .footer-links a:hover { opacity: .75; }
.footer-inner p { margin: 0; }
.blog-intro { text-align: center; margin-bottom: 3rem; }
.blog-intro h1 { font-size: 2.25rem; font-weight: 700; margin-bottom: 1rem; }
.blog-intro p { color: var(--muted); font-size: 1.125rem; max-width: 42rem; margin: 0 auto; line-height: 1.75; }
body .hero-post {
  background: var(--surface); color: var(--fg); padding: 2rem;
  border-radius: .75rem; margin-bottom: 3rem;
}
body .hero-post-title { font-size: 1.875rem; font-weight: 700; }
body .hero-post-meta { color: var(--muted); font-size: .875rem; opacity: 1; display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; }
body .hero-post-summary { color: var(--muted); font-size: 1rem; opacity: 1; }
body .hero-post-thumbnail { border: 1px solid var(--border); box-shadow: none; border-radius: .5rem; }
body .posts-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
body .post-card {
  background: var(--bg); padding: 1.5rem; margin: 0; min-width: 0;
  border-radius: .5rem; transition: transform 200ms ease, box-shadow 200ms ease;
}
body .post-card:hover { border-color: var(--border); transform: scale(1.02); box-shadow: var(--shadow-lg); }
body .post-card-with-thumbnail { display: flex; flex-direction: column; gap: 0; padding: 0; overflow: hidden; }
body .post-card-thumbnail { width: 100%; aspect-ratio: 16 / 9; border-radius: 0; }
body .post-card-with-thumbnail .post-card-body { padding: 1.5rem; }
body .post-card-title { font-size: 1.125rem; font-weight: 600; }
body .post-card-summary { color: var(--muted); }
body .post-card-meta { align-items: center; gap: .5rem; }
body .tag, body .category-badge, body .series-badge, body .badge {
  color: var(--fg); background: var(--surface); border: 0; border-radius: 999px;
  padding: .25rem .75rem; font-size: .875rem; text-transform: none; letter-spacing: normal;
}
body .tag:hover, body .category-badge:hover { background: var(--surface); color: var(--accent); }
body .tag-more { color: var(--muted); font-size: .875rem; align-self: center; }
body .blog-home > section + section { margin-top: 4rem; }
body .blog-home > section > h2 { font-size: 1.5rem; font-weight: 700; margin-bottom: 1.5rem; }
body .categories-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
body .category-card { background: var(--surface); padding: 1.5rem; border-radius: .75rem; }
body .category-card-title { font-size: 1.25rem; font-weight: 700; margin-bottom: .75rem; }
body .category-card-title a { color: var(--fg); text-decoration: none; }
body .category-card-count { color: var(--muted); font-size: .875rem; margin-bottom: .75rem; }
body .category-card-description { color: var(--muted); line-height: 1.75; }
body .view-all { text-align: center; margin-top: 2rem; }
body .button { border-radius: .5rem; padding: .75rem 1.5rem; }
body .button:hover { transform: scale(1.05); box-shadow: none; }
body .search-input { padding: .75rem 1rem; border-radius: .5rem; font-family: inherit; }
body .search-input:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; box-shadow: none; }
body .page-header { text-align: center; padding-top: 0; margin-bottom: 3rem; }
body .page-title, body .post-title { font-size: 2.25rem; font-weight: 700; }
body .page-summary { font-size: 1.125rem; color: var(--muted); line-height: 1.75; }
body .post-header { padding-top: 0; margin-bottom: 2rem; }
body .post-meta { color: var(--muted); font-size: .875rem; }
body .post-summary { color: var(--muted); font-size: 1.125rem; line-height: 1.75; }
body .prose { max-width: var(--reading-width); margin-inline: auto; min-width: 0; overflow-wrap: break-word; }
body .prose h2 { font-size: 1.5rem; font-weight: 700; border: 0; padding-bottom: 0; }
body .prose h3 { font-size: 1.25rem; font-weight: 700; }
body .prose h4 { font-size: 1.125rem; }
body .prose pre { background: var(--surface); border-radius: .5rem; text-shadow: none; }
body .prose pre code { text-shadow: none; }
body .callout-info, body .note, body .series-toc, body .table-of-contents { background: var(--surface); }
body .post-footer { max-width: var(--reading-width); margin: 3rem auto 0; padding: 1.5rem; background: var(--surface); border-radius: .75rem; }
body .post-footer p:last-child { margin-bottom: 0; }
body .related-posts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* These pages currently have inline styles; keep their content and use site tokens. */
body .category-section, body .tag-section, body .category-detail-post, body .tag-detail-post { background: var(--bg); border-radius: .75rem; }
body .tags-cloud { background: var(--surface); border-radius: .75rem; }
body .tag-cloud-item { border-radius: 999px; }
body .categories-intro, body .tags-intro, body .archive-intro, body .category-detail-intro { color: var(--muted); }
@media (min-width: 640px) {
  body .container, body .container-wide { padding-inline: 1.5rem; }
}
@media (min-width: 1024px) {
  body .container, body .container-wide { padding-inline: 2rem; }
}
@media (max-width: 1023px) {
  body .site-header .header-inner { gap: 1rem; }
  body .site-nav { order: 3; width: 100%; justify-content: center; gap: 1rem; }
}
@media (max-width: 767px) {
  body main { padding-top: 3rem; }
  body .site-nav { gap: .75rem; }
  body .site-nav a { font-size: .8125rem; }
  body .posts-grid, body .categories-grid, body .related-posts-grid { grid-template-columns: 1fr; }
  body .hero-post { padding: 1.5rem; }
  body .hero-post-title { font-size: 1.5rem; }
  body .post-title { font-size: 1.875rem; }
  .footer-inner { flex-direction: column; text-align: center; }
  body .button { display: inline-block; width: auto; }
  body .category-detail-post, body .tag-detail-post, body .category-section, body .tag-section { padding: 1.5rem; }
}
@media (max-width: 379px) {
  .site-section-label { display: none; }
  .theme-switcher summary > span { display: none; }
  body .site-nav { gap: .75rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
  body .post-card:hover, body .button:hover { transform: none; }
}

body .site-nav a[aria-current="true"] { font-weight: 500; border-bottom: 2px solid var(--accent); }
.blog-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.5rem; margin-bottom: 3rem; }
.blog-nav a { color: var(--muted); font-size: .875rem; text-decoration: none; padding-bottom: .25rem; }
.blog-nav a[aria-current="page"] { color: var(--fg); border-bottom: 2px solid var(--accent); }
.blog-nav a:hover { color: var(--accent); }
