/* ------------------------------------------------------------------ *
 * Public blog skin. Consumes the per-blog tokens injected in <head>.
 * ------------------------------------------------------------------ */

.site-header {
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--background) 85%, transparent);
  backdrop-filter: saturate(180%) blur(8px);
  position: sticky; top: 0; z-index: 30;
}
.site-header .inner { display: flex; align-items: center; justify-content: space-between; height: 4rem; }
.site-brand { font-weight: 700; font-size: 1.125rem; letter-spacing: -0.03em; }
.site-brand:hover { text-decoration: none; opacity: .85; }
.site-nav { display: flex; align-items: center; gap: 1.25rem; font-size: 0.9rem; }
.site-nav a:not(.btn) { color: var(--muted-foreground); }
.site-nav a:not(.btn):hover { color: var(--foreground); text-decoration: none; }
.site-nav a.btn-primary { color: var(--primary-foreground); }

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 4rem; padding: 2rem 0;
  color: var(--muted-foreground); font-size: 0.875rem;
}

/* Hero / blog intro */
.blog-hero { padding: 3.5rem 0 2rem; }
.blog-hero h1 { font-size: clamp(2rem, 4vw, 2.75rem); }
.blog-hero p { color: var(--muted-foreground); font-size: 1.1rem; margin-top: 0.75rem; max-width: 42rem; }

/* Image slider (replicates the WP Transition Slider — fade) */
.yuwa-slider { position: relative; width: 100%; height: 440px; margin: 1.75rem 0 0.5rem; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: var(--muted); }
.yuwa-slider .slides { position: absolute; inset: 0; }
.yuwa-slider .slide { position: absolute; inset: 0; opacity: 0; transition: opacity .8s ease-in-out; }
.yuwa-slider .slide.active { opacity: 1; }
.yuwa-slider .slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.yuwa-slider figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 2.5rem 1.5rem 1.25rem;
  color: #fff; font-weight: 600; font-size: 1.1rem;
  background: linear-gradient(to top, rgb(0 0 0 / 0.65), transparent);
}
.slider-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 2.5rem; height: 2.5rem; border-radius: 9999px; border: 0; cursor: pointer;
  background: rgb(0 0 0 / 0.35); color: #fff; font-size: 1.5rem; line-height: 1;
  display: flex; align-items: center; justify-content: center; transition: background .15s;
}
.slider-nav:hover { background: rgb(0 0 0 / 0.6); }
.slider-nav.prev { left: 0.75rem; }
.slider-nav.next { right: 0.75rem; }
.slider-dots { position: absolute; bottom: 0.75rem; left: 0; right: 0; z-index: 2; display: flex; gap: 0.4rem; justify-content: center; }
.slider-dots .dot { width: 0.55rem; height: 0.55rem; border-radius: 9999px; border: 0; cursor: pointer; background: rgb(255 255 255 / 0.5); padding: 0; transition: background .15s, transform .15s; }
.slider-dots .dot.active { background: #fff; transform: scale(1.25); }
@media (max-width: 640px) {
  .yuwa-slider { height: 260px; }
  .yuwa-slider figcaption { font-size: 0.95rem; padding: 2rem 1rem 1rem; }
}

/* Search bar */
.search-bar { position: relative; max-width: 34rem; margin-top: 1.75rem; }
.search-bar .search-icon { position: absolute; left: 0.85rem; top: 50%; transform: translateY(-50%); color: var(--muted-foreground); pointer-events: none; }
.search-input { padding-left: 2.5rem; height: 2.75rem; }
.search-input::-webkit-search-cancel-button { cursor: pointer; }

/* Feed (infinite scroll) */
.feed-status { padding: 1.25rem 0 2rem; min-height: 1rem; font-size: 0.875rem; }
#feed-sentinel { height: 1px; }

/* Post list */
/* Single column pinned to the container width (minmax(0,1fr)); without this the
   implicit auto track expands to the widest card's min-content — a long unbreakable
   token in one excerpt/title would then blow up every card's width. */
.post-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; padding-bottom: 1rem; }
.post-card { display: flex; gap: 1.25rem; align-items: stretch; min-width: 0; padding: 1.25rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); transition: border-color .15s, box-shadow .15s, transform .15s; }
.post-card:hover { text-decoration: none; border-color: color-mix(in srgb, var(--primary) 40%, var(--border)); box-shadow: 0 4px 16px rgb(0 0 0 / 0.06); }
.post-card-thumb { flex: 0 0 auto; width: 168px; }
.post-card-thumb img, .post-card .thumb-placeholder { width: 168px; height: 118px; object-fit: cover; border-radius: calc(var(--radius) - 2px); display: flex; }
.post-card .thumb-placeholder { align-items: center; justify-content: center; background: var(--muted); color: var(--muted-foreground); font-weight: 700; font-size: 1.75rem; }
.post-card-body { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.post-card h2 { font-size: 1.3rem; overflow-wrap: anywhere; }
.post-card .excerpt { color: var(--muted-foreground); margin-top: 0.5rem; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 560px) {
  .post-card { flex-direction: column; }
  .post-card-thumb, .post-card-thumb img, .post-card .thumb-placeholder { width: 100%; height: 180px; }
}
.post-meta { color: var(--muted-foreground); font-size: 0.8rem; display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; margin-top: 0.75rem; }
.post-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .5; }
.tag-list { display: flex; gap: 0.4rem; flex-wrap: wrap; }

/* Single post */
.post-article { padding: 3rem 0; }
.post-header h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
.featured-image { border-radius: var(--radius); margin: 1.5rem 0; border: 1px solid var(--border); }

/* Prose — rendered Markdown */
.prose { font-size: 1.05rem; line-height: 1.75; color: var(--foreground); }
.prose > * + * { margin-top: 1.25rem; }
.prose h1, .prose h2, .prose h3 { margin-top: 2.25rem; }
.prose h1 { font-size: 1.9rem; }
.prose h2 { font-size: 1.5rem; }
.prose h3 { font-size: 1.25rem; }
.prose p, .prose ul, .prose ol { color: var(--foreground); }
.prose ul, .prose ol { padding-left: 1.5rem; }
.prose li + li { margin-top: 0.35rem; }
.prose a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.prose blockquote { border-left: 3px solid var(--border); padding-left: 1rem; color: var(--muted-foreground); font-style: italic; }
.prose code { background: var(--muted); padding: 0.15rem 0.4rem; border-radius: calc(var(--radius) - 3px); font-size: 0.875em; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.prose pre { background: var(--muted); padding: 1rem 1.25rem; border-radius: var(--radius); overflow-x: auto; border: 1px solid var(--border); }
.prose pre code { background: none; padding: 0; }
/* highlight.js: keep our code-block background; let the token colors apply on top */
.prose pre code.hljs { background: transparent; padding: 0; color: inherit; }
.prose img { border-radius: var(--radius); border: 1px solid var(--border); }
.prose video { max-width: 100%; border-radius: var(--radius); border: 1px solid var(--border); display: block; }
.prose hr { border: 0; border-top: 1px solid var(--border); }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.prose th, .prose td { border: 1px solid var(--border); padding: 0.5rem 0.75rem; text-align: left; }
