:root {
  --asr-bg: #151729;
  --asr-surface: rgba(43, 49, 82, 0.94);
  --asr-surface-strong: #31365a;
  --asr-text: #f5f7ff;
  --asr-heading: #f8faff;
  --asr-muted: #aab3d8;
  --asr-line: rgba(166, 176, 224, 0.16);
  --asr-primary: #a855f7;
  --asr-accent: #38bdf8;
  --asr-shadow: 0 28px 90px rgba(4, 7, 20, 0.5);
  --asr-radius: 28px;
}

body.asr-blog-body,
body.single-post.asr-blog-body {
  margin: 0;
  background:
    radial-gradient(circle at top center, rgba(168, 85, 247, 0.2), transparent 22rem),
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.16), transparent 24rem),
    linear-gradient(180deg, #131526 0%, var(--asr-bg) 100%);
  color: var(--asr-text);
  font-family: "Segoe UI", "Trebuchet MS", sans-serif;
}

.asr-blog-page * { box-sizing: border-box; }
.asr-blog-page a { color: inherit; text-decoration: none; }
.asr-container { width: min(1160px, calc(100% - 2rem)); margin: 0 auto; }

/* ── Header ── */
.asr-site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  background: rgba(16, 18, 34, 0.72);
  border-bottom: 1px solid rgba(166, 176, 224, 0.12);
}

.asr-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem 0;
}

.asr-brand { display: inline-flex; align-items: center; }
.asr-brand-logo { display: block; width: auto; height: 2.7rem; max-width: min(18rem, 42vw); }
.asr-brand-text { color: #f8faff; font-size: 1.3rem; font-weight: 800; letter-spacing: -0.03em; }

.asr-site-nav, .asr-nav-actions, .asr-hero-actions, .asr-blog-hero-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.asr-site-nav a { color: var(--asr-muted); font-size: 0.95rem; }
.asr-site-nav a:hover { color: var(--asr-text); }

/* ── Buttons ── */
.asr-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.85rem 1.3rem;
  border-radius: 16px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: opacity 0.18s;
}
.asr-button:hover { opacity: 0.88; }

.asr-button-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--asr-primary), var(--asr-accent));
  box-shadow: 0 18px 36px rgba(114, 82, 211, 0.34);
}

.asr-button-ghost {
  background: rgba(39, 43, 70, 0.72);
  border-color: var(--asr-line);
  color: var(--asr-text);
}

/* ── Kicker ── */
.asr-kicker {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.5rem 0.9rem;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--asr-primary);
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.18);
}

/* ── Cards (shared surface) ── */
.asr-hero-card,
.asr-post-card,
.asr-post-hero-card,
.asr-empty-card,
.asr-pagination,
.asr-category-card,
.asr-sidebar-cta-card {
  background: var(--asr-surface);
  border: 1px solid rgba(173, 184, 236, 0.22);
  box-shadow: var(--asr-shadow);
  border-radius: var(--asr-radius);
  backdrop-filter: blur(18px);
}

/* ── Blog hero ── */
.asr-blog-hero { padding: 3.5rem 0 2rem; }

.asr-hero-card,
.asr-empty-card,
.asr-post-hero-card { padding: 2.5rem; }

.asr-blog-title {
  margin: 0.85rem 0 0;
  color: var(--asr-heading);
  font-size: clamp(1.6rem, 2.8vw, 2.4rem);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.asr-blog-intro {
  margin: 0.85rem 0 0;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--asr-muted);
  max-width: 640px;
}

.asr-blog-hero-actions { margin-top: 1.5rem; }

/* ── Blog layout ── */
.asr-blog-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 1.5rem;
  align-items: start;
  padding-bottom: 4.5rem;
}

/* ── Post grid ── */
.asr-post-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.asr-post-card { overflow: hidden; display: grid; }

.asr-post-thumb {
  display: block;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(56, 189, 248, 0.18));
}
.asr-post-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.asr-post-content-wrap { padding: 1.4rem; }

