:root {
  --primary: #7c3aed;
  --primary-soft: #c4b5fd;
  --background: #f9f7ff;
  --surface: #ffffff;
  --muted: #5b5f73;
  --text: #0f172a;
  --radius: 14px;
  --shadow-soft: 0 10px 40px rgba(15, 23, 42, 0.12);
  --container: 1040px;
  --prose: 920px;
  font-family: "Inter", "Helvetica Neue", system-ui, sans-serif;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--background);
  color: var(--text);
  font-size: 18px;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
}

.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  width: min(var(--container), 92%);
  margin: 0 auto;
}

.muted {
  color: rgba(255, 255, 255, 0.85);
}

.hero {
  background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.15), transparent 55%),
    linear-gradient(135deg, var(--primary), #6938ef);
  color: #fff;
  padding: clamp(2.75rem, 5vw, 4.25rem) 0;
  display: grid;
  gap: 1rem;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.hero > div {
  width: min(var(--container), 92%);
  margin: 0 auto;
}

.hero h1 {
  font-size: clamp(2.2rem, 4vw, 3rem);
  margin: 0;
  letter-spacing: -0.02em;
}

.hero p {
  margin: 0;
  max-width: 36rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.5;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: min(var(--container), 92%);
  margin: 0 auto;
  padding: 1.25rem 0;
}

.nav__actions {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav__toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(124, 58, 237, 0.22);
  background: rgba(255, 255, 255, 0.78);
  cursor: pointer;
}

.nav__toggle-icon {
  width: 18px;
  height: 12px;
  display: block;
  position: relative;
}

.nav__toggle-icon::before,
.nav__toggle-icon::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(15, 23, 42, 0.78);
  border-radius: 999px;
}

.nav__toggle-icon::before {
  top: 0;
  box-shadow: 0 5px 0 rgba(15, 23, 42, 0.78);
}

.nav__toggle-icon::after {
  bottom: 0;
}

.nav__overlay[hidden] {
  display: none;
}

.nav__overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  z-index: 9000;
}

.nav__drawer {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: min(360px, 86vw);
  background: rgba(255, 255, 255, 0.98);
  border-left: 1px solid rgba(124, 58, 237, 0.16);
  box-shadow: -18px 0 50px rgba(15, 23, 42, 0.18);
  z-index: 9001;
  transform: translateX(105%);
  transition: transform 180ms ease;
  flex-direction: column;
}

.nav__drawer.is-open {
  transform: translateX(0);
}

.nav__drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 12px;
  border-bottom: 1px solid rgba(124, 58, 237, 0.12);
}

.nav__drawer-title {
  font-weight: 800;
  color: rgba(15, 23, 42, 0.9);
  font-size: 1rem;
}

.nav__close {
  appearance: none;
  border: 1px solid rgba(124, 58, 237, 0.18);
  background: rgba(255, 255, 255, 0.78);
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 800;
  font-size: 0.9rem;
  color: rgba(15, 23, 42, 0.78);
}

.nav__drawer-body {
  padding: 12px 16px 18px;
  overflow: auto;
}

.nav__drawer-links {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}

.nav__drawer-links .nav__link {
  padding: 10px 10px;
  border-radius: 12px;
  background: rgba(124, 58, 237, 0.06);
  box-shadow: none;
}

.nav__drawer-links .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
  align-self: stretch;
  border-radius: 12px;
  padding: 0.7rem 1rem;
  font-size: 1rem;
  text-shadow: none;
  box-shadow: none;
}

.nav__drawer-links .button--primary {
  box-shadow: none;
}

body.nav-drawer-open {
  overflow: hidden;
}

.nav__link {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.35rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(15, 23, 42, 0.62);
  text-decoration: none;
  background: transparent;
  border-radius: 0;
  box-shadow: inset 0 -2px 0 transparent;
  transition: color 160ms ease, box-shadow 160ms ease;
}

