/* ============================================================
   PoW Protocol University — Dark Futuristic Theme
   ============================================================ */

:root {
  --bg: #06060b;
  --bg-card: rgba(12, 12, 22, 0.85);
  --bg-glass: rgba(16, 16, 30, 0.55);
  --cyan: #00f0ff;
  --cyan-dim: rgba(0, 240, 255, 0.15);
  --cyan-glow: rgba(0, 240, 255, 0.4);
  --purple: #8b5cf6;
  --purple-dim: rgba(139, 92, 246, 0.15);
  --purple-glow: rgba(139, 92, 246, 0.4);
  --text: #e8e8f0;
  --text-dim: #8888a0;
  --text-bright: #ffffff;
  --border: rgba(255, 255, 255, 0.07);
  --border-hover: rgba(0, 240, 255, 0.3);
  --glass-blur: 24px;
  --radius: 20px;
  --radius-sm: 12px;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

a { color: var(--cyan); text-decoration: none; transition: all 0.3s; }
a:hover { color: var(--text-bright); text-shadow: 0 0 10px var(--cyan-glow); }

::selection { background: var(--purple); color: var(--text-bright); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }

/* ===== PARTICLE CANVAS ===== */
#particleCanvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ===== NAVIGATION ===== */
.main-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2.5rem;
  background: linear-gradient(180deg, rgba(6, 6, 11, 0.92) 0%, rgba(6, 6, 11, 0.8) 100%);
  backdrop-filter: blur(30px) saturate(1.2);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-brand {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: 0.02em;
}

.nav-links { display: flex; gap: 2rem; }
.nav-links a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-dim);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: all 0.3s;
}
.nav-links a:hover { color: var(--cyan); text-shadow: 0 0 10px var(--cyan-glow); }

/* ===== HERO ===== */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2rem;
}

.hero::before {
  content: '';
  position: absolute;
  top: -20%; left: 50%; transform: translateX(-50%);
  width: 800px; height: 800px;
  background: radial-gradient(ellipse, rgba(0, 240, 255, 0.06) 0%, rgba(139, 92, 246, 0.04) 40%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 200px;
  background: linear-gradient(to top, var(--bg), transparent);
  z-index: 1;
  pointer-events: none;
}

.hero-content { position: relative; z-index: 2; }

.hero-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  text-shadow: 0 0 80px rgba(0, 240, 255, 0.15), 0 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-title-line { display: block; color: var(--text-bright); }
.hero-title-line.accent {
  background: linear-gradient(135deg, var(--cyan) 0%, var(--purple) 50%, var(--cyan) 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmerText 6s ease infinite;
  filter: drop-shadow(0 0 30px rgba(0, 240, 255, 0.2));
}

@keyframes shimmerText {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  color: var(--text-dim);
  font-weight: 300;
  margin-bottom: 3rem;
  letter-spacing: 0.08em;
}

.btn-glow {
  display: inline-block;
  padding: 1rem 3rem;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  color: var(--bg);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.05em;
  border-radius: 50px;
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 240, 255, 0.2), 0 1px 3px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.btn-glow::before {
  content: '';
  position: absolute;
  top: 0; left: -100%; width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.6s;
}
.btn-glow:hover::before { left: 100%; }
.btn-glow:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 15px 50px var(--cyan-glow), 0 15px 50px var(--purple-glow), 0 2px 8px rgba(0,0,0,0.4);
  color: var(--bg);
  text-shadow: none;
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.scroll-arrow {
  width: 24px;
  height: 24px;
  border-right: 2px solid var(--cyan);
  border-bottom: 2px solid var(--cyan);
  transform: rotate(45deg);
  animation: scrollPulse 2s infinite;
  opacity: 0.5;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: rotate(45deg) translateY(0); }
  50% { opacity: 0.8; transform: rotate(45deg) translateY(8px); }
}

/* ===== SECTIONS ===== */
.section {
  position: relative;
  z-index: 1;
  padding: 8rem 0;
}

/* Ambient orb glow per section */
.why-pow::before {
  content: '';
  position: absolute;
  top: 10%; right: -15%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.04) 0%, transparent 60%);
  pointer-events: none;
}

.pillars-section::before {
  content: '';
  position: absolute;
  top: 20%; left: -10%;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.04) 0%, transparent 60%);
  pointer-events: none;
}

