/* ============================================
   Technology Leader Blog - Professional Theme
   AI, ML & Software Architecture
   Author: drv
   ============================================ */

:root {
  --bg-primary: #0f1419;
  --bg-secondary: #1a2332;
  --bg-card: #1e2a3a;
  --text-primary: #e8edf4;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-soft: rgba(59, 130, 246, 0.15);
  --border: #2d3a4d;
  --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
  --transition: 0.2s ease;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Home page: fit entire layout in viewport, no page scroll */
body.page-home {
  height: 100vh;
  overflow: hidden;
}

body.page-home .page-columns {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

body.page-home .page-main {
  overflow-y: auto;
  overflow-x: hidden;
}

body.page-home .sidebar-panel {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.25;
  color: var(--text-primary);
}

h1 { font-size: clamp(2rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 0.75rem; }
h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }

p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

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

/* Layout */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header & Nav */
.site-header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
  flex-shrink: 0;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
}

.site-logo {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-primary);
}

.site-logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--text-primary);
}

/* Two-column layout under header */
.page-columns {
  display: flex;
  align-items: stretch;
  gap: 0;
  flex: 1;
}

.page-main {
  flex: 2;
  min-width: 0;
  padding-bottom: 1.5rem;
}

.sidebar-panel {
  flex: 1;
  min-width: 0;
  max-width: 33.333%;
  background: var(--bg-secondary);
  border-left: 1px solid var(--border);
  padding: 1.5rem 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
}

body.page-home .page-columns {
  align-items: stretch;
}

body.page-home .page-main {
  min-height: 0;
  padding-bottom: 1rem;
}

body.page-home .sidebar-panel {
  min-height: 0;
  padding: 1rem;
}

.sidebar-panel .section-title {
  margin-bottom: 0.5rem;
  flex-shrink: 0;
}

.sidebar-view-all {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
}

.sidebar-view-all a {
  font-weight: 500;
}

.sidebar-panel-scroll {
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  min-height: 0;
  padding-right: 0.25rem;
}

.sidebar-panel-scroll .blog-card {
  margin-bottom: 1rem;
  flex-direction: row;
  align-items: center;
  padding: 1rem;
}

.sidebar-panel-scroll .blog-card:last-child {
  margin-bottom: 0;
}

.sidebar-panel-scroll .blog-card-body {
  flex: 1;
  min-width: 0;
}

.sidebar-panel-scroll .blog-card-thumbnail {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  padding: 0.5rem;
  margin-left: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-panel-scroll .blog-card-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-panel-scroll .blog-card-thumbnail--empty::after {
  content: "";
  display: block;
  width: 24px;
  height: 24px;
  background: var(--text-muted);
  opacity: 0.3;
  border-radius: 4px;
}

@media (max-width: 900px) {
  .page-columns {
    flex-direction: column;
    min-height: 0;
  }

  .page-main {
    flex: none;
  }

  .sidebar-panel {
    flex: none;
    width: 100%;
    max-width: none;
    position: static;
    max-height: min(400px, 50vh);
    border-left: none;
    border-top: 1px solid var(--border);
    padding: 1rem 1rem 1.25rem;
  }

  body.page-home .sidebar-panel {
    max-height: min(280px, 35vh);
    min-height: 0;
  }

  body.page-home .page-main {
    min-height: 0;
    flex: 1;
  }

  .sidebar-panel .section-title {
    margin-bottom: 0.75rem;
  }

  .sidebar-panel-scroll .blog-card {
    margin-bottom: 0.75rem;
  }

  .sidebar-panel-scroll .blog-card-thumbnail {
    width: 56px;
    height: 56px;
    padding: 0.375rem;
    margin-left: 0.5rem;
  }

  .sidebar-panel-scroll .blog-card-body {
    padding: 0.75rem 1rem;
  }

  .blog-card--sidebar h3 {
    font-size: 1.05rem !important;
  }

  .sidebar-panel-scroll .blog-card p {
    -webkit-line-clamp: 2;
  }
}

/* Hero */
.hero {
  padding: 1.5rem 0 1rem;
  text-align: center;
}

.hero h1 {
  margin-bottom: 0.35rem;
}

.hero .tagline {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto;
}

/* Assistant Chatbot Section */
.assistant-chatbot {
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
}

.assistant-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.assistant-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem 1.5rem;
}

.assistant-heading {
  font-size: 1.2rem;
  margin: 0;
  color: var(--text-primary);
}

.assistant-tagline {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0;
  flex: 1;
  min-width: 200px;
}

