/* The Czar's Blog — styled to match the main portfolio (christopher-m-miller
   site). This file relies on /assets/index-B2eAm3U1.css being loaded first
   for the :root design tokens (--bg-primary, --accent-primary, --font-*,
   --space-*, --radius-*, etc.), the .navbar/.footer component styles, and
   the base reset — this file only adds what's specific to the blog. */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&display=swap');

body.blog {
  padding-top: var(--nav-height);
  background: var(--bg-primary);
  color: var(--text-primary);
}

/* Static nav link fix: the real navbar items are <button>s (UA default
   display:inline-block, vertically centered by default). A plain <a> here
   defaults to display:inline, whose vertical padding doesn't grow the line
   box the same way and renders visibly higher — match the box model. */
.navbar__link {
  display: inline-flex;
  align-items: center;
}

.blog-container {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

/* ---- page header ---- */

.blog-hero {
  text-align: center;
  padding: var(--space-3xl) 0 var(--space-2xl);
}

.blog-hero__title {
  font-family: var(--font-heading);
  font-size: var(--fs-h1);
  font-weight: 700;
  letter-spacing: -0.5px;
  margin: 0 0 var(--space-sm);
  background: linear-gradient(135deg, var(--accent-secondary), var(--accent-coral));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.blog-hero__tagline {
  color: var(--text-muted);
  font-size: var(--fs-body);
  margin: 0;
}

.known-gaps-note {
  text-align: center;
  color: var(--text-muted);
  font-size: var(--fs-xs);
  margin: var(--space-lg) 0;
}

/* ---- post cards ---- */

.entry-list {
  list-style: none;
  margin: 0 0 var(--space-2xl);
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

article.entry {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  scroll-margin-top: calc(var(--nav-height) + var(--space-md));
  transition: border-color var(--transition-base);
}

article.entry:hover {
  border-color: var(--border-color-hover);
}

.entry-title {
  font-family: var(--font-heading);
  font-size: var(--fs-h2);
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 var(--space-sm);
  letter-spacing: -0.3px;
}

.entry-title a {
  color: inherit;
  text-decoration: none;
}

.entry-title a:hover {
  color: var(--accent-primary);
}

.entry-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
  color: var(--text-muted);
  font-size: var(--fs-small);
  margin-bottom: var(--space-lg);
}

.entry-meta__sep {
  color: var(--border-color-hover);
}

.badge {
  display: inline-block;
  padding: 2px var(--space-sm);
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--accent-primary);
  border-radius: var(--radius-full);
  background: #00d4aa1a;
  border: 1px solid #00d4aa33;
}

.badge-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

a.badge--link {
  text-decoration: none;
  border-bottom: none;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
}

a.badge--link:hover {
  background: var(--accent-primary);
  color: var(--bg-primary);
  border-bottom: none;
}

.filter-bar {
  text-align: center;
  color: var(--text-secondary);
  font-size: var(--fs-small);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  margin: 0 0 var(--space-lg);
}

.filter-bar a {
  color: var(--accent-primary);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.filter-bar a:hover {
  border-bottom-color: var(--accent-primary);
}

/* ---- entry content typography ---- */

.entry-content {
  font-size: var(--fs-body);
  line-height: 1.75;
  color: var(--text-secondary);
}

.entry-content p {
  margin: 0 0 var(--space-md);
}

.entry-content a {
  color: var(--accent-primary);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition-fast);
}

.entry-content a:hover {
  border-bottom-color: var(--accent-primary);
}

.entry-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: var(--space-lg) auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.entry-content pre {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin: 0 0 var(--space-md);
}

.entry-content pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: var(--fs-small);
  line-height: 1.6;
  color: inherit;
}

.entry-content code {
  font-family: var(--font-mono);
}

.entry-content span[style] {
  font-family: var(--font-mono);
  font-size: 0.95em;
}

.entry-content h3,
.entry-content h4 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  margin: var(--space-lg) 0 var(--space-sm);
  line-height: 1.3;
}

.entry-content h3 { font-size: var(--fs-h3); }
.entry-content h4 { font-size: 1.1rem; }

.entry-content ul,
.entry-content ol {
  margin: 0 0 var(--space-md);
  padding-left: var(--space-xl);
}

.entry-content li {
  margin-bottom: var(--space-xs);
}

.entry-content blockquote {
  margin: 0 0 var(--space-md);
  padding: var(--space-sm) var(--space-lg);
  border-left: 3px solid var(--accent-primary);
  background: var(--bg-secondary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-primary);
}

.entry-content blockquote p:last-child {
  margin-bottom: 0;
}

.entry-content hr {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: var(--space-lg) 0;
}

.entry-content strong {
  color: var(--text-primary);
}

.embed-responsive {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: var(--space-lg) 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.embed-responsive iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.entry-footer {
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: center;
  font-size: var(--fs-small);
  color: var(--text-muted);
}

.permalink {
  color: var(--text-muted);
  text-decoration: none;
  font-size: var(--fs-xs);
}

.permalink:hover {
  color: var(--accent-primary);
}
