/* ===================================================================
   Base / Reset
=================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: #f8f9fa;
  color: #212529;
  line-height: 1.6;
}

/* ===================================================================
   Header / Footer
   - LIST page uses: <header class="site-header">
   - POST page uses: <header class="post-hero">
=================================================================== */
header.site-header {
  background-color: #222;
  color: #ffffff;
  padding: 2rem 0;
  text-align: center;
  border-bottom: 1px solid #444;
}
header.site-header h1 { color: #ffffff; font-size: 2.5rem; font-weight: 800; }
/* Hide intro line under "My Blog" */


footer {
  background-color: #f1f3f5;
  color: #495057;
  padding: 2rem 0;
  border-top: 1px solid #dee2e6;
  text-align: center;
  font-size: 0.9rem;
}
.footer-content { max-width: 1200px; margin: 0 auto; text-align: center; padding: 0 2rem; }

/* ===================================================================
   BLOG LIST (compact cards)
=================================================================== */
.container { max-width: 1200px; margin: 0 auto; padding: 2rem 1.5rem; }

.grid {
  display: grid;
  grid-template-columns: 1fr;     /* mobile: single column */
  gap: 20px;
}

/* Card shell */
.blog-card {
  display: flex;
  align-items: stretch;
  gap: 16px;
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 8px 18px rgba(0,0,0,.06);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.blog-card:hover {
  transform: translateY(-2px);
  border-color: #dfe4ea;
  box-shadow: 0 12px 24px rgba(0,0,0,.10);
}

/* Left thumbnail — compact & neat */
.blog-card-image {
  width: 160px;
  height: 120px;
  object-fit: cover;
  border-radius: 12px;
  flex-shrink: 0;
}

/* Right content */
.blog-card-content {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 2px 0;
  min-width: 0; /* enable text truncation */
}

.blog-card-title {
  font-size: 1.15rem;
  line-height: 1.25;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}

.blog-card-meta {
  font-size: 0.85rem;
  color: #6b7280;
  font-weight: 600;
  margin-bottom: 8px;
}

.blog-card-summary {
  color: #374151;
  font-size: 0.95rem;
  line-height: 1.55;
  margin-bottom: 10px;
}

/* Actions */
.blog-card-actions {
  margin-top: auto;
  display: flex;
  gap: 10px;
}

.read-more-btn,
.copy-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
  border-radius: 10px;
  padding: 10px 14px;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
}

.read-more-btn {
  background: #0b5fff;
  color: #fff;
  box-shadow: 0 6px 14px rgba(11,95,255,.20);
}
.read-more-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(11,95,255,.28);
}

/* Copy link — NO hover effect (keeps same look on hover) */
.copy-link-btn {
  background: #eef2ff;
  color: #1e40af;
}
.copy-link-btn:hover {
  background: #eef2ff;
  color: #1e40af;
  transform: none;
  box-shadow: none;
}

/* Desktop: 2 columns of compact cards */
@media (min-width: 920px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}

/* Tighten up on very small screens; stack image on top */
@media (max-width: 520px) {
  .blog-card {
    flex-direction: column;
    gap: 12px;
  }
  .blog-card-image {
    width: 100%;
    height: 180px;
  }
}

/* ===================================================================
   SINGLE BLOG POST (unchanged from your good version)
=================================================================== */

/* remove dark strip used by site header */
header.post-hero { background: transparent !important; border: 0 !important; padding: 0 !important; }

/* hero layout */
.post-hero { max-width: 1000px; margin: 20px auto 14px; padding: 0 16px; text-align: center; }

/* back link styled like primary button (one arrow; remove arrow from text) */
.back-link {
  display: inline-flex; align-items: center; gap: 8px;
  background: #0b5fff; color: #fff !important;
  padding: 10px 14px; border-radius: 10px; text-decoration: none !important;
  font-weight: 700; font-size: 14px; border: none; cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.back-link::before { content: "←"; margin-right: 6px; transition: transform .25s; }
.back-link:hover { background: #094de3; transform: translateY(-1px); box-shadow: 0 6px 14px rgba(11,95,255,.35); }
.back-link:hover::before { transform: translateX(-3px); }

/* titles/meta */
.blog-post-title { color: #0f172a; font-size: clamp(28px, 4vw, 40px); line-height: 1.18; font-weight: 900; letter-spacing: -0.015em; margin: 10px 0 6px; }
.blog-post-meta  { color: #64748b; font-size: 14px; font-weight: 600; margin: 0 0 12px; }

/* hero image */
.post-hero-image { display: block; width: 100%; max-width: 1000px; height: 420px; max-height: 55vh; object-fit: cover; border-radius: 16px; margin: 10px auto 18px; background: #e5e7eb; }

/* article */
.blog-post-content { max-width: 1000px; margin: 0 auto 24px; background: #fff; border: 1px solid #e9ecef; border-radius: 16px; padding: 22px 22px 26px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); color: #1a1a1a; font-size: 17px; line-height: 1.78; }
.blog-post-content h2, .blog-post-content h3, .blog-post-content h4 { color: #0f172a; line-height: 1.22; font-weight: 900; margin: 26px 0 12px; }
.blog-post-content h2 { font-size: 26px; } .blog-post-content h3 { font-size: 22px; } .blog-post-content h4 { font-size: 18px; }
.blog-post-content p { margin: 0 0 16px; }
.blog-post-content ul, .blog-post-content ol { margin: 0 0 16px; padding-left: 1.25rem; }
.blog-post-content li { margin: 6px 0; }
.blog-post-content img { display: block; max-width: 100%; height: auto; border-radius: 12px; margin: 16px auto; }
.blog-post-content pre { background: #0b0b0b; color: #eaeaea; padding: 14px 16px; border-radius: 12px; overflow-x: auto; font-size: 14px; line-height: 1.6; margin: 18px 0; }
.blog-post-content code { background: #f3f3f3; padding: 2px 6px; border-radius: 6px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; }

/* CTA in article */
.primary-btn { display: inline-block; background: #0b5fff; color: #fff !important; padding: 10px 14px; border-radius: 10px; text-decoration: none !important; margin-top: 24px; font-weight: 800; box-shadow: 0 6px 14px rgba(11,95,255,.28); transition: transform .2s ease, box-shadow .2s ease; }
.primary-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 20px rgba(11,95,255,.32); }

/* responsive */
@media (max-width: 860px) {
  .container { padding: 1.5rem; }
  .post-hero { padding: 0 14px; }
  .post-hero-image { height: 320px; max-height: 48vh; }
  .blog-post-content { padding: 18px; }
}
@media (max-width: 520px) {
  .post-hero-image { height: 240px; max-height: 42vh; }
  .blog-post-title { font-size: clamp(24px, 6vw, 32px); }
}


html, body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
}

.page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1; /* makes main content grow and push footer down */
}

/* optional: add slight top margin to footer to breathe */
footer {
  margin-top: auto;
}

.dark-header p {
  display: block;
}

/* --- Remove underline from the "Read More" link in all states --- */
.read-more-btn,
.read-more-btn:visited,
.read-more-btn:hover,
.read-more-btn:focus,
.read-more-btn:active {
  text-decoration: none;
}