:root {
  --bg-deep: #0a0e1a;
  --bg-surface: #111728;
  --bg-elevated: #161d33;
  --bg-elevated-2: #1a2342;

  --accent: #4f7df5;
  --accent-2: #22d3a7;
  --accent-glow: rgba(79, 125, 245, 0.35);

  --text-primary: #e8ecf4;
  --text-secondary: #8a93ad;
  --text-dim: #5b6480;

  --border: rgba(140, 160, 220, 0.10);
  --border-strong: rgba(140, 160, 220, 0.18);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  --shadow-lg: 0 24px 60px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 0 1px rgba(79,125,245,0.35), 0 8px 28px rgba(79,125,245,0.25);
}

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

html, body {
  background: var(--bg-deep);
  color: var(--text-primary);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- Hero shell ---------- */
.linkup-changelog-header {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(72px, 12vw, 140px) 24px clamp(80px, 14vw, 160px);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(79,125,245,0.18), transparent 60%),
    radial-gradient(900px 500px at 0% 100%, rgba(34,211,167,0.12), transparent 55%),
    linear-gradient(180deg, var(--bg-deep) 0%, #070b15 100%);
  border-bottom: 1px solid var(--border);
}

/* Grid backdrop */
.cl-bg-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--border-strong) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-strong) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 40%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 40%, transparent 75%);
  opacity: 0.45;
  z-index: -2;
}

/* Floating orbs */
.cl-bg-orb {
  position: absolute;
  width: 520px; height: 520px;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
  z-index: -1;
  pointer-events: none;
  animation: cl-float 14s ease-in-out infinite;
}
.cl-bg-orb--a { top: -120px; right: -120px; background: radial-gradient(circle, var(--accent) 0%, transparent 65%); }
.cl-bg-orb--b { bottom: -180px; left: -140px; background: radial-gradient(circle, var(--accent-2) 0%, transparent 65%); animation-delay: -7s; }

@keyframes cl-float {
  0%,100% { transform: translate(0,0) scale(1); }
  50%     { transform: translate(30px,-20px) scale(1.08); }
}

/* ---------- Container ---------- */
.changelog-header-container {
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* ---------- Identity chip ---------- */
.changelog-identity {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  align-self: flex-start;
  padding: 8px 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  background: linear-gradient(180deg, var(--bg-elevated), var(--bg-surface));
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  backdrop-filter: blur(8px);
  animation: cl-fade-up 0.7s ease both;
}
.changelog-identity strong { color: var(--text-primary); font-weight: 600; }
.cl-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 12px var(--accent-2);
}
.cl-identity-sep { color: var(--text-dim); }
.cl-identity-tag { color: var(--accent); }

/* ---------- Title ---------- */
.changelog-title {
  font-size: clamp(48px, 9vw, 104px);
  line-height: 0.96;
  letter-spacing: -0.04em;
  font-weight: 700;
  color: var(--text-primary);
  animation: cl-fade-up 0.8s 0.1s ease both;
}
.cl-title-line { display: block; }
.cl-title-accent {
  background: linear-gradient(100deg, var(--accent) 10%, var(--accent-2) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  position: relative;
}
.cl-cursor {
  display: inline-block;
  margin-left: 6px;
  color: var(--accent);
  -webkit-text-fill-color: var(--accent);
  animation: cl-blink 1.05s steps(1) infinite;
}
@keyframes cl-blink { 50% { opacity: 0; } }

/* ---------- Subtext ---------- */
.changelog-subtext {
  max-width: 640px;
  font-size: clamp(15px, 1.6vw, 18px);
  line-height: 1.65;
  color: var(--text-secondary);
  animation: cl-fade-up 0.8s 0.2s ease both;
}

/* ---------- Meta pills ---------- */
.cl-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
  animation: cl-fade-up 0.8s 0.3s ease both;
}
.cl-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  transition: border-color .25s, transform .25s;
}
.cl-meta-pill:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.cl-meta-key { color: var(--text-dim); }
.cl-meta-val { color: var(--text-primary); }
.cl-meta-pill--live .cl-meta-val { color: var(--accent-2); }
.cl-live-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 0 rgba(34,211,167,0.5);
  animation: cl-pulse 1.8s infinite;
}
@keyframes cl-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(34,211,167,0.55); }
  70%  { box-shadow: 0 0 0 10px rgba(34,211,167,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,211,167,0); }
}

/* ---------- Actions ---------- */
.cl-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
  animation: cl-fade-up 0.8s 0.4s ease both;
}
.cl-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s, box-shadow .25s, background .25s, border-color .25s;
  border: 1px solid transparent;
}
.cl-btn--primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #3b66d6);
  box-shadow: var(--shadow-glow);
}
.cl-btn--primary:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px var(--accent), 0 14px 40px rgba(79,125,245,0.45); }
.cl-btn--ghost {
  color: var(--text-secondary);
  background: var(--bg-elevated);
  border-color: var(--border-strong);
}
.cl-btn--ghost:hover { color: var(--text-primary); border-color: var(--accent); }

/* ---------- Animations ---------- */
@keyframes cl-fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Responsive tweaks ---------- */
@media (max-width: 640px) {
  .linkup-changelog-header { padding: 64px 20px 80px; }
  .cl-bg-orb { width: 320px; height: 320px; }
  .cl-actions .cl-btn { flex: 1 1 auto; justify-content: center; }
  .cl-meta-pill { font-size: 11px; padding: 7px 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .cl-bg-orb, .cl-cursor, .cl-live-dot { animation: none; }
  .changelog-identity, .changelog-title, .changelog-subtext, .cl-meta-row, .cl-actions { animation: none; }
}
