/* static/css/blog.css — Blog / Articles (all selectors namespaced with blog-) */

.blog-page { color: #e2e8f0; }

/* Search */
.blog-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: .5rem;
  max-width: 560px;
  background: #0f172a;
  border: 1px solid rgba(242, 235, 82, .25);
  border-radius: 50px;
  padding: .35rem .5rem .35rem 1rem;
}
.blog-search-icon { color: #94a3b8; }
.blog-search-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: 0;
  color: #fff;
  padding: .35rem .25rem;
}
.blog-search-input::placeholder { color: #94a3b8; }
.blog-search .btn { border-radius: 50px; }

/* Category pills */
.blog-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem;
  }

.blog-filter-pill {
  padding: .35rem 1rem;
  border-radius: 50px;
  border: 1px solid rgba(242, 235, 82, .3);
  background: #0f172a;
  color: #cbd5e1;
  font-size: .9rem;
  text-decoration: none;
  transition: all .25s ease;
}
.blog-filter-pill:hover,
.blog-filter-pill.active {
  background: #f2eb52;
  color: #0f172a;
  border-color: #f2eb52;
  }

/* Cards — same animated yellow border sweep as .portfolio-card */
.blog-card {
  display: flex;
  flex-direction: column;
  background-color: #0f172a;
  border-radius: var(--border-radius);
  overflow: hidden;
  position: relative;
  transition: var(--transition), --border-progress 0.6s ease, box-shadow 0.3s ease;
  border: 2px solid transparent; /* reserves the 2px ring, transparent at rest */
  background-image:
    linear-gradient(#0f172a, #0f172a),
    conic-gradient(
      from var(--corner-angle, -45deg),
      rgba(242, 235, 82, 0.95) 0%,
      rgba(242, 235, 82, 0.95) var(--border-progress),
      transparent var(--border-progress),
      transparent calc(100% - var(--border-progress)),
      rgba(242, 235, 82, 0.95) calc(100% - var(--border-progress)),
      rgba(242, 235, 82, 0.95) 100%
    );
  background-origin: padding-box, border-box;
  background-clip: padding-box, border-box;
}
.blog-card:hover {
  transform: translateY(-6px);
  --border-progress: 50%; /* each arm grows to 50%, meeting = full loop */
  box-shadow: 0 0 20px 4px rgba(242, 235, 82, 0.35),
              0 4px 8px rgba(0, 0, 0, 0.3);
}

.blog-card-img {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #1e293b;
  border-radius: 10px 10px 10px 10px;
  }

.blog-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px 10px 10px 10px;
  transition: transform .4s ease;
  }

.blog-card:hover .blog-card-img img {
  transform: scale(1.05);
  }

.blog-card-placeholder {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem; color: #334155;
}
.blog-card-body { display: flex; flex-direction: column; flex: 1; padding: 1.25rem; }
.blog-card-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .9rem;
  font-size: .8rem; color: #94a3b8; margin-bottom: .75rem;
}
.blog-badge {
  display: inline-block;
  position: relative;
  background: rgba(242, 235, 82, .12);
  color: #f2eb52;
  border: 1px solid rgba(242, 235, 82, .35);
  border-radius: 50px;
  padding: .15rem .7rem;
  font-size: .75rem;
  font-weight: 600;
  text-decoration: none;
  overflow: hidden;
  isolation: isolate;
}