.protocols-section::before {
  content: '';
  position: absolute;
  bottom: 10%; right: -10%;
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.03) 0%, transparent 60%);
  pointer-events: none;
}

.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 1rem;
  color: var(--text-bright);
  text-shadow: 0 0 40px rgba(0, 240, 255, 0.08);
  position: relative;
  display: inline-block;
  width: 100%;
}

.section-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  margin: 0.8rem auto 0;
  border-radius: 2px;
  box-shadow: 0 0 12px var(--cyan-glow);
}

.section-intro {
  text-align: center;
  color: var(--text-dim);
  max-width: 600px;
  margin: 0 auto 4rem;
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.8;
}

.subsection-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.6rem;
  font-weight: 600;
  text-align: center;
  margin: 4rem 0 2rem;
  color: var(--text-bright);
}

/* ===== WHY POW — THREE PILLARS ===== */
.three-pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-bottom: 6rem;
}

.pillar-card {
  background: linear-gradient(165deg, rgba(25, 25, 45, 0.7) 0%, rgba(12, 12, 22, 0.9) 100%);
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  text-align: center;
  transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  opacity: 0;
  transform: translateY(30px);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.pillar-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 10%, rgba(0, 240, 255, 0.15) 50%, transparent 90%);
}

.pillar-card.revealed {
  opacity: 1;
  transform: translateY(0);
}

.pillar-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-8px) rotateX(2deg);
  box-shadow: 0 25px 60px rgba(0, 240, 255, 0.1), 0 8px 25px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(0, 240, 255, 0.1);
}

.pillar-icon { font-size: 2.5rem; margin-bottom: 1.2rem; }

.pillar-card h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 0.8rem;
  color: var(--text-bright);
}

.pillar-card p {
  font-size: 0.92rem;
  color: var(--text-dim);
  line-height: 1.7;
  font-weight: 300;
}

/* ===== POW VS POS ===== */
.pow-vs-pos { margin-top: 2rem; }

.tradeoff-grid {
  display: grid;
  gap: 1rem;
  max-width: 900px;
  margin: 0 auto;
}

.tradeoff-row {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1.2fr;
  gap: 1px;
  background: var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  position: relative;
}

.tradeoff-row::after {
  content: '→';
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%) translateX(5px);
  opacity: 0;
  color: var(--cyan);
  font-size: 1.2rem;
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
  z-index: 2;
}

.tradeoff-row:hover {
  box-shadow: 0 8px 30px rgba(0, 240, 255, 0.12), 0 4px 15px rgba(0, 0, 0, 0.3);
  transform: translateY(-3px) scale(1.015);
  background: rgba(0, 240, 255, 0.08);
  border-color: rgba(0, 240, 255, 0.2);
}

.tradeoff-row:hover::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.tradeoff-row:active {
  transform: translateY(-1px) scale(1.005);
  transition-duration: 0.1s;
}

.tradeoff-cell {
  background: var(--bg-card);
  padding: 1.2rem 1.5rem;
  font-size: 0.88rem;
  transition: background 0.4s ease;
}

.tradeoff-row:hover .tradeoff-cell {
  background: rgba(15, 15, 30, 0.95);
}

.tradeoff-cell.label {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  color: var(--text-bright);
  display: flex;
  align-items: center;
}

.tradeoff-cell.pow {
  color: var(--cyan);
  border-left: 2px solid var(--cyan);
}

.tradeoff-cell.pos {
  color: #ff6b6b;
  border-left: 2px solid #ff6b6b;
}

.tradeoff-cell.pow.winner { background: rgba(0, 240, 255, 0.06); }
.tradeoff-cell.pos.winner { background: rgba(255, 107, 107, 0.06); }

.tradeoff-header {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1.2fr;
  gap: 1px;
  margin-bottom: 0.5rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 1rem;
}

.tradeoff-header-cell {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  padding: 0.8rem 1.5rem;
  color: var(--text-dim);
}

.tradeoff-header-cell:nth-child(2) { color: var(--cyan); }
.tradeoff-header-cell:nth-child(3) { color: #ff6b6b; }

/* Failure Timeline */
.failure-timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.2rem;
  max-width: 900px;
  margin: 0 auto;
}

