/* ==========================================
   CHANGELOG PAGE - BRUTALIST TIMELINE DESIGN
   ========================================== */

:root {
  /* Colors */
  --color-bg: #0a0e14 !important;
  --color-bg-light: #171b21;
  --color-fg: #fafafa;
  --color-primary: #00d1b2;
  --color-primary-dark: #00a896;
  --color-accent: #c77dff;
  --color-muted: #7d8590;
  --color-border: rgba(255, 255, 255, 0.1);
  
  /* Tag Colors */
  --color-feature: #00d1b2;
  --color-improvement: #3b82f6;
  --color-fix: #f59e0b;
  --color-security: #ef4444;
  
  /* Typography */
  --font-display: 'Outfit', sans-serif;
  --font-mono: 'Space Mono', monospace;
  
  /* Spacing */
  --container-max: 1200px;
  --section-padding: 8rem;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-display);
  background: var(--color-bg);
  color: var(--color-fg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.noise {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.03;
  pointer-events: none;
  z-index: 1;
}

/* ==========================================
   HERO SECTION
   ========================================== */

.changelog-hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  padding: 8rem 0 4rem;
  margin-top: 4.5rem;
  overflow: hidden;
  background: var(--color-bg);
}

.changelog-hero-bg-text {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  transform: translateY(-50%);
  pointer-events: none;
  overflow: hidden;
}

.changelog-hero-bg-text-inner {
  font-size: 20vw;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.05em;
  color: rgba(255, 255, 255, 0.02);
  white-space: nowrap;
}

/* Geometric elements - creative scattered layout */
.changelog-hero-geo {
  position: absolute;
  display: none;
}

.changelog-hero-geo-1 {
  top: 8rem;
  right: 8rem;
  width: 6rem;
  height: 6rem;
  border: 2px solid rgba(0, 209, 178, 0.3);
  transform: rotate(15deg);
  animation: float 8s ease-in-out infinite;
}

.changelog-hero-geo-2 {
  top: 18rem;
  left: 6rem;
  width: 4rem;
  height: 4rem;
  background: rgba(0, 209, 178, 0.1);
  border: 1px solid rgba(0, 209, 178, 0.2);
  transform: rotate(-25deg);
  animation: float 6s ease-in-out infinite 1s;
}

.changelog-hero-geo-3 {
  bottom: 8rem;
  right: 12rem;
  width: 8rem;
  height: 8rem;
  border: 1px solid rgba(0, 209, 178, 0.15);
  transform: rotate(45deg);
  animation: float 10s ease-in-out infinite 2s;
}

@media (min-width: 1024px) {
  .changelog-hero-geo {
    display: block;
  }
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(var(--rotate, 0deg)); }
  50% { transform: translateY(-20px) rotate(calc(var(--rotate, 0deg) + 10deg)); }
}

.changelog-hero-container {
  position: relative;
  z-index: 10;
}

.changelog-hero-content {
  max-width: 48rem;
  margin: 0 auto;
  text-align: center;
}

.changelog-hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
  animation: fade-in 0.6s ease-out;
}

.changelog-hero-tag-line {
  width: 3rem;
  height: 1px;
  background: var(--color-primary);
}

.changelog-hero-tag-text {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-primary);
}

.changelog-hero-title {
  font-size: clamp(3rem, 10vw, 6rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

.changelog-hero-title-line {
  display: block;
  animation: slide-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.changelog-hero-description {
  font-size: 1.25rem;
  color: var(--color-muted);
  margin-bottom: 3rem;
  animation: fade-in 0.8s ease-out 0.2s forwards;
  opacity: 0;
}

/* Stats Counter */
.changelog-hero-stats {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  animation: fade-in 0.8s ease-out 0.3s forwards;
  opacity: 0;
}

.changelog-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.changelog-stat-value {
  font-family: var(--font-mono);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
}

.changelog-stat-label {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-muted);
}

.changelog-stat-divider {
  width: 1px;
  height: 3rem;
  background: var(--color-border);
}

/* ==========================================
   FILTER BAR
   ========================================== */

.changelog-filter-bar {
  position: sticky;
  top: 4.5rem;
  z-index: 100;
  background: rgba(10, 14, 20, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--color-border);
  padding: 1.5rem 0;
}

.filter-wrapper {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.filter-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-muted);
}

.filter-header i {
  color: var(--color-primary);
}

.filter-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  flex: 1;
}

.filter-btn {
  padding: 0.5rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: transparent;
  border: 2px solid var(--color-border);
  color: var(--color-fg);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-btn:hover {
  border-color: var(--color-primary);
  background: rgba(0, 209, 178, 0.1);
  transform: translateY(-2px);
}

.filter-btn.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-bg);
}

.filter-btn i {
  font-size: 0.875rem;
}

.filter-count {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--color-muted);
  margin-left: auto;
}

.filter-count span {
  color: var(--color-primary);
  font-weight: 700;
}

/* ==========================================
   TIMELINE
   ========================================== */

.changelog-timeline {
  position: relative;
  padding: 6rem 0;
  background: #0d1117;
}

.timeline-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(
    to bottom,
    transparent,
    var(--color-primary) 10%,
    var(--color-primary) 90%,
    transparent
  );
  transform: translateX(-50%);
}

.timeline-wrapper {
  position: relative;
  max-width: 56rem;
  margin: 0 auto;
}

/* Timeline Item */
.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 3rem 1fr;
  gap: 2rem;
  margin-bottom: 4rem;
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.timeline-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.timeline-item[style*="display: none"] {
  display: none !important;
}

/* Alternating layout */
.timeline-item:nth-child(odd) {
  grid-template-areas: "card marker .";
}

