.blog-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 0%, rgba(154, 51, 255, 0.07), transparent 27rem),
    var(--page-bg);
  color: var(--text);
}

.blog-shell {
  position: relative;
  padding-top: var(--header-offset);
  padding-bottom: 32px;
}

.blog-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 88% 4%, rgba(91, 173, 255, 0.055), transparent 26rem);
}

.blog-hero {
  padding-top: clamp(64px, 8vw, 92px);
  padding-bottom: clamp(44px, 6vw, 68px);
}

.blog-hero-panel {
  max-width: 880px;
  margin-inline: auto;
  text-align: center;
}

.blog-hero-copy,
.blog-hero-aside {
  margin-inline: auto;
}

.blog-eyebrow {
  color: #ff9d7d;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.blog-hero h1 {
  margin-top: 10px;
  color: var(--text-strong);
  font-size: clamp(2.45rem, 6vw, 4rem);
  line-height: 1.06;
  letter-spacing: -0.05em;
  text-wrap: balance;
}

.blog-hero h1 span {
  background: linear-gradient(116deg, var(--accent) 30%, var(--accent-purple) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.blog-hero-text {
  max-width: 650px;
  margin: 24px auto 0;
  color: #d0cbc6;
  font-size: clamp(1rem, 2vw, 1.12rem);
  line-height: 1.85;
  text-wrap: pretty;
}

.blog-hero-aside {
  max-width: 760px;
  margin-top: 34px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.blog-hero-label {
  color: #fff;
  font-size: 0.92rem;
  font-weight: 600;
}

.blog-topic-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  list-style: none;
}

.blog-topic-list li {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: #ece3da;
  font-size: 0.86rem;
  font-weight: 500;
}

.blog-hero-note {
  max-width: 58ch;
  margin: 16px auto 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.65;
}

.blog-index-section {
  padding-top: 0;
}

.blog-filter-shell {
  display: grid;
  gap: 24px;
}

.blog-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 18px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02));
  box-shadow: var(--shadow-sm);
}

.blog-search {
  display: grid;
  gap: 10px;
}

.blog-search span {
  color: #fff;
  font-size: 0.94rem;
  font-weight: 600;
}

.blog-search-input-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  padding: 0 16px;
  background: rgba(17, 16, 15, 0.7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.blog-search-input-wrap:focus-within {
  border-color: rgba(255, 134, 96, 0.46);
  box-shadow: 0 0 0 4px rgba(255, 134, 96, 0.14);
}

.blog-search-input-wrap i {
  color: #ff9d7d;
  font-size: 0.95rem;
}

.blog-search input {
  width: 100%;
  border: 0;
  padding: 16px 0;
  background: transparent;
  color: #fff;
  font: inherit;
}

.blog-search input::placeholder {
  color: #8c837c;
}

.blog-search input:focus {
  outline: none;
}

.blog-results-count {
  align-self: center;
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
}

.blog-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.blog-tag-filter,
.blog-card-tag {
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.05);
  color: #f4ece6;
  font: inherit;
}

.blog-tag-filter {
  cursor: pointer;
  transition: transform 160ms var(--ease-out), border-color 160ms ease,
    background-color 160ms ease, color 160ms ease;
}

.blog-tag-filter.is-active {
  border-color: rgba(255, 134, 96, 0.28);
  background: linear-gradient(
    135deg,
    rgba(255, 134, 96, 0.16),
    rgba(91, 173, 255, 0.14)
  );
  color: #fff;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.blog-card {
  position: relative;
  display: grid;
  gap: 18px;
  min-height: 100%;
  padding: 26px;
  border-radius: 24px;
  overflow: hidden;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 200ms var(--ease-out), border-color 200ms ease,
    box-shadow 200ms ease;
}

.blog-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #ff8660, #9a33ff, #5badff);
  opacity: 0.6;
}

.blog-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: #b4aaa2;
  font-size: 0.92rem;
}

.blog-featured {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 134, 96, 0.12);
  border: 1px solid rgba(255, 134, 96, 0.2);
  color: #fff;
  font-weight: 700;
}

.blog-card h2 {
  color: #fff;
  font-size: 1.6rem;
  line-height: 1.28;
  letter-spacing: -0.03em;
}

.blog-card p {
  color: #d5cbc3;
  line-height: 1.8;
}

.blog-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin-top: auto;
}

.blog-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.blog-card-tag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  color: #efe5de;
}

.blog-card-cta {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: #fff;
  font-weight: 600;
  white-space: nowrap;
}

.blog-card-cta i {
  font-size: 0.92rem;
  transition: transform 180ms var(--ease-out);
}

