/* ===== Self-hosted fonts (latin subset, OFL) — replaces the Google Fonts request ===== */
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 100 700; font-display: swap; src: url('../fonts/ibm-plex-sans-var.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Chakra Petch'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/chakra-petch-500.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Chakra Petch'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/chakra-petch-600.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/ibm-plex-mono-400.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/ibm-plex-mono-600.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ===== SecBlog theme — tokens ===== */
:root {
  --bg: #EDF1EF;
  --surface: #FFFFFF;
  --surface-2: #F5F8F6;
  --ink: #171C1A;
  --ink-2: #4C564F;
  --ink-3: #6E7A72;
  --border: #DBE3DE;
  --border-strong: #C4D0C9;
  --accent: #0EA5B7;
  --accent-soft: rgba(14, 165, 183, 0.10);
  --sev-critical: #7A2318;
  --sev-critical-soft: #FBEAE7;
  --tag-default: #6E7A72;
  --tag-news: #B8501F;
  --tag-cloud: #1D6FA5;
  --tag-vendor: #6A4FB0;
  --tag-oss: #2E8B57;
  --tag-deep: #B08A1E;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
::selection { background: rgba(14, 165, 183, 0.22); }
img { max-width: 100%; }

.font-display { font-family: 'Chakra Petch', ui-sans-serif, sans-serif; }
.font-mono { font-family: 'IBM Plex Mono', ui-monospace, monospace; }

/* ===== Nav ===== */
.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  border-bottom: 1px solid var(--border);
  max-width: 1100px;
  margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--ink);
}
.brand-by {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 9.5px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.nav-right { display: flex; align-items: center; gap: 18px; }
.btn {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  cursor: pointer;
  border: none;
  padding: 0 20px;
  height: 40px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  background: var(--accent);
  color: #ffffff;
}
.btn:hover { text-decoration: none; filter: brightness(0.94); }

/* ===== Hero ===== */
.hero {
  background-image: radial-gradient(var(--border-strong) 1px, transparent 1px);
  background-size: 22px 22px;
  padding: 88px 32px 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
}
.eyebrow {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
}
.hero h1 {
  font-family: 'Chakra Petch', ui-sans-serif, sans-serif;
  font-weight: 600;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.005em;
  margin: 0;
  max-width: 720px;
  text-wrap: balance;
}
.hero p.sub {
  font-size: 16.5px;
  color: var(--ink-2);
  max-width: 560px;
  margin: 0;
}
.hero-form { display: flex; gap: 10px; margin-top: 6px; }
.hero-form input[type="email"] {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 14px;
  padding: 0 16px;
  height: 44px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  width: 280px;
  background: var(--surface);
  color: var(--ink);
}
.hero-form button {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  height: 44px;
  padding: 0 22px;
  border: none;
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
}
.hero-note {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11px;
  color: var(--ink-3);
}

/* ===== Roundup / post list ===== */
.roundup {
  max-width: 780px;
  margin: 0 auto;
  padding: 64px 24px;
}
.roundup-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
  margin-bottom: 28px;
}
.roundup-head h2 {
  font-family: 'Chakra Petch', ui-sans-serif, sans-serif;
  font-size: 24px;
  font-weight: 600;
  margin: 0;
}
.post-list { display: flex; flex-direction: column; gap: 26px; }
.post-item { padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.post-item:last-child { border-bottom: none; padding-bottom: 0; }
.post-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--tag-default); flex-shrink: 0; }
.tag-label {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.post-item h3 {
  font-family: 'Chakra Petch', ui-sans-serif, sans-serif;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 8px;
}
.post-item h3 a { color: var(--ink); }
.post-item .excerpt { font-size: 14.5px; color: var(--ink-2); margin: 0 0 8px; max-width: 66ch; }
.post-item .byline {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11px;
  color: var(--ink-3);
}

/* Known pillar tag colors, driven by data-tag on .post-item */
.post-item[data-tag="news-roundup"] .dot { background: var(--tag-news); }
.post-item[data-tag="cloud-security-hardening"] .dot { background: var(--tag-cloud); }
.post-item[data-tag="vendor-watch"] .dot { background: var(--tag-vendor); }
.post-item[data-tag="oss-tooling-spotlight"] .dot { background: var(--tag-oss); }
.post-item[data-tag="deep-dives"] .dot { background: var(--tag-deep); }

/* ===== Pillars ===== */
.pillars {
  background-image: radial-gradient(var(--border-strong) 1px, transparent 1px);
  background-size: 22px 22px;
  background-color: var(--surface-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 64px 24px 76px;
}
.pillars-inner { max-width: 1080px; margin: 0 auto; }
.pillars h2 {
  font-family: 'Chakra Petch', ui-sans-serif, sans-serif;
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 32px;
}
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
.pillar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pillar-card .icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}
.pillar-card h3 {
  font-family: 'Chakra Petch', ui-sans-serif, sans-serif;
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}
.pillar-card h3 a { color: var(--ink); }
a.cadence {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 10.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: auto;
}
a.cadence:hover { text-decoration: underline; }
.pillar-card p {
  font-size: 13px;
  color: var(--ink-2);
  margin: 0;
  line-height: 1.55;
}
.pillar-card .cadence {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 10.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: auto;
}

@media (max-width: 900px) {
  .pillars-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav-links { display: none; }
}

/* ===== Empty state ===== */
.empty-state {
  max-width: 560px;
  margin: 0 auto;
  padding: 64px 24px;
  text-align: center;
  color: var(--ink-2);
}

/* ===== Footer ===== */
.site-footer {
  padding: 56px 32px 40px;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 28px;
  padding-bottom: 28px;
  border-top: 1px solid var(--border);
  padding-top: 32px;
}
.footer-brand { max-width: 340px; display: flex; flex-direction: column; gap: 8px; }
.footer-brand p { font-size: 13px; color: var(--ink-2); margin: 0; line-height: 1.6; }
.footer-links { display: flex; gap: 56px; flex-wrap: wrap; }
.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-col .label {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.footer-col a { font-size: 13px; color: var(--ink-2); }
.copyright {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11px;
  color: var(--ink-3);
}

/* ===== Article / post page ===== */
.article-header {
  max-width: 720px;
  margin: 0 auto;
  padding: 56px 24px 28px;
}
.article-tag { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; }
.article-header h1 {
  font-family: 'Chakra Petch', ui-sans-serif, sans-serif;
  font-weight: 600;
  font-size: clamp(28px, 4vw, 36px);
  line-height: 1.15;
  margin: 0 0 18px;
  text-wrap: balance;
}
.article-byline {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 12px;
  color: var(--ink-3);
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.gh-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px 40px;
  font-size: 17px;
  color: var(--ink);
}
.gh-content > * + * { margin-top: 20px; }
.gh-content h1, .gh-content h2, .gh-content h3, .gh-content h4 {
  font-family: 'Chakra Petch', ui-sans-serif, sans-serif;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
  text-wrap: balance;
}
.gh-content h2 { font-size: 22px; margin-top: 40px; }
.gh-content h3 { font-size: 19px; margin-top: 32px; }
.gh-content p { line-height: 1.75; }
.gh-content a { color: var(--accent); }
.gh-content strong { font-weight: 600; }
.gh-content em { color: var(--ink-2); }
.gh-content blockquote {
  margin: 0;
  padding: 4px 0 4px 18px;
  border-left: 3px solid var(--accent);
  color: var(--ink-2);
  font-family: 'Chakra Petch', ui-sans-serif, sans-serif;
  font-size: 19px;
}
.gh-content code {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1em 0.4em;
  font-size: 0.88em;
}
.gh-content pre {
  background: var(--ink);
  color: #EDF1EF;
  padding: 18px 20px;
  border-radius: 8px;
  overflow-x: auto;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 13.5px;
}
.gh-content pre code { background: none; border: none; padding: 0; color: inherit; }
.gh-content ul, .gh-content ol { padding-left: 1.3em; line-height: 1.7; }
.gh-content hr { border: none; border-top: 1px solid var(--border); margin: 40px 0; }
.gh-content img { border-radius: 8px; }
.gh-content figcaption {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 12px;
  color: var(--ink-3);
  text-align: center;
  margin-top: 8px;
}

/* Koenig editor width classes — break out of the 720px text column */
.gh-content .kg-width-wide {
  width: 1040px;
  max-width: 1040px;
  margin-left: calc(50% - 520px);
}
.gh-content .kg-width-full {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
}
@media (max-width: 1080px) {
  .gh-content .kg-width-wide { width: 100%; max-width: 100%; margin-left: 0; }
}

/* ===== Author bio (end of post) ===== */
.author-bio {
  max-width: 720px;
  margin: 32px auto 0;
  padding: 20px 24px 0;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.author-bio-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.author-bio-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.author-bio-name {
  font-family: 'Chakra Petch', ui-sans-serif, sans-serif;
  font-weight: 600;
  font-size: 15px;
  margin: 0 0 4px;
  color: var(--ink);
}
.author-bio-text {
  font-size: 13.5px;
  color: var(--ink-2);
  margin: 0;
  line-height: 1.6;
}

/* ===== Newsletter CTA (end of post) ===== */
.post-cta {
  max-width: 720px;
  margin: 8px auto 64px;
  padding: 0 24px;
}
.post-cta-inner {
  background-image: radial-gradient(var(--border-strong) 1px, transparent 1px);
  background-size: 22px 22px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
}
.post-cta-inner h3 {
  font-family: 'Chakra Petch', ui-sans-serif, sans-serif;
  font-size: 21px;
  font-weight: 600;
  margin: 0;
}