/* Diagonal shine animation */
.blog-badge::after {
  content: '';
  position: absolute;
  top: -100%;
  left: -150%;
  width: 65%;
  height: 300%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.08) 30%,
    rgba(255, 255, 255, 0.55) 50%,
    rgba(255, 255, 255, 0.08) 70%,
    transparent 100%
  );
  transform: rotate(35deg);
  animation: blogBadgeShine 4s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes blogBadgeShine {
  0% {
    left: -150%;
  }

  45%, 100% {
    left: 180%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .blog-badge::after {
    animation: none;
  }
}
.blog-card-title { font-size: 1.15rem; line-height: 1.35; margin-bottom: .6rem; }
.blog-card-title a { color: #fff; text-decoration: none; }
.blog-card-title a:hover { color: #f2eb52; }
.blog-card-excerpt { color: #94a3b8; font-size: .92rem; flex: 1; }
.blog-read-more { color: #f2eb52; font-weight: 600; font-size: .9rem; text-decoration: none; margin-top: .5rem; }
.blog-read-more:hover { text-decoration: underline; }

/* Pagination */
.blog-pagination { display: flex; justify-content: center; align-items: center; gap: 1rem; }
.blog-page-link {
  padding: .4rem 1.1rem; border-radius: 50px;
  border: 1px solid rgba(242, 235, 82, .3);
  color: #f2eb52; text-decoration: none; background: #0f172a;
}
.blog-page-link:hover { background: #f2eb52; color: #0f172a; }
.blog-page-current { color: #94a3b8; font-size: .9rem; }

/* Empty state */
.blog-empty i { font-size: 3rem; color: #334155; }

/* Detail page */
.blog-breadcrumb { font-size: .85rem; color: #94a3b8; }
.blog-breadcrumb a { color: #cbd5e1; text-decoration: none; }
.blog-breadcrumb a:hover { color: #f2eb52; }
.blog-breadcrumb span { margin: 0 .35rem; }
.blog-breadcrumb .current { color: #f2eb52; margin: 0; }

.blog-article {
  background: #0f172a;
  border: 1px solid rgba(242, 235, 82, .15);
  border-radius: 20px;
  padding: 2rem;
}
.blog-article-title { font-size: clamp(1.6rem, 4vw, 2.4rem); color: #fff; line-height: 1.25; margin-bottom: 1rem; }
.blog-article-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.2rem;
  color: #94a3b8; font-size: .85rem;
  padding-bottom: 1.25rem; margin-bottom: 1.5rem;
  border-bottom: 1px solid #1e293b;
}

/* Author in the article meta row: avatar (or fallback icon) + name */
.blog-author {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}
.blog-article-meta .blog-author-avatar {
  width: 28px;
  height: 28px;
  min-width: 28px;
  aspect-ratio: 1 / 1;
  border-radius: 50% !important;
  object-fit: cover;
  object-position: center;
  border: 1.5px solid #f2eb52;
  background: #1e293b;
  flex-shrink: 0;
  display: block;
}

.blog-article-image { margin-bottom: 1.75rem; border-radius: 14px; overflow: hidden; }
.blog-article-image img { width: 100%; height: auto; display: block; }

.blog-content { font-size: 1.05rem; line-height: 1.8; color: #cbd5e1; overflow-wrap: break-word; }
.blog-content h1, .blog-content h2, .blog-content h3, .blog-content h4 { color: #fff; margin: 2rem 0 .8rem; }
.blog-content h2 { font-size: 1.6rem; }
.blog-content h3 { font-size: 1.3rem; }
.blog-content a { color: #f2eb52; }
.blog-content img { max-width: 100%; height: auto; border-radius: 12px; margin: 1rem 0; }
.blog-content ul, .blog-content ol { padding-left: 1.5rem; margin-bottom: 1.2rem; }
.blog-content blockquote {
  border-left: 4px solid #f2eb52;
  background: #1e293b;
  padding: .8rem 1.2rem;
  margin: 1.5rem 0;
  border-radius: 0 10px 10px 0;
  color: #e2e8f0;
}
.blog-content pre, .blog-content code { background: #1e293b; color: #f2eb52; border-radius: 6px; }
.blog-content code { padding: .1rem .4rem; }
.blog-content pre { padding: 1rem; overflow-x: auto; }

.blog-share {
  display: flex; align-items: center; gap: .6rem;
  margin-top: 2rem; padding-top: 1.25rem;
  border-top: 1px solid #1e293b; color: #94a3b8;
}
.blog-share a {
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: #1e293b; color: #fff; text-decoration: none;
  transition: all .25s ease;
}
.blog-share a:hover { background: #f2eb52; color: #0f172a; }

.blog-cta {
  margin-top: 2rem; padding: 2rem;
  background: #0f172a;
  border: 1px solid rgba(242, 235, 82, .25);
  border-radius: 20px;
}

@media (max-width: 576px) {
  .blog-article { padding: 1.25rem; }
}

/******************************************************************************************************/
/* Share icon in the article meta row (same colour as the other meta items, yellow on hover) */
.blog-share-btn {
  background: transparent;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  transition: color .25s ease;
}
.blog-share-btn:hover,
.blog-share-btn.copied { color: #f2eb52; }
.blog-share-label:not(:empty) { margin-left: .4rem; }

/******************************************************************************************************/