/* ClouHost modern blog front-end */

.ch-blog-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  z-index: 100;
  background: linear-gradient(90deg, #6366f1, #a855f7);
  transition: width 0.1s linear;
}

.ch-blog-hero {
  background:
    radial-gradient(ellipse 80% 60% at 20% 0%, rgba(99,102,241,.35), transparent 55%),
    radial-gradient(ellipse 60% 50% at 90% 20%, rgba(168,85,247,.25), transparent 50%),
    #0b0f19;
  color: #fff;
}

.ch-blog-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: #cbd5e1;
  transition: background .15s, border-color .15s, color .15s;
}
.ch-blog-chip:hover,
.ch-blog-chip.is-active {
  background: #6366f1;
  border-color: #6366f1;
  color: #fff;
}
.ch-blog-chip-light {
  border-color: #e2e8f0;
  background: #fff;
  color: #475569;
}
.ch-blog-chip-light:hover,
.ch-blog-chip-light.is-active {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #fff;
}

html.dark .ch-blog-chip-light {
  background: #0f172a;
  border-color: #1e293b;
  color: #cbd5e1;
}

.ch-blog-card {
  background: #fff;
  border: 1px solid #eef2f7;
  border-radius: 1.25rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
.ch-blog-card:hover {
  transform: translateY(-3px);
  border-color: #c7d2fe;
  box-shadow: 0 18px 40px -18px rgba(79,70,229,.35);
}
html.dark .ch-blog-card {
  background: #0f172a;
  border-color: #1e293b;
}

.ch-blog-card-cover {
  position: relative;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #4f46e5, #7c3aed 55%, #db2777);
  overflow: hidden;
}
.ch-blog-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}
.ch-blog-card:hover .ch-blog-card-cover img {
  transform: scale(1.04);
}
.ch-blog-card-badge {
  position: absolute;
  left: 0.85rem;
  bottom: 0.85rem;
  padding: 0.25rem 0.6rem;
  border-radius: 0.5rem;
  font-size: 0.65rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .06em;
  background: rgba(15,23,42,.72);
  color: #fff;
  backdrop-filter: blur(6px);
}

