/* =========================================================
   Coframe Landing — Prajwal Prakash
   ========================================================= */

:root {
  --bg: #0A0A0A;
  --bg-deep: #060606;
  --panel: #111;
  --panel-2: #151515;
  --cf-green: #4AE387;
  --cf-green-dim: #2FB066;
  --cf-green-glow: rgba(74, 227, 135, 0.35);
  --text: #FAFAFA;
  --text-mute: #B5B5B5;
  --text-dim: #7A7A7A;
  --border: rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.18);
  --grid: rgba(255,255,255,0.045);
  --max-w: 1200px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ------------------ Reset / base ------------------ */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  font-feature-settings: "ss01", "ss02", "cv11";
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }

::selection { background: var(--cf-green); color: #0A0A0A; }

/* ------------------ Full-page grid background ------------------ */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 0%, rgba(0,0,0,0.4) 80%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 0%, rgba(0,0,0,0.4) 80%, transparent 100%);
}
section { position: relative; z-index: 1; }

/* ------------------ Typography helpers ------------------ */
.eyebrow, .section-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 24px;
  font-weight: 500;
}
.section-label-light { color: rgba(255,255,255,0.55); }
.eyebrow-sep { opacity: 0.4; margin: 0 2px; }

/* ------------------ Hero eyebrow — pill badge ------------------ */
.hero-eyebrow {
  padding: 9px 18px 9px 14px;
  border: 1px solid rgba(74, 227, 135, 0.32);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(74,227,135,0.10) 0%, rgba(74,227,135,0.02) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 0 0 1px rgba(74, 227, 135, 0.08),
    0 0 30px -6px rgba(74, 227, 135, 0.35);
  font-size: 13px;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.82);
  gap: 9px;
  margin-bottom: 28px;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
  position: relative;
  overflow: hidden;
}
.hero-eyebrow:hover {
  border-color: rgba(74, 227, 135, 0.6);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 0 0 1px rgba(74, 227, 135, 0.25),
    0 0 44px -6px rgba(74, 227, 135, 0.55);
  transform: translateY(-1px);
}
/* Soft sweep highlight */
.hero-eyebrow::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  left: -40%;
  width: 40%;
  background: linear-gradient(90deg, transparent, rgba(74,227,135,0.18), transparent);
  pointer-events: none;
  animation: eyebrow-sweep 4.4s ease-in-out infinite;
}
@keyframes eyebrow-sweep {
  0% { left: -40%; }
  55%, 100% { left: 120%; }
}
.hero-eyebrow .eyebrow-name {
  color: rgba(255,255,255,0.95);
  font-weight: 600;
}
.hero-eyebrow .eyebrow-sep {
  display: inline-block;
  width: 1px;
  height: 14px;
  background: rgba(255,255,255,0.22);
  margin: 0 1px;
  opacity: 1;
}
.hero-eyebrow .eyebrow-built {
  color: rgba(255,255,255,0.6);
  font-weight: 500;
}
.hero-eyebrow .cf-word {
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 13.5px;
}
.cf-shimmer {
  background: linear-gradient(90deg, #4AE387 0%, #B6FBCF 35%, #4AE387 55%, #8CFAB5 75%, #4AE387 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: cf-shimmer 3.6s linear infinite;
}
@keyframes cf-shimmer {
  0%   { background-position: 0% 50%; }
  100% { background-position: 250% 50%; }
}
@media (max-width: 540px) {
  .hero-eyebrow { font-size: 12px; gap: 7px; padding: 8px 14px 8px 12px; }
  .hero-eyebrow .cf-word { font-size: 12.5px; letter-spacing: 0.2em; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-eyebrow::after { animation: none; left: -40%; }
  .cf-shimmer {
    animation: none;
    background: none;
    -webkit-text-fill-color: var(--cf-green);
    color: var(--cf-green);
  }
}
.eyebrow-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--cf-green);
  box-shadow: 0 0 12px var(--cf-green-glow), 0 0 0 4px rgba(74,227,135,0.1);
  animation: dot-pulse 2.8s ease-in-out infinite;
}
@keyframes dot-pulse {
  0%, 100% { box-shadow: 0 0 12px var(--cf-green-glow), 0 0 0 0 rgba(74,227,135,0.2); }
  50% { box-shadow: 0 0 18px var(--cf-green-glow), 0 0 0 6px rgba(74,227,135,0.02); }
}