.failure-card {
  background: linear-gradient(160deg, rgba(30, 15, 15, 0.6) 0%, rgba(12, 8, 8, 0.8) 100%);
  border: 1px solid rgba(255, 107, 107, 0.12);
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 107, 107, 0.04);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.failure-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 50% 50%, rgba(255, 107, 107, 0.06) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.failure-card::after {
  content: 'Click to learn more →';
  position: absolute;
  bottom: 0.8rem;
  right: 1rem;
  font-size: 0.7rem;
  color: rgba(255, 107, 107, 0.5);
  opacity: 0;
  transform: translateY(5px);
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.failure-card:hover {
  border-color: rgba(255, 107, 107, 0.45);
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 20px 50px rgba(255, 107, 107, 0.1), 0 8px 25px rgba(0, 0, 0, 0.4);
}

.failure-card:hover::before {
  opacity: 1;
}

.failure-card:hover::after {
  opacity: 1;
  transform: translateY(0);
}

.failure-card:active {
  transform: translateY(-2px) scale(1.005);
  transition-duration: 0.1s;
}

.failure-year {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  color: #ff6b6b;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.4rem;
}

.failure-event {
  font-weight: 600;
  color: var(--text-bright);
  font-size: 0.95rem;
  margin-bottom: 0.3rem;
}

.failure-detail {
  font-size: 0.82rem;
  color: var(--text-dim);
  font-weight: 300;
}

/* ===== EXPLANATION MODAL BODY ===== */
.explain-body {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.75;
}

.explain-body h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-bright);
  margin: 0 0 1rem;
}

.explain-body h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: #e0e0f0;
  margin: 1.8rem 0 0.6rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.explain-body p {
  margin: 0 0 0.8rem;
  color: #b0b0c8;
}

.explain-body ul, .explain-body ol {
  margin: 0.5rem 0 1rem 1.5rem;
  padding: 0;
}

.explain-body li {
  margin: 0.4rem 0;
  color: #b0b0c8;
}

.explain-body li strong {
  color: #e0e0f0;
}

.explain-body blockquote {
  border-left: 3px solid #ff6b6b;
  padding-left: 1rem;
  color: #ccc;
  margin: 1rem 0;
  font-style: italic;
}

.explain-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.explain-body th {
  text-align: left;
  padding: 0.5rem;
  color: #8888a0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.explain-body td {
  padding: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* ===== PILLAR BUBBLES ===== */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.pillar-bubble {
  position: relative;
  background: linear-gradient(170deg, rgba(22, 22, 42, 0.7) 0%, rgba(10, 10, 18, 0.9) 100%);
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transform-style: preserve-3d;
}

.pillar-bubble::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at var(--glow-x, 50%) var(--glow-y, 50%), var(--bubble-color, var(--cyan-dim)) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}

.pillar-bubble::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 10%, rgba(255, 255, 255, 0.08) 50%, transparent 90%);
  transition: background 0.3s;
}

.pillar-bubble:hover {
  border-color: var(--border-hover);
  /* transform handled by JS 3D tilt */
  box-shadow:
    0 30px 70px rgba(0, 240, 255, 0.12),
    0 10px 30px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(0, 240, 255, 0.12);
}

.pillar-bubble:hover::before { opacity: 1; }
.pillar-bubble:hover::after {
  background: linear-gradient(90deg, transparent 5%, rgba(0, 240, 255, 0.2) 50%, transparent 95%);
}

.bubble-icon {
  font-size: 2.8rem;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.pillar-bubble h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 1;
}

.pillar-bubble .bubble-sub {
  font-size: 0.82rem;
  color: var(--text-dim);
  font-weight: 300;
  position: relative;
  z-index: 1;
}

/* ===== PROTOCOL BUBBLES ===== */
.protocol-bubbles {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.protocol-bubble {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 35% 25%, rgba(255, 255, 255, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 65% 75%, rgba(0, 0, 0, 0.3) 0%, transparent 50%),
    linear-gradient(160deg, rgba(25, 25, 45, 0.8) 0%, rgba(8, 8, 16, 0.95) 100%);
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
  text-align: center;
  box-shadow:
    0 6px 25px rgba(0, 0, 0, 0.5),
    inset 0 1px 1px rgba(255, 255, 255, 0.06),
    inset 0 -3px 8px rgba(0, 0, 0, 0.3);
}

.protocol-bubble::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background: conic-gradient(from 200deg, var(--proto-color, var(--cyan)), transparent 30%, transparent 70%, var(--proto-color, var(--cyan)));
  opacity: 0;
  transition: opacity 0.4s;
  z-index: -1;
}

