/* ======================= BLOG ARCHIVE PAGE ======================= */

/* --- Hero --- */
.bl-hero {
  position: relative;
  padding: 100px 0 80px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  text-align: center;
}
.bl-hero .hero-bg { position: absolute; inset: 0; pointer-events: none; }
.bl-hero .hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, black 20%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, black 20%, transparent 80%);
}
.bl-hero .hero-glow {
  position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.5;
}
.bl-hero .hero-glow--a {
  width: 600px; height: 600px;
  background: radial-gradient(circle, var(--red-glow) 0%, transparent 70%);
  top: -250px; left: 50%; transform: translateX(-50%);
}
.bl-hero-inner { position: relative; max-width: 700px; margin: 0 auto; }
.bl-hero h1 {
  font-size: clamp(40px, 5vw, 72px);
  margin: 20px 0 18px;
}
.bl-hero .lead {
  margin: 0 auto;
  max-width: 560px;
}

/* --- Post list layout --- */
.bl-list-section {
  padding: 64px 0 96px;
}

.bl-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 48px;
  align-items: start;
}

.bl-main {
  min-width: 0;
}

.bl-archive {
  position: sticky;
  top: 96px;
}

.bl-archive-nav {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg-1);
}

.bl-archive-label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-4);
  margin-bottom: 14px;
}

.bl-archive-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 0;
}

.bl-archive-item a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--fg-2);
  text-decoration: none;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.bl-archive-item a:hover {
  background: var(--bg-2);
  color: var(--fg);
}

.bl-archive-month {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
}

.bl-archive-count {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-4);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 100px;
  min-width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  padding: 0 8px;
  flex-shrink: 0;
}

.bl-archive-rss {
  display: inline-flex;
  margin-top: 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-3);
  text-decoration: none;
}

.bl-archive-rss:hover {
  color: var(--red);
}

.bl-archive-item.is-hidden,
.bl-archive-item.is-empty {
  display: none;
}

/* Month groups */
.bl-list {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.bl-month {
  scroll-margin-top: 96px;
}

.bl-month.is-hidden {
  display: none;
}

.bl-month-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.bl-month-title {
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.bl-month-count {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg-4);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.bl-month-posts {
  display: flex;
  flex-direction: column;
}

/* Individual post row */
.bl-post {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: background 0.25s var(--ease);
  position: relative;
}
.bl-month-posts .bl-post:last-child {
  border-bottom: none;
}
.bl-post:hover {
  background: var(--bg-1);
}
.bl-post:hover .bl-post-title {
  color: var(--red);
}

/* Left side: title + meta */
.bl-post-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.bl-post-top {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Tag pill */
.bl-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--red);
  background: var(--red-glow-soft);
  border: 1px solid rgba(255,43,43,0.18);
  border-radius: 100px;
  padding: 4px 12px;
  flex-shrink: 0;
}
.bl-tag-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--red);
  flex-shrink: 0;
}

.bl-post-title {
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--fg);
  transition: color 0.25s var(--ease);
}

/* Meta row */
.bl-post-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.bl-post-author {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.bl-post-author-avatar {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--bg-3);
  border: 1px solid var(--line-2);
  display: grid;
  place-items: center;
  overflow: hidden;
  flex-shrink: 0;
}
.bl-post-author-avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
  border-radius: 50%;
  display: block;
  align-self: stretch;
  justify-self: stretch;
}
.bl-post-author-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-3);
}
.bl-meta-sep {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--fg-4);
  flex-shrink: 0;
}
.bl-post-info {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg-4);
  letter-spacing: 0.04em;
}

/* Right side: arrow */
.bl-post-arrow {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: var(--fg-4);
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease), background 0.25s var(--ease);
}
.bl-post-arrow svg {
  width: 16px; height: 16px;
}
.bl-post:hover .bl-post-arrow {
  border-color: var(--red);
  color: var(--red);
  background: rgba(255,43,43,0.06);
}

/* --- Responsive --- */
@media (max-width: 960px) {
  .bl-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .bl-archive {
    position: static;
    order: -1;
  }

  .bl-archive-nav {
    padding: 16px;
  }

  .bl-archive-list {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }

  .bl-archive-item {
    flex: 0 0 auto;
  }

  .bl-archive-item a {
    white-space: nowrap;
    border: 1px solid var(--line);
    background: var(--bg);
  }

  .bl-archive-rss {
    margin-top: 12px;
  }
}

@media (max-width: 700px) {
  .bl-hero { padding: 72px 0 56px; }
  .bl-post {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 24px 0;
  }
  .bl-post-arrow {
    display: none;
  }
}

/* --- Category filters --- */
.bl-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}
.bl-filter {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 14px;
  border-radius: 100px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--fg-3);
  cursor: pointer;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), background 0.2s var(--ease);
}
.bl-filter:hover {
  border-color: var(--line-2);
  color: var(--fg);
}
.bl-filter.is-active {
  border-color: rgba(255,43,43,0.35);
  background: var(--red-glow-soft);
  color: var(--red);
}
.bl-post.is-hidden {
  display: none;
}