.cf-word {
  color: var(--cf-green);
  font-weight: 600;
  font-style: normal;
}
.cf-highlight {
  color: var(--cf-green);
  font-weight: 700;
}
.cf-pulse { animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { opacity: 1; text-shadow: 0 0 0 rgba(74,227,135,0); }
  50% { opacity: 0.92; text-shadow: 0 0 22px rgba(74,227,135,0.45); }
}

.section-title {
  font-family: "Inter", sans-serif;
  font-weight: 800;
  font-size: clamp(40px, 5.2vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin: 0 0 48px;
  color: var(--text);
}
.accent { color: var(--cf-green); }

/* ------------------ Ink trail ------------------ */
.ink-trail {
  position: fixed;
  top: 0; left: 32px;
  width: 2px; height: 100vh;
  background: rgba(255,255,255,0.06);
  z-index: 40;
  pointer-events: none;
}
.ink-fill {
  display: block;
  width: 100%;
  height: 0%;
  background: linear-gradient(to bottom, var(--cf-green), #2FB066);
  box-shadow: 0 0 14px rgba(74,227,135,0.5);
  transition: height 0.1s linear;
}
@media (max-width: 860px) { .ink-trail { display: none; } }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  min-height: 100vh;
  background: radial-gradient(ellipse at 50% 30%, #0F0F0F 0%, var(--bg-deep) 60%);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 32px 120px;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  pointer-events: none;
  opacity: 0.9;
}
#variation-grid { width: 100%; height: 100%; display: block; }

.hero::before {
  content: "";
  position: absolute;
  top: -30%; left: 30%;
  width: 60%; height: 100%;
  background: radial-gradient(ellipse at center, rgba(74,227,135,0.10) 0%, transparent 60%);
  filter: blur(60px);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: var(--max-w);
  width: 100%;
  margin: 0 auto;
  padding-left: 48px;
}

.hero-headline {
  font-family: "Inter", sans-serif;
  font-weight: 700;
  font-size: clamp(40px, 6.4vw, 88px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  margin: 0 0 20px;
  max-width: 14ch;
  color: var(--text);
  opacity: 0;
  animation: rise 0.9s 0.25s var(--ease) forwards;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.accent-bar {
  width: 0;
  height: 3px;
  background: var(--cf-green);
  box-shadow: 0 0 20px rgba(74,227,135,0.6);
  margin: 4px 0 28px;
  animation: slideBar 1.0s 1.1s var(--ease) forwards;
}
@keyframes slideBar { to { width: 140px; } }

.rotating-tagline {
  height: 30px;
  overflow: hidden;
  font-family: "JetBrains Mono", monospace;
  font-size: 14px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cf-green);
  margin-bottom: 28px;
  opacity: 0;
  animation: fadeIn 0.6s 1.4s var(--ease) forwards;
}
.rotator {
  display: flex;
  flex-direction: column;
  animation: rotate 8s 1.8s infinite;
}
.rotator span { height: 30px; line-height: 30px; }
@keyframes rotate {
  0%, 22%   { transform: translateY(0); }
  25%, 47%  { transform: translateY(-30px); }
  50%, 72%  { transform: translateY(-60px); }
  75%, 100% { transform: translateY(-90px); }
}
@keyframes fadeIn { to { opacity: 1; } }

.hero-sub {
  max-width: 620px;
  font-size: 18px;
  line-height: 1.55;
  color: rgba(255,255,255,0.72);
  margin: 0 0 42px;
  opacity: 0;
  animation: fadeIn 0.8s 1.7s var(--ease) forwards;
}

.cta-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeIn 0.8s 2.0s var(--ease) forwards;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.01em;
  transition: transform 0.2s var(--ease), box-shadow 0.3s var(--ease), background 0.2s, border-color 0.2s;
  cursor: pointer;
  border: 1px solid transparent;
  will-change: transform;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: var(--cf-green);
  color: #0A0A0A;
  box-shadow: 0 10px 24px -8px rgba(74,227,135,0.55);
}
.btn-primary:hover {
  background: #5DF097;
  box-shadow: 0 14px 32px -8px rgba(74,227,135,0.75);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: rgba(255,255,255,0.2);
}
.btn-ghost:hover { border-color: rgba(255,255,255,0.45); background: rgba(255,255,255,0.04); }

.hero-scroll-hint {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.42);
  opacity: 0;
  animation: fadeIn 0.8s 2.6s var(--ease) forwards;
}
.scroll-line {
  width: 1px;
  height: 36px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.5), transparent);
  animation: scrollLine 1.8s ease-in-out infinite;
}
@keyframes scrollLine {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  50.01% { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* =========================================================
   METRIC BAND
   ========================================================= */
.metric-band {
  background: var(--bg-deep);
  color: var(--text);
  padding: 70px 32px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 40px;
  max-width: 100%;
  text-align: center;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  position: relative;
}
.metric {
  display: flex; flex-direction: column; gap: 10px;
  align-items: center;
}
.metric-value {
  font-family: "JetBrains Mono", monospace;
  font-weight: 600;
  font-size: clamp(40px, 5.6vw, 76px);
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--text);
  position: relative;
  display: inline-block;
}
.metric-value::after {
  content: "↑";
  position: absolute;
  top: -4px;
  right: -18px;
  font-size: 0.35em;
  color: var(--cf-green);
  opacity: 0.8;
}
.metric-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 500;
}
@media (max-width: 900px) {
  .metric-band { grid-template-columns: repeat(2, 1fr); gap: 48px 32px; }
}