.asr-post-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--asr-muted);
  margin-bottom: 0.5rem;
}
.asr-post-meta a { color: #8ee2ff; }
.asr-meta-sep { opacity: 0.5; }

.asr-post-title-link { display: inline-block; }
.asr-post-title-link h2 {
  margin: 0.2rem 0 0;
  color: var(--asr-heading);
  font-size: 1.2rem;
  letter-spacing: -0.03em;
  line-height: 1.2;
}
.asr-post-title-link:hover h2 { color: #c4b5fd; }

.asr-post-excerpt {
  margin-top: 0.75rem;
  color: var(--asr-muted);
  font-size: 0.9rem;
  line-height: 1.65;
}

.asr-read-more {
  display: inline-flex;
  align-items: center;
  margin-top: 1rem;
  color: #8ee2ff;
  font-weight: 700;
  font-size: 0.88rem;
}
.asr-read-more:hover { color: #fff; }

/* ── Empty state ── */
.asr-empty-card { text-align: center; }
.asr-empty-title {
  margin: 0.85rem 0 0;
  color: var(--asr-heading);
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  line-height: 1.2;
  letter-spacing: -0.03em;
}
.asr-empty-copy {
  margin: 0.75rem auto 1.5rem;
  max-width: 480px;
  color: var(--asr-muted);
  font-size: 0.97rem;
  line-height: 1.7;
}

/* ── Pagination ── */
.asr-pagination { margin-top: 1.5rem; padding: 0.75rem; }
.asr-pagination .nav-links { display: flex; justify-content: space-between; gap: 1rem; }
.asr-pagination a,
.asr-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.8rem;
  min-height: 2.8rem;
  padding: 0.7rem 1rem;
  border-radius: 14px;
  background: rgba(49, 54, 90, 0.88);
  border: 1px solid rgba(173, 184, 236, 0.18);
  color: #f8faff;
}

/* ── Sidebar ── */
.asr-sidebar { display: grid; gap: 1rem; }

.asr-category-card { padding: 1.3rem; }
.asr-category-card h3 {
  margin: 0 0 0.9rem;
  color: var(--asr-heading);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.asr-category-list { display: grid; gap: 0.55rem; }
.asr-category-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.65rem 0.9rem;
  border-radius: 14px;
  background: rgba(49, 54, 90, 0.75);
  border: 1px solid rgba(173, 184, 236, 0.15);
  font-size: 0.9rem;
  color: var(--asr-muted);
  transition: color 0.15s, background 0.15s;
}
.asr-category-list a:hover { color: var(--asr-text); background: rgba(49, 54, 90, 1); }
.asr-cat-count {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--asr-primary);
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.18);
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
}

/* ── Sidebar CTA ── */
.asr-sidebar-cta-card {
  padding: 1.5rem;
  border-color: rgba(168, 85, 247, 0.28);
  box-shadow: 0 0 40px rgba(168, 85, 247, 0.1), var(--asr-shadow);
  display: grid;
  gap: 0.75rem;
}
.asr-sidebar-cta-card h3 {
  margin: 0.35rem 0 0;
  color: var(--asr-heading);
  font-size: 1.05rem;
  line-height: 1.25;
  letter-spacing: -0.03em;
}
.asr-sidebar-cta-card p {
  margin: 0;
  color: var(--asr-muted);
  font-size: 0.88rem;
  line-height: 1.65;
}

/* ── Single post ── */
.asr-post-shell { padding: 3.5rem 0 4.5rem; }

.asr-post-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 1.5rem;
  align-items: start;
}

.asr-post-hero-card { margin-bottom: 1.5rem; }

.asr-post-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.asr-post-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.2);
  color: #8ee2ff;
  font-size: 0.84rem;
  font-weight: 700;
}

.asr-post-title {
  margin: 1rem 0 0;
  color: var(--asr-heading);
  font-size: clamp(1.7rem, 3vw, 2.8rem);
  line-height: 1.1;
  letter-spacing: -0.045em;
}

.asr-post-meta { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.95rem; font-size: 0.9rem; color: var(--asr-muted); }
.asr-post-meta a { color: #8ee2ff; }

.asr-post-cover {
  margin-top: 1.3rem;
  aspect-ratio: 16 / 8;
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.22), rgba(56, 189, 248, 0.2));
}
.asr-post-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

.asr-post-content-card { padding: 2rem; }

