/* ============================================================
   Ventorify blog styles (loads after css/site.css)
   Long-form article typography, the /blog/ index and /about/.
   Page-scoped classes only; shared selectors stay untouched.
   Nothing here hides content, so no html.js scoping is needed.
   ============================================================ */

.article {
  --measure: 43rem;
  padding-block: clamp(2.5rem, 1.8rem + 3vw, 4rem) var(--section);
}
.article-shell {
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* ---------- Breadcrumb ---------- */

.article-breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--text-small);
  color: var(--slate-light);
}
.article-breadcrumb li + li::before {
  content: "/";
  margin-right: 0.4rem;
  color: var(--border);
}
.article-breadcrumb a {
  color: var(--slate-light);
}
.article-breadcrumb a:hover {
  color: var(--indigo);
}
.article-breadcrumb li[aria-current] {
  color: var(--slate);
  max-width: 22ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- Article head ---------- */

.article-head {
  margin-top: 1.6rem;
}
.article-head h1 {
  font-size: clamp(2.1rem, 1.3rem + 3vw, 3rem);
  font-weight: 700;
  letter-spacing: var(--track-display);
  line-height: 1.08;
  text-wrap: balance;
}
.article-standfirst {
  margin-top: 1.1rem;
  font-size: var(--text-lead);
  line-height: 1.6;
  color: var(--slate);
}
.article-meta {
  margin-top: 1.4rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  font-size: var(--text-small);
  color: var(--slate-light);
}
.article-meta a {
  color: var(--slate);
  font-weight: 560;
}
.article-meta a:hover {
  color: var(--indigo);
}
.article-meta-sep,
.post-card-sep {
  color: var(--slate-light);
  opacity: 0.5;
}
.article-tags {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0;
  list-style: none;
}
.article-tags li {
  padding: 0.25rem 0.7rem;
  border-radius: var(--r-pill);
  background: var(--indigo-tint);
  color: var(--indigo);
  font-size: var(--text-micro);
  font-weight: 560;
}

.article-cover {
  margin-top: 2rem;
}
.article-cover img {
  width: 100%;
  /* Heroes are wide (1200x630); the cap only guards against a very tall image. */
  max-height: 26rem;
  object-fit: cover;
  border-radius: var(--r-card);
  border: 1px solid var(--border-soft);
}

/* ---------- Table of contents ---------- */

.article-toc {
  margin-top: 2.4rem;
  padding: 1.3rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.article-toc h2 {
  font-size: var(--text-micro);
  font-weight: 660;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--slate-light);
}
.article-toc ol {
  margin: 0.7rem 0 0;
  padding: 0;
  list-style: none;
}
.article-toc li + li,
.article-toc .toc-sublist {
  margin-top: 0.4rem;
}
.article-toc .toc-sublist {
  padding-left: 1rem;
  border-left: 2px solid var(--border-soft);
}
.article-toc a {
  color: var(--slate);
  font-size: var(--text-small);
  line-height: 1.5;
}
.article-toc a:hover {
  color: var(--indigo);
}

/* ---------- Article body ---------- */

.article-body {
  margin-top: 2.6rem;
  font-size: 1.06rem;
  line-height: 1.75;
  color: var(--slate);
}
.article-body > * + * {
  margin-top: 1.25rem;
}
.article-body h2 {
  margin-top: 3rem;
  font-size: clamp(1.5rem, 1.2rem + 1.1vw, 1.85rem);
  font-weight: 680;
  letter-spacing: var(--track-h2);
  line-height: 1.2;
  color: var(--ink);
  scroll-margin-top: 96px;
}
.article-body h3 {
  margin-top: 2.2rem;
  font-size: 1.22rem;
  font-weight: 640;
  line-height: 1.3;
  color: var(--ink);
  scroll-margin-top: 96px;
}
.article-body h2 + p,
.article-body h3 + p,
.article-body h2 + ul,
.article-body h3 + ul {
  margin-top: 0.9rem;
}
.article-body strong {
  color: var(--ink);
  font-weight: 620;
}
.article-body a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--indigo-soft);
}
.article-body a:hover {
  text-decoration-color: var(--indigo-hover);
}
.article-body ul,
.article-body ol {
  padding-left: 1.3rem;
}
.article-body li + li {
  margin-top: 0.45rem;
}
.article-body li::marker {
  color: var(--slate-light);
}
.article-body hr {
  margin-block: 2.6rem;
  border: 0;
  border-top: 1px solid var(--border);
}
.article-body img {
  width: 100%;
  height: auto;
  border-radius: var(--r-chip);
}

/* Figures: images, and the inline SVG charts the blog skills emit.
   width/height on the svg keeps it inside the column on every width;
   the viewBox does the scaling. */
.article-body figure {
  margin-block: 2.2rem;
  overflow-x: auto;
}
.article-body figure svg,
.article-body > svg {
  width: 100%;
  height: auto;
  max-width: 100%;
  color: var(--slate);
}
.article-body figcaption {
  margin-top: 0.7rem;
  font-size: var(--text-small);
  line-height: 1.5;
  color: var(--slate-light);
  text-align: center;
}