.timeline-item:nth-child(odd) .timeline-card {
  grid-area: card;
  text-align: right;
}

.timeline-item:nth-child(even) {
  grid-template-areas: ". marker card";
}

.timeline-item:nth-child(even) .timeline-card {
  grid-area: card;
  text-align: left;
}

/* Timeline Marker */
.timeline-marker {
  grid-area: marker;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 0.5rem;
  position: relative;
  z-index: 2;
}

.timeline-marker-dot {
  width: 1.5rem;
  height: 1.5rem;
  border: 3px solid var(--color-primary);
  background: var(--color-bg);
  box-shadow: 0 0 0 4px rgba(0, 209, 178, 0.2);
  transition: all 0.3s ease;
}

.timeline-item:hover .timeline-marker-dot {
  transform: scale(1.2);
  box-shadow: 0 0 0 6px rgba(0, 209, 178, 0.3);
}

/* Timeline Card */
.timeline-card {
  background: var(--color-bg);
  border: 2px solid var(--color-border);
  padding: 2rem;
  transition: all 0.3s ease;
}

.timeline-item:hover .timeline-card {
  border-color: var(--color-primary);
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.timeline-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.timeline-item:nth-child(odd) .timeline-card-header {
  flex-direction: row-reverse;
}

.timeline-date {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--color-muted);
}

.timeline-date i {
  color: var(--color-primary);
}

.timeline-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.timeline-item:nth-child(odd) .timeline-tags {
  justify-content: flex-start;
}

.timeline-item:nth-child(even) .timeline-tags {
  justify-content: flex-end;
}

/* Tags */
.tag {
  padding: 0.25rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.tag-feature {
  background: rgba(0, 209, 178, 0.1);
  border-color: var(--color-feature);
  color: var(--color-feature);
}

.tag-improvement {
  background: rgba(59, 130, 246, 0.1);
  border-color: var(--color-improvement);
  color: var(--color-improvement);
}

.tag-fix {
  background: rgba(245, 158, 11, 0.1);
  border-color: var(--color-fix);
  color: var(--color-fix);
}

.tag-security {
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--color-security);
  color: var(--color-security);
}

.tag-plan {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--color-border);
  color: var(--color-muted);
}

.timeline-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-fg);
  margin-bottom: 0.75rem;
}

.timeline-description {
  font-size: 1rem;
  color: var(--color-muted);
  line-height: 1.75;
  margin-bottom: 1rem;
}

.timeline-meta {
  display: flex;
  gap: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--color-muted);
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
}

.timeline-item:nth-child(odd) .timeline-meta {
  justify-content: flex-end;
}

.timeline-meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.timeline-meta-item i {
  color: var(--color-primary);
}

/* Empty State */
.timeline-empty {
  text-align: center;
  padding: 4rem 2rem;
  grid-column: 1 / -1;
}

.timeline-empty-icon {
  width: 5rem;
  height: 5rem;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--color-border);
  color: var(--color-muted);
  font-size: 2rem;
}

.timeline-empty-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-fg);
  margin-bottom: 0.5rem;
}

.timeline-empty-text {
  font-size: 1rem;
  color: var(--color-muted);
}

/* ==========================================
   CTA SECTION
   ========================================== */

.changelog-cta {
  position: relative;
  padding: 6rem 0;
  background: var(--color-bg);
  border-top: 2px solid var(--color-border);
}

.cta-content {
  max-width: 40rem;
  margin: 0 auto;
  text-align: center;
}

.cta-title {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--color-fg);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

.cta-description {
  font-size: 1.125rem;
  color: var(--color-muted);
  margin-bottom: 2rem;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.cta-btn {
  padding: 0.875rem 1.75rem;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.cta-btn-primary {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-bg);
}

.cta-btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 209, 178, 0.3);
}

.cta-btn-secondary {
  background: transparent;
  border-color: var(--color-border);
  color: var(--color-fg);
}

.cta-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--color-primary);
}

/* ==========================================
   ANIMATIONS
   ========================================== */

@keyframes slide-up {
  from {
    opacity: 0;
    transform: translateY(60px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 1024px) {
  .timeline-line {
    left: 2rem;
  }
  
  .timeline-item {
    grid-template-columns: 3rem 1fr;
    grid-template-areas: "marker card" !important;
    gap: 1.5rem;
  }
  
  .timeline-card {
    text-align: left !important;
  }
  
  .timeline-card-header {
    flex-direction: column !important;
    align-items: flex-start !important;
  }
  
  .timeline-tags {
    justify-content: flex-start !important;
  }
  
  .timeline-meta {
    justify-content: flex-start !important;
    flex-wrap: wrap;
  }
}

@media (max-width: 767px) {
  :root {
    --section-padding: 4rem;
  }
  
  .changelog-hero {
    min-height: 60vh;
    padding: 6rem 0 3rem;
  }
  
  .changelog-hero-stats {
    flex-direction: column;
    gap: 1.5rem;
  }
  
  .changelog-stat-divider {
    width: 3rem;
    height: 1px;
  }
  
  .filter-wrapper {
    flex-direction: column;
    align-items: stretch;
  }
  
  .filter-buttons {
    flex-direction: column;
  }
  
  .filter-btn {
    justify-content: center;
  }
  
  .filter-count {
    margin-left: 0;
    text-align: center;
  }
  
  .timeline-card {
    padding: 1.5rem;
  }
  
  .timeline-title {
    font-size: 1.25rem;
  }
  
  .cta-buttons {
    flex-direction: column;
    align-items: stretch;
  }
  
  .cta-btn {
    width: 100%;
    justify-content: center;
  }
}