/* Patron Engineering blog — shares the marketing site's design tokens
   (index.html :root) so the blog feels like the same product. */
:root {
  --bg: #ECE8E0;
  --bg-warm: #E2DDD2;
  --paper: #FFFFFF;
  --ink: #14181F;
  --ink-soft: #5B626B;
  --ink-faint: #7C828B;
  --accent: #2F6FED;
  --accent-deep: #205FD8;
  --accent-pale: #EAF1FB;
  --accent-label: #1F66E0;
  --rule: rgba(0,0,0,0.08);
  --rule-soft: rgba(0,0,0,0.05);
  --sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --wide: 1120px;
  --read: 720px;
  --r-card: 24px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
.wrap { max-width: var(--wide); margin: 0 auto; padding-left: 28px; padding-right: 28px; }
.read { max-width: var(--read); margin: 0 auto; padding-left: 28px; padding-right: 28px; }

/* ---------- Nav (matches index.html) ---------- */
nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(236,232,224,0.82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rule-soft);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.wordmark { font-weight: 800; font-size: 28px; letter-spacing: -0.8px; text-decoration: none; line-height: 1; color: var(--ink); }
.wordmark .dot { color: var(--accent); }
.wordmark .sub { font-weight: 700; font-size: 15px; color: var(--ink-faint); letter-spacing: -0.2px; margin-left: 9px; }
.nav-links { display: flex; gap: 26px; align-items: center; font-size: 14.5px; font-weight: 600; color: var(--ink-soft); }
.nav-links a { text-decoration: none; transition: color .15s; }
.nav-links a:hover { color: var(--ink); }
.nav-cta {
  background: var(--accent); color: #fff !important; text-decoration: none;
  font-size: 14px; font-weight: 700; padding: 9px 18px; border-radius: 999px;
  transition: transform .15s, background .15s;
}
.nav-cta:hover { background: var(--accent-deep); transform: translateY(-1px); }

/* ---------- Blog index hero ---------- */
.blog-hero { padding: 78px 0 26px; }
.eyebrow {
  display: inline-block; font-size: 12.5px; font-weight: 800; letter-spacing: 2px;
  text-transform: uppercase; color: var(--accent-label);
  background: var(--accent-pale); padding: 7px 16px; border-radius: 999px; margin-bottom: 24px;
}
.blog-hero h1 { font-size: clamp(36px, 5.4vw, 56px); font-weight: 800; letter-spacing: -1.8px; line-height: 1.08; max-width: 760px; }
.blog-hero h1 .hl { color: var(--accent); }
.blog-hero p { font-size: clamp(17px, 2.1vw, 20px); color: var(--ink-soft); max-width: 600px; margin-top: 20px; }

/* ---------- Post list ---------- */
.posts { padding: 44px 0 30px; display: grid; gap: 18px; }
.post-card {
  display: block; text-decoration: none; background: var(--paper);
  border: 1px solid var(--rule); border-radius: var(--r-card);
  padding: 30px 32px; transition: transform .16s, box-shadow .16s, border-color .16s;
}
.post-card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(20,24,31,0.08); border-color: rgba(47,111,237,0.3); }
.post-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: 12.5px; font-weight: 700; color: var(--ink-faint); letter-spacing: .3px; margin-bottom: 14px; }
.tag { font-size: 11.5px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--accent-label); background: var(--accent-pale); padding: 5px 11px; border-radius: 999px; }
.dot-sep { color: var(--rule); }
.post-card h2 { font-size: clamp(23px, 3vw, 30px); font-weight: 800; letter-spacing: -0.9px; line-height: 1.16; margin-bottom: 12px; }
.post-card p { color: var(--ink-soft); font-size: 16.5px; }
.post-card .more { display: inline-block; margin-top: 16px; font-weight: 700; font-size: 14.5px; color: var(--accent); }

/* ---------- Article ---------- */
.article { padding: 60px 0 30px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: var(--ink-faint); text-decoration: none; margin-bottom: 30px; }
.back-link:hover { color: var(--accent); }
.article-head .post-meta { margin-bottom: 18px; }
.article-head h1 { font-size: clamp(32px, 4.8vw, 50px); font-weight: 800; letter-spacing: -1.6px; line-height: 1.1; }
.article-head .dek { font-size: clamp(18px, 2.2vw, 21px); color: var(--ink-soft); margin-top: 20px; line-height: 1.55; }
.byline { margin-top: 26px; padding-bottom: 30px; border-bottom: 1px solid var(--rule); font-size: 14px; color: var(--ink-faint); font-weight: 600; }

.article-body { padding-top: 38px; font-size: 18px; line-height: 1.72; color: #20262E; }
.article-body > * + * { margin-top: 22px; }
.article-body h2 { font-size: clamp(24px, 3.2vw, 31px); font-weight: 800; letter-spacing: -0.9px; line-height: 1.18; margin-top: 46px; }
.article-body h3 { font-size: 21px; font-weight: 800; letter-spacing: -0.4px; margin-top: 34px; }
.article-body p { color: #232a32; }
.article-body strong { font-weight: 700; color: var(--ink); }
.article-body a { color: var(--accent); font-weight: 600; text-decoration: none; border-bottom: 1px solid rgba(47,111,237,0.3); }
.article-body a:hover { border-bottom-color: var(--accent); }
.article-body ul, .article-body ol { padding-left: 26px; }
.article-body li { margin-top: 9px; }
.article-body li::marker { color: var(--accent); }
.article-body blockquote {
  border-left: 3px solid var(--accent); background: var(--paper);
  padding: 20px 26px; border-radius: 0 14px 14px 0; font-size: 19px;
  color: var(--ink); font-style: italic; line-height: 1.55;
}
.article-body code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 14.5px;
  background: var(--bg-warm); padding: 2px 7px; border-radius: 6px; font-style: normal;
}
.article-body .callout {
  background: var(--paper); border: 1px solid var(--rule); border-radius: 16px;
  padding: 24px 28px; font-size: 16.5px; color: var(--ink-soft);
}
.article-body .callout strong { color: var(--ink); }
.article-body .lede { font-size: 20px; color: var(--ink-soft); line-height: 1.6; }
.kicker { font-size: 12.5px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: var(--accent-label); }

/* ---------- End / next ---------- */
.post-end { margin-top: 56px; padding-top: 34px; border-top: 1px solid var(--rule); }
.post-end .signoff { font-size: 15.5px; color: var(--ink-faint); }
.post-end .signoff a { color: var(--accent); font-weight: 700; text-decoration: none; }

/* ---------- Figures / diagrams ---------- */
.fig { margin: 40px 0; }
.fig .fig-frame {
  background: var(--paper); border: 1px solid var(--rule); border-radius: 18px;
  padding: 26px 24px; overflow-x: auto;
}
.fig svg { display: block; width: 100%; height: auto; max-width: 100%; }
.fig figcaption { margin-top: 14px; font-size: 13.5px; color: var(--ink-faint); text-align: center; line-height: 1.5; }
.fig figcaption strong { color: var(--ink-soft); font-weight: 700; }

/* ---------- Footer (matches index.html) ---------- */
footer { border-top: 1px solid var(--rule-soft); padding: 44px 0 56px; margin-top: 40px; }
.foot-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 18px; }
.foot-links { display: flex; gap: 24px; font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.foot-links a { text-decoration: none; } .foot-links a:hover { color: var(--ink); }
.foot-love { width: 100%; margin-top: 22px; font-size: 13.5px; color: var(--ink-faint); }

@media (max-width: 860px) {
  .nav-links .hide-m { display: none; }
  .post-card { padding: 26px 24px; }
}
