/* Стили блога. Токены совпадают с главной страницей (index.html). */
:root {
  --hero-bg: oklch(14% 0.030 245);
  --bg: oklch(97% 0.004 240);
  --surface: oklch(100% 0 0);
  --fg: oklch(16% 0.020 245);
  --muted: oklch(50% 0.015 240);
  --border: oklch(90% 0.006 240);
  --accent: oklch(71% 0.190 78);
  --accent-dk: oklch(60% 0.180 78);
  --accent-lt: oklch(80% 0.150 78);
  --accent-bg: oklch(95% 0.050 80);
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: ui-monospace, 'JetBrains Mono', Menlo, monospace;
  --r: 10px;
  --r-lg: 16px;
  --shadow-card: 0 2px 12px oklch(14% 0.03 245 / 0.08);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { overflow-x: hidden; }
body { font-family: var(--font-sans); background: var(--bg); color: var(--fg); font-size: 17px; line-height: 1.7; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
.wrap { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* header / footer */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--hero-bg); border-bottom: 1px solid oklch(100% 0 0 / 0.08); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; }
.brand img { border-radius: 8px; }
.brand b { display: block; font-size: 0.95rem; letter-spacing: 0.02em; line-height: 1.2; }
.brand small { display: block; font-size: 0.72rem; color: oklch(100% 0 0 / 0.55); }
.site-header nav { display: flex; align-items: center; gap: 22px; }
.site-header nav a { color: oklch(100% 0 0 / 0.75); text-decoration: none; font-size: 0.92rem; font-weight: 500; }
.site-header nav a:hover, .site-header nav a.active { color: var(--accent); }
.site-header nav a.nav-cta { background: var(--accent); color: var(--hero-bg); padding: 8px 16px; border-radius: 8px; font-weight: 700; }
.site-header nav a.nav-cta:hover { background: var(--accent-lt); color: var(--hero-bg); }
.site-footer { background: var(--hero-bg); color: oklch(100% 0 0 / 0.6); font-size: 0.85rem; line-height: 1.6; margin-top: 72px; padding: 36px 0; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: flex-start; }
.footer-inner b { color: oklch(100% 0 0 / 0.85); }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a, .site-footer a { color: oklch(100% 0 0 / 0.5); text-decoration: none; }
.footer-links a:hover, .site-footer a:hover { color: var(--accent); }

/* общие */
main { padding-top: 28px; }
.crumbs { font-size: 0.82rem; color: var(--muted); margin-bottom: 18px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--accent-dk); }
.tag { display: inline-block; font-family: var(--font-mono); font-size: 0.7rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-dk); }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 720px; }

/* список */
.blog-head { padding: 24px 0 32px; }
.blog-head h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; margin-bottom: 10px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 22px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; text-decoration: none; display: flex; flex-direction: column; box-shadow: var(--shadow-card); transition: transform .15s, box-shadow .15s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 28px oklch(14% 0.03 245 / 0.14); }
.card img { width: 100%; height: 180px; object-fit: cover; background: var(--border); }
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card h3 { font-size: 1.12rem; line-height: 1.3; }
.card p { font-size: 0.92rem; color: var(--muted); line-height: 1.55; flex: 1; }
.card small { color: var(--muted); font-size: 0.78rem; }

/* статья */
.post { max-width: 760px; margin: 0 auto; }
.post > header { margin-bottom: 28px; }
.post h1 { font-size: clamp(1.9rem, 4.6vw, 2.8rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; margin: 8px 0 14px; }
.post .meta { color: var(--muted); font-size: 0.88rem; }
.post-body > * + * { margin-top: 1.1em; }
.post-body h2 { font-size: 1.6rem; line-height: 1.25; letter-spacing: -0.01em; margin-top: 2em; }
.post-body h3 { font-size: 1.2rem; line-height: 1.3; margin-top: 1.6em; }
.post-body a { color: var(--accent-dk); text-decoration: underline; text-underline-offset: 3px; }
.post-body ul, .post-body ol { padding-left: 1.4em; }
.post-body li + li { margin-top: 0.4em; }
.post-body code { font-family: var(--font-mono); font-size: 0.88em; background: var(--accent-bg); padding: 1px 6px; border-radius: 5px; }
.post-body hr { border: 0; border-top: 1px solid var(--border); margin: 2em 0; }
.post-body figure { margin-top: 1.6em; }
.post-body figure img { border-radius: var(--r); width: 100%; max-height: 520px; object-fit: cover; }
.post-body figcaption { font-size: 0.82rem; color: var(--muted); margin-top: 8px; }
.callout { background: var(--accent-bg); border-left: 4px solid var(--accent); border-radius: 0 var(--r) var(--r) 0; padding: 14px 18px; }
.callout p + p { margin-top: 0.6em; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 0.93rem; background: var(--surface); }
th, td { border: 1px solid var(--border); padding: 9px 12px; text-align: left; vertical-align: top; }
th { background: var(--accent-bg); }

.cta-box { background: var(--hero-bg); color: #fff; border-radius: var(--r-lg); padding: 30px 28px; margin-top: 48px; }
.cta-box h2 { font-size: 1.4rem; line-height: 1.25; margin-bottom: 10px; }
.cta-box p { color: oklch(100% 0 0 / 0.75); font-size: 0.97rem; }
.cta-box p + p { margin-top: 18px; }
.btn { display: inline-block; background: var(--accent); color: var(--hero-bg); font-weight: 700; padding: 12px 22px; border-radius: 10px; text-decoration: none; margin: 0 8px 8px 0; }
.btn:hover { background: var(--accent-lt); }
.btn-ghost { background: transparent; color: #fff; border: 1.5px solid oklch(100% 0 0 / 0.3); }
.btn-ghost:hover { background: transparent; border-color: var(--accent); color: var(--accent); }
.more { margin-top: 56px; }
.more h2 { font-size: 1.4rem; margin-bottom: 18px; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .site-header nav a:not(.nav-cta):not(.active) { display: none; }
  .brand small { display: none; }
  .cta-box { padding: 24px 20px; }
}