.blog-empty-state {
  padding: 34px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.blog-empty-state h2 {
  color: #fff;
  margin-bottom: 8px;
}

.blog-empty-state-initial {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(30px, 5vw, 48px);
  text-align: center;
}

.blog-empty-state-initial .blog-eyebrow {
  margin-bottom: 10px;
}

.blog-empty-state-initial h2 {
  font-size: clamp(1.65rem, 4vw, 2.35rem);
  letter-spacing: -0.035em;
}

.blog-empty-state-initial > p:last-child {
  max-width: 56ch;
  margin: 10px auto 0;
  color: #cfc6bf;
  line-height: 1.75;
}

.blog-clear-filters {
  min-height: 44px;
  margin-top: 18px;
  padding: 9px 15px;
  border: 1px solid rgba(255, 134, 96, 0.3);
  border-radius: 999px;
  background: rgba(255, 134, 96, 0.1);
  color: #fff;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 160ms ease, border-color 160ms ease,
    transform 160ms var(--ease-out);
}

.blog-post-shell {
  padding-top: clamp(38px, 5vw, 60px);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 4px;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 26px;
  transition: color 160ms ease, transform 160ms var(--ease-out);
}

.blog-post-content-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018));
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}

.blog-post-content-card {
  max-width: 880px;
  margin: 0 auto;
  padding: clamp(30px, 5vw, 52px);
  border-radius: 24px;
}

.blog-post-content-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #ff8660, #9a33ff, #5badff);
  opacity: 0.72;
}

.blog-post-top {
  display: grid;
  gap: 28px;
  max-width: 880px;
  margin: 0 auto 34px;
}

.blog-post-header {
  margin: 0;
}

.blog-post-heading {
  display: grid;
  justify-items: center;
  gap: 14px;
  max-width: 820px;
  margin-inline: auto;
  text-align: center;
}

.blog-post-heading h1 {
  max-width: 19ch;
  color: var(--text-strong);
  font-size: clamp(2.2rem, 5vw, 3.65rem);
  line-height: 1.06;
  letter-spacing: -0.05em;
  text-wrap: balance;
}

.blog-post-description {
  max-width: 62ch;
  color: #d0cbc6;
  font-size: clamp(1rem, 2vw, 1.08rem);
  line-height: 1.78;
  text-wrap: pretty;
}

.blog-post-aside {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 20px;
  padding: 18px 20px;
  border-block: 1px solid var(--border);
}

.blog-post-author,
.blog-post-stat {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.blog-post-author {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0;
}

.blog-post-author-avatar {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  object-fit: cover;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
}

.blog-post-author-label,
.blog-post-stat-label {
  color: #9f958e;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.blog-post-author-name,
.blog-post-stat-value {
  margin-top: 2px;
  color: #fff;
  font-size: 0.92rem;
  font-weight: 600;
}

.blog-post-stat-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 20px;
}

.blog-post-stat {
  display: grid;
  gap: 1px;
  padding: 0;
}

.blog-post-tags {
  justify-content: center;
  margin: 0;
}

.blog-post-content {
  --article-warm: #ff9d7d;
  --article-cool: #7db7ff;
  --article-muted: #bcaea5;
  --article-line: rgba(255, 255, 255, 0.1);
  max-width: 72ch;
  margin: 0 auto;
  color: #d8d3ce;
  font-family: "Poppins", system-ui, sans-serif;
  font-size: 1.06rem;
  line-height: 1.85;
  text-wrap: pretty;
}

.blog-post-content > * + * {
  margin-top: 1.2em;
}

.blog-post-content > p:first-of-type {
  color: #eee9e4;
  font-size: 1.16rem;
  line-height: 1.85;
}

.blog-post-content p {
  hanging-punctuation: first last;
}

.blog-post-content > h2,
.blog-post-content > h3,
.blog-post-content > h4 {
  color: #fff;
  font-family: "Poppins", sans-serif;
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.03em;
  margin-top: 2.25em;
}

.blog-post-content > h2 {
  position: relative;
  padding-bottom: 0.55em;
  border-bottom: 1px solid var(--article-line);
  font-size: 2rem;
}

.blog-post-content > h2::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 3rem;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--article-warm), var(--article-cool));
}

.blog-post-content > h3 {
  padding-left: 0.72em;
  border-left: 3px solid var(--article-warm);
  font-size: 1.45rem;
}

.blog-post-content > h4 {
  color: #f7e9df;
  font-size: 1.12rem;
  letter-spacing: -0.015em;
}

.blog-post-content strong {
  color: #fff;
  font-weight: 700;
}

.blog-post-content mark {
  padding: 0.05em 0.22em;
  border-radius: 0.25em;
  background: rgba(255, 157, 125, 0.2);
  color: #fff5ee;
}

.blog-post-content p,
.blog-post-content li,
.blog-post-content blockquote,
.blog-post-content pre {
  max-width: 68ch;
}