/* =========================================================
   TIMELINE
   ========================================================= */
.timeline-section {
  background: var(--bg);
  color: var(--text);
  padding: 140px 32px 160px;
  position: relative;
}
.timeline-section .section-label { color: rgba(255,255,255,0.55); }
.section-head {
  max-width: var(--max-w);
  margin: 0 auto 80px;
}

.timeline {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 920px;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 14px;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--border) 10%, var(--border) 90%, transparent);
}

.node {
  position: relative;
  padding: 0 0 64px 60px;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.node.in-view { opacity: 1; transform: translateY(0); }

.node-dot {
  position: absolute;
  top: 10px; left: 7px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--cf-green);
  box-shadow: 0 0 0 4px rgba(74,227,135,0.14), 0 0 20px rgba(74,227,135,0.4);
}
.node-meta {
  display: flex; gap: 20px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: 10px;
  font-weight: 500;
}
.node-body h3 {
  font-family: "Inter", sans-serif;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
  color: var(--text);
}
.node-org {
  font-size: 15px;
  color: rgba(255,255,255,0.6);
  margin: 0 0 18px;
  font-weight: 500;
}
.node-vertical {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cf-green);
  margin: 18px 0 8px;
  padding-left: 10px;
  border-left: 2px solid var(--cf-green);
}
.node-body > ul + .node-vertical { margin-top: 22px; }
.node-body ul {
  margin: 0; padding: 0;
  list-style: none;
}
.node-body li {
  padding: 6px 0 6px 22px;
  position: relative;
  line-height: 1.58;
  color: rgba(255,255,255,0.78);
  font-size: 16px;
}
.node-body li::before {
  content: "";
  position: absolute;
  top: 14px; left: 0;
  width: 8px; height: 1px;
  background: var(--cf-green);
}
.node-body li strong { color: var(--text); font-weight: 600; }

/* =========================================================
   SIGNATURE WORK
   ========================================================= */
.signature-work {
  background: var(--bg);
  color: var(--text);
  padding: 140px 32px 160px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.card-grid {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
@media (max-width: 760px) { .card-grid { grid-template-columns: 1fr; } }

.cc-card {
  background: var(--panel);
  border-radius: 14px;
  padding: 28px 28px 26px;
  border: 1px solid var(--border);
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 280px;
  position: relative;
  overflow: hidden;
}
.cc-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(74,227,135,0.06) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
}
.cc-card:hover {
  border-color: rgba(74,227,135,0.35);
  transform: translateY(-3px);
  box-shadow: 0 20px 50px -20px rgba(74,227,135,0.18), 0 0 0 1px rgba(74,227,135,0.15);
}
.cc-card:hover::before { opacity: 1; }

.card-tag {
  position: absolute;
  top: 20px;
  right: 22px;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--cf-green);
  padding: 4px 10px;
  border: 1px solid rgba(74,227,135,0.3);
  border-radius: 4px;
  background: rgba(74,227,135,0.06);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.tag-star {
  display: none;
  color: var(--cf-green);
  font-size: 11px;
  line-height: 1;
  transform: translateY(-0.5px);
}
.tag-dwell {
  display: none;
  color: var(--cf-green);
  opacity: 0.85;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
  padding-left: 7px;
  border-left: 1px solid rgba(74,227,135,0.3);
  min-width: 32px;
  text-align: right;
}
.cc-card.hovering .tag-dwell { display: inline-block; }
.cc-card.engaged .tag-star { display: inline-block; }
.cc-card.engaged {
  border-color: rgba(74,227,135,0.55);
  box-shadow: 0 24px 60px -18px rgba(74,227,135,0.28), 0 0 0 1px rgba(74,227,135,0.35);
}
.cc-card.engaged::before { opacity: 1; }
.cc-card.engaged .card-tag {
  background: rgba(74,227,135,0.12);
  border-color: rgba(74,227,135,0.55);
}

/* Attention-driven reorder: each card's order is set inline by JS based on dwell rank */
.cc-card { transition: border-color 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease), padding 0.4s var(--ease); }

