/* ── DevLog Feed Layout ── */
.blog-page {
  max-width: 850px;
  margin: 0 auto;
  padding: 120px 24px 80px;
  position: relative;
  z-index: 2;
  min-height: calc(100vh - 200px);
}

/* ── Floating Orbs — fixed full-viewport ambient glow (site palette) ── */
.blog-orbs {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
/* Soft glows via radial-gradient — no filter:blur (Safari repaints huge blurs
   on fixed elements every scroll frame, tanking performance) */
.blog-orb {
  position: absolute;
  border-radius: 50%;
}
.blog-orb:nth-child(1) { width: 700px; height: 700px; top: -6%;  left: -220px; background: radial-gradient(circle, rgba(255, 0, 79, 0.10) 0%, transparent 65%); }
.blog-orb:nth-child(2) { width: 620px; height: 620px; bottom: -4%; right: -220px; background: radial-gradient(circle, rgba(255, 0, 79, 0.07) 0%, transparent 65%); }
.blog-orb:nth-child(3) { width: 820px; height: 820px; top: 40%; left: 50%; transform: translateX(-50%); background: radial-gradient(circle, rgba(255, 0, 79, 0.05) 0%, transparent 65%); }

/* ── Header ── */
.blog-header {
  text-align: center;
  margin-bottom: 48px;
  position: relative;
  z-index: 2;
}
.blog-kicker {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}
.blog-title {
  font-family: var(--sans);
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 900;
  color: var(--text);
  letter-spacing: -0.03em;
}

/* ── Filter Bar ── */
.blog-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 48px;
  position: relative;
  z-index: 2;
}
.filter-btn {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 20px;
  background: rgba(22, 22, 22, 0.5);
  border: 1px solid var(--border);
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.25s ease;
}
.filter-btn:hover {
  border-color: var(--accent);
  color: var(--text);
}
.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  box-shadow: 0 0 16px rgba(255, 0, 79, 0.4);
}

/* ── Commit Feed ── */
.blog-feed {
  position: relative;
  z-index: 2;
  padding-left: 28px;
}
.blog-feed::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom, var(--border) 0%, rgba(255,255,255,0.05) 100%);
}

.blog-loading {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--text-3);
  text-align: center;
  padding: 40px 0;
}

/* ── Commit Row ── */
.commit-row {
  display: flex;
  flex-direction: column;
  position: relative;
  margin-bottom: 32px;
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.commit-row.hidden {
  display: none;
  opacity: 0;
  transform: translateY(12px);
}

/* Scroll reveal (JS toggles .is-visible) */
.commit-row {
  opacity: 0;
  transform: translateY(24px);
}
.commit-row.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .commit-row { opacity: 1; transform: none; transition: none; }
}

/* Commit Node (dot on line) */
.commit-node {
  position: absolute;
  left: -28px;
  top: 18px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--accent);
  box-shadow: 0 0 8px rgba(255, 0, 79, 0.3);
  z-index: 3;
  transform: translateX(-50%);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hover glow expansion */
.commit-row:hover .commit-node {
  transform: translateX(-50%) scale(1.2);
}

/* ── Commit Card ── */
.commit-card {
  background: linear-gradient(135deg, rgba(22, 22, 22, 0.4) 0%, rgba(12, 12, 12, 0.7) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}
.commit-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* Card Header */
.commit-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}
.commit-date {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-3);
}

/* Tags */
.commit-tag {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.02em;
}
.commit-row[data-tag="idea"] .commit-tag { background: rgba(255, 213, 79, 0.1); color: #ffd54f; }
.commit-row[data-tag="building"] .commit-tag { background: rgba(41, 182, 246, 0.1); color: #29b6f6; }
.commit-row[data-tag="learning"] .commit-tag { background: rgba(102, 187, 106, 0.1); color: #66bb6a; }
.commit-row[data-tag="shipped"] .commit-tag { background: rgba(255, 0, 79, 0.1); color: var(--accent); }

/* Commit Title */
.commit-title {
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  margin: 0;
  transition: color 0.2s ease;
}
.commit-card:hover .commit-title {
  color: var(--accent);
}

/* Commit Body (Description) */
.commit-body {
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-2);
}

/* Expandable content */
.commit-excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity 0.3s ease;
}
.commit-full {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease, margin-top 0.4s ease;
}

/* Expanded state */
.commit-card.expanded .commit-excerpt {
  display: none;
}
.commit-card.expanded .commit-full {
  max-height: 2500px;
  opacity: 1;
  margin-top: 12px;
}

/* Chevron expand indicator */
.commit-arrow {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  margin-top: 12px;
  transition: transform 0.2s ease;
}
.commit-card:hover .commit-arrow {
  transform: translateX(4px);
}
.commit-card.expanded .commit-arrow {
  display: none;
}

/* ── Mobile Responsive ── */
@media (max-width: 600px) {
  .blog-page { padding: 96px 16px 56px; }

  .blog-header { margin-bottom: 36px; }

  /* rail closer to the edge → more width for cards */
  .blog-feed { padding-left: 22px; }
  .blog-feed::before { left: 6px; }
  .commit-node {
    left: -22px;
    top: 20px;
    width: 15px;
    height: 15px;
    border-width: 2.5px;
  }

  .blog-filters { gap: 8px; }
  .filter-btn { padding: 6px 12px; font-size: 12px; }
  .commit-card { padding: 16px 18px; }
  .commit-title { font-size: 16px; }
  .commit-body { font-size: 13.5px; }
}