/* Pull quote */
.article-body blockquote {
  margin-block: 2rem;
  padding-left: 1.3rem;
  border-left: 3px solid var(--indigo);
  font-size: 1.12rem;
  line-height: 1.6;
  color: var(--ink);
}
.article-body blockquote p + p {
  margin-top: 0.8rem;
}
.article-body blockquote cite {
  display: block;
  margin-top: 0.7rem;
  font-size: var(--text-small);
  font-style: normal;
  color: var(--slate-light);
}

/* Key takeaways: the blockquote-with-bullets pattern the blog skills write,
   plus an explicit class for hand-written HTML. Browsers without :has()
   fall back to the pull-quote style above, which stays readable. */
.article-body .key-takeaways,
.article-body blockquote:has(ul),
.article-body blockquote:has(ol) {
  margin-block: 2.2rem;
  padding: 1.4rem 1.6rem;
  border: 1px solid var(--indigo-soft);
  border-left: 4px solid var(--indigo);
  border-radius: var(--r-card);
  background: var(--indigo-tint);
  font-size: 1rem;
  color: var(--slate);
}
.article-body .key-takeaways > p:first-child,
.article-body blockquote:has(ul) > p:first-child,
.article-body blockquote:has(ol) > p:first-child {
  font-size: var(--text-micro);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--indigo);
}
.article-body .key-takeaways ul,
.article-body blockquote:has(ul) ul,
.article-body blockquote:has(ol) ol {
  margin-top: 0.8rem;
}

/* Tables scroll inside the column instead of widening the page.
   The wrapper is added by the markdown-it rule in eleventy.config.js. */
.article-table {
  margin-block: 2.2rem;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--surface);
}
.article-table table {
  width: 100%;
  min-width: 30rem;
  border-collapse: collapse;
  font-size: var(--text-small);
  font-variant-numeric: tabular-nums;
}
.article-table th,
.article-table td {
  padding: 0.7rem 1rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border-soft);
}
.article-table thead th {
  background: var(--canvas);
  color: var(--ink);
  font-weight: 620;
  white-space: nowrap;
}
.article-table tbody tr:last-child td {
  border-bottom: 0;
}

/* Code */
.article-body code {
  padding: 0.12em 0.4em;
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  background: var(--canvas);
  font-size: 0.88em;
  color: var(--ink);
}
.article-body pre {
  margin-block: 2rem;
  padding: 1.1rem 1.3rem;
  overflow-x: auto;
  border-radius: var(--r-card);
  background: var(--ink-deep);
  color: var(--on-dark);
  font-size: var(--text-small);
  line-height: 1.6;
}
.article-body pre code {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: inherit;
  font-size: inherit;
}

/* ---------- Article foot ---------- */

.article-foot {
  margin-top: 3rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--border);
  font-size: var(--text-small);
}
.article-back::before {
  content: "\2190";
  margin-right: 0.4rem;
}

/* ---------- /blog/ index ---------- */

.blog-hero,
.about-hero {
  padding-bottom: clamp(1.6rem, 1rem + 2vw, 2.6rem);
}
.blog-hero h1 {
  max-width: none;
}
.blog-hero .lead {
  max-width: 42rem;
}
.blog-listing {
  padding-top: 0;
}
.post-list {
  max-width: 48rem;
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 1rem;
}
.post-card {
  padding: 1.5rem 1.7rem;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.post-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  font-size: var(--text-micro);
  color: var(--slate-light);
}
.post-card-sep {
  color: var(--border);
}
.post-card h2 {
  margin-top: 0.6rem;
  font-size: 1.3rem;
  font-weight: 660;
  letter-spacing: -0.015em;
  line-height: 1.3;
}
.post-card h2 a {
  color: var(--ink);
}
.post-card h2 a:hover {
  color: var(--indigo);
}
.post-card-desc {
  margin-top: 0.6rem;
  color: var(--slate);
  line-height: 1.65;
}
.post-list-empty {
  color: var(--slate);
}
@media (prefers-reduced-motion: no-preference) {
  .post-card {
    transition: box-shadow var(--dur-med) var(--ease-out),
      transform var(--dur-med) var(--ease-out),
      border-color var(--dur-med) var(--ease-out);
  }
  .post-card:hover {
    transform: translateY(-2px);
    border-color: var(--indigo-soft);
    box-shadow: var(--shadow-card);
  }
}

/* ---------- /about/ ---------- */

.about-hero .lead {
  max-width: 34rem;
}
.about-section {
  padding-top: 0;
}
.prose {
  max-width: 43rem;
  font-size: 1.06rem;
  line-height: 1.75;
  color: var(--slate);
}
.prose p + p {
  margin-top: 1.25rem;
}
.prose a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--indigo-soft);
}
.prose a:hover {
  text-decoration-color: var(--indigo-hover);
}

/* ---------- Responsive ---------- */

/* Give charts and tables a little more room than the text measure. */
@media (min-width: 900px) {
  .article-body figure,
  .article-table {
    margin-inline: -3rem;
  }
}

@media (max-width: 599px) {
  .article-body {
    font-size: 1.02rem;
  }
  .article-toc,
  .post-card {
    padding-inline: 1.1rem;
  }
  .article-body pre {
    padding-inline: 1rem;
  }
  .article-table table {
    min-width: 26rem;
  }
}
