/* ForkPDF blog
   Base nav/footer styles come from /style.css. This file only styles the
   blog index, post pages and author page. */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  padding: 0.75rem 1rem;
  background: #111827;
  color: #ffffff;
  border-radius: 0 0 0.5rem 0;
  text-decoration: none;
}

.skip-link:focus {
  left: 0;
  outline: 3px solid #8b5cf6;
  outline-offset: 2px;
}

.blog-main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 3.5rem 1.25rem 5rem;
}

.blog-post {
  max-width: 780px;
  margin: 0 auto;
}

/* Index */

.blog-index-hero {
  max-width: 960px;
  margin: 0 auto 3.5rem;
  text-align: center;
}

.blog-eyebrow {
  color: #7c3aed;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.blog-index-hero h1 {
  color: #111827;
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 1.25rem;
  text-wrap: balance;
}

.blog-index-deck {
  color: #4b5563;
  font-size: 1.2rem;
  line-height: 1.7;
  margin: 0 auto;
  max-width: 680px;
}

.blog-rss-link {
  display: inline-block;
  margin-top: 1.25rem;
  color: #6b7280;
  font-size: 0.9rem;
}

.nowrap {
  white-space: nowrap;
}

.blog-featured {
  display: block;
  background: linear-gradient(135deg, #ffffff 0%, #f5f3ff 100%);
  border: 1px solid #ddd6fe;
  border-radius: 1rem;
  margin-bottom: 2rem;
  padding: 2.25rem;
  text-decoration: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.blog-featured:hover {
  border-color: #a78bfa;
  box-shadow: 0 18px 40px -24px rgba(76, 29, 149, 0.35);
  transform: translateY(-2px);
}

.blog-featured h2 {
  color: #111827;
  font-size: clamp(1.6rem, 3.5vw, 2.25rem);
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin: 0.9rem 0 0.75rem;
}

.blog-featured p {
  color: #4b5563;
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 1rem;
  max-width: 760px;
}

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

.blog-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.9rem;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  text-decoration: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.blog-card:hover {
  border-color: #c4b5fd;
  box-shadow: 0 16px 34px -26px rgba(17, 24, 39, 0.35);
  transform: translateY(-2px);
}

.blog-card h2 {
  color: #111827;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin: 0.8rem 0 0.6rem;
}

.blog-card p {
  color: #6b7280;
  font-size: 0.98rem;
  line-height: 1.65;
  margin-bottom: 1rem;
}

.blog-card .blog-meta {
  margin-top: auto;
}

.blog-tag {
  align-self: flex-start;
  background: #f5f3ff;
  border: 1px solid #ddd6fe;
  border-radius: 999px;
  color: #6d28d9;
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.3rem 0.65rem;
  text-decoration: none;
  text-transform: uppercase;
}

.blog-meta {
  align-items: center;
  color: #6b7280;
  display: flex;
  flex-wrap: wrap;
  font-size: 0.88rem;
  gap: 0.45rem;
  line-height: 1.5;
}

.blog-meta .blog-dot {
  color: #d1d5db;
}

.blog-empty {
  background: transparent;
  border: 0;
  color: #6b7280;
  font-size: 0.95rem;
  padding: 0.5rem 0 0;
  text-align: center;
}

/* Post */

.blog-breadcrumbs {
  align-items: center;
  color: #6b7280;
  display: flex;
  flex-wrap: wrap;
  font-size: 0.88rem;
  gap: 0.45rem;
  margin-bottom: 2rem;
}

.blog-breadcrumbs a {
  color: #6b7280;
  text-decoration: none;
}

.blog-breadcrumbs a:hover {
  color: #7c3aed;
}

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

.blog-post-header h1 {
  color: #111827;
  font-size: clamp(2.1rem, 5vw, 3.15rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin: 1rem 0;
  text-wrap: balance;
}

.blog-deck {
  color: #4b5563;
  font-size: 1.2rem;
  line-height: 1.65;
  margin-bottom: 1.25rem;
}

.blog-post-header .blog-meta {
  border-top: 1px solid #e5e7eb;
  padding-top: 1.1rem;
}

/* Table of contents */

.blog-toc {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.8rem;
  margin: 2rem 0 2.5rem;
  padding: 1.25rem 1.5rem;
}

.blog-toc-title {
  color: #6b7280;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
}

.blog-toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.blog-toc li {
  margin: 0.45rem 0;
}

.blog-toc ul ul {
  margin-left: 1rem;
  margin-top: 0.35rem;
}

.blog-toc a {
  color: #4b5563;
  font-size: 0.95rem;
  text-decoration: none;
}

.blog-toc a:hover {
  color: #7c3aed;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Body */

.blog-body {
  color: #1f2937;
  font-size: 1.1rem;
  line-height: 1.8;
}

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

.blog-body h2,
.blog-body h3,
.blog-body h4 {
  color: #111827;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.25;
  scroll-margin-top: 100px;
}

.blog-body h2 {
  font-size: 1.75rem;
  margin: 2.75rem 0 1rem;
}

.blog-body h3 {
  font-size: 1.35rem;
  margin: 2rem 0 0.75rem;
}

.blog-body h4 {
  font-size: 1.1rem;
  margin: 1.75rem 0 0.5rem;
}

.blog-heading-anchor {
  color: #c4b5fd;
  font-weight: 400;
  margin-left: 0.4rem;
  opacity: 0;
  text-decoration: none !important;
  transition: opacity 0.15s ease;
}

.blog-body h2:hover .blog-heading-anchor,
.blog-body h3:hover .blog-heading-anchor,
.blog-heading-anchor:focus {
  opacity: 1;
}

.blog-body p {
  margin: 0 0 1.25rem;
}

.blog-body ul,
.blog-body ol {
  margin: 0 0 1.35rem 1.35rem;
}

.blog-body li {
  margin-bottom: 0.45rem;
}

.blog-body li > ul,
.blog-body li > ol {
  margin-top: 0.45rem;
  margin-bottom: 0.45rem;
}

.blog-body a {
  color: #6d28d9;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.blog-body a:hover {
  color: #4c1d95;
}

.blog-body strong {
  color: #111827;
  font-weight: 700;
}

.blog-body blockquote {
  background: #f5f3ff;
  border-left: 4px solid #8b5cf6;
  border-radius: 0 0.5rem 0.5rem 0;
  color: #4b5563;
  margin: 1.75rem 0;
  padding: 1.1rem 1.35rem;
}

.blog-body blockquote p:last-child {
  margin-bottom: 0;
}

.blog-body hr {
  border: 0;
  border-top: 1px solid #e5e7eb;
  margin: 2.5rem 0;
}

.blog-body :not(pre) > code {
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 0.3rem;
  color: #9d174d;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.88em;
  padding: 0.1rem 0.3rem;
}

.blog-body pre {
  background: #1e293b;
  border-radius: 0.5rem;
  color: #e2e8f0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.88rem;
  line-height: 1.7;
  margin: 0;
  overflow-x: auto;
  padding: 1.1rem 1.25rem;
}

.blog-body pre code {
  background: transparent;
  border: 0;
  color: inherit;
  font-size: inherit;
  padding: 0;
}

.blog-body .code-window {
  background: #1e293b;
  border-radius: 0.55rem;
  box-shadow: 0 16px 32px -24px rgba(15, 23, 42, 0.55);
  margin: 1.75rem 0;
  overflow: hidden;
}

.blog-body .code-header {
  align-items: center;
  background: #0f172a;
  border-bottom: 1px solid #334155;
  display: flex;
  justify-content: space-between;
  padding: 0.45rem 0.75rem 0.45rem 1rem;
}

.blog-body .code-lang {
  color: #94a3b8;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.blog-copy-btn {
  background: transparent;
  border: 1px solid #475569;
  border-radius: 0.3rem;
  color: #cbd5e1;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.55rem;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.blog-copy-btn:hover {
  background: #1e293b;
  border-color: #64748b;
  color: #ffffff;
}

.blog-body img {
  border: 1px solid #e5e7eb;
  border-radius: 0.6rem;
  display: block;
  height: auto;
  margin: 1.75rem auto;
  max-width: 100%;
}

.blog-body figure {
  margin: 1.75rem 0;
}

.blog-body figcaption {
  color: #6b7280;
  font-size: 0.88rem;
  margin-top: 0.6rem;
  text-align: center;
}

.blog-table-wrap {
  margin: 1.75rem 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.blog-body table {
  border-collapse: collapse;
  font-size: 0.98rem;
  min-width: 520px;
  width: 100%;
}

.blog-body th,
.blog-body td {
  border: 1px solid #e5e7eb;
  padding: 0.7rem 0.8rem;
  text-align: left;
  vertical-align: top;
}

.blog-body th {
  background: #f9fafb;
  color: #111827;
  font-weight: 700;
}

.blog-body tr:nth-child(even) td {
  background: #fcfcfd;
}

/* Author box, CTA, related */

.blog-author {
  align-items: flex-start;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.85rem;
  display: flex;
  gap: 1rem;
  margin: 3rem 0 2rem;
  padding: 1.35rem;
}

.blog-author-mark {
  align-items: center;
  background: #8b5cf6;
  border-radius: 0.65rem;
  color: #ffffff;
  display: flex;
  flex: 0 0 48px;
  font-size: 1.2rem;
  font-weight: 800;
  height: 48px;
  justify-content: center;
  min-width: 48px;
  width: 48px;
}

.blog-author-name {
  color: #111827;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.blog-author p {
  color: #6b7280;
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.blog-author a {
  color: #6d28d9;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.blog-cta {
  background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
  border: 1px solid #ddd6fe;
  border-radius: 1rem;
  margin: 2.5rem 0;
  padding: 2rem;
  text-align: center;
}

.blog-cta h2 {
  color: #111827;
  font-size: 1.55rem;
  letter-spacing: -0.025em;
  margin-bottom: 0.6rem;
}

.blog-cta p {
  color: #4b5563;
  font-size: 1rem;
  line-height: 1.65;
  margin: 0 auto 1.25rem;
  max-width: 620px;
}

.blog-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.blog-btn {
  background: #7c3aed;
  border-radius: 0.45rem;
  color: #ffffff;
  display: inline-block;
  font-weight: 600;
  padding: 0.7rem 1.1rem;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
}

.blog-btn:hover {
  background: #6d28d9;
  transform: translateY(-1px);
}

.blog-btn.secondary {
  background: #ffffff;
  border: 1px solid #c4b5fd;
  color: #6d28d9;
}

.blog-btn.secondary:hover {
  background: #f5f3ff;
}

.blog-cta-note {
  color: #6b7280;
  font-size: 0.82rem;
  margin-top: 0.9rem;
}

.blog-related {
  border-top: 1px solid #e5e7eb;
  margin-top: 3rem;
  padding-top: 2rem;
}

.blog-related h2 {
  color: #111827;
  font-size: 1.3rem;
  margin-bottom: 1.25rem;
}

.blog-related-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.blog-related-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1.1rem;
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.blog-related-card:hover {
  border-color: #c4b5fd;
  transform: translateY(-2px);
}

.blog-related-card h3 {
  color: #111827;
  font-size: 0.98rem;
  line-height: 1.4;
  margin-bottom: 0.4rem;
}

.blog-related-card span {
  color: #6b7280;
  font-size: 0.8rem;
}

/* Author page */

.blog-author-hero {
  align-items: center;
  display: flex;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.blog-author-hero .blog-author-mark {
  flex-basis: 72px;
  font-size: 1.8rem;
  height: 72px;
  min-width: 72px;
  width: 72px;
}

.blog-author-hero h1 {
  color: #111827;
  font-size: 2rem;
  letter-spacing: -0.03em;
  margin-bottom: 0.35rem;
}

.blog-author-hero p {
  color: #6b7280;
  font-size: 1rem;
  line-height: 1.6;
  max-width: 700px;
}

.blog-author-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.25rem 0 2.5rem;
}

.blog-author-links a {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  color: #4b5563;
  font-size: 0.85rem;
  padding: 0.4rem 0.8rem;
  text-decoration: none;
}

.blog-author-links a:hover {
  border-color: #c4b5fd;
  color: #6d28d9;
}

/* Responsive */

@media (max-width: 900px) {
  .blog-grid,
  .blog-related-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .blog-main {
    padding: 2.25rem 1rem 3.5rem;
  }

  .blog-featured {
    padding: 1.5rem;
  }

  .blog-body {
    font-size: 1.03rem;
  }

  .blog-author {
    flex-direction: column;
  }

  .blog-author > div:last-child,
  .blog-author-hero > div:last-child {
    min-width: 0;
    width: 100%;
  }

  .blog-author-hero {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Print */

@media print {
  .navbar,
  .footer,
  .blog-cta,
  .blog-related,
  .blog-toc,
  .blog-author {
    display: none;
  }

  .blog-main {
    max-width: none;
    padding: 0;
  }

  .blog-body {
    font-size: 11pt;
  }

  .blog-body pre {
    white-space: pre-wrap;
  }
}
