:root {
  --rk-accent: #0d6efd;
  --rk-text: #1f2937;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--rk-text);
  background-color: #fafafa;
}

h1, h2, h3, h4 {
  font-weight: 600;
  letter-spacing: -0.01em;
}

.navbar {
  border-bottom: 3px solid var(--rk-accent);
}

/* Hero on home / about */
.hero {
  text-align: center;
  margin-bottom: 2.5rem;
}
.hero h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin-bottom: 1rem;
}
.hero img {
  max-height: 320px;
  width: 100%;
  object-fit: cover;
  border-radius: 0.75rem;
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.08);
}

/* Post grid cards */
.post-card {
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 0.75rem;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.post-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.08);
}
.post-card .card-img-top {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #eef2f5;
}
.post-card .card-title a {
  color: inherit;
  text-decoration: none;
}
.post-card .card-title a:hover {
  color: var(--rk-accent);
}

/* Post detail prose */
.prose {
  font-size: 1.125rem;
  line-height: 1.75;
  max-width: 65ch;
  color: var(--rk-text);
}
.prose p { margin-bottom: 1.25rem; }
.prose img { max-width: 100%; border-radius: 0.5rem; }

/* Markdown-rendered elements */
.prose h2 {
  font-size: 1.6rem;
  font-weight: 600;
  margin-top: 2.25rem;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}
.prose h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
}
.prose h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}
.prose ul,
.prose ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}
.prose li {
  margin-bottom: 0.35rem;
}
.prose a {
  color: var(--rk-accent);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.prose a:hover {
  text-decoration-thickness: 2px;
}
.prose code {
  background: rgba(13, 110, 253, 0.08);
  padding: 0.1em 0.35em;
  border-radius: 0.25rem;
  font-size: 0.92em;
  color: #b02a37;
}
.prose pre {
  background: #f6f8fa;
  border: 1px solid #e3e6ea;
  border-radius: 0.5rem;
  padding: 1rem;
  overflow-x: auto;
  margin-bottom: 1.25rem;
  font-size: 0.92em;
  line-height: 1.55;
}
.prose pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}
.prose blockquote {
  border-left: 4px solid var(--rk-accent);
  padding: 0.25rem 1rem;
  margin: 0 0 1.25rem;
  color: #495057;
  font-style: italic;
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose hr {
  border: 0;
  border-top: 1px solid #dee2e6;
  margin: 2rem 0;
}
.prose table {
  width: 100%;
  margin-bottom: 1.25rem;
  border-collapse: collapse;
}
.prose th,
.prose td {
  border: 1px solid #dee2e6;
  padding: 0.5rem 0.75rem;
  text-align: left;
}
.prose th {
  background: #f8f9fa;
  font-weight: 600;
}

/* About page */
.about-page {
  max-width: 70ch;
}
.about-page .lead {
  font-size: 1.2rem;
  line-height: 1.7;
  color: #343a40;
  margin-bottom: 2rem;
}
.about-page h2 {
  margin-top: 2.5rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid #e9ecef;
}
.about-page .topic {
  margin-bottom: 1.75rem;
  padding-left: 1rem;
  border-left: 3px solid var(--rk-accent);
}
.about-page .topic h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: var(--rk-accent);
}
.about-page .topic p {
  margin-bottom: 0;
}
.about-page .cta {
  font-size: 1.05rem;
  padding: 1rem 1.25rem;
  background: rgba(13, 110, 253, 0.06);
  border-radius: 0.5rem;
  margin-top: 1.5rem;
}
.about-page hr {
  margin-top: 3rem;
}
.about-page .disclaimer {
  font-size: 0.85rem;
  color: #6c757d;
  font-style: italic;
  margin-bottom: 0;
}

.post-hero img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 0.75rem;
  margin-bottom: 1.5rem;
}

.post-meta {
  color: #6c757d;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

/* Pagination tweaks */
.pagination .page-link { color: var(--rk-accent); }
.pagination .page-item.active .page-link {
  background-color: var(--rk-accent);
  border-color: var(--rk-accent);
}
