﻿:root {
  --bg: #0d1117;
  --card-bg: #161b22;
  --line-color: #3b82f6;
  --accent: #58a6ff;
  --text: #e6edf3;
  --muted: #8b949e;
  --border: #30363d;
  --intel: #3b82f6;
  --amd: #ef4444;
  --apple: #a1a1aa;
  --qualcomm: #22c55e;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 40px 16px 80px;
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}

.page-header {
  max-width: 1100px;
  margin: 0 auto 24px;
  text-align: center;
}

h1 {
  margin: 0 0 4px;
  color: var(--text);
  font-size: 2.2rem;
  letter-spacing: 0;
}

.subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

.timeline {
  position: relative;
  max-width: 1100px;
  min-height: 240px;
  margin: 0 auto;
  padding: 10px 0;
}

.timeline::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  border-radius: 2px;
  background: linear-gradient(to bottom, var(--line-color), var(--accent));
  content: "";
  transform: translateX(-50%);
}

.item {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  width: 100%;
  justify-content: flex-start;
}

.item.right {
  justify-content: flex-end;
}

.card {
  position: relative;
  width: 44%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card-bg);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.55);
  transform: translateY(-4px);
}

.card.brand-Intel {
  border-left: 4px solid var(--intel);
}

.card.brand-AMD {
  border-left: 4px solid var(--amd);
}

.card.brand-Apple {
  border-left: 4px solid var(--apple);
}

.processor-image {
  display: block;
  width: 100%;
  height: 100px;
  margin-bottom: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.06);
}

.processor-image.is-loading {
  opacity: 0.72;
}

.processor-image.is-fallback {
  object-fit: cover;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 6px;
}

.year,
.badge {
  display: inline-flex;
  min-height: 20px;
  align-items: center;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
}

.year {
  padding: 2px 8px;
  color: #fff;
  background: var(--line-color);
}

.badge {
  padding: 2px 8px;
  border: 1px solid currentColor;
}

.badge-Intel {
  color: #60a5fa;
  background: rgba(29, 78, 216, 0.18);
}

.badge-AMD {
  color: #f87171;
  background: rgba(220, 38, 38, 0.18);
}

.badge-Apple {
  color: #d4d4d8;
  background: rgba(113, 113, 122, 0.18);
}

.card h2 {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 1.05rem;
  letter-spacing: 0;
}

.specs {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.specs td {
  padding: 2px 0;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
}

.specs .label {
  width: 45%;
  color: var(--text);
  font-weight: 700;
}

.dot {
  position: absolute;
  top: 14px;
  left: 50%;
  z-index: 2;
  width: 16px;
  height: 16px;
  border: 4px solid var(--accent);
  border-radius: 50%;
  background: var(--bg);
  transform: translateX(-50%);
}

.dot.brand-Intel {
  border-color: var(--intel);
}

.dot.brand-AMD {
  border-color: var(--amd);
}

.dot.brand-Apple {
  border-color: var(--apple);
}

.item:not(.right) .card::after,
.item.right .card::after {
  position: absolute;
  top: 16px;
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  content: "";
}

.item:not(.right) .card::after {
  right: -12px;
  border-left: 12px solid var(--card-bg);
}

.item.right .card::after {
  left: -12px;
  border-right: 12px solid var(--card-bg);
}

@media (max-width: 800px) {
  body {
    padding-top: 28px;
  }

  .timeline {
    height: auto !important;
  }

  .timeline::before {
    left: 24px;
  }

  .item,
  .item.right {
    position: static !important;
    justify-content: flex-start;
    margin-bottom: 14px;
    padding-left: 50px;
  }

  .card {
    width: 100%;
  }

  .dot {
    left: 24px;
  }

  .item:not(.right) .card::after,
  .item.right .card::after {
    right: auto;
    left: -12px;
    border-right: 12px solid var(--card-bg);
    border-left: none;
  }
}

.filters {
  max-width: 1100px;
  margin: 0 auto 18px;
  text-align: center;
}

.filter-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(22, 27, 34, 0.78);
}

.filter-button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.filter-button:hover,
.filter-button:focus-visible {
  border-color: var(--border);
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  outline: none;
}

.filter-button.active {
  border-color: var(--accent);
  color: #fff;
  background: var(--line-color);
}

.results-count {
  min-height: 20px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}


.card.brand-Qualcomm {
  border-left: 4px solid var(--qualcomm);
}

.badge-Qualcomm {
  color: #86efac;
  background: rgba(34, 197, 94, 0.18);
}

.dot.brand-Qualcomm {
  border-color: var(--qualcomm);
}


/* Visual polish and motion layer */
:root {
  --surface: rgba(18, 24, 33, 0.88);
  --surface-strong: rgba(23, 31, 43, 0.96);
  --glow: rgba(88, 166, 255, 0.18);
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(34, 197, 94, 0.08), transparent 30%),
    linear-gradient(225deg, rgba(239, 68, 68, 0.07), transparent 34%),
    linear-gradient(180deg, #0b1020 0%, #0f141d 42%, #0a0d12 100%);
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.75), transparent 78%);
  content: "";
}

.page-header {
  position: relative;
  padding: 12px 0 4px;
}

.page-header::after {
  display: block;
  width: min(360px, 72vw);
  height: 2px;
  margin: 18px auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--amd), var(--intel), var(--qualcomm), transparent);
  content: "";
}

h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.05;
  text-shadow: 0 12px 32px rgba(0, 0, 0, 0.42);
}

.subtitle,
.results-count {
  color: #a8b3c4;
}

.filter-group {
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
}