.ch-blog-featured {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 0;
  border-radius: 1.5rem;
  overflow: hidden;
  background: #fff;
  border: 1px solid #eef2f7;
  box-shadow: 0 25px 50px -24px rgba(15,23,42,.25);
}
@media (max-width: 900px) {
  .ch-blog-featured { grid-template-columns: 1fr; }
}
html.dark .ch-blog-featured {
  background: #0f172a;
  border-color: #1e293b;
}
.ch-blog-featured-cover {
  min-height: 280px;
  background: linear-gradient(135deg, #312e81, #4f46e5 50%, #a855f7);
  position: relative;
}
.ch-blog-featured-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}
.ch-blog-featured-body {
  padding: 2rem 2.1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Single post */
.ch-post-hero {
  background: #0b0f19;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.ch-post-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 10% 0%, rgba(99,102,241,.3), transparent 55%),
    radial-gradient(ellipse 50% 40% at 100% 30%, rgba(168,85,247,.2), transparent 50%);
  pointer-events: none;
}
.ch-post-cover {
  max-width: 960px;
  margin: -3.5rem auto 0;
  padding: 0 1rem;
  position: relative;
  z-index: 2;
}
.ch-post-cover-frame {
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(15,23,42,.45);
  border: 1px solid rgba(255,255,255,.08);
  aspect-ratio: 21 / 9;
  background: #1e293b;
}
.ch-post-cover-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.prose-blog {
  font-size: 1.085rem;
  line-height: 1.8;
  color: #334155;
  font-family: Georgia, "Times New Roman", Times, serif;
}
.prose-blog > *:first-child { margin-top: 0; }
.prose-blog h1, .prose-blog h2, .prose-blog h3, .prose-blog h4 {
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  color: #0f172a;
  font-weight: 900;
  line-height: 1.25;
  scroll-margin-top: 5rem;
}
.prose-blog h2 { font-size: 1.55rem; margin: 2.25rem 0 .85rem; }
.prose-blog h3 { font-size: 1.25rem; margin: 1.75rem 0 .65rem; }
.prose-blog h4 { font-size: 1.1rem; margin: 1.4rem 0 .5rem; }
.prose-blog p { margin: 0 0 1.15rem; }
.prose-blog ul, .prose-blog ol { margin: 0 0 1.15rem 1.35rem; }
.prose-blog li { margin: .4rem 0; }
.prose-blog a { color: #4f46e5; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.prose-blog img {
  max-width: 100%;
  height: auto;
  border-radius: 1rem;
  margin: 1.25rem 0;
  box-shadow: 0 10px 30px -15px rgba(15,23,42,.35);
}
.prose-blog img.alignleft { float: left; margin: .25rem 1.25rem .85rem 0; max-width: 45%; }
.prose-blog img.alignright { float: right; margin: .25rem 0 .85rem 1.25rem; max-width: 45%; }
.prose-blog img.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.prose-blog blockquote {
  border-left: 4px solid #6366f1;
  padding: .75rem 1.15rem;
  margin: 1.35rem 0;
  background: #f8fafc;
  border-radius: 0 .85rem .85rem 0;
  color: #475569;
  font-style: italic;
}
.prose-blog pre {
  background: #0f172a;
  color: #e2e8f0;
  padding: 1rem 1.15rem;
  border-radius: .85rem;
  overflow-x: auto;
  font-size: .875rem;
  margin: 1.25rem 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.prose-blog code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .9em;
  background: #f1f5f9;
  padding: .1em .35em;
  border-radius: .3rem;
}
.prose-blog pre code { background: transparent; padding: 0; color: inherit; }
.prose-blog table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: .92rem;
  font-family: system-ui, sans-serif;
}
.prose-blog th, .prose-blog td {
  border: 1px solid #e2e8f0;
  padding: .65rem .8rem;
  text-align: left;
}
.prose-blog th { background: #f8fafc; font-weight: 800; }
.prose-blog hr {
  border: 0;
  border-top: 2px solid #e2e8f0;
  margin: 2rem 0;
}
.prose-blog figure { margin: 1.35rem 0; }
.prose-blog figcaption {
  text-align: center;
  font-size: .85rem;
  color: #64748b;
  margin-top: .45rem;
  font-family: system-ui, sans-serif;
}

html.dark .prose-blog { color: #cbd5e1; }
html.dark .prose-blog h1,
html.dark .prose-blog h2,
html.dark .prose-blog h3,
html.dark .prose-blog h4 { color: #f8fafc; }
html.dark .prose-blog blockquote { background: #0f172a; color: #94a3b8; }
html.dark .prose-blog code { background: #1e293b; }
html.dark .prose-blog th, html.dark .prose-blog td { border-color: #1e293b; }
html.dark .prose-blog th { background: #0f172a; }
html.dark .prose-blog hr { border-color: #1e293b; }

.ch-toc {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 1rem 1.15rem;
  margin-bottom: 1.75rem;
}
html.dark .ch-toc {
  background: #0f172a;
  border-color: #1e293b;
}
.ch-toc-title {
  font-size: .7rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #64748b;
  margin-bottom: .65rem;
}
.ch-toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .35rem;
}
.ch-toc a {
  font-size: .85rem;
  font-weight: 700;
  color: #334155;
  text-decoration: none;
}
.ch-toc a:hover { color: #4f46e5; }
.ch-toc .is-h3 { padding-left: .9rem; font-weight: 600; color: #64748b; }
html.dark .ch-toc a { color: #cbd5e1; }
html.dark .ch-toc .is-h3 { color: #94a3b8; }

.ch-author-box {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.15rem;
  padding: 1.35rem;
  border-radius: 1.25rem;
  border: 1px solid #e2e8f0;
  background: linear-gradient(135deg, #f8fafc, #fff);
}
html.dark .ch-author-box {
  background: linear-gradient(135deg, #0f172a, #020617);
  border-color: #1e293b;
}
.ch-author-avatar {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  object-fit: cover;
  box-shadow: 0 8px 20px -8px rgba(79,70,229,.5);
}
.ch-author-avatar-fallback {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  font-weight: 900;
  font-size: 1.15rem;
}

.ch-share-bar {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
}
.ch-share-btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .45rem .8rem;
  border-radius: .75rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  font-size: .72rem;
  font-weight: 800;
  color: #475569;
  transition: background .15s, color .15s, border-color .15s;
}
.ch-share-btn:hover {
  border-color: #c7d2fe;
  color: #4f46e5;
  background: #eef2ff;
}
html.dark .ch-share-btn {
  background: #0f172a;
  border-color: #1e293b;
  color: #cbd5e1;
}

.ch-related-card {
  border: 1px solid #eef2f7;
  border-radius: 1.1rem;
  overflow: hidden;
  background: #fff;
  transition: border-color .15s, box-shadow .15s, transform .15s;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.ch-related-card:hover {
  border-color: #c7d2fe;
  box-shadow: 0 14px 30px -18px rgba(79,70,229,.4);
  transform: translateY(-2px);
}
html.dark .ch-related-card {
  background: #0f172a;
  border-color: #1e293b;
}
.ch-related-cover {
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
}
.ch-related-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ch-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  justify-content: center;
  align-items: center;
}
.ch-page-link {
  min-width: 2.4rem;
  height: 2.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: .75rem;
  border: 1px solid #e2e8f0;
  font-size: .8rem;
  font-weight: 800;
  color: #475569;
  background: #fff;
  padding: 0 .65rem;
}
.ch-page-link.is-active {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #fff;
}
html.dark .ch-page-link {
  background: #0f172a;
  border-color: #1e293b;
  color: #cbd5e1;
}

.ch-meta-dot::before {
  content: "·";
  margin: 0 .45rem;
  opacity: .5;
}