.assistant-fullscreen-btn,
.assistant-fullscreen-close-btn {
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: var(--font-sans);
  transition: color var(--transition);
}

.assistant-fullscreen-btn:hover,
.assistant-fullscreen-close-btn:hover {
  color: var(--accent);
}

.assistant-fullscreen-close-btn {
  padding: 0.4rem 0.75rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.assistant-fullscreen-close-btn:hover {
  border-color: var(--accent);
}

/* Assistant full-screen expand in place (preserves chat session - iframe never moves) */
body.assistant-fullscreen-active .assistant-card {
  position: fixed;
  top: clamp(1rem, 2.5vw, 2rem);
  right: clamp(1rem, 2.5vw, 2rem);
  bottom: clamp(1rem, 2.5vw, 2rem);
  left: clamp(1rem, 2.5vw, 2rem);
  width: auto;
  height: auto;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  max-width: none;
  margin: 0;
  min-height: 0;
  box-sizing: border-box;
}

body.assistant-fullscreen-active .assistant-card .assistant-header {
  flex-shrink: 0;
}

body.assistant-fullscreen-active .assistant-card .assistant-embed {
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: hidden;
}

body.assistant-fullscreen-active .assistant-card .assistant-iframe {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.assistant-embed {
  padding: 0;
  background: var(--bg-secondary);
}

.assistant-iframe {
  width: 100%;
  height: 480px;
  display: block;
  border: none;
}

@media (max-width: 700px) {
  .assistant-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .assistant-tagline {
    min-width: 0;
  }

  .assistant-iframe {
    height: 420px;
  }
}

/* About Section */
.about {
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
}

.about .container {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 700px) {
  .about .container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .about-photo {
    margin: 0 auto;
  }
}


.about-photo {
  width: 100%;
  max-width: 140px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  box-shadow: var(--shadow);
}

.about-content h2 {
  margin-bottom: 0.5rem;
}

.about-content p {
  margin-bottom: 0.6rem;
  font-size: 0.95rem;
  line-height: 1.55;
}

/* Home page: scale about text to fit viewport */
body.page-home .about-content p {
  font-size: clamp(0.8rem, 1.5vh, 0.95rem);
  line-height: 1.5;
  margin-bottom: 0.45rem;
}

body.page-home .hero {
  padding: 1rem 0 0.75rem;
}

body.page-home .hero h1 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
}

body.page-home .hero .tagline {
  font-size: clamp(0.875rem, 1.5vh, 1rem);
}

body.page-home .about {
  padding: 1rem 0;
}

body.page-home .contact {
  padding: 1rem 0;
}

body.page-home .about-photo {
  max-width: clamp(100px, 12vw, 140px);
}

body.page-home .about .container {
  grid-template-columns: clamp(100px, 12vw, 140px) 1fr;
  gap: 1rem;
}

body.page-home .contact-intro {
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.about-signature {
  margin-top: 0.75rem;
  margin-bottom: 0;
  text-align: right;
  font-style: italic;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.about-connect {
  margin-top: 1.25rem;
  margin-bottom: 0;
}

.about-connect a {
  font-weight: 600;
  display: inline-block;
}

/* Contact Section */
.contact {
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
}

.contact h2 {
  margin-bottom: 1rem;
}

.contact,
.contact p,
.contact a {
  font-size: 0.9rem;
}

.contact-intro {
  margin-bottom: 0.75rem;
}

.contact-links {
  margin-bottom: 0;
}

.contact-sep {
  margin: 0 0.5rem;
  color: var(--text-muted);
}

/* Contact page (standalone) */
.contact-page {
  padding: 4rem 0 6rem;
}

.contact-page .back-link {
  display: inline-block;
  margin-bottom: 2rem;
}

.contact-page h1 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

/* About page - fit screen space */
body.page-about main.about-main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

body.page-about .about-page {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 2rem;
  box-sizing: border-box;
}

.about-page .back-link {
  flex-shrink: 0;
  display: inline-block;
  margin-bottom: 1.5rem;
}

.about-page .about-page-layout {
  flex: 1;
  min-height: min(600px, 60vh);
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: start;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.about-page .about-photo {
  width: 100%;
  max-width: 240px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  box-shadow: var(--shadow);
}

.about-page .about-content {
  min-width: 0;
}

.about-page h1 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  margin-bottom: 1.25rem;
}

.about-page .about-content p {
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 1rem;
}

@media (max-width: 700px) {
  body.page-about .about-page {
    padding: 1.5rem;
  }

  .about-page .about-page-layout {
    grid-template-columns: 1fr;
    text-align: center;
    min-height: auto;
  }

  .about-page .about-photo {
    margin: 0 auto;
    max-width: 200px;
  }
}

/* Section titles */
.section-title {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}

/* Blog grid (used in sidebar and elsewhere) */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

/* Blogs page: wider container to maximize space */
.blogs-page .container {
  max-width: 1280px;
}

.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
}

.blog-card-image {
  width: 100%;
  height: 160px;
  object-fit: cover;
  background: var(--bg-secondary);
}

.blog-card-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-card-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-family: var(--font-mono);
}

.blog-card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

/* Sidebar: card titles at half size (class ensures override) */
.blog-card--sidebar h3 {
  font-size: 1.1rem !important;
  line-height: 1.3;
}

.blog-card h3 a {
  color: var(--text-primary);
}

.blog-card h3 a:hover {
  color: var(--accent);
}

.blog-card p {
  font-size: 0.9rem;
  margin-bottom: 1rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card .read-more {
  font-weight: 600;
  font-size: 0.9rem;
}

/* Footer */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 1rem 0;
  margin-top: auto;
  flex-shrink: 0;
}

.site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-footer p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--accent);
}

