/* Base design tokens */
:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #1d2733;
  --muted: #6b7280;
  --accent: #1c7ed6;
  --accent-strong: #0f5fa8;
  --border: #e2e8f0;
  --code-bg: #0f172a;
  --code-text: #e2e8f0;
  --radius: 14px;
  --shadow: 0 18px 50px rgba(17, 24, 39, 0.08);
  --max-width: 860px;
  --font-main: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

/* Global */
* {
  box-sizing: border-box;
}

body.page {
  margin: 0;
  font-family: var(--font-main);
  color: var(--text);
  background: radial-gradient(circle at 10% 20%, #f0f4ff 0, transparent 25%),
    radial-gradient(circle at 90% 10%, #e8f5ff 0, transparent 20%),
    var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease;
}

a:hover {
  color: var(--accent-strong);
}

img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

/* Shells */
.page-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px 64px;
}

.post-shell {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 56px 24px 72px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Post header */
.post-header {
  margin-bottom: 32px;
}

.post-kicker {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 10px;
}

.post-title {
  margin: 0 0 8px;
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1.15;
}

.post-date {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Typography inside posts */
.post-body {
  font-size: 1.05rem;
}

.post-body p {
  margin: 0 0 1.4em;
}

.post-body h2,
.post-body h3,
.post-body h4 {
  margin: 2.2em 0 0.6em;
  line-height: 1.25;
  color: #101828;
}

.post-body h2 {
  font-size: 1.6rem;
}

.post-body h3 {
  font-size: 1.35rem;
}

.post-body h4 {
  font-size: 1.15rem;
  letter-spacing: 0.01em;
}

.post-body ul,
.post-body ol {
  padding-left: 1.3rem;
  margin: 0 0 1.6em;
  line-height: 1.6;
}

.post-body li + li {
  margin-top: 0.45em;
}

.post-body blockquote {
  margin: 1.8em 0;
  padding: 1.1em 1.2em;
  border-left: 4px solid var(--accent);
  background: #f5f8ff;
  color: #0f172a;
  border-radius: 10px;
}

.post-body code {
  font-family: var(--font-mono);
  background: #eef2ff;
  color: #111827;
  padding: 0.1em 0.35em;
  border-radius: 6px;
  font-size: 0.95em;
}

.post-body pre {
  background: var(--code-bg);
  color: var(--code-text);
  padding: 1.1em 1.2em;
  border-radius: 12px;
  overflow: auto;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  line-height: 1.55;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.post-body pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.8em 0;
}

.post-body th,
.post-body td {
  padding: 0.75em;
  border: 1px solid var(--border);
}

.post-body th {
  background: #f0f4ff;
  text-align: left;
}

.post-footer {
  margin-top: 40px;
  display: flex;
  justify-content: flex-start;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(28, 126, 214, 0.08);
  color: var(--accent-strong);
  font-weight: 600;
}

.back-link:hover {
  background: rgba(28, 126, 214, 0.15);
}

/* Generic helpers for pages using the default layout */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

.grid-two {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.muted {
  color: var(--muted);
}

.cta-button {
  display: inline-block;
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 600;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 12px 30px rgba(28, 126, 214, 0.25);
}

.cta-button:hover {
  background: var(--accent-strong);
}

.ghost-button {
  display: inline-block;
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 600;
  border: 1px solid var(--accent);
  color: var(--accent-strong);
  background: rgba(28, 126, 214, 0.08);
}

.ghost-button:hover {
  background: rgba(28, 126, 214, 0.15);
}

/* Hero */
.hero {
  max-width: 940px;
  margin: 0 auto 32px;
  padding: 32px 24px;
  text-align: left;
}

.hero h1 {
  margin: 6px 0 10px;
  font-size: clamp(2.4rem, 5vw, 3.1rem);
  line-height: 1.05;
}

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

.hero-lede {
  font-size: 1.1rem;
  color: #0f172a;
  margin: 0 0 16px;
  max-width: 720px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Sections */
.section {
  max-width: 1100px;
  margin: 0 auto 48px;
  padding: 0 24px;
}

.section-heading {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.section-heading h2 {
  margin: 0;
  font-size: 1.8rem;
}

.section-link {
  margin-left: auto;
  font-weight: 600;
  color: var(--accent-strong);
}

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

/* Posts grid */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.post-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.14);
}

.post-card-date {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 6px;
}

.post-card-title {
  margin: 0 0 8px;
  font-size: 1.2rem;
  color: #0f172a;
}

.post-card-excerpt {
  margin: 0;
  color: #334155;
}

.post-card-read {
  display: inline-block;
  margin-top: 10px;
  font-weight: 600;
  color: var(--accent-strong);
}

/* Stacked cards */
.stacked-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.card-title {
  margin: 0;
  font-size: 1.1rem;
  color: #0f172a;
}

.card-subtitle {
  font-size: 0.95rem;
  color: var(--muted);
}

.card-list {
  margin: 0;
  padding-left: 18px;
  color: #334155;
  line-height: 1.5;
}

.card-list li + li {
  margin-top: 0.35em;
}

.center-note {
  text-align: center;
  max-width: 780px;
  margin: 18px auto 0;
}

/* CTA strip */
.cta-strip {
  margin: 0;
  padding: 0 24px 64px;
}

.cta-strip-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 22px 24px;
  background: linear-gradient(135deg, rgba(28, 126, 214, 0.12), rgba(15, 95, 168, 0.12));
  border: 1px solid rgba(28, 126, 214, 0.2);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.cta-strip h3 {
  margin: 0 0 6px;
}

.cta-strip p {
  margin: 0;
  color: #0f172a;
}

/* Blog list */
.posts-list {
  display: grid;
  gap: 16px;
}

.post-list-card {
  display: block;
  padding: 20px;
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.post-list-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.14);
}