/* top-light reflection arc */
.protocol-bubble::after {
  content: '';
  position: absolute;
  top: 6%; left: 20%; right: 20%;
  height: 30%;
  border-radius: 50%;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.07), transparent);
  pointer-events: none;
}

.protocol-bubble:hover {
  transform: translateY(-10px) scale(1.1);
  border-color: var(--proto-color, var(--cyan));
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.6),
    0 0 40px var(--proto-glow, var(--cyan-glow)),
    0 0 80px rgba(0, 240, 255, 0.08),
    inset 0 1px 2px rgba(255, 255, 255, 0.1),
    inset 0 -4px 12px rgba(0, 0, 0, 0.3);
}

.protocol-bubble:hover::before { opacity: 0.7; }

.proto-icon {
  font-size: 1.8rem;
  margin-bottom: 0.3rem;
  font-weight: 700;
}

.proto-logo {
  width: 2.2rem;
  height: 2.2rem;
  object-fit: contain;
  border-radius: 50%;
}

.proto-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-bright);
}

.proto-ticker {
  font-size: 0.68rem;
  color: var(--text-dim);
  font-weight: 400;
  letter-spacing: 0.05em;
}

/* Bubble sizes based on market cap rank */
.proto-rank-1 { width: 180px; height: 180px; }
.proto-rank-2 { width: 160px; height: 160px; }
.proto-rank-3 { width: 150px; height: 150px; }
.proto-rank-4 { width: 145px; height: 145px; }
.proto-rank-5 { width: 140px; height: 140px; }
.proto-rank-6 { width: 135px; height: 135px; }
.proto-rank-7 { width: 128px; height: 128px; }
.proto-rank-8 { width: 122px; height: 122px; }
.proto-rank-9 { width: 116px; height: 116px; }
.proto-rank-10 { width: 110px; height: 110px; }

/* Float animation */
.protocol-bubble { animation: floatBubble 6s ease-in-out infinite; }
.protocol-bubble:nth-child(2n) { animation-delay: -1s; animation-duration: 7s; }
.protocol-bubble:nth-child(3n) { animation-delay: -2s; animation-duration: 5.5s; }
.protocol-bubble:nth-child(4n) { animation-delay: -0.5s; animation-duration: 6.5s; }
.protocol-bubble:nth-child(5n) { animation-delay: -3s; animation-duration: 7.5s; }

@keyframes floatBubble {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.protocol-bubble:hover { animation-play-state: paused; }

/* ===== MODALS ===== */

.modal-content {
  background:
    linear-gradient(170deg, rgba(20, 20, 38, 0.95) 0%, rgba(8, 8, 16, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  max-width: 800px;
  width: 100%;
  padding: 3rem;
  position: relative;
  box-shadow:
    0 40px 100px rgba(0, 0, 0, 0.7),
    0 0 60px rgba(0, 240, 255, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.modal-overlay.active .modal-content {
  animation: modalIn 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.92) translateY(40px) rotateX(2deg); }
  to { opacity: 1; transform: scale(1) translateY(0) rotateX(0); }
}

.modal-close {
  position: absolute;
  top: 1rem; right: 1.5rem;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 2rem;
  cursor: pointer;
  transition: all 0.3s;
  z-index: 10;
  line-height: 1;
}
.modal-close:hover { color: var(--cyan); transform: rotate(90deg); }

.modal-video {
  margin-bottom: 2rem;
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 16/9;
  background: rgba(0, 0, 0, 0.3);
}

.modal-video iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.modal-body h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: 0.8rem;
}

.modal-body h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--cyan);
  margin: 1.5rem 0 0.6rem;
}

.modal-body p {
  font-size: 0.82rem;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 0.8rem;
  font-weight: 300;
}

.modal-body strong { color: var(--text-bright); font-weight: 600; }

/* ===== Pillar Modal — 2-Step Layout ===== */
.pillar-modal-content { max-width: 960px; }

.pillar-step-hidden { display: none !important; }

/* Step 1: Header */
.pillar-modal-header { text-align: center; margin-bottom: 2rem; }

.pillar-modal-icon {
  font-size: 2.8rem;
  margin-bottom: 0.5rem;
  display: block;
  filter: drop-shadow(0 0 12px rgba(0, 240, 255, 0.3));
}

.pillar-modal-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-bright);
  margin: 0 0 0.4rem;
}

.pillar-modal-sub {
  color: var(--text-dim);
  font-size: 0.95rem;
  font-weight: 300;
  margin: 0;
}