.blog-post-content ul,
.blog-post-content ol {
  padding-left: 1.45rem;
}

.blog-post-content ul ul,
.blog-post-content ul ol,
.blog-post-content ol ul,
.blog-post-content ol ol {
  margin-top: 0.45em;
}

.blog-post-content li {
  color: #e3d7ce;
  padding-left: 0.15rem;
}

.blog-post-content li + li {
  margin-top: 0.45em;
}

.blog-post-content ul li::marker {
  color: #ff9d7d;
}

.blog-post-content ol li::marker {
  color: #7db7ff;
  font-family: "Poppins", sans-serif;
  font-weight: 700;
}

.blog-post-content > blockquote {
  position: relative;
  padding: 24px 26px 24px 64px;
  border: 1px solid rgba(255, 157, 125, 0.18);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(255, 134, 96, 0.09), transparent 62%),
    rgba(255, 255, 255, 0.025);
  color: #fff4ea;
  font-size: 1.15rem;
  line-height: 1.72;
}

.blog-post-content > blockquote::before {
  content: "“";
  position: absolute;
  top: 15px;
  left: 22px;
  color: var(--article-warm);
  font-family: Georgia, serif;
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
}

.blog-post-content > blockquote p {
  margin: 0;
}

.blog-post-content > blockquote p + p {
  margin-top: 0.8em;
}

.blog-post-content > blockquote cite {
  display: block;
  margin-top: 0.85em;
  color: var(--article-muted);
  font-family: "Poppins", sans-serif;
  font-size: 0.76em;
  font-style: normal;
  font-weight: 600;
}

.blog-post-content code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.9em;
}

.blog-post-content .katex {
  color: #fff5ee;
  font-size: 1.02em;
}

.blog-post-content .katex-display {
  margin: 1.5em 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.2em 0;
}

.blog-post-content pre {
  position: relative;
  overflow-x: auto;
  border-radius: 20px;
  padding: 20px 22px;
  background: rgba(7, 7, 7, 0.48);
  border: 1px solid var(--article-line);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.035),
    0 16px 36px rgba(0, 0, 0, 0.14);
  line-height: 1.75;
  scrollbar-color: rgba(255, 157, 125, 0.55) transparent;
  scrollbar-width: thin;
}

.blog-post-content pre code {
  font-size: 0.9rem;
}

.blog-post-content :not(pre) > code {
  padding: 0.14em 0.42em;
  border: 1px solid rgba(125, 183, 255, 0.14);
  border-radius: 7px;
  background: rgba(125, 183, 255, 0.09);
  color: #dcecff;
}

.blog-post-content a {
  color: #ffb694;
  text-decoration-color: rgba(255, 182, 148, 0.48);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.16em;
  transition: color 150ms ease, text-decoration-color 150ms ease;
}

.blog-post-content a:hover {
  color: #ffd0b8;
  text-decoration-color: currentColor;
}

.blog-post-content a:focus-visible {
  border-radius: 3px;
  outline: 2px solid var(--article-cool);
  outline-offset: 3px;
}

.blog-post-content a[href^="https://gakvetili.ge"] {
  color: var(--gakvetili-accent);
  font-weight: 600;
  text-decoration: none;
}

.blog-post-content a[href^="https://gakvetili.ge"]:hover {
  color: var(--gakvetili-accent-bright);
  text-shadow: 0 0 14px rgba(244, 163, 203, 0.3);
}

.blog-post-content img {
  display: block;
  width: 100%;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.2);
}

.blog-post-content > figure {
  margin-right: 0;
  margin-left: 0;
}

.blog-post-content > figure > figcaption {
  margin-top: 0.75rem;
  color: var(--article-muted);
  font-family: "Poppins", sans-serif;
  font-size: 0.78rem;
  line-height: 1.55;
  text-align: center;
}

.blog-post-content > table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-spacing: 0;
  border: 1px solid var(--article-line);
  border-radius: 16px;
  font-size: 0.92em;
  line-height: 1.55;
  scrollbar-color: rgba(255, 157, 125, 0.55) transparent;
  scrollbar-width: thin;
}

.blog-post-content > table th,
.blog-post-content > table td {
  min-width: 8rem;
  padding: 0.75rem 0.9rem;
  border-right: 1px solid var(--article-line);
  border-bottom: 1px solid var(--article-line);
  text-align: left;
}

.blog-post-content > table th {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-family: "Poppins", sans-serif;
  font-size: 0.8em;
  letter-spacing: 0.02em;
}

.blog-post-content > table tr:last-child td {
  border-bottom: 0;
}

.blog-post-content > table th:last-child,
.blog-post-content > table td:last-child {
  border-right: 0;
}

.blog-post-content > details {
  padding: 1rem 1.1rem;
  border: 1px solid var(--article-line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.025);
}

