/* DELETE THIS FILE */

/* ===============================
   GLOBAL BLOG STYLES
   Works for ALL blog pages
   =============================== */

/* Force readable base */

/* FORCE BLOG VISIBILITY (IMPORTANT FIX) */
.blog-post {
  opacity: 1 !important;
  visibility: visible !important;
  display: block !important;
}

.blog-post {
  max-width: 880px;
  margin: 60px auto;
  padding: 0 20px;
  color: #1f2937; /* dark readable text */
  background: var(--eerie-black-2); /* Darker background for blog posts */
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Ensure blog post visibility */
.blog-post {
    opacity: 1 !important; /* Ensure full opacity */
    visibility: visible !important; /* Ensure visibility */
}

/* Breadcrumb */
.blog-post .breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 14px;
  margin-bottom: 18px;
  color: #6b7280;
}

.blog-post .breadcrumb a,
.blog-post .breadcrumb span {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.blog-post .breadcrumb a {
  color: #d4a017;
  text-decoration: none;
}

.blog-post .breadcrumb a:hover {
  text-decoration: underline;
}

/* Header */
.blog-post h1 {
  font-size: 38px;
  line-height: 1.2;
  margin-bottom: 10px;
  color: #111827;
}

.blog-post .post-meta {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 28px;
}

/* Featured Image */
.blog-post img {
  width: 100%;
  border-radius: 14px;
  margin: 24px 0 32px;
  display: block;
}

/* Content Typography */
.blog-post p {
  font-size: 17px;
  line-height: 1.75;
  margin-bottom: 20px;
  color: #374151;
}

.blog-post h2 {
  font-size: 26px;
  margin-top: 48px;
  margin-bottom: 14px;
  color: #111827;
}

.blog-post ul {
  padding-left: 20px;
  margin-bottom: 24px;
}

.blog-post li {
  margin-bottom: 8px;
  color: #374151;
}

/* ===============================
   CODE BLOCKS (KEY PART)
   =============================== */

.blog-post pre {
  background: #111827 !important;
  color: #e5e7eb !important;
  border-radius: 14px;
  padding: 18px 20px;
  overflow-x: auto;
  margin: 20px 0 36px;
  font-size: 14px;
}

.blog-post code {
  font-family: "Fira Code", Consolas, monospace;
  color: #e5e7eb !important;
}

/* Copy Button */
.code-block {
  position: relative;
}

.copy-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #facc15;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* ===============================
   VIDEO
   =============================== */

.video-wrapper {
  margin: 48px 0;
  border-radius: 16px;
  overflow: hidden;
}

.video-wrapper iframe {
  width: 100%;
  height: 420px;
  border: none;
}

/* ===============================
   DARK MODE SUPPORT
   =============================== */

@media (prefers-color-scheme: dark) {
  .blog-post {
    color: #e5e7eb;
  }

  .blog-post h1,
  .blog-post h2 {
    color: #f9fafb;
  }

  .blog-post p,
  .blog-post li {
    color: #d1d5db;
  }

  .blog-post .post-meta,
  .blog-post .breadcrumb {
    color: #9ca3af;
  }
}

/* ===============================
   MOBILE
   =============================== */

@media (max-width: 640px) {
  .blog-post h1 {
    font-size: 30px;
  }

  .video-wrapper iframe {
    height: 240px;
  }
}

/* ===============================
   STANDALONE BLOG PAGE STYLES
   Independent of portfolio SPA
   =============================== */

/* CRITICAL: Override any inherited portfolio styles */
body {
  background: hsl(0, 0%, 7%) !important;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* FORCE VISIBILITY - No SPA logic */
.blog-post {
  opacity: 1 !important;
  visibility: visible !important;
  display: block !important;
  max-width: 880px;
  margin: 60px auto;
  padding: 30px 20px;
  background: hsl(240, 2%, 12%);
  border: 1px solid hsl(0, 0%, 22%);
  border-radius: 20px;
  box-shadow: -4px 8px 24px hsla(0, 0%, 0%, 0.25);
}

/* Breadcrumb */
.blog-post .breadcrumb {
  font-size: 14px;
  margin-bottom: 18px;
  color: hsla(0, 0%, 84%, 0.7);
}

.blog-post .breadcrumb a {
  color: hsl(45, 100%, 72%);
  text-decoration: none;
  transition: color 0.25s ease;
}

.blog-post .breadcrumb a:hover {
  color: hsl(45, 54%, 58%);
  text-decoration: underline;
}

/* Header */
.blog-post h1 {
  font-size: 38px;
  line-height: 1.2;
  margin-bottom: 10px;
  color: hsl(0, 0%, 98%);
  font-weight: 600;
}

.blog-post .post-meta {
  font-size: 14px;
  color: hsla(0, 0%, 84%, 0.7);
  margin-bottom: 28px;
}

/* Featured Image */
.blog-post img {
  width: 100%;
  border-radius: 14px;
  margin: 24px 0 32px;
  display: block;
}

/* Content Typography */
.blog-post p {
  font-size: 17px;
  line-height: 1.75;
  margin-bottom: 20px;
  color: hsl(0, 0%, 84%);
}

.blog-post h2 {
  font-size: 26px;
  margin-top: 48px;
  margin-bottom: 14px;
  color: hsl(0, 0%, 98%);
  font-weight: 500;
}

.blog-post ul {
  padding-left: 20px;
  margin-bottom: 24px;
}

.blog-post li {
  margin-bottom: 8px;
  color: hsl(0, 0%, 84%);
}

/* ===============================
   CODE BLOCKS
   =============================== */

.blog-post pre {
  background: hsl(240, 2%, 13%) !important;
  color: hsl(0, 0%, 84%) !important;
  border: 1px solid hsl(0, 0%, 22%);
  border-radius: 14px;
  padding: 18px 20px;
  overflow-x: auto;
  font-size: 14px;
}

.blog-post code {
  font-family: "Fira Code", "Courier New", Consolas, monospace;
  color: hsl(0, 0%, 84%) !important;
}

.blog-post pre code {
  background: transparent;
  padding: 0;
  border-radius: 0;
}

/* Inline code */
.blog-post :not(pre) > code {
  background: hsl(240, 2%, 13%);
  color: hsl(45, 100%, 72%);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

/* ===============================
   LINKS
   =============================== */

.blog-post a {
  color: hsl(45, 100%, 72%);
  text-decoration: none;
  transition: color 0.25s ease;
}

.blog-post a:hover {
  color: hsl(45, 54%, 58%);
  text-decoration: underline;
}

/* ===============================
   MOBILE RESPONSIVE
   =============================== */

@media (max-width: 640px) {
  .blog-post {
    margin: 20px 10px;
    padding: 20px 15px;
  }

  .blog-post h1 {
    font-size: 28px;
  }

  .blog-post h2 {
    font-size: 22px;
  }

  .blog-post p {
    font-size: 16px;
  }
}