.nav__link:hover,
.nav__link:focus-visible {
  color: rgba(15, 23, 42, 0.92);
  box-shadow: inset 0 -2px 0 transparent;
}

.nav__link.is-active {
  color: rgba(15, 23, 42, 0.92);
  box-shadow: inset 0 -2px 0 var(--primary);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}

.brand:hover,
.brand:visited {
  text-decoration: none;
}

.brand__logo {
  width: 28px;
  height: 28px;
  display: block;
  object-fit: contain;
  border-radius: 999px;
}

.brand__name {
  font: inherit;
  letter-spacing: normal;
  text-transform: none;
}

.content {
  flex: 1;
  padding: clamp(1.5rem, 4vw, 3rem) 0;
  width: min(var(--container), 92%);
  margin: 0 auto;
}

.posts {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  list-style: none;
  padding: 1.5rem 0 0;
  margin: 0;
}

.pagination .page-item {
  margin: 0;
}

.pagination .page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.8rem;
  border-radius: 8px;
  border: 1px solid rgba(124, 58, 237, 0.18);
  background: rgba(255, 255, 255, 0.78);
  color: rgba(15, 23, 42, 0.72);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.pagination .page-link:hover {
  background: rgba(124, 58, 237, 0.12);
  color: rgba(15, 23, 42, 0.92);
}

.pagination .active .page-link {
  background: rgba(124, 58, 237, 0.16);
  border-color: rgba(124, 58, 237, 0.28);
  color: rgba(15, 23, 42, 0.92);
}

.pagination .disabled .page-link {
  opacity: 0.55;
  pointer-events: none;
}

.terms {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.term-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(124, 58, 237, 0.18);
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.term-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(124, 58, 237, 0.28);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.10);
}

.term-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.1ch;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.12);
  color: rgba(15, 23, 42, 0.78);
  font-size: 0.85em;
  font-weight: 800;
}

.post-card {
  background: var(--surface);
  border-radius: calc(var(--radius) + 4px);
  padding: 1.6rem;
  border: 1px solid rgba(124, 58, 237, 0.12);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.post-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.12);
}

.post-card h2 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
}