/* Step 1: Protocol bubble grid */
.pillar-proto-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}

.pillar-proto-bubble {
  background:
    radial-gradient(ellipse at 50% 0%, color-mix(in srgb, var(--pp-color) 12%, transparent) 0%, transparent 70%),
    linear-gradient(165deg, rgba(18, 18, 38, 0.85) 0%, rgba(8, 8, 16, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  padding: 1.4rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  animation: fadeSlideUp 0.5s ease both;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.pp-rating {
  margin-top: auto;
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.pillar-proto-bubble:hover {
  transform: translateY(-6px) scale(1.04);
  border-color: var(--pp-color);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.4),
    0 0 25px color-mix(in srgb, var(--pp-color) 20%, transparent);
}

.pp-icon {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  filter: drop-shadow(0 0 8px currentColor);
}

.pp-icon .proto-logo {
  width: 1.8rem;
  height: 1.8rem;
}

.pp-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: 0.1rem;
}

.pp-ticker {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 0.6rem;
  letter-spacing: 0.05em;
}

.pp-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--cyan);
  margin-bottom: 0.3rem;
}

.pp-rating {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: var(--cyan);
}

.pp-rating .dots-empty {
  color: rgba(255, 255, 255, 0.12);
}

/* Step 2: Back button */
.pillar-back-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.25s;
  margin-bottom: 1.5rem;
}

.pillar-back-btn:hover {
  background: rgba(0, 240, 255, 0.08);
  border-color: var(--cyan);
  color: var(--cyan);
}

/* Step 2: Drill-down body */
.drill-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.drill-icon {
  font-size: 1.8rem;
  font-weight: 700;
  filter: drop-shadow(0 0 10px currentColor);
}

.drill-icon .proto-logo {
  width: 2.4rem;
  height: 2.4rem;
}

.drill-header h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-bright);
  margin: 0;
}

.drill-ticker {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-dim);
}

.drill-pillar-label {
  font-size: 0.82rem;
  color: var(--cyan);
  margin: 0.2rem 0 0;
  font-weight: 500;
}

.drill-rating {
  margin-left: auto;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: var(--cyan);
}

.drill-rating .dots-empty {
  color: rgba(255, 255, 255, 0.12);
}

.drill-value-badge {
  display: inline-block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--cyan);
  border: 1px solid;
  border-radius: var(--radius-sm);
  padding: 0.4rem 1rem;
  margin-bottom: 1rem;
  background: rgba(0, 240, 255, 0.04);
}

.node-specs-chart {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
  margin-bottom: 1.5rem;
  padding: 1.2rem;
  background: rgba(0, 240, 255, 0.03);
  border: 1px solid rgba(0, 240, 255, 0.1);
  border-radius: var(--radius-sm);
}

.node-spec-item {
  text-align: center;
  padding: 0.6rem 0.3rem;
}

.node-spec-icon {
  font-size: 1.4rem;
  margin-bottom: 0.3rem;
}

.node-spec-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.25rem;
}

.node-spec-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--cyan);
  line-height: 1.3;
}

@media (max-width: 600px) {
  .node-specs-chart {
    grid-template-columns: repeat(2, 1fr);
  }
}

.drill-detail {
  font-size: 0.82rem;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 1.2rem;
  font-weight: 300;
}

.drill-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.7rem;
  margin-bottom: 1.5rem;
}

.drill-stat {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.9rem;
}

.drill-stat-label {
  display: block;
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.2rem;
}

.drill-stat-val {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-bright);
}

.drill-description {
  font-size: 0.78rem;
  color: var(--text-dim);
  line-height: 1.6;
  font-weight: 300;
  margin: 0;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* Stat Grid inside modals */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.stat-card {
  background: linear-gradient(160deg, rgba(0, 240, 255, 0.06) 0%, rgba(0, 240, 255, 0.01) 100%);
  border: 1px solid rgba(0, 240, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 1.2rem;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(0, 240, 255, 0.05);
  transition: all 0.3s;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 240, 255, 0.06), 0 4px 12px rgba(0, 0, 0, 0.3);
}

.stat-number {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--cyan);
  margin-bottom: 0.3rem;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Algo Grid */
.algo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.8rem;
  margin: 1.5rem 0;
}

