/* ReeliChat Blog */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: "Quicksand", "Segoe UI", Arial, sans-serif; font-weight: 700; color: #1f2633; background: #fff; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

/* ---------- header banner ---------- */
.nav {
  position: relative; padding: 70px 16px; margin-bottom: 15px; text-align: center; background-position: center; background-size: cover;
  background-color: #0f2f6b;
  background-image: radial-gradient(rgba(255,255,255,.08) 2px, transparent 2.5px), linear-gradient(135deg, #1a56c4 0%, #0f2f6b 55%, #0b2558 100%);
  background-size: 26px 26px, cover;
}
.nav[style] { background-size: cover; }   /* an uploaded banner or post image */
.nav .logo-link { display: inline-flex; flex-direction: column; align-items: center; gap: 8px; }
.nav img.logo { width: 350px; max-width: 80vw; transition: transform .2s; filter: drop-shadow(0 4px 14px rgba(0,0,0,.35)); }
.nav .logo-link:hover img.logo { transform: translateY(-2px); }
.nav .logo-tag { color: #fff; background: rgba(0,0,0,.35); border: 2px solid rgba(255,255,255,.5); padding: 2px 16px; border-radius: 20px; font-size: 1rem; letter-spacing: 3px; text-transform: uppercase; }
.nav .tagline { color: #eef3fb; margin: 12px 0 0; font-size: 1.05rem; text-shadow: 0 1px 4px rgba(0,0,0,.5); }
.nav a.back { position: absolute; top: 30px; left: 65px; color: #fff; background: rgba(0,0,0,.25); padding: 5px 10px; border-radius: 5px; transition: color .1s, background .1s; z-index: 2; }
.nav a.back:hover { color: rgba(255,255,255,.85); background: rgba(0,0,0,.4); }
.nav.article { height: 300px; padding: 0; display: flex; align-items: center; justify-content: center; }
.nav.article.checker {
  background-color: #0b2558;
  background-image: linear-gradient(45deg, #102e66 25%, transparent 25%), linear-gradient(-45deg, #102e66 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #102e66 75%), linear-gradient(-45deg, transparent 75%, #102e66 75%);
  background-size: 120px 120px; background-position: 0 0, 0 60px, 60px -60px, -60px 0;
}
.nav img.logo.faint { width: 260px; opacity: .35; filter: none; }

/* ---------- page column ---------- */
.column { max-width: 660px; margin: 0 auto; padding: 0 16px 10px; }
.empty { text-align: center; color: #8a93a3; padding: 50px 0; }

/* ---------- post list ---------- */
.date { font-size: .9rem; color: #666; }
.blog-preview { display: block; overflow: auto; border-radius: 6px; padding: 15px; margin-bottom: 15px; transition: background-color .05s; }
.blog-preview:hover { background-color: rgba(26,86,196,.06); }
.blog-preview .title { font-size: 2rem; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.blog-preview .content { font-weight: 400; line-height: 1.5; margin-top: 4px; color: #333b48; }
.blog-preview .authors { float: right; margin-top: 8px; display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.blog-preview .author { display: inline-flex; align-items: center; gap: 6px; font-size: .95rem; }
.blog-preview .author img { height: 2rem; width: 2rem; border-radius: 50%; object-fit: cover; }

/* ---------- pagination & footer ---------- */
nav.pagination { position: relative; color: #989898; text-align: center; padding: 10px 0; border-top: 2px solid #e6e6e6; min-height: 42px; }
nav.pagination .older-posts, nav.pagination .newer-posts { position: absolute; top: 10px; transition: color .1s; }
nav.pagination .older-posts { right: 0; }
nav.pagination .newer-posts { left: 0; }
nav.pagination a:hover { color: #1a56c4; }
.footer { display: flex; border-top: 2px solid #e6e6e6; color: #a2a2a2; margin-top: 10px; }
.footer a { flex: 1; text-align: center; padding: 8px 5px; transition: color .1s; }
.footer a:hover { color: #666; }

/* ---------- article ---------- */
.article .title { font-size: 2.5rem; line-height: 1.2; margin: 10px 0 0; word-break: break-word; }
.article .date { display: block; margin-top: 6px; }
.article .content { font-size: 1.1rem; line-height: 1.6; font-weight: 400; margin-top: 14px; color: #262d3a; }
.article .content p { margin: .6rem 0; }
.article .content a { color: #1a56c4; font-weight: 700; }
.article .content a:hover { text-decoration: underline; }
.article .content h2, .article .content h3, .article .content h4 { font-weight: 700; line-height: 1.3; margin: 1.6rem 0 .4rem; color: #1f2633; }
.article .content h2 { font-size: 1.6rem; }
.article .content h3 { font-size: 1.3rem; }
.article .content h4 { font-size: 1.1rem; }
.article .content ul, .article .content ol { padding-left: 1.4rem; margin: .6rem 0; }
.article .content li { margin: .3rem 0; }
.article .content strong { font-weight: 700; }
.article .content blockquote { margin: 1rem 0; padding: .6rem 1rem; border-left: 4px solid #1a56c4; background: #f2f6fd; border-radius: 0 6px 6px 0; font-weight: 500; }
.article .content code { background: #f1f3f6; padding: 1px 6px; border-radius: 4px; font-size: .92em; }
.article .content pre { background: #101826; color: #e6edf7; padding: 14px; border-radius: 8px; overflow-x: auto; font-size: .9rem; }
.article .content pre code { background: none; padding: 0; color: inherit; }
.article .content hr { border: 0; border-top: 1px solid #e6e6e6; margin: 15px 0; }
figure { margin: 1rem 0; }
figure img { display: block; width: 100%; height: auto; border-radius: 6px; }
figcaption { color: #666; text-align: center; font-size: .95rem; margin-top: 6px; }
.embed-box { position: relative; height: 0; padding-bottom: 56.25%; border-radius: 8px; overflow: hidden; background: #000; }
.embed-box iframe { position: absolute; inset: 0; width: 100%; height: 100%; }
.button-row { text-align: center; margin: 1.2rem 0 !important; }
.post-button, .article .content a.post-button { display: inline-block; background: #1a56c4; color: #fff; padding: 10px 24px; border-radius: 8px; font-weight: 700; box-shadow: 0 3px 0 #123f94; transition: transform .1s, box-shadow .1s; }
.post-button:hover, .article .content a.post-button:hover { transform: translateY(-1px); box-shadow: 0 4px 0 #123f94; text-decoration: none; color: #fff; }
.preview-note { margin-top: 10px; background: #fff4dc; color: #7a5200; padding: 8px 12px; border-radius: 6px; font-size: .9rem; }

/* written by */
.by { border-top: 2px solid #e6e6e6; margin: 30px 0 20px; color: #a2a2a2; position: relative; }
.by::after { content: "Written By"; position: absolute; top: -.75em; left: 50%; transform: translateX(-50%); background: #fff; padding: 0 6px; }
.article .authors { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 20px; }
.article .authors .author { text-align: center; flex: 1; min-width: 140px; max-width: 220px; }
.article .authors .author img { width: 125px; height: 125px; object-fit: cover; border-radius: 50%; padding: 3px; border: 3px solid #e6e6e6; transition: border-color .1s; }
.article .authors .author:hover img { border-color: #1a56c4; }
.article .authors .author .name { font-size: 1.2rem; margin-top: 4px; }

.post-nav { display: flex; justify-content: space-between; gap: 14px; border-top: 2px solid #e6e6e6; padding: 12px 0; }
.post-nav a { flex: 1; max-width: 48%; color: #4a5263; transition: color .1s; }
.post-nav a:hover { color: #1a56c4; }
.post-nav small { display: block; color: #a2a2a2; font-size: .85rem; }
.post-nav .next { text-align: right; margin-left: auto; }

/* ---------- author page ---------- */
.nav.profile { min-height: 325px; display: flex; align-items: center; justify-content: center; padding: 40px 16px; }
.nav .author { text-align: center; }
.nav .author .pic { width: 175px; height: 175px; object-fit: cover; border-radius: 50%; border: 4px solid rgba(255,255,255,.85); }
.nav .author .name { color: #f3f3f3; font-size: 1.8rem; }
.nav .author .posts, .nav .author .bio { color: #e6e6e6; margin-bottom: 3px; }
.nav .author .bio { font-weight: 500; max-width: 520px; margin: 0 auto 6px; }
.nav .author .channel-link { display: inline-block; margin-top: 6px; color: #fff; background: rgba(0,0,0,.3); padding: 4px 12px; border-radius: 14px; font-size: .9rem; }
.nav .author .channel-link:hover { background: rgba(0,0,0,.45); }

/* ---------- 404 ---------- */
.error-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px;
  background-color: #fff;
  background-image: linear-gradient(45deg, #f4f7fc 25%, transparent 25%), linear-gradient(-45deg, #f4f7fc 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #f4f7fc 75%), linear-gradient(-45deg, transparent 75%, #f4f7fc 75%);
  background-size: 120px 120px; background-position: 0 0, 0 60px, 60px -60px, -60px 0;
}
.error-card { text-align: center; color: #232323; }
.error-code { font-size: 5rem; color: #1a56c4; }

@media (max-width: 640px) {
  .nav { padding: 50px 16px; }
  .nav a.back { top: 14px; left: 14px; }
  .nav.article { height: 200px; }
  .blog-preview { padding: 12px 4px; }
  .blog-preview .title { font-size: 1.5rem; white-space: normal; }
  .article .title { font-size: 1.9rem; }
  .article .content { font-size: 1.02rem; }
  .article .authors .author img { width: 96px; height: 96px; }
}