.filter-button {
  position: relative;
  overflow: hidden;
}

.filter-button.active {
  background: linear-gradient(135deg, #2563eb, #16a34a);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
}

.timeline::before {
  width: 5px;
  background: linear-gradient(180deg, var(--amd), var(--intel), var(--qualcomm), var(--apple));
  box-shadow: 0 0 22px rgba(88, 166, 255, 0.32);
  animation: linePulse 5s ease-in-out infinite;
}

.item {
  opacity: 0;
  animation: cardReveal 0.62s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--reveal-delay, 0ms);
}

.card {
  overflow: hidden;
  padding: 12px 14px 14px;
  background: linear-gradient(180deg, var(--surface-strong), var(--surface));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(10px);
}

.card::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.075) 36%, transparent 58%);
  opacity: 0;
  transform: translateX(-38%);
  transition: opacity 0.24s ease, transform 0.55s ease;
  content: "";
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.46), 0 0 28px var(--glow);
  transform: translateY(-6px) scale(1.01);
}

.card:hover::before {
  opacity: 1;
  transform: translateX(34%);
}

.card.brand-Intel {
  --glow: rgba(59, 130, 246, 0.24);
}

.card.brand-AMD {
  --glow: rgba(239, 68, 68, 0.2);
}

.card.brand-Apple {
  --glow: rgba(212, 212, 216, 0.16);
}

.card.brand-Qualcomm {
  --glow: rgba(34, 197, 94, 0.22);
}

.processor-image {
  height: 118px;
  padding: 8px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025);
  opacity: 0.92;
  transform: translateY(0);
  transition: opacity 0.35s ease, transform 0.35s ease, filter 0.35s ease;
}

.processor-image.is-loaded {
  opacity: 1;
  filter: saturate(1.05) contrast(1.04);
}

.processor-image.is-loading {
  filter: grayscale(0.18);
}

.card:hover .processor-image {
  transform: translateY(-2px);
}

.year,
.badge {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.card h2 {
  margin-bottom: 7px;
  color: #dbeafe;
}

.specs td {
  padding: 4px 0;
}

.dot {
  width: 18px;
  height: 18px;
  box-shadow: 0 0 0 5px rgba(13, 17, 23, 0.92), 0 0 24px currentColor;
  animation: dotGlow 3.6s ease-in-out infinite;
}

@keyframes cardReveal {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes linePulse {
  0%, 100% {
    filter: saturate(1);
  }

  50% {
    filter: saturate(1.45) brightness(1.1);
  }
}

@keyframes dotGlow {
  0%, 100% {
    transform: translateX(-50%) scale(1);
  }

  50% {
    transform: translateX(-50%) scale(1.12);
  }
}

@media (max-width: 800px) {
  h1 {
    font-size: 2.05rem;
  }

  .processor-image {
    height: 130px;
  }

  .item,
  .item.right {
    animation-delay: calc(var(--reveal-delay, 0ms) / 2);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .item,
  .timeline::before,
  .dot {
    animation: none;
  }

  .item {
    opacity: 1;
  }

  .card,
  .card::before,
  .processor-image,
  .filter-button {
    transition: none;
  }
}

/* Keep timeline connectors visible with the polished card layer */
.card {
  overflow: visible;
}

.card::before {
  border-radius: 8px;
}

.processor-image,
.meta-row,
.card h2,
.specs {
  position: relative;
  z-index: 1;
}

.item:not(.right) .card::after {
  border-left-color: var(--surface);
}

.item.right .card::after {
  border-right-color: var(--surface);
}

@media (max-width: 800px) {
  .item:not(.right) .card::after,
  .item.right .card::after {
    border-right-color: var(--surface);
  }
}

/* Timeline node labels and card connectors */
.item::before {
  position: absolute;
  top: 28px;
  z-index: 1;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.18), currentColor);
  box-shadow: 0 0 14px currentColor;
  color: rgba(88, 166, 255, 0.45);
  content: "";
}

.item:not(.right)::before {
  right: 50%;
  left: 44%;
}

.item.right::before {
  right: 44%;
  left: 50%;
  background: linear-gradient(90deg, currentColor, rgba(148, 163, 184, 0.18));
}

.item:has(.brand-Intel)::before {
  color: rgba(59, 130, 246, 0.55);
}

.item:has(.brand-AMD)::before {
  color: rgba(239, 68, 68, 0.48);
}

.item:has(.brand-Apple)::before {
  color: rgba(212, 212, 216, 0.42);
}

.item:has(.brand-Qualcomm)::before {
  color: rgba(34, 197, 94, 0.5);
}

.dot {
  top: 15px;
  display: inline-flex;
  width: 64px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border-width: 2px;
  border-radius: 999px;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  background: linear-gradient(180deg, #111827, #080b12);
  box-shadow: 0 0 0 5px rgba(13, 17, 23, 0.92), 0 0 24px currentColor, inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.dot.brand-Intel {
  color: #bfdbfe;
}

.dot.brand-AMD {
  color: #fecaca;
}

.dot.brand-Apple {
  color: #e5e7eb;
}

.dot.brand-Qualcomm {
  color: #bbf7d0;
}

@media (max-width: 800px) {
  .item::before,
  .item.right::before,
  .item:not(.right)::before {
    top: 30px;
    right: auto;
    left: 24px;
    width: 30px;
    background: linear-gradient(90deg, currentColor, rgba(148, 163, 184, 0.18));
  }

  .dot {
    left: 24px;
    width: 54px;
    height: 28px;
    font-size: 0.72rem;
  }

  .item,
  .item.right {
    padding-left: 66px;
  }
}
