/* ============================================================
   Dev Journal Section — dev-log.css
   ============================================================ */

/* ── Section Container ───────────────────────────────────────── */
.dev-journal {
  padding: 80px 0;
  background: var(--bg-dark, #0d1117);
  position: relative;
  overflow: hidden;
}

.dev-journal::before {
  content: '';
  position: absolute;
  top: -120px;
  right: -120px;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(88, 166, 255, 0.07) 0%, transparent 70%);
  pointer-events: none;
}

/* ── Stats Bar ───────────────────────────────────────────────── */
.dj-stats-bar {
  display: flex;
  align-items: center;
  gap: 32px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 20px 28px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.dj-stat {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dj-stat-icon {
  font-size: 1.1rem;
  line-height: 1;
  color: #58a6ff;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

.dj-stat-value {
  display: block;
  font-size: 1.4rem;
  font-weight: 700;
  color: #58a6ff;
  line-height: 1;
  font-family: 'Inter', sans-serif;
}

.dj-stat-label {
  display: block;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 3px;
}

.dj-powered {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.78rem;
  white-space: nowrap;
}

.dj-powered i {
  font-size: 1rem;
}

/* ── Content Layout (Grid) ───────────────────────────────────── */
.dj-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 48px;
  align-items: start;
}

/* ── Scroll Wrapper (contains timeline + gradient fade) ──────── */
.dj-timeline-scroll-wrapper {
  position: relative;
}

.dj-timeline-scroll-wrapper::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: linear-gradient(to bottom, transparent, var(--bg-dark, #0d1117));
  pointer-events: none;
  z-index: 1;
}

/* ── Timeline ────────────────────────────────────────────────── */
.dj-timeline {
  position: relative;
  padding-left: 28px;
  max-height: 520px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 8px;
  scroll-behavior: smooth;
}

/* Custom scrollbar */
.dj-timeline::-webkit-scrollbar {
  width: 4px;
}

.dj-timeline::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 2px;
}

.dj-timeline::-webkit-scrollbar-thumb {
  background: rgba(88, 166, 255, 0.25);
  border-radius: 2px;
}

.dj-timeline::-webkit-scrollbar-thumb:hover {
  background: rgba(88, 166, 255, 0.5);
}

.dj-timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(
    to bottom,
    #58a6ff 0%,
    rgba(88, 166, 255, 0.3) 60%,
    transparent 100%
  );
  border-radius: 2px;
}

/* ── Timeline Entry Card ─────────────────────────────────────── */
.dj-entry {
  position: relative;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 18px 22px;
  margin-bottom: 16px;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
  cursor: default;
}

.dj-entry:hover {
  background: rgba(88, 166, 255, 0.06);
  border-color: rgba(88, 166, 255, 0.25);
  transform: translateX(4px);
}

/* Dot on the timeline line */
.dj-entry::before {
  content: '';
  position: absolute;
  left: -34px;
  top: 22px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #58a6ff;
  border: 2px solid #0d1117;
  box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.2);
  transition: box-shadow 0.25s ease;
}

.dj-entry:hover::before {
  box-shadow: 0 0 0 5px rgba(88, 166, 255, 0.3);
}

/* Latest entry gets a glowing green dot */
.dj-entry.dj-latest::before {
  background: #3fb950;
  box-shadow: 0 0 0 3px rgba(63, 185, 80, 0.25);
}

.dj-entry.dj-latest {
  border-color: rgba(63, 185, 80, 0.2);
}

/* ── Entry Header ────────────────────────────────────────────── */
.dj-entry-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.dj-meta-badges {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.dj-meta-badge {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.dj-meta-badge i {
  font-size: 0.7rem;
}

.dj-day-badge {
  font-size: 0.7rem;
  font-weight: 700;
  color: #58a6ff;
  background: rgba(88, 166, 255, 0.12);
  border: 1px solid rgba(88, 166, 255, 0.2);
  border-radius: 20px;
  padding: 2px 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dj-entry.dj-latest .dj-day-badge {
  color: #3fb950;
  background: rgba(63, 185, 80, 0.12);
  border-color: rgba(63, 185, 80, 0.25);
}

.dj-date {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.35);
}

.dj-tag {

  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Entry Note ──────────────────────────────────────────────── */
.dj-note {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.6;
  margin: 0;
}

/* ── Loading State ───────────────────────────────────────────── */
.dj-loading {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 32px 0;
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.88rem;
}

.dj-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(88, 166, 255, 0.2);
  border-top-color: #58a6ff;
  border-radius: 50%;
  animation: dj-spin 0.8s linear infinite;
  flex-shrink: 0;
}

@keyframes dj-spin {
  to { transform: rotate(360deg); }
}

/* ── Footer CTA ──────────────────────────────────────────────── */
.dj-footer {
  margin-top: 32px;
  text-align: center;
}

.dj-view-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 10px 20px;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.dj-view-all:hover {
  color: #58a6ff;
  border-color: rgba(88, 166, 255, 0.35);
  background: rgba(88, 166, 255, 0.06);
}

.dj-view-all .fa-arrow-right {
  font-size: 0.75rem;
  transition: transform 0.2s ease;
}

.dj-view-all:hover .fa-arrow-right {
  transform: translateX(3px);
}

/* ── Insights Sidebar ────────────────────────────────────────── */
.dj-insights {
  position: sticky;
  top: 100px;
}

.dj-insights-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dj-insights-title i {
  color: #58a6ff;
}

.dj-insight-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}

.dj-insight-card h4 {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}

.dj-top-tags {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dj-tag-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.dj-tag-count {
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
}

.dj-type-distribution {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dj-type-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
}

.dj-type-stat i {
  margin-right: 6px;
  width: 14px;
  text-align: center;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 640px) {
  .dj-stats-bar {
    gap: 20px;
    padding: 16px 18px;
  }

  .dj-powered {
    margin-left: 0;
    width: 100%;
  }

  .dj-timeline {
    padding-left: 20px;
    max-height: 420px;
  }

  .dj-entry::before {
    left: -26px;
  }
}

@media (max-width: 992px) {
  .dj-content {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  
  .dj-insights {
    position: static;
  }
  
  .dj-meta-badges {
    width: 100%;
    margin-left: 0;
    margin-top: 4px;
  }
}