.algo-card {
  background: rgba(139, 92, 246, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  font-size: 0.88rem;
  color: var(--text);
  font-weight: 300;
}

.algo-card strong { color: var(--purple); }

/* Privacy Spectrum */
.privacy-spectrum { margin: 1.5rem 0; }

.privacy-level {
  padding: 1.2rem 1.5rem;
  border-left: 3px solid var(--level-color, var(--cyan));
  margin-bottom: 0.8rem;
  background: var(--bg-card);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.privacy-level strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 0.3rem;
}

.privacy-level p {
  font-size: 0.85rem;
  margin-bottom: 0;
}

/* Partition Grid */
.partition-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.partition-card {
  padding: 1.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.partition-card h5 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.partition-card p { font-size: 0.85rem; margin-bottom: 0; }

.partition-card.good { border-color: rgba(0, 240, 255, 0.3); background: rgba(0, 240, 255, 0.04); }
.partition-card.good h5 { color: var(--cyan); }
.partition-card.ok { border-color: rgba(255, 170, 0, 0.3); background: rgba(255, 170, 0, 0.04); }
.partition-card.ok h5 { color: #ffaa00; }
.partition-card.bad { border-color: rgba(255, 107, 107, 0.3); background: rgba(255, 107, 107, 0.04); }
.partition-card.bad h5 { color: #ff6b6b; }
.partition-card.worst { border-color: rgba(255, 50, 50, 0.3); background: rgba(255, 50, 50, 0.04); }
.partition-card.worst h5 { color: #ff3232; }

/* Launch Grid */
.launch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.2rem;
  margin: 1.5rem 0;
}

.launch-card {
  padding: 1.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.launch-card h5 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.launch-card p { font-size: 0.88rem; margin-bottom: 0.3rem; }
.launch-detail { color: var(--text-dim) !important; font-style: italic; }

.launch-card.fair { border-color: rgba(0, 240, 255, 0.3); background: rgba(0, 240, 255, 0.04); }
.launch-card.fair h5 { color: var(--cyan); }
.launch-card.unfair { border-color: rgba(255, 107, 107, 0.2); background: rgba(255, 107, 107, 0.03); }
.launch-card.unfair h5 { color: #ff6b6b; }

/* ===== PROTOCOL MODAL ===== */
.protocol-modal-content { max-width: 900px; }

.protocol-modal-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.proto-modal-icon {
  font-size: 3rem;
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 2px solid var(--border);
  flex-shrink: 0;
}

.proto-modal-info h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-bright);
}

.proto-modal-info .proto-modal-ticker {
  font-size: 0.85rem;
  color: var(--text-dim);
  font-weight: 400;
}

.proto-modal-info .proto-modal-desc {
  font-size: 0.92rem;
  color: var(--text);
  line-height: 1.7;
  margin-top: 0.5rem;
  font-weight: 300;
}

/* Protocol Stats Grid */
.protocol-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.8rem;
  margin-bottom: 2rem;
}

.proto-stat {
  background: linear-gradient(160deg, rgba(18, 18, 32, 0.8) 0%, rgba(6, 6, 12, 0.9) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.2rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition: all 0.3s;
}

.proto-stat:hover {
  border-color: rgba(0, 240, 255, 0.15);
  transform: translateY(-1px);
}

.proto-stat-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  font-weight: 500;
  margin-bottom: 0.3rem;
}

.proto-stat-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-bright);
}

/* Strengths / Weaknesses */
.protocol-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.proto-section h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.proto-section.strengths h3 { color: var(--cyan); }
.proto-section.weaknesses h3 { color: #ff6b6b; }

.proto-section ul {
  list-style: none;
  padding: 0;
}

.proto-section li {
  font-size: 0.88rem;
  color: var(--text);
  padding: 0.5rem 0;
  padding-left: 1.2rem;
  position: relative;
  font-weight: 300;
  line-height: 1.5;
}

.proto-section li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.85rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.proto-section.strengths li::before { background: var(--cyan); }
.proto-section.weaknesses li::before { background: #ff6b6b; }

/* ===== FOOTER ===== */
.site-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 5rem 2rem;
  border-top: 1px solid var(--border);
  background: linear-gradient(to top, rgba(0, 0, 0, 0.3) 0%, transparent 100%);
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.12), rgba(139, 92, 246, 0.12), transparent);
}

.footer-tagline {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: 0.5rem;
}

.footer-sub {
  font-size: 0.85rem;
  color: var(--text-dim);
  font-weight: 300;
  margin-bottom: 1.5rem;
}

