body {
  background-color: #f8fafc;
  background-image: radial-gradient(rgba(148, 163, 184, 0.25) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #0284c7;
}

/* Glass card – toned down hover */
.glass-card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(226, 232, 240, 0.9);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.glass-card:hover {
  border-color: rgba(6, 182, 212, 0.4);
}

.glow-cyan {
  box-shadow: 0 0 30px -5px rgba(6, 182, 212, 0.2);
}

/* Skills filter – no scale on active */
.skill-filter-btn {
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.skill-bar-fill {
  transition: width 1.1s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Timeline */
.timeline-item {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.timeline-item.in-view {
  opacity: 1;
  transform: none;
}
.timeline-item:nth-child(2) {
  transition-delay: 0.12s;
}

.timeline-spine-fill {
  transition: height 1.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.toggle-chevron.rotate-180 {
  transform: rotate(180deg);
}

/* Topology packet flow */
.link-line {
  position: relative;
}
.packet-dot {
  position: absolute;
  left: 50%;
  top: 0%;
  width: 5px;
  height: 5px;
  border-radius: 9999px;
  background: #22d3ee;
  box-shadow: 0 0 6px 1px rgba(34, 211, 238, 0.85);
  transform: translateX(-50%);
  animation: packet-flow 1.8s linear infinite;
  opacity: 0;
}
.link-line.link-active .link-track {
  background: #22d3ee;
  box-shadow: 0 0 6px 1px rgba(34, 211, 238, 0.6);
}
.link-line.link-active .packet-dot {
  background: #34d399;
  box-shadow: 0 0 8px 2px rgba(52, 211, 153, 0.9);
}

@keyframes packet-flow {
  0%   { top: 0%;   opacity: 0; }
  15%  { opacity: 1; }
  85%  { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

/* Loading spinner for ping */
.spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: #22d3ee;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .packet-dot {
    animation: none !important;
    top: 50% !important;
    opacity: 0.6 !important;
  }
  .timeline-item,
  .skill-bar-fill,
  .timeline-spine-fill {
    transition-duration: 0.01ms !important;
  }
}

/* Hero & About image backgrounds */
.hero-image {
    background-size: cover;
    background-position: center;
}

.about-image {
    background-size: cover;
    background-position: center;
}