/* Home page animated background */
#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

body.home {
  background:
    radial-gradient(
      ellipse at 20% 10%,
      rgb(19 121 255 / 18%) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse at 85% 90%,
      rgb(120 60 255 / 14%) 0%,
      transparent 50%
    ),
    #000;
  background-attachment: fixed;
}

body.home h1 {
  font-size: 3rem;
  background: linear-gradient(90deg, #fff, #6fb1ff, #1379ff);
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 20px rgb(19 121 255 / 40%));
}

/* Skill "crypto ticker" chart */
.skill-chart {
  position: relative;
  width: min(760px, calc(100% - 32px));
  margin: 20px auto 40px;
  padding: 16px 16px 8px;
  border: 1px solid #1f2733;
  border-radius: 12px;
  background: rgb(13 17 23 / 70%);
}

.skill-ticker {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
}

.skill-ticker-symbol {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #f0f6fc;
  font-size: 1.1rem;
  font-weight: 600;
}

.skill-ticker-symbol small {
  color: #8b949e;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
}

/* Blue coin icon in the site colors, Bitcoin-logo style */
.skill-coin {
  display: inline-grid;
  place-items: center;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #6fb1ff, #1379ff 55%, #0a2f7a);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 0 12px rgb(19 121 255 / 60%);
}

/* "A" with two strokes through it, like a $ sign */
.skill-coin svg {
  width: 65%;
  height: 65%;
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.skill-ticker-price {
  font-size: 2rem;
  font-weight: 600;
}

.skill-ticker-change {
  color: #16c784;
  font-weight: 600;
}

.skill-plot {
  position: relative;
}

.skill-chart-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.skill-grid {
  stroke: #1f2733;
  stroke-width: 1;
}

.skill-axis {
  fill: #8b949e;
  font-size: 13px;
}

.skill-label {
  fill: #f0f6fc;
  font-size: 15px;
  font-weight: 500;
}

.skill-line {
  fill: none;
  stroke: #16c784;
  stroke-width: 3;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  filter: drop-shadow(0 0 8px rgb(22 199 132 / 60%));
  animation: skill-draw 1.6s ease-out both;
}

.skill-area {
  animation: skill-fade 1.6s ease-out both;
}

.skill-crosshair {
  stroke: #8b949e;
  stroke-width: 1;
  stroke-dasharray: 4 4;
}

.skill-dot {
  fill: #16c784;
  stroke: #0d1117;
  stroke-width: 2;
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 0.15s ease;
}

.skill-dot.active {
  transform: scale(1.6);
}

/* Latest "price" pulses like a live ticker */
.skill-dot-live {
  animation: skill-live 1.8s ease-in-out infinite;
}

.skill-hit {
  fill: transparent;
  cursor: crosshair;
  outline: none;
}

.skill-hit:focus-visible {
  stroke: #16c784;
  stroke-width: 1;
}

.skill-tooltip {
  position: absolute;
  transform: translate(-50%, calc(-100% - 14px));
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #2d3748;
  background: #151b23;
  color: #f0f6fc;
  font-size: 0.95rem;
  white-space: nowrap;
  pointer-events: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@keyframes skill-draw {
  from {
    stroke-dashoffset: 1;
  }

  to {
    stroke-dashoffset: 0;
  }
}

@keyframes skill-fade {
  from {
    opacity: 0;
  }
}

@keyframes skill-live {
  50% {
    filter: drop-shadow(0 0 8px #16c784);
    transform: scale(1.3);
  }
}

@media (prefers-reduced-motion: reduce) {
  .skill-line,
  .skill-area,
  .skill-dot-live {
    animation: none;
  }
}