.footer-copy {
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .main-nav { padding: 0.8rem 1.5rem; }
  .nav-links { gap: 1rem; }
  .nav-links a { font-size: 0.75rem; }

  .section { padding: 3rem 0; }
  .container { padding: 0 1rem; }

  .hero-title { font-size: clamp(2.2rem, 10vw, 3.5rem); }

  .section-intro { margin-bottom: 1.5rem; font-size: 0.9rem; }

  /* ---- Protocol bubbles: 2-col grid, compact cards ---- */
  .protocol-bubbles {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.6rem !important;
    justify-items: center;
  }

  .protocol-bubble {
    border-radius: 16px !important;
    animation: none !important;
    width: 100% !important;
    max-width: 170px !important;
    height: auto !important;
    padding: 1rem 0.5rem !important;
  }

  .protocol-bubble::before { border-radius: 16px !important; }
  .proto-icon { font-size: 1.5rem; margin-bottom: 0.15rem; }
  .proto-name { font-size: 0.75rem; }
  .proto-ticker { font-size: 0.6rem; }

  /* ---- Pillar grid in modal: 3-col, compact ---- */
  .pillar-proto-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 0.5rem !important;
  }

  .pillar-proto-bubble {
    padding: 0.7rem 0.4rem !important;
    border-radius: 10px !important;
  }

  .pp-icon { font-size: 1.3rem; margin-bottom: 0.2rem; }
  .pp-name { font-size: 0.7rem; }
  .pp-ticker { font-size: 0.58rem; margin-bottom: 0.2rem; }
  .pp-value { font-size: 0.65rem; margin-bottom: 0.15rem; }
  .pp-rating { font-size: 0.55rem; }

  /* Modal padding compact */
  #protoModalInner { padding: 1.2rem; }
  #protoModal { padding: 0.5rem; }

  .protocol-details { grid-template-columns: 1fr; }
  .modal-content { padding: 2rem 1.5rem; }

  /* Tradeoff grid stacked on mobile */
  .tradeoff-row { grid-template-columns: 1fr; }
  .tradeoff-header { display: none; }
  .tradeoff-cell.label {
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
  }
  .tradeoff-cell.pow, .tradeoff-cell.pos { font-size: 0.82rem; }
  .tradeoff-cell.pow::before { content: 'PoW: '; font-weight: 600; }
  .tradeoff-cell.pos::before { content: 'PoS: '; font-weight: 600; }
}

@media (max-width: 480px) {
  .protocol-bubbles { gap: 0.5rem !important; }

  .protocol-bubble {
    max-width: 150px !important;
    padding: 0.8rem 0.4rem !important;
  }

  .proto-icon { font-size: 1.3rem; }
  .proto-name { font-size: 0.68rem; }
  .proto-ticker { font-size: 0.55rem; }

  .pillar-proto-bubble { padding: 0.6rem 0.3rem !important; }
  .pp-icon { font-size: 1.1rem; margin-bottom: 0.15rem; }
  .pp-name { font-size: 0.62rem; }
  .pp-ticker { font-size: 0.52rem; }
  .pp-value { font-size: 0.6rem; }
  .pp-rating { font-size: 0.5rem; }
}

/* ============================================================
   Roadmap Timeline — SVG Fork History
   ============================================================ */

svg .fork-dot {
  cursor: pointer;
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.18s ease;
}

svg .fork-dot:hover {
  transform: scale(1.55);
}

.roadmap-splash {
  position: fixed;
  z-index: 100000;
  width: 340px;
  max-width: calc(100vw - 30px);
  background: rgba(10, 10, 22, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(0, 240, 255, 0.15);
  border-radius: 14px;
  padding: 1.1rem 1.3rem 1.2rem;
  pointer-events: auto;
  display: none;
  animation: splashIn 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes splashIn {
  from { opacity: 0; transform: translateY(8px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.splash-type {
  display: inline-block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.15rem 0.55rem;
  border: 1px solid;
  border-radius: 20px;
  margin-bottom: 0.5rem;
}

.splash-proto {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.1rem;
}

.splash-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #e8e8f0;
  line-height: 1.3;
  margin-bottom: 0.15rem;
}

.splash-date {
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  color: #8888a0;
  margin-bottom: 0.7rem;
}

.splash-detail {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  color: #b8b8cc;
  line-height: 1.55;
}