.blog-post-content > details > summary {
  color: #fff;
  font-family: "Poppins", sans-serif;
  font-size: 0.9em;
  font-weight: 650;
  cursor: pointer;
}

.blog-post-content > details[open] > summary {
  margin-bottom: 0.8rem;
}

.blog-post-content hr {
  width: min(8rem, 35%);
  margin: 2.7em auto;
  border: 0;
  border-top: 2px solid transparent;
  border-image: linear-gradient(90deg, transparent, var(--article-warm), var(--article-cool), transparent) 1;
}

.blog-tag-filter:active,
.blog-clear-filters:active,
.blog-card:active,
.back-link:active {
  transform: scale(0.97);
}

.blog-footer {
  position: relative;
  z-index: 1;
}

@media (hover: hover) and (pointer: fine) {
  .blog-tag-filter:hover,
  .blog-clear-filters:hover {
    border-color: rgba(255, 134, 96, 0.34);
    background: linear-gradient(
      135deg,
      rgba(255, 134, 96, 0.16),
      rgba(91, 173, 255, 0.14)
    );
    color: #fff;
    transform: translateY(-1px);
  }

  .blog-card:hover {
    border-color: rgba(255, 134, 96, 0.2);
    box-shadow: 0 32px 58px rgba(0, 0, 0, 0.3);
    transform: translateY(-4px);
  }

  .blog-card:hover .blog-card-cta i {
    transform: translateX(3px);
  }

  .back-link:hover {
    color: #ffb694;
  }
}

@media (max-width: 930px) {
  .blog-shell {
    padding-top: var(--header-offset);
    padding-bottom: 52px;
  }

  .blog-hero-panel {
    padding: 0;
  }

  .blog-toolbar {
    grid-template-columns: 1fr;
  }

  .blog-results-count {
    white-space: normal;
    justify-self: start;
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }

  .blog-card-footer {
    flex-direction: column;
    align-items: start;
  }

  .blog-post-top {
    gap: 24px;
    margin-bottom: 30px;
  }

  .blog-post-heading h1 {
    max-width: 19ch;
    font-size: clamp(2rem, 7vw, 3.2rem);
  }

  .blog-post-aside {
    padding: 16px;
  }

  .blog-post-content-card {
    padding: 30px 24px 36px;
    border-radius: 24px;
  }

  .blog-post-content {
    font-size: 1.04rem;
    line-height: 1.85;
  }

  .blog-post-content > p:first-of-type {
    font-size: 1.14rem;
  }
}

@media (max-width: 540px) {
  .blog-shell {
    padding-bottom: 40px;
  }

  .blog-toolbar,
  .blog-card,
  .blog-empty-state {
    border-radius: 20px;
  }

  .blog-card {
    padding: 22px;
  }

  .blog-toolbar {
    padding: 18px;
  }

  .blog-card-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .blog-post-shell {
    padding-top: 26px;
  }

  .back-link {
    margin-bottom: 20px;
  }

  .blog-post-top {
    gap: 22px;
  }

  .blog-post-aside {
    align-items: flex-start;
    justify-content: flex-start;
    padding-inline: 0;
  }

  .blog-post-stat-grid,
  .blog-post-tags {
    justify-content: flex-start;
  }

  .blog-post-tags {
    width: 100%;
  }

  .blog-post-content-card {
    padding: 24px 16px 30px;
    border-radius: 20px;
  }

  .blog-post-content {
    overflow-wrap: anywhere;
    font-size: 1.02rem;
    line-height: 1.78;
  }

  .blog-post-content > p:first-of-type {
    font-size: 1.14rem;
    line-height: 1.7;
  }

  .blog-post-content > h2,
  .blog-post-content > h3,
  .blog-post-content > h4 {
    margin-top: 1.9em;
  }

  .blog-post-content > h2 {
    padding-bottom: 0.48em;
    font-size: 1.55rem;
  }

  .blog-post-content > h3 {
    font-size: 1.28rem;
  }

  .blog-post-content > blockquote {
    padding: 48px 16px 18px;
    border-radius: 16px;
    font-size: 1.02rem;
    line-height: 1.65;
  }

  .blog-post-content > blockquote::before {
    top: 12px;
    left: 16px;
    font-size: 2.6rem;
  }

  .blog-post-content pre {
    padding: 16px 14px;
    border-radius: 16px;
  }

  .blog-post-content pre code {
    font-size: 0.8rem;
  }

  .blog-post-content > table th,
  .blog-post-content > table td {
    padding: 0.65rem 0.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .blog-card,
  .blog-card-cta i,
  .blog-tag-filter,
  .blog-clear-filters,
  .back-link,
  .navbar a {
    transform: none;
    transition: color 120ms ease, opacity 120ms ease, border-color 120ms ease,
      background-color 120ms ease;
  }
}
