/* ── Changelog page ─────────────────────────────────── */

/* Nav right group */
.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-link {
  color: #8d96a5;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s;
}

.nav-link:hover {
  color: #f0f0f0;
}

/* Hero */
.changelog-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 80px 24px 48px;
  text-align: center;
}

.changelog-hero h1 {
  max-width: 640px;
}

/* Stats row */
.changelog-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  padding: 0 24px 48px;
  flex-wrap: wrap;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.stat-value {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: var(--brand-gradient);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  font-size: 12px;
  font-weight: 600;
  color: #8d96a5;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Search */
.changelog-search-wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 24px 56px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: #111113;
  border: 1px solid #1e1e1e;
  border-radius: 12px;
  transition: border-color 0.15s;
}

.search-box:focus-within {
  border-color: var(--brand-blue);
}

.search-icon {
  width: 18px;
  height: 18px;
  color: #555;
  flex-shrink: 0;
}

.search-box input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: #f0f0f0;
  font-size: 15px;
  font-family: inherit;
}

.search-box input::placeholder {
  color: #555;
}

.search-hint {
  margin-top: 8px;
  text-align: center;
  font-size: 13px;
  color: #8d96a5;
  min-height: 20px;
}

/* Timeline */
.changelog-timeline {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px 80px;
  position: relative;
}

.changelog-timeline::before {
  content: "";
  position: absolute;
  left: 39px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--brand-blue), var(--brand-pink), var(--brand-coral), transparent);
  border-radius: 2px;
}

/* Version group */
.version-group {
  position: relative;
  padding-left: 60px;
  margin-bottom: 48px;
}

.version-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.timeline-dot {
  position: absolute;
  left: 31px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--brand-gradient);
  box-shadow: 0 0 12px rgba(47, 91, 255, 0.4);
  z-index: 1;
}

.version-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.version-tag {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}

.version-date {
  font-size: 13px;
  color: #555;
  padding: 3px 10px;
  background: #161616;
  border: 1px solid #1e1e1e;
  border-radius: 100px;
}

.version-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
  letter-spacing: 0.02em;
}

.version-badge-feat {
  color: #86a7ff;
  background: rgba(47, 91, 255, 0.12);
  border: 1px solid rgba(47, 91, 255, 0.25);
}

.version-badge-fix {
  color: #ffad9e;
  background: rgba(255, 107, 74, 0.12);
  border: 1px solid rgba(255, 107, 74, 0.25);
}

/* Commit cards */
.version-commits {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.commit-card {
  position: relative;
  background: #111113;
  border: 1px solid #1e1e1e;
  border-radius: 12px;
  padding: 16px 18px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.commit-card:hover {
  border-color: #2a2a2e;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.commit-main {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.commit-top-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

/* Type pills */
.type-pill {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  margin-top: 2px;
}

.type-feature {
  color: #86a7ff;
  background: rgba(47, 91, 255, 0.14);
}

.type-fix {
  color: #ffad9e;
  background: rgba(255, 107, 74, 0.14);
}

.type-refactor {
  color: #c9a0ff;
  background: rgba(160, 100, 255, 0.14);
}

.type-style {
  color: #f0a0e8;
  background: rgba(222, 79, 210, 0.14);
}

.type-chore {
  color: #8d96a5;
  background: rgba(141, 150, 165, 0.12);
}

.type-docs {
  color: #7ecfcf;
  background: rgba(100, 200, 200, 0.12);
}

.type-test {
  color: #a0d98a;
  background: rgba(100, 200, 80, 0.12);
}

.type-performance {
  color: #ffd080;
  background: rgba(255, 200, 80, 0.12);
}

.type-ci,
.type-build {
  color: #8d96a5;
  background: rgba(141, 150, 165, 0.1);
}

.type-other {
  color: #8d96a5;
  background: rgba(141, 150, 165, 0.1);
}

.commit-title {
  font-size: 15px;
  font-weight: 600;
  color: #f0f0f0;
  line-height: 1.4;
}

.pr-link {
  color: var(--brand-pink);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
}

.pr-link:hover {
  text-decoration: underline;
}

/* Meta row */
.commit-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.author-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--brand-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.author-name {
  font-size: 13px;
  font-weight: 600;
  color: #c0c0c0;
}

.commit-date {
  font-size: 12px;
  color: #555;
}

.commit-hash {
  font-family: "SF Mono", "Fira Code", "Fira Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  color: var(--brand-blue);
  text-decoration: none;
  transition: color 0.15s;
}

.commit-hash:hover {
  color: #86a7ff;
  text-decoration: underline;
}

/* Expand indicator */
.commit-expand-indicator {
  position: absolute;
  top: 16px;
  right: 16px;
}

.chevron {
  width: 18px;
  height: 18px;
  color: #555;
  transition: transform 0.25s ease, color 0.15s;
}

.commit-card.expanded .chevron {
  transform: rotate(180deg);
  color: var(--brand-pink);
}

/* Details panel */
.commit-details {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.35s ease, opacity 0.25s ease, margin-top 0.25s ease;
  margin-top: 0;
}

.commit-card.expanded .commit-details {
  max-height: 600px;
  opacity: 1;
  margin-top: 16px;
}

.details-section {
  padding: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid #1a1a1e;
  border-radius: 10px;
}

.details-kicker {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-pink);
  margin-bottom: 12px;
}

.details-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.details-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: #c0c0c0;
  line-height: 1.5;
}

.detail-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-gradient);
  flex-shrink: 0;
  margin-top: 7px;
}

.details-footer {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.affected-areas {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.area-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 100px;
  color: #8d96a5;
  background: rgba(141, 150, 165, 0.08);
  border: 1px solid rgba(141, 150, 165, 0.15);
}

/* ── Responsive ────────────────────────────────────── */

@media (max-width: 720px) {
  .nav-right .nav-cta {
    display: none;
  }

  .changelog-hero {
    padding: 48px 20px 32px;
  }

  .changelog-stats {
    gap: 24px;
  }

  .stat-value {
    font-size: 24px;
  }

  .changelog-timeline::before {
    left: 19px;
  }

  .version-group {
    padding-left: 40px;
  }

  .timeline-dot {
    left: 11px;
    width: 16px;
    height: 16px;
  }

  .version-tag {
    font-size: 17px;
  }

  .commit-card {
    padding: 14px;
  }

  .commit-top-row {
    flex-direction: column;
    gap: 6px;
  }

  .commit-meta-row {
    gap: 8px;
  }
}
