/* Blog-only styles. Layout, type and colour tokens come from the main site's site.css, loaded first. */

/* index: a grid of post cards */
.post-grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.post-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--card); color: inherit; text-decoration: none; transition: border-color .3s, transform .3s, box-shadow .3s; }
.post-card:hover { border-color: rgba(20,197,249,.42); transform: translateY(-4px); box-shadow: 0 24px 60px rgba(0,0,0,.45); }
.post-card-img { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #0a1220; }
.post-card-img img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.22,1,.36,1); }
.post-card:hover .post-card-img img { transform: scale(1.04); }
.post-card-body { display: flex; flex-direction: column; gap: 10px; padding: 22px 24px 26px; }
.post-card-meta { font-family: 'Space Grotesk', sans-serif; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--b6); }
.post-card h2 { margin: 0; max-width: none; font-family: 'Space Grotesk', sans-serif; font-size: 20px; font-weight: 700; line-height: 1.25; letter-spacing: -.01em; text-transform: none; }
.post-card-desc { color: var(--muted); font-size: 14.5px; line-height: 1.65; }
.post-empty { padding: 30px 0; text-align: center; color: var(--muted); }
.post-empty a { color: var(--b6); }

/* a post: title block, optional cover, then the article column */
.post .hero { padding-bottom: 34px; }
.hero h1.post-title { max-width: 26ch; font-size: clamp(28px, 4.4vw, 48px); line-height: 1.12; text-transform: none; }
.post-meta { font-family: 'Space Grotesk', sans-serif; font-size: 13px; letter-spacing: .04em; color: var(--muted); animation: fadeUp .9s .2s cubic-bezier(.22,1,.36,1) both; }
.post-cover { max-width: 960px; margin: 0 auto 18px; padding: 0 24px; }
.post-cover img { display: block; width: 100%; height: auto; border-radius: 18px; border: 1px solid var(--line); }
.post-body { max-width: 760px; padding-bottom: 70px; font-size: 17px; line-height: 1.8; color: #dbe5f8; }
.post-body > * + * { margin-top: 1.15em; }
.post-body h2 { margin-top: 2.1em; font-family: 'Space Grotesk', sans-serif; font-size: clamp(22px, 3vw, 28px); line-height: 1.25; letter-spacing: -.01em; color: #fff; }
.post-body h3 { margin-top: 1.8em; font-family: 'Space Grotesk', sans-serif; font-size: 20px; color: #fff; }
.post-body a { color: var(--b6); text-decoration: underline; text-underline-offset: 3px; }
.post-body a:hover { color: #fff; }
.post-body ul, .post-body ol { padding-left: 1.4em; }
.post-body li + li { margin-top: .4em; }
.post-body blockquote { border-left: 3px solid var(--b6); padding: 4px 0 4px 20px; color: var(--muted); font-style: italic; }
.post-body img { max-width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line); }
.post-body code { padding: 2px 6px; border-radius: 6px; background: rgba(255,255,255,.08); font-family: ui-monospace, Consolas, monospace; font-size: .9em; }
.post-body pre { overflow-x: auto; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: #070b16; }
.post-body pre code { padding: 0; background: none; }
.post-body hr { margin: 2.4em 0; border: 0; border-top: 1px solid var(--line); }
.post-body table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; font-size: 15px; }
.post-body th, .post-body td { padding: 8px 12px; border: 1px solid var(--line); text-align: left; }
.post-body th { background: rgba(255,255,255,.05); }

@media (hover: none) { .post-card:hover { transform: none; box-shadow: none; } .post-card:hover .post-card-img img { transform: none; } }
@media (prefers-reduced-motion: reduce) { .post-meta { animation: none; } .post-card, .post-card-img img { transition: none; } }