/* Featured = leader card after engagement threshold. Spans both columns, larger type. */
.cc-card.featured {
  grid-column: 1 / -1;
  padding: 40px 44px 38px;
  min-height: 320px;
  border-color: rgba(74,227,135,0.6);
  box-shadow: 0 36px 90px -24px rgba(74,227,135,0.38), 0 0 0 1px rgba(74,227,135,0.4);
  animation: card-rise 0.55s var(--ease) both;
}
.cc-card.featured::before { opacity: 1; }
.cc-card.featured .card-body h3 {
  font-size: 34px;
  max-width: 72%;
  letter-spacing: -0.025em;
}
.cc-card.featured .card-sub { font-size: 12px; }
.cc-card.featured .card-body p { font-size: 17px; max-width: 88%; }
.cc-card.featured .chips span { font-size: 12px; }
.cc-card.featured .card-tag {
  background: rgba(74,227,135,0.16);
  border-color: rgba(74,227,135,0.6);
}

@keyframes card-rise {
  0%   { transform: translateY(8px) scale(0.995); opacity: 0.6; }
  60%  { transform: translateY(-2px) scale(1.004); opacity: 1; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

@media (max-width: 760px) {
  .cc-card.featured { grid-column: 1 / -1; padding: 30px 26px 28px; min-height: 0; }
  .cc-card.featured .card-body h3 { font-size: 24px; max-width: 100%; }
  .cc-card.featured .card-body p { font-size: 15px; max-width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .cc-card { transition: none; }
  .cc-card.featured { animation: none; }
}

/* =========================================================
   ATTENTION STATS
   ========================================================= */
.attention-stats {
  background: var(--panel);
  color: var(--text);
  padding: 140px 32px 160px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  position: relative;
}
.attention-stats .section-head {
  max-width: var(--max-w);
  margin: 0 auto 56px;
}
.attention-stats .section-label { color: rgba(255,255,255,0.55); }
.stats-note {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.45);
  margin: -28px 0 0;
  font-weight: 500;
}
.stats-note-mark { color: var(--cf-green); margin-right: 6px; }

.stats-bars {
  max-width: var(--max-w);
  margin: 0 auto;
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.stats-row {
  display: grid;
  grid-template-columns: 280px 1fr 80px;
  gap: 20px;
  align-items: center;
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255,255,255,0.02);
  transition: all 0.5s var(--ease);
  position: relative;
  overflow: hidden;
}
.stats-row.leader {
  border-color: rgba(74,227,135,0.55);
  background: rgba(74,227,135,0.05);
  box-shadow: 0 0 0 1px rgba(74,227,135,0.35), 0 14px 40px -20px rgba(74,227,135,0.35);
}
.stats-row.leader .stats-title { color: var(--cf-green); }
.stats-title {
  font-family: "Inter", sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stats-rank {
  color: var(--text-dim);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  margin-right: 10px;
  font-weight: 500;
}
.stats-row.leader .stats-rank { color: var(--cf-green); }
.stats-bar-wrap {
  position: relative;
  height: 6px;
  background: rgba(255,255,255,0.05);
  border-radius: 3px;
  overflow: hidden;
}
.stats-bar-fill {
  position: absolute;
  top: 0; left: 0;
  bottom: 0;
  width: 0%;
  background: linear-gradient(90deg, rgba(74,227,135,0.45), var(--cf-green));
  box-shadow: 0 0 12px rgba(74,227,135,0.5);
  border-radius: 3px;
  transition: width 0.4s var(--ease);
}
.stats-value {
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.stats-row.leader .stats-value { color: var(--cf-green); }

.stats-empty {
  max-width: var(--max-w);
  margin: 32px auto 0;
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  color: rgba(255,255,255,0.38);
  text-align: center;
  font-weight: 500;
  letter-spacing: 0.05em;
}
.stats-bars.has-data + .stats-empty { display: none; }

@media (max-width: 720px) {
  .stats-row {
    grid-template-columns: 1fr 60px;
    gap: 8px 16px;
    padding: 14px 16px;
  }
  .stats-title { grid-column: 1 / 2; }
  .stats-value { grid-column: 2 / 3; text-align: right; }
  .stats-bar-wrap { grid-column: 1 / 3; }
}

.card-body h3 {
  font-family: "Inter", sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
  line-height: 1.2;
  max-width: 85%;
  color: var(--text);
}
.card-sub {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 0 0 14px;
  font-weight: 500;
}
.card-body p {
  margin: 0 0 16px;
  line-height: 1.58;
  color: rgba(255,255,255,0.76);
  font-size: 15px;
}
.card-body p strong { color: var(--text); font-weight: 600; }

.chips {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: auto;
}
.chips span {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: rgba(255,255,255,0.72);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.02em;
  font-weight: 500;
}
.chips-lg span {
  padding: 7px 12px;
  font-size: 12px;
  background: transparent;
  border: 1px solid var(--border-strong);
  color: rgba(255,255,255,0.82);
}
.chips-lg span:hover {
  border-color: rgba(74,227,135,0.5);
  color: var(--cf-green);
}

/* =========================================================
   SKILLS + PUBS
   ========================================================= */
.skills-pubs {
  background: var(--bg);
  color: var(--text);
  padding: 140px 32px 160px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 80px;
  max-width: var(--max-w);
  margin: 0 auto;
}
@media (max-width: 900px) {
  .skills-pubs { grid-template-columns: 1fr; gap: 80px; padding-left: 32px; padding-right: 32px; }
}
.skills-pubs .section-label { color: rgba(255,255,255,0.55); }
.skills-pubs .section-title { color: var(--text); margin-bottom: 40px; }

.skill-group {
  margin-bottom: 28px;
}
.skill-group h4 {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin: 0 0 12px;
  font-weight: 500;
}

.pub {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 20px;
  padding: 24px 0;
  border-top: 1px solid var(--border);
}
.pub:last-child { border-bottom: 1px solid var(--border); }
.pub-year {
  font-family: "JetBrains Mono", monospace;
  font-size: 28px;
  font-weight: 500;
  color: rgba(255,255,255,0.3);
  letter-spacing: -0.01em;
  line-height: 1;
}
.pub-body h4 {
  font-family: "Inter", sans-serif;
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 6px;
  color: var(--text);
  line-height: 1.35;
  letter-spacing: -0.015em;
}
.pub-meta {
  margin: 0;
  color: rgba(255,255,255,0.55);
  font-size: 14px;
}
.pub-flag {
  display: inline-block;
  background: rgba(74,227,135,0.14);
  color: var(--cf-green);
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 4px;
  margin-bottom: 8px;
  border: 1px solid rgba(74,227,135,0.3);
  font-weight: 500;
}

.pub-link {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s var(--ease);
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}
.pub-link:hover { color: var(--cf-green); }
.pub-link .pub-arrow {
  font-size: 0.75em;
  opacity: 0.5;
  transition: transform 0.2s var(--ease), opacity 0.2s;
  display: inline-block;
}
.pub-link:hover .pub-arrow {
  opacity: 1;
  transform: translate(2px, -2px);
}
.pub-doi {
  color: rgba(255,255,255,0.42);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  text-decoration: none;
  border-bottom: 1px dashed rgba(255,255,255,0.18);
  transition: color 0.2s, border-color 0.2s;
}
.pub-doi:hover { color: var(--cf-green); border-color: var(--cf-green); }

.card-link {
  display: inline-flex;
  align-items: center;
  margin-top: 8px;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--cf-green);
  font-weight: 500;
  text-transform: uppercase;
  transition: transform 0.2s var(--ease);
}
.card-link:hover { transform: translateX(3px); }

/* =========================================================
   DEAR COFRAME
   ========================================================= */
.dear-coframe {
  background: var(--panel);
  color: var(--text);
  padding: 140px 32px 160px;
  position: relative;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.dear-coframe::before {
  content: "";
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 140px; height: 2px;
  background: var(--cf-green);
  box-shadow: 0 0 24px rgba(74,227,135,0.6);
}
.letter {
  max-width: 760px;
  margin: 0 auto;
}
.dear-coframe .section-label { color: rgba(255,255,255,0.55); }

.salutation {
  font-family: "Inter", sans-serif;
  font-size: clamp(36px, 4.6vw, 56px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
  margin: 0 0 32px;
  color: var(--text);
}
.letter-body p {
  font-size: 18px;
  line-height: 1.7;
  margin: 0 0 22px;
  font-family: "Inter", sans-serif;
  color: rgba(255,255,255,0.82);
  font-weight: 400;
}
.letter-body p em {
  font-style: italic;
  color: var(--cf-green);
  font-weight: 500;
}
.letter-body p strong {
  color: var(--text);
  font-weight: 600;
}

.letter-body .quote-block {
  position: relative;
  padding: 28px 32px 28px 44px;
  margin: 0 0 36px;
  border-left: 2px solid var(--cf-green);
  background: rgba(74,227,135,0.04);
  border-radius: 0 8px 8px 0;
  font-size: 17px;
  line-height: 1.65;
  color: rgba(255,255,255,0.9);
  font-style: normal;
}
.letter-body .quote-block em {
  color: var(--cf-green);
  font-weight: 500;
  font-style: italic;
}
.letter-body .quote-block .quote-mark {
  position: absolute;
  top: -14px;
  left: 14px;
  font-family: "Inter", sans-serif;
  font-weight: 800;
  font-size: 72px;
  line-height: 1;
  color: var(--cf-green);
  opacity: 0.9;
}

@media (max-width: 600px) {
  .letter-body .quote-block {
    padding: 22px 22px 22px 30px;
    font-size: 16px;
  }
  .letter-body .quote-block .quote-mark {
    font-size: 56px;
    top: -10px;
    left: 8px;
  }
}

.letter-closing {
  font-family: "Inter", sans-serif;
  font-size: clamp(26px, 3.4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin: 44px 0 14px;
  color: var(--text);
}
.signature {
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  color: var(--text-dim);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0;
  font-weight: 500;
}

/* =========================================================
   CLOSING
   ========================================================= */
.closing {
  background: linear-gradient(180deg, var(--bg) 0%, #0b1f14 70%, #0d2a1a 100%);
  color: var(--text);
  padding: 160px 32px 100px;
  position: relative;
  overflow: hidden;
}
.closing::before {
  content: "";
  position: absolute;
  top: 10%; left: 50%;
  transform: translateX(-50%);
  width: 900px; height: 900px;
  background: radial-gradient(circle, rgba(74,227,135,0.12) 0%, transparent 60%);
  pointer-events: none;
  filter: blur(20px);
}
.closing-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  position: relative;
  text-align: center;
}
.big-headline {
  font-family: "Inter", sans-serif;
  font-weight: 800;
  font-size: clamp(52px, 9vw, 128px);
  letter-spacing: -0.04em;
  line-height: 1;
  margin: 0 0 16px;
  color: var(--text);
}
.big-sub {
  font-family: "Inter", sans-serif;
  font-size: clamp(28px, 3.6vw, 44px);
  font-weight: 400;
  font-style: italic;
  color: var(--cf-green);
  margin: 0 0 80px;
  letter-spacing: -0.02em;
}
.assemble { display: inline-block; }
.assemble .letter-char {
  display: inline-block;
  opacity: 0;
  transform: translate(0, 0) rotate(0);
  will-change: transform, opacity;
}

.resume-preview {
  max-width: 820px;
  margin: 0 auto 72px;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 40px 80px -20px rgba(0,0,0,0.7), 0 0 0 1px rgba(74,227,135,0.15);
  aspect-ratio: 8.5 / 11;
}
.resume-preview iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  max-width: 880px;
  margin: 0 auto 64px;
}
@media (max-width: 720px) {
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
}
.contact-btn {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255,255,255,0.02);
  text-align: left;
  transition: all 0.25s var(--ease);
}
.contact-btn:hover {
  background: rgba(74,227,135,0.06);
  border-color: rgba(74,227,135,0.4);
  transform: translateY(-2px);
}
.contact-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  font-weight: 500;
}
.contact-value {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  word-break: break-word;
}
.contact-btn-primary {
  background: var(--cf-green);
  border-color: var(--cf-green);
  box-shadow: 0 10px 30px -10px rgba(74,227,135,0.6);
}
.contact-btn-primary:hover {
  background: #5DF097;
  border-color: #5DF097;
  transform: translateY(-3px);
  box-shadow: 0 16px 40px -10px rgba(74,227,135,0.8);
}
.contact-btn-primary .contact-label { color: rgba(10,10,10,0.7); }
.contact-btn-primary .contact-value { color: #0A0A0A; }

.footer-note {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.42);
  margin: 0;
  font-weight: 500;
}

/* =========================================================
   TIMELINE BULLET HIGHLIGHT (driven by top signature-work card)
   ========================================================= */
.node-body li.attention-match {
  color: var(--text);
  position: relative;
  padding: 6px 12px 6px 30px;
  margin: 2px -12px;
  border-radius: 6px;
  background-image:
    linear-gradient(
      90deg,
      rgba(74, 227, 135, 0.02) 0%,
      rgba(74, 227, 135, 0.18) 40%,
      rgba(74, 227, 135, 0.26) 50%,
      rgba(74, 227, 135, 0.18) 60%,
      rgba(74, 227, 135, 0.02) 100%
    );
  background-size: 260% 100%;
  background-position: -40% 50%;
  box-shadow: inset 0 0 0 1px rgba(74, 227, 135, 0.22);
  animation: bullet-sweep 4.6s ease-in-out infinite;
  transition: padding 0.3s var(--ease), margin 0.3s var(--ease), color 0.3s var(--ease), box-shadow 0.4s var(--ease);
  z-index: 0;
}
@keyframes bullet-sweep {
  0%   { background-position: -40% 50%; }
  100% { background-position: 140% 50%; }
}

.node-body li.attention-match::before {
  top: 13px;
  left: 10px;
  width: 14px;
  height: 3px;
  border-radius: 2px;
  background: var(--cf-green);
  animation: marker-breathe 1.8s ease-in-out infinite;
  z-index: 1;
}
@keyframes marker-breathe {
  0%, 100% {
    width: 14px;
    box-shadow: 0 0 8px rgba(74, 227, 135, 0.55);
  }
  50% {
    width: 22px;
    box-shadow:
      0 0 18px rgba(74, 227, 135, 1),
      0 0 36px rgba(74, 227, 135, 0.45);
  }
}

/* One-shot BURST on transition into attention-match */
.node-body li.attention-flash {
  animation:
    bullet-sweep 4.6s ease-in-out infinite,
    bullet-burst-nudge 0.9s ease-out;
}
.node-body li.attention-flash > * { position: relative; z-index: 1; }
.node-body li.attention-flash > .burst {
  display: block;
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 6px;
  background:
    radial-gradient(ellipse at left center,
      rgba(74, 227, 135, 0.55) 0%,
      rgba(74, 227, 135, 0.18) 40%,
      transparent 75%);
  animation: burst-bloom 1.6s ease-out forwards;
  z-index: 0;
}
@keyframes burst-bloom {
  0%   { opacity: 1; transform: scaleX(0.7); }
  20%  { opacity: 1; transform: scaleX(1.05); }
  100% { opacity: 0; transform: scaleX(1); }
}
@keyframes bullet-burst-nudge {
  0%   { transform: translateX(0); }
  20%  { transform: translateX(8px); }
  100% { transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
  .node-body li.attention-match,
  .node-body li.attention-flash,
  .node-body li.attention-match::before,
  .node-body li.attention-flash > .burst {
    animation: none !important;
  }
  .node-body li.attention-match {
    background-image: none;
    background-color: rgba(74, 227, 135, 0.10);
  }
}

/* =========================================================
   LIVE SIGNAL HUD
   ========================================================= */
.signal-hud {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 50;
  width: 280px;
  background: rgba(12, 12, 12, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(74, 227, 135, 0.22);
  border-radius: 12px;
  padding: 14px 14px 12px;
  box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.7),
              0 0 0 1px rgba(74, 227, 135, 0.08),
              0 0 40px -10px rgba(74, 227, 135, 0.25);
  font-family: "JetBrains Mono", monospace;
  color: var(--text);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
  pointer-events: none;
}
.signal-hud.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.signal-hud.minimized { width: 44px; height: 44px; padding: 0; border-radius: 50%; overflow: hidden; }
.signal-hud.minimized .hud-body,
.signal-hud.minimized .hud-header { display: none; }
.signal-hud.minimized .hud-dot-btn { display: flex; }

.hud-dot-btn {
  display: none;
  width: 100%; height: 100%;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  cursor: pointer;
  color: var(--cf-green);
}
.hud-dot-btn::before {
  content: "";
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--cf-green);
  box-shadow: 0 0 14px var(--cf-green-glow);
  animation: dot-pulse 2.4s ease-in-out infinite;
}

.hud-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.hud-title {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cf-green);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.hud-title::before {
  content: "";
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--cf-green);
  box-shadow: 0 0 10px var(--cf-green-glow);
  animation: dot-pulse 2.4s ease-in-out infinite;
}
.hud-controls { display: inline-flex; gap: 6px; }
.hud-btn-icon {
  background: transparent;
  border: 0;
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  width: 20px; height: 20px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  line-height: 1;
  transition: color 0.2s, background 0.2s;
}
.hud-btn-icon:hover { color: var(--text); background: rgba(255,255,255,0.06); }

.hud-body { display: flex; flex-direction: column; gap: 8px; }
.hud-bars { display: flex; flex-direction: column; gap: 5px; list-style: none; padding: 0; margin: 0; }
.hud-row {
  display: grid;
  grid-template-columns: 1fr 46px;
  gap: 8px;
  align-items: center;
  font-size: 10px;
  letter-spacing: 0.02em;
  color: rgba(255,255,255,0.75);
  position: relative;
  padding: 4px 6px;
  border-radius: 4px;
  transition: background 0.25s var(--ease);
}
.hud-row.leader { background: rgba(74,227,135,0.08); color: var(--text); }
.hud-row-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hud-row-track {
  position: relative;
  height: 3px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 3px;
  grid-column: 1 / 3;
}
.hud-row-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: linear-gradient(90deg, rgba(74,227,135,0.4), var(--cf-green));
  box-shadow: 0 0 8px rgba(74,227,135,0.5);
  transition: width 0.3s var(--ease);
}
.hud-row-time {
  font-variant-numeric: tabular-nums;
  font-size: 10px;
  text-align: right;
  color: rgba(255,255,255,0.62);
  font-weight: 500;
}
.hud-row.leader .hud-row-time { color: var(--cf-green); }

.hud-cta-row {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.hud-cta {
  flex: 1;
  background: var(--cf-green);
  color: #0A0A0A;
  border: 0;
  border-radius: 6px;
  padding: 9px 10px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 6px 18px -8px rgba(74,227,135,0.7);
}
.hud-cta:hover:not(:disabled) { background: #5DF097; transform: translateY(-1px); }
.hud-cta:disabled { opacity: 0.5; cursor: not-allowed; }
.hud-cta.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: none;
}
.hud-cta.secondary:hover:not(:disabled) {
  border-color: rgba(74,227,135,0.5);
  color: var(--cf-green);
  background: rgba(74,227,135,0.04);
}

/* Toast */
.signal-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: 60;
  background: rgba(12, 12, 12, 0.96);
  border: 1px solid rgba(74, 227, 135, 0.5);
  color: var(--cf-green);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 10px 18px;
  border-radius: 8px;
  box-shadow: 0 16px 40px -12px rgba(74,227,135,0.4);
  opacity: 0;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
  pointer-events: none;
  font-weight: 600;
}
.signal-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 600px) {
  .signal-hud { width: 240px; right: 12px; bottom: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .reorderable-stack.reordering { opacity: 1; }
  .signal-hud { transition: none; }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 760px) {
  .hero-inner { padding-left: 0; }
  .hero { padding: 80px 24px 100px; }
  .section-head { margin-bottom: 56px; }
  .timeline-section, .signature-work, .skills-pubs, .dear-coframe, .closing {
    padding-top: 100px; padding-bottom: 100px; padding-left: 24px; padding-right: 24px;
  }
  .node { padding-bottom: 48px; padding-left: 48px; }
  .letter-body p { font-size: 17px; }
  .card-body h3 { font-size: 20px; }
  .resume-preview { aspect-ratio: unset; height: 520px; }
  .card-tag { top: 16px; right: 16px; }
  .card-body h3 { max-width: 100%; padding-right: 90px; }
}

/* =========================================================
   REDUCED MOTION
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .rotator { animation: none; transform: none; }
  .node { opacity: 1; transform: none; }
  .hero-headline, .hero-sub, .cta-row, .rotating-tagline, .accent-bar, .hero-scroll-hint {
    opacity: 1;
    animation: none;
  }
  .accent-bar { width: 140px; }
}
