/* ТАЧ! — блог в духе публичных тем Ghost (Casper): светлая сетка, карточки, читабельная колонка */
:root {
  --gh-bg: #f4f8f6;
  --gh-surface: #ffffff;
  --gh-ink: #0f1419;
  --gh-muted: #738a94;
  --gh-border: #e3e9e6;
  --gh-accent: #127a5c;
  --gh-accent-soft: rgba(18, 122, 92, 0.12);
  --gh-card-radius: 12px;
  --gh-content: 720px;
  --gh-wide: 1120px;
  --gh-sans: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --gh-serif: Georgia, "Times New Roman", Times, serif;
}

.blog-body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--gh-sans);
  font-weight: 400;
  color: var(--gh-ink);
  background: var(--gh-bg);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

.blog-body main {
  flex: 1 0 auto;
}

.blog-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--gh-border);
}

.blog-nav__inner {
  max-width: var(--gh-wide);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.blog-brand {
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--gh-ink);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.blog-brand:hover {
  color: var(--gh-accent);
}

.blog-brand .brand-mark {
  color: var(--gh-accent);
}

.blog-nav__links {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  align-items: center;
}

.blog-nav__links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gh-muted);
  text-decoration: none;
}

.blog-nav__links a:hover {
  color: var(--gh-ink);
}

/* ——— Index hero ——— */
.blog-hero {
  max-width: var(--gh-wide);
  margin: 0 auto;
  padding: 3.5rem 1.5rem 2.5rem;
  text-align: center;
}

.blog-hero__kicker {
  margin: 0 0 0.75rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gh-accent);
}

.blog-hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.blog-hero__lead {
  margin: 0 auto;
  max-width: 520px;
  font-size: 1.125rem;
  color: var(--gh-muted);
  line-height: 1.65;
}

/* ——— Post grid (как в Ghost) ——— */
.blog-feed {
  max-width: var(--gh-wide);
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

.blog-feed__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 960px) {
  .blog-feed__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.post-card {
  display: flex;
  flex-direction: column;
  background: var(--gh-surface);
  border-radius: var(--gh-card-radius);
  overflow: hidden;
  border: 1px solid var(--gh-border);
  box-shadow: 0 1px 3px rgba(15, 20, 25, 0.06);
  transition:
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.post-card:hover {
  box-shadow: 0 12px 40px rgba(15, 20, 25, 0.08);
  transform: translateY(-2px);
}

.post-card__image-wrap {
  display: block;
  aspect-ratio: 16 / 9;
  background: linear-gradient(145deg, #dfece7 0%, #c5ddd2 45%, #a8cfc0 100%);
  position: relative;
}

.post-card__image-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 70% 40%, rgba(255, 255, 255, 0.35), transparent);
}

.post-card__image-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.post-card__image-wrap--photo::after {
  display: none;
}

.post-card__image-wrap--photo {
  background: #f5e6ec;
}

.post-card__body {
  padding: 1.35rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.post-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.post-card__tag {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gh-accent);
  background: var(--gh-accent-soft);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

.post-card__title {
  margin: 0 0 0.6rem;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.post-card__title a {
  color: inherit;
  text-decoration: none;
}

.post-card__title a:hover {
  color: var(--gh-accent);
}

.post-card__excerpt {
  margin: 0;
  flex: 1;
  font-size: 0.9375rem;
  color: var(--gh-muted);
  line-height: 1.6;
}

.post-card__meta {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--gh-border);
  font-size: 0.8125rem;
  color: var(--gh-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
}

.post-card__meta time {
  font-weight: 600;
  color: var(--gh-ink);
}

/* ——— Широкая карточка (на всю сетку): 3 → wide → 3 ——— */
.post-card--wide {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr;
  overflow: hidden;
}

@media (min-width: 768px) {
  .post-card--wide {
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  }
}

.post-card--wide .post-card__image-wrap {
  aspect-ratio: 16 / 9;
  min-height: 200px;
}

@media (min-width: 768px) {
  .post-card--wide .post-card__image-wrap {
    aspect-ratio: auto;
    min-height: 280px;
    align-self: stretch;
  }
}

.post-card--wide .post-card__image-wrap--featured {
  background: linear-gradient(135deg, #c5e8dc 0%, #6fb399 42%, #2d7a62 100%);
}

.post-card--wide .post-card__image-wrap--featured::after {
  background: radial-gradient(ellipse 65% 55% at 25% 35%, rgba(255, 255, 255, 0.42), transparent);
}

.post-card--wide .post-card__image-wrap--featured.post-card__image-wrap--photo {
  background: #f5e6ec;
}

.post-card--wide .post-card__image-wrap--featured.post-card__image-wrap--photo::after {
  display: none;
}

.post-card--wide .post-card__body {
  padding: 1.75rem 1.75rem 2rem;
  justify-content: center;
}

.post-card--wide .post-card__title {
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  line-height: 1.2;
}

.post-card--wide .post-card__excerpt {
  font-size: 1rem;
  max-width: 42rem;
}

.post-card--wide:hover {
  transform: translateY(-1px);
}

/* ——— Article (post) ——— */
.blog-article-wrap {
  max-width: var(--gh-content);
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.blog-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gh-muted);
  text-decoration: none;
  margin-bottom: 2rem;
}

.blog-back:hover {
  color: var(--gh-accent);
}

.blog-article-header {
  margin-bottom: 2rem;
}

.blog-article__kicker {
  margin: 0 0 0.75rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gh-accent);
}

.blog-article-header h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.85rem, 4.2vw, 2.85rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.12;
}

.blog-article__meta {
  font-size: 0.9375rem;
  color: var(--gh-muted);
}

.blog-article__meta time {
  font-weight: 600;
  color: var(--gh-ink);
}

.blog-byline {
  display: flex;
  justify-content: center;
  margin: 0 0 2rem;
  text-align: center;
}

.blog-byline--footer {
  margin: 0;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--gh-border);
}

