.bp-body {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.5rem;
  padding-block: 3rem;
}

/* Single-post two-column layout (content + sidebar) */
.bp-layout {
  display: block;
}

.bp-main {
  min-width: 0;
}

.bp-layout:not(.has-sidebar) .bp-main {
  max-width: 52rem;
  margin-inline: auto;
}

.bp-sidebar {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 1000px) {
  .bp-layout.has-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 20rem;
    gap: 3.5rem;
    align-items: start;
  }
  .bp-layout.has-sidebar .bp-sidebar {
    margin-top: 0;
    position: sticky;
    top: 6rem;
  }
  /* let article text fill the wider column */
  .bp-layout.has-sidebar .bp-article p,
  .bp-layout.has-sidebar .bp-article ul,
  .bp-layout.has-sidebar .bp-article ol {
    max-width: none;
  }
}

/* Sidebar widgets */
.bp-widget {
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-2xl);
  background: hsl(220 15% 12%);
  padding: 1.5rem;
}

.bp-widget-title {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: hsl(var(--foreground) / 0.85);
  margin-bottom: 1rem;
}

.bp-widget-cta {
  text-align: center;
  border-color: hsl(var(--primary) / 0.25);
  background:
    radial-gradient(ellipse 90% 120% at 50% 0%, hsl(var(--primary) / 0.12), transparent 70%),
    hsl(220 16% 10%);
}

.bp-widget-cta .ic {
  width: 3rem;
  height: 3rem;
  margin: 0 auto 0.9rem;
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  background: hsl(var(--primary) / 0.12);
  border: 1px solid hsl(var(--primary) / 0.3);
}

.bp-widget-cta .ic .icon {
  width: 1.5rem;
  height: 1.5rem;
  color: hsl(var(--primary));
}

.bp-widget-cta h4 {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1.15rem;
  color: hsl(var(--foreground));
  margin-bottom: 0.4rem;
}

.bp-widget-cta p {
  font-size: 0.9rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.6;
  margin-bottom: 1.1rem;
}

.bp-widget-cta .btn-cta {
  width: 100%;
}

.bp-recent {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.bp-recent li + li {
  border-top: 1px solid hsl(var(--border));
}

.bp-recent a {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.7rem 0;
}

.bp-recent .t {
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.35;
  color: hsl(var(--foreground) / 0.9);
}

.bp-recent a:hover .t {
  color: hsl(var(--primary));
}

.bp-recent .d {
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
}

.bp-cats {
  list-style: none;
  margin: 0;
  padding: 0;
}

.bp-cats li {
  margin: 0;
}

.bp-cats li + li {
  border-top: 1px solid hsl(var(--border));
}

.bp-cats a {
  display: inline-block;
  padding: 0.55rem 0;
  font-size: 0.92rem;
  color: hsl(var(--muted-foreground));
}

.bp-cats a:hover {
  color: hsl(var(--primary));
}

.bp-widget .search-form,
.bp-widget form {
  display: flex;
  gap: 0.5rem;
}

.bp-widget .search-field,
.bp-widget input[type="search"],
.bp-widget input[type="text"] {
  flex: 1;
  min-width: 0;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-lg);
  border: 1px solid hsl(var(--border));
  background: hsl(220 16% 9%);
  color: hsl(var(--foreground));
  font-size: 0.9rem;
}

.bp-widget .search-submit,
.bp-widget button[type="submit"] {
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius-lg);
  border: 0;
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
}

.bp-ctacard {
  margin-top: 2rem;
  border-radius: var(--radius-2xl);
  border: 1px solid hsl(var(--primary) / 0.2);
  background: hsl(var(--primary) / 0.05);
  padding: 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.bp-ctacard .glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 80% at 50% 0%, rgba(var(--glow), 0.07), transparent);
}

.bp-ctacard .body {
  position: relative;
}

.bp-ctacard h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  color: hsl(var(--foreground));
  margin-bottom: 0.5rem;
}

.bp-ctacard p {
  color: hsl(var(--muted-foreground));
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

.bp-spacer {
  height: 5rem;
}

@media (min-width: 640px) {
  .bp-bio {
    flex-direction: row;
  }
  .bp-related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