/* ============================================
   Blog post page styles
   ============================================ */

.blog-header {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--border);
}

.blog-header h1 {
  margin-bottom: 0.75rem;
  max-width: 720px;
}

.blog-header .blog-meta {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.blog-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.75rem;
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
  font-family: var(--font-sans);
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
}

.blog-share-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.blog-share-bottom {
  margin-top: 2.5rem;
  margin-bottom: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.blog-share-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 0.75rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-size: 0.9rem;
  color: var(--text-primary);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.25s ease, opacity 0.25s ease, visibility 0.25s ease;
  z-index: 1000;
}

.blog-share-toast--visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  visibility: visible;
}

.blog-content {
  padding: 2.5rem 0 4rem;
  max-width: 720px;
}

.blog-content p {
  margin-bottom: 1.25rem;
}

.blog-content h2 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.blog-content h3 {
  margin-top: 1.5rem;
}

.blog-content ul, .blog-content ol {
  margin: 0 0 1.25rem 1.5rem;
  color: var(--text-secondary);
}

.blog-content li {
  margin-bottom: 0.5rem;
}

.blog-content code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--accent-soft);
  padding: 0.2em 0.4em;
  border-radius: var(--radius-sm);
  color: var(--accent);
}

.blog-content pre {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  overflow-x: auto;
  margin-bottom: 1.25rem;
}

.blog-content pre code {
  background: none;
  padding: 0;
  color: var(--text-primary);
}

.more-posts {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.more-posts h3 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.more-posts-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.more-posts-list li {
  margin-bottom: 0.5rem;
}

.more-posts-list a {
  color: var(--text-primary);
}

.more-posts-list a:hover {
  color: var(--accent);
}

.more-posts-date {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-left: 0.5rem;
}

.blog-content table.blog-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
}

.blog-content table.blog-table th,
.blog-content table.blog-table td {
  border: 1px solid var(--border);
  padding: 0.5rem 0.75rem;
  text-align: left;
}

.blog-content table.blog-table th {
  background: var(--bg-card);
  color: var(--text-primary);
  font-weight: 600;
}

.blog-content table.blog-table td {
  color: var(--text-secondary);
}

.blog-content blockquote {
  border-left: 4px solid var(--accent);
  margin: 1.5rem 0;
  padding: 0.75rem 1.25rem;
  background: var(--accent-soft);
  color: var(--text-secondary);
  font-style: italic;
}

.blog-content img {
  max-width: 70%;
  height: auto;
  border-radius: var(--radius);
  margin: 1.5rem auto;
  display: block;
}

/* 30% larger than default (70% * 1.3 = 91%) */
.blog-content img.blog-img-medium {
  max-width: 91%;
}

/* 50% larger than default (70% * 1.5 = 105%) */
.blog-content img.blog-img-large {
  max-width: 105%;
}

/* 60% larger than default (70% * 1.6 = 112%) */
.blog-content img.blog-img-xlarge {
  max-width: 112%;
}

/* Two images displayed horizontally */
.blog-images-horizontal {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  align-items: flex-start;
  margin: 1.5rem 0;
}

.blog-images-horizontal img {
  flex: 1 1 45%;
  min-width: 280px;
  max-width: 50%;
}

/* AI Risk Registers blog: images 50% smaller */
.blog-risk-registers img {
  width: 50%;
}

/* Hybrid retrieval blog: smaller images with padding */
.blog-hybrid-retrieval img {
  max-width: 55%;
  padding: 1rem;
  box-sizing: border-box;
}

