/* 0nda.net blog (web/blog.html). Builds on home.css (tokens, header, footer, buttons). */

.blog-main { position: relative; z-index: 1; min-height: 70vh; padding: calc(var(--header-h) + clamp(28px, 6vw, 64px)) var(--pad) clamp(56px, 9vw, 110px); }
#blogApp { max-width: var(--maxw); margin: 0 auto; }
.blog-loading { display: grid; place-items: center; min-height: 50vh; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(0,229,255,.2); border-top-color: var(--cyan); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.blog-head { text-align: center; max-width: 760px; margin: 0 auto clamp(30px, 5vw, 54px); }
.blog-head h1 { font-size: clamp(34px, 6vw, 60px); }

/* ---------------------------------------------------------------- list */
.post-grid { display: grid; gap: clamp(14px, 2vw, 22px); grid-template-columns: 1fr; }
@media (min-width: 640px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .post-grid { grid-template-columns: repeat(3, 1fr); } }
.post-card { display: flex; flex-direction: column; text-decoration: none; border-radius: 20px; overflow: hidden; background: rgba(16, 26, 38, .55);
  border: 1px solid var(--line); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  transition: transform .6s var(--ease-fluid), border-color .6s var(--ease-fluid); }
.post-card:hover { transform: translate3d(0, -6px, 0); border-color: color-mix(in srgb, var(--accent, var(--cyan)) 45%, transparent); }
.post-cover { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: linear-gradient(135deg, #0D1B2A, #132030); }
.post-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease-fluid); }
.post-card:hover .post-cover img { transform: scale(1.05); }
.post-card-body { padding: 16px 18px 22px; }
.post-card h2 { margin-top: 10px; font-size: 18px; line-height: 1.32; color: #fff; letter-spacing: -.01em; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font: 600 11px/1.4 'JetBrains Mono', monospace; letter-spacing: .06em; color: var(--dim); text-transform: uppercase; }
.tag { padding: 3px 8px; border-radius: 999px; color: var(--cyan); background: rgba(0,229,255,.08); border: 1px solid rgba(0,229,255,.2); }

/* No image: a wave background, seeded per post (blog.js sets --x/--y/--r/--accent). */
.cover-fallback {
  background:
    radial-gradient(circle at var(--x) var(--y), color-mix(in srgb, var(--accent) 55%, transparent) 0, transparent 34%),
    radial-gradient(circle at calc(100% - var(--x)) 80%, rgba(0, 229, 255, .35) 0, transparent 40%),
    linear-gradient(var(--r), #050B14 0%, #0D1B2A 55%, #0D47A1 140%);
}
.cover-fallback::before, .cover-fallback::after { content: ''; position: absolute; left: -10%; right: -10%; height: 46%; border-radius: 50% 50% 0 0;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 35%, transparent), transparent); opacity: .5; }
.cover-fallback::before { bottom: -12%; transform: rotate(-3deg); }
.cover-fallback::after { bottom: -22%; transform: rotate(2deg); opacity: .35; background: linear-gradient(180deg, rgba(0,229,255,.35), transparent); }

/* ---------------------------------------------------------------- pager (Google-style) */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: clamp(30px, 5vw, 50px); flex-wrap: wrap; }
.pager-step { display: inline-flex; align-items: center; gap: 4px; min-width: 110px; height: 44px; padding: 0 14px; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: 14px;
  color: var(--cyan); border: 1px solid rgba(0,229,255,.35); justify-content: center; transition: background-color .3s; }
.pager-step:hover { background: rgba(0,229,255,.1); }
.pager-step.disabled { visibility: hidden; }
.pager-nums { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.pager-nums a, .pager-nums span { min-width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; text-decoration: none; font-weight: 600; font-size: 14px; }
.pager-nums a { color: var(--muted); border: 1px solid var(--line); transition: border-color .3s, color .3s; }
.pager-nums a:hover { color: #fff; border-color: var(--line-2); }
.pager-nums .current { color: #00131a; background: var(--cyan); }
.pager-nums .gap { color: var(--dim); }
@media (max-width: 520px) { .pager { justify-content: center; } .pager-nums { order: -1; width: 100%; } .pager-step { min-width: 0; } }

/* ---------------------------------------------------------------- article */
.post-article { max-width: 760px; margin: 0 auto; }
.back-link { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 18px; color: var(--cyan); text-decoration: none; font-weight: 600; font-size: 14px; }
.back-link .ms { font-size: 20px; }
.article-cover { position: relative; min-height: 120px; max-width: min(100%, 620px); margin-inline: auto; border-radius: 22px; overflow: hidden; border: 1px solid var(--line); background: linear-gradient(135deg, #0D1B2A, #132030); }
.article-cover img { display: block; width: 100%; height: auto; }
.article-head { margin: clamp(22px, 4vw, 34px) 0 clamp(18px, 3vw, 26px); }
.article-head h1 { margin-top: 12px; font-size: clamp(30px, 5vw, 48px); font-weight: 800; line-height: 1.12; color: #fff; }
.lang-note { display: flex; gap: 8px; align-items: flex-start; margin-top: 16px; padding: 10px 14px; border-radius: 12px; font-size: 14px; color: var(--muted);
  background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.lang-note .ms { font-size: 18px; color: var(--cyan); margin-top: 1px; }
.article-body { font-size: clamp(16px, 1.9vw, 18px); line-height: 1.75; color: rgba(255,255,255,.86); }
.article-body > * + * { margin-top: 1.05em; }
.article-body h2, .article-body h3 { color: #fff; margin-top: 1.7em; font-size: clamp(20px, 2.6vw, 25px); line-height: 1.25; }
.article-body a { color: var(--cyan); text-underline-offset: 3px; }
.article-body ul, .article-body ol { padding-left: 1.3em; }
.article-body li + li { margin-top: .45em; }
.article-body strong { color: #fff; }
.article-body img, .article-body iframe { max-width: 100%; border-radius: 14px; }
.article-body blockquote { margin-left: 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--cyan); color: var(--muted); }
.article-body code { font-family: 'JetBrains Mono', monospace; font-size: .92em; padding: 2px 7px; border-radius: 7px; background: rgba(0,229,255,.1); color: #7CF4FF; }
.article-body .gift-code { text-align: center; margin: 1.4em 0; }
.article-body .gift-code code { display: inline-block; font-size: clamp(24px, 5vw, 34px); font-weight: 700; letter-spacing: .14em; padding: 14px 26px; border-radius: 16px;
  color: #fff; background: linear-gradient(135deg, rgba(0,229,255,.18), rgba(156,39,176,.18)); border: 1px dashed rgba(0,229,255,.6); user-select: all; }
.article-foot { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; margin-top: clamp(34px, 6vw, 56px); padding-top: 24px; border-top: 1px solid var(--line); }
.post-missing { text-align: center; display: grid; gap: 22px; justify-items: center; padding: 10vh 0; }