.asr-post-content p,
.asr-post-content li { color: #d0d8f8; line-height: 1.8; }

.asr-post-content h1,
.asr-post-content h2,
.asr-post-content h3 { color: var(--asr-heading); }

.asr-post-content h2 { margin-top: 2rem; font-size: 1.65rem; line-height: 1.15; letter-spacing: -0.03em; }
.asr-post-content h3 { margin-top: 1.6rem; font-size: 1.25rem; line-height: 1.2; }

.asr-post-content a { color: #8ee2ff; text-decoration: underline; }

.asr-post-content blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.2rem;
  border-left: 4px solid var(--asr-primary);
  background: rgba(49, 54, 90, 0.78);
  border-radius: 16px;
}

.asr-post-content code {
  padding: 0.2rem 0.45rem;
  border-radius: 8px;
  background: rgba(49, 54, 90, 0.88);
  font-size: 0.88em;
}

.asr-post-content pre {
  padding: 1rem;
  overflow: auto;
  border-radius: 18px;
  background: rgba(24, 27, 48, 0.94);
  border: 1px solid rgba(173, 184, 236, 0.18);
}

.asr-post-content img { max-width: 100%; height: auto; border-radius: 20px; }

.asr-post-sidebar {
  display: grid;
  gap: 1rem;
  position: sticky;
  top: 6rem;
}

.asr-sidebar-stat {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 0.95rem;
  border-radius: 16px;
  background: rgba(49, 54, 90, 0.88);
  border: 1px solid rgba(173, 184, 236, 0.18);
  color: var(--asr-muted);
  font-size: 0.9rem;
}
.asr-sidebar-stat strong { color: var(--asr-heading); font-size: 0.94rem; }

.asr-post-cta-card {
  margin-top: 1.5rem;
  padding: 2rem;
  border-radius: var(--asr-radius);
  border: 1px solid rgba(168, 85, 247, 0.26);
  background: rgba(43, 49, 82, 0.94);
  box-shadow: 0 0 50px rgba(168, 85, 247, 0.1), var(--asr-shadow);
  backdrop-filter: blur(18px);
  text-align: center;
}

.asr-post-cta-card h2 {
  margin: 0.85rem 0 0;
  color: var(--asr-heading);
  font-size: clamp(1.5rem, 2.8vw, 2.2rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.asr-post-cta-card p:not(.asr-kicker) {
  max-width: 640px;
  margin: 0.85rem auto 0;
  color: var(--asr-muted);
  line-height: 1.75;
  font-size: 0.97rem;
}

/* ── Footer ── */
.asr-site-footer { border-top: 1px solid var(--asr-line); background: rgba(23, 26, 46, 0.84); padding: 3rem 0 0; }

.asr-footer-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: 2rem;
}

.asr-footer-left { max-width: 340px; display: grid; gap: 0.75rem; }
.asr-footer-brand { margin-bottom: 0.25rem; }
.asr-footer-copy { margin: 0; color: var(--asr-muted); font-size: 0.88rem; line-height: 1.7; }

.asr-footer-social { display: flex; gap: 0.9rem; margin-top: 0.1rem; }
.asr-footer-social a { color: var(--asr-muted); display: flex; align-items: center; transition: color 0.18s; }
.asr-footer-social a:hover { color: var(--asr-text); }

.asr-footer-links { display: flex; align-items: flex-start; gap: 2.5rem; }
.asr-footer-links div { display: grid; gap: 0.6rem; }
.asr-footer-links p { margin: 0 0 0.35rem; color: var(--asr-heading); font-weight: 700; font-size: 0.9rem; }
.asr-footer-links a { color: var(--asr-muted); font-size: 0.9rem; }
.asr-footer-links a:hover { color: var(--asr-text); }

.asr-footer-legal {
  border-top: 1px solid rgba(166, 176, 224, 0.1);
  padding: 1.1rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.asr-footer-legal p { margin: 0; color: var(--asr-muted); font-size: 0.8rem; }
.asr-footer-legal-links { display: flex; gap: 1.25rem; }
.asr-footer-legal-links a { color: var(--asr-muted); font-size: 0.8rem; }
.asr-footer-legal-links a:hover { color: var(--asr-text); }

/* ── Responsive ── */
@media (max-width: 980px) {
  .asr-site-nav, .asr-sidebar { display: none; }
  .asr-blog-layout, .asr-post-layout, .asr-post-grid { grid-template-columns: 1fr; }
  .asr-post-sidebar { position: static; }
  .asr-footer-row { flex-direction: column; }
  .asr-footer-left { max-width: 100%; }
}

@media (max-width: 720px) {
  .asr-nav-row { flex-wrap: wrap; }
  .asr-nav-actions { width: 100%; }
  .asr-button { width: 100%; }
  .asr-blog-hero-actions, .asr-hero-actions { flex-direction: column; align-items: stretch; }
  .asr-hero-card, .asr-empty-card, .asr-post-hero-card, .asr-post-content-card { padding: 1.4rem; }
  .asr-footer-legal { flex-direction: column; gap: 0.5rem; text-align: center; }
}