.post-meta {
  font-size: 0.82rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.post-card p {
  margin: 0;
  color: rgba(15, 23, 42, 0.7);
  line-height: 1.75;
}

.post-card {
  line-height: 1.75;
}

.post-card h1,
.post-card h2,
.post-card h3 {
  line-height: 1.2;
}

.post-card h2 {
  margin-top: 0.25rem;
}

.post-card ul,
.post-card ol {
  padding-left: 1.25rem;
  margin: 0.75rem 0;
}

.post-card li {
  margin: 0.35rem 0;
}

.post-card a:not(.button) {
  color: var(--primary);
  text-decoration: underline;
  text-decoration-color: rgba(124, 58, 237, 0.35);
  text-underline-offset: 3px;
}

.post-card a:not(.button):hover {
  text-decoration-color: rgba(124, 58, 237, 0.8);
}

.post-card__read {
  margin-top: 0.25rem;
  font-weight: 800;
  align-self: flex-start;
}

.post-card a:focus-visible,
.nav__link:focus-visible,
.button:focus-visible {
  outline: 3px solid rgba(124, 58, 237, 0.35);
  outline-offset: 3px;
}

.button {
  align-self: flex-start;
  padding: 0.65rem 1.4rem;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  border: none;
  font-weight: 700;
  cursor: pointer;
  text-transform: none;
  letter-spacing: normal;
  font-size: 1.05rem;
  text-decoration: none;
}

.button--sm {
  padding: 0.45rem 0.9rem;
  font-size: 0.95rem;
}

.button--outline {
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  border: 1px solid rgba(124, 58, 237, 0.22);
  text-shadow: none;
}

.button--outline:hover {
  background: #a78bfa;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.22);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.22);
}

.button:not(.button--primary):not(.button--outline):hover {
  background: #b8a6fb;
}

.button--primary {
  background: #6d28d9;
  color: #ffffff;
  box-shadow: 0 18px 44px rgba(109, 40, 217, 0.22);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.button--primary:hover {
  background: #5b21b6;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.22);
}

.cta {
  display: flex;
  justify-content: center;
  padding: 1.75rem 0 0.25rem;
}

.footer {
  width: min(var(--container), 92%);
  margin: 0 auto;
  padding: 2rem 0;
  text-align: center;
  font-size: 0.9rem;
  color: rgba(15, 23, 42, 0.5);
}

.content--single {
  width: min(var(--prose), 92%);
  margin: 0 auto;
}

.post-card--preview {
  min-height: 180px;
}

.post-card--preview p {
  flex: 1;
  margin-top: 0.25rem;
}

.prose {
  padding: 2rem;
  transition: none;
}

.prose:hover {
  transform: none;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.prose p {
  margin: 1rem 0;
  color: rgba(15, 23, 42, 0.82);
}

.prose h2 {
  font-size: 1.55rem;
  margin: 2.25rem 0 0.75rem;
}

.prose h3 {
  font-size: 1.25rem;
  margin: 1.75rem 0 0.5rem;
}

.prose blockquote {
  margin: 1.5rem 0;
  padding: 0.75rem 1rem;
  border-left: 4px solid rgba(124, 58, 237, 0.35);
  background: rgba(124, 58, 237, 0.06);
  border-radius: 12px;
  color: rgba(15, 23, 42, 0.82);
}

.prose code {
  font-size: 0.95em;
  padding: 0.15em 0.35em;
  border-radius: 8px;
  background: rgba(124, 58, 237, 0.10);
}

.prose pre {
  margin: 1.5rem 0;
  padding: 1rem 1.1rem;
  overflow: auto;
  border-radius: 14px;
  background: #0b1022;
  color: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.16);
}

.prose pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}

.prose hr {
  border: none;
  border-top: 1px solid rgba(124, 58, 237, 0.14);
  margin: 2rem 0;
}

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid rgba(124, 58, 237, 0.12);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.10);
}

.post-cta {
  margin-top: 1.25rem;
  padding: 1.6rem;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(124, 58, 237, 0.10);
}

.post-cta:hover {
  transform: none;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.post-cta__content {
  width: min(720px, 100%);
  text-align: center;
}

.post-cta__title {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.post-cta__text {
  margin: 0.5rem 0 0.9rem;
  color: rgba(15, 23, 42, 0.78);
  font-size: 1rem;
  line-height: 1.6;
}

.post-cta a.post-cta__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.52rem 1.25rem;
  font-size: 0.9rem;
  box-shadow: 0 10px 24px rgba(109, 40, 217, 0.18);
  margin-top: 0.75rem;
  color: #ffffff;
  font-weight: 800;
  text-decoration: none;
  text-align: center;
}

.post-cta a.post-cta__button:hover {
  color: #ffffff;
  text-decoration: none;
}

@media (max-width: 520px) {
  body {
    font-size: 17px;
  }

  .prose {
    padding: 1.35rem;
  }
}

@media (max-width: 760px) {
  .nav__overlay {
    display: block;
  }

  .nav__drawer {
    display: flex;
  }

  .nav {
    flex-direction: row;
    align-items: center;
    gap: 0.85rem;
    padding: 1rem 0;
  }

  .nav__toggle {
    display: inline-flex;
  }

  .nav__actions {
    display: none;
  }

  .post-card {
    padding: 1.25rem;
  }

  /* Single post pages: use full width and drop the card border on mobile. */
  .content--single {
    width: 100%;
  }

  .content--single .post-card.prose {
    border: none;
    border-radius: 0;
    box-shadow: none;
  }

  .post-card h2 {
    font-size: 1.2rem;
  }

  .post-meta {
    font-size: 0.75rem;
    letter-spacing: 0.06em;
  }

  .pagination {
    flex-wrap: wrap;
  }
}