.blog-byline__figure {
  margin: 0;
}

.blog-byline__photo {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 auto 0.75rem;
  border: 3px solid #fff;
  box-shadow:
    0 0 0 1px var(--gh-border),
    0 8px 24px rgba(15, 20, 25, 0.1);
}

.blog-byline__caption {
  font-family: var(--gh-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--gh-muted);
  line-height: 1.45;
  max-width: 22rem;
  margin: 0 auto;
}

.blog-featured {
  aspect-ratio: 2 / 1;
  max-height: 380px;
  width: 100%;
  border-radius: var(--gh-card-radius);
  margin: 0 0 2.5rem;
  background: linear-gradient(135deg, #d4ebe2 0%, #9bcbb8 50%, #6fb399 100%);
  border: 1px solid var(--gh-border);
  position: relative;
  overflow: hidden;
}

.blog-featured::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 55% at 30% 30%, rgba(255, 255, 255, 0.45), transparent);
}

.blog-featured--accent {
  background: linear-gradient(135deg, #c5e8dc 0%, #6fb399 42%, #2d7a62 100%);
}

.blog-featured--accent::after {
  background: radial-gradient(ellipse 65% 55% at 25% 35%, rgba(255, 255, 255, 0.42), transparent);
}

.blog-featured--photo {
  padding: 0;
  background: #f5e6ec;
  aspect-ratio: 3 / 2;
  max-height: min(440px, 78vw);
}

.blog-featured--photo::after {
  display: none;
}

.blog-featured--photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.blog-prose {
  font-family: var(--gh-serif);
  font-size: 1.1875rem;
  line-height: 1.75;
  color: #222c31;
}

.blog-prose > *:first-child {
  margin-top: 0;
}

.blog-prose p {
  margin: 0 0 1.35em;
}

.blog-prose h2 {
  font-family: var(--gh-sans);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 2.25rem 0 0.85rem;
  line-height: 1.25;
  color: var(--gh-ink);
}

.blog-prose ul,
.blog-prose ol {
  margin: 0 0 1.35em;
  padding-left: 1.35em;
}

.blog-prose li {
  margin-bottom: 0.45em;
}

.blog-prose a {
  color: var(--gh-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.blog-prose a:hover {
  text-decoration-thickness: 2px;
}

.blog-prose strong {
  font-weight: 700;
  color: var(--gh-ink);
}

.blog-prose table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--gh-sans);
  font-size: 0.9375rem;
  margin: 0 0 1.5em;
}

.blog-prose caption {
  caption-side: top;
  text-align: left;
  font-family: var(--gh-sans);
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.65rem;
  color: var(--gh-ink);
}

.blog-prose th,
.blog-prose td {
  border: 1px solid var(--gh-border);
  padding: 0.65rem 0.85rem;
  text-align: left;
  vertical-align: top;
}

.blog-prose th {
  background: rgba(255, 255, 255, 0.85);
  font-weight: 600;
}

.blog-prose .blog-callout {
  font-family: var(--gh-sans);
  font-size: 1rem;
  background: var(--gh-accent-soft);
  border: 1px solid var(--gh-border);
  border-radius: var(--gh-card-radius);
  padding: 1rem 1.15rem;
  margin: 0 0 1.35em;
}

/* ——— Footer блога ——— */
.blog-footer {
  margin-top: auto;
  border-top: 1px solid var(--gh-border);
  background: var(--gh-surface);
  padding: 2rem 1.5rem;
}

.blog-footer__inner {
  max-width: var(--gh-wide);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  color: var(--gh-muted);
}

.blog-footer__inner a {
  color: var(--gh-muted);
  text-decoration: none;
  font-weight: 500;
}

.blog-footer__inner a:hover {
  color: var(--gh-accent);
}

.blog-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}