.blog-hybrid-retrieval img.blog-img-larger {
  max-width: 92%;
}

/* RLHF vs DPO blog: images (100% max-width) */
.blog-rlhf-dpo img {
  max-width: 100%;
  padding: 1.25rem;
  box-sizing: border-box;
}

.blog-rlhf-dpo .blog-figure {
  margin: 1.5rem 0;
  padding: 0;
}

/* Multimodal safety blog: images with padding */
.blog-multimodal-safety img {
  max-width: 55%;
  padding: 1.25rem;
  box-sizing: border-box;
}

.blog-multimodal-safety .blog-figure {
  margin: 1.5rem 0;
  padding: 0;
}

/* Small models blog: images with padding */
.blog-small-models img {
  max-width: 55%;
  padding: 1.25rem;
  box-sizing: border-box;
}

.blog-small-models .blog-figure {
  margin: 1.5rem 0;
  padding: 0;
}

/* Latency crisis blog: infographic with padding */
.blog-latency-crisis img {
  max-width: 65%;
  padding: 1.25rem;
  box-sizing: border-box;
}

.blog-latency-crisis .blog-figure {
  margin: 1.5rem 0;
  padding: 0;
}

/* Temporal reasoning blog: flowcharts with padding */
.blog-temporal-reasoning img {
  max-width: 60%;
  padding: 1.25rem;
  box-sizing: border-box;
}

.blog-temporal-reasoning .blog-figure {
  margin: 1.5rem 0;
  padding: 0;
}

/* Scaling RAG blog: flowcharts and diagrams with padding */
.blog-scaling-rag img {
  max-width: 65%;
  padding: 1.25rem;
  box-sizing: border-box;
}

.blog-scaling-rag img.blog-img-larger {
  max-width: 97.5%;
}

.blog-scaling-rag .blog-figure {
  margin: 1.5rem 0;
  padding: 0;
}

/* Engineering reasoning models blog: diagram with padding */
.blog-reasoning-models img {
  max-width: 60%;
  padding: 1.25rem;
  box-sizing: border-box;
}

.blog-reasoning-models .blog-figure {
  margin: 1.5rem 0;
  padding: 0;
}

/* RAG at scale blog: flowcharts with padding */
.blog-rag-at-scale img {
  max-width: 60%;
  padding: 1.25rem;
  box-sizing: border-box;
}

.blog-rag-at-scale .blog-figure {
  margin: 1.5rem 0;
  padding: 0;
}

/* From bench to deployment blog: MLOps diagrams with padding */
.blog-mlops-bench-deployment img {
  max-width: 60%;
  padding: 1.25rem;
  box-sizing: border-box;
}

.blog-mlops-bench-deployment .blog-figure {
  margin: 1.5rem 0;
  padding: 0;
}

/* RAG LangChain blog: flowcharts with padding */
.blog-rag-langchain img {
  max-width: 60%;
  padding: 1.25rem;
  box-sizing: border-box;
}

.blog-rag-langchain img.blog-img-larger {
  max-width: 96%;
}

.blog-rag-langchain .blog-figure {
  margin: 1.5rem 0;
  padding: 0;
}

/* Chains to Graphs blog: flowcharts with padding */
.blog-chains-to-graphs img {
  max-width: 60%;
  padding: 1.25rem;
  box-sizing: border-box;
}

.blog-chains-to-graphs .blog-figure {
  margin: 1.5rem 0;
  padding: 0;
}

/* Brilliant Tools / Intent-Driven Development as a Service blog: infographic with padding */
.blog-brilliant-tools img {
  max-width: 100%;
  width: 100%;
  height: auto;
  padding: 1.5rem;
  box-sizing: border-box;
  border-radius: var(--radius);
}

.blog-brilliant-tools .blog-figure {
  margin: 2rem 0;
  padding: 0;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 2rem;
}

.back-link:hover {
  color: var(--accent);
}

/* Blogs listing page */
.blogs-page .blogs-listing {
  padding: 0 0 4rem;
}

.blogs-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  margin-bottom: 1rem;
  align-items: flex-end;
}

.blogs-control-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.blogs-control-group label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.blogs-input,
.blogs-select {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  min-width: 180px;
}

.blogs-input {
  min-width: 240px;
}

.blogs-input::placeholder {
  color: var(--text-muted);
}

.blogs-input:focus,
.blogs-select:focus {
  outline: none;
  border-color: var(--accent);
}

.blogs-page-info {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.blogs-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.pagination-btn {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}

.pagination-btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-btn.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.pagination-pages {
  display: flex;
  gap: 0.25rem;
}
