:root {
  --bg: #0b0f1a;
  --node: #7dd3fc;
  --edge: rgba(125,211,252,.15);
  --edge-hot: rgba(125,211,252,.6);
  --glow: #38bdf8;
}

/* ---------- Network Animation Styles ---------- */
.network-container {
  overflow: hidden;
  position: absolute; /* Changed from relative */
  inset: 0; /* Cover the entire parent */
  display: flex;
  justify-content: center;
  align-items: center;
  /* background property from welcome section should handle it */
}

.network {
  position: relative;
  width: min(90vw, 900px); /* Use viewport width while keeping desktop max size */
  height: auto; /* Let height adjust to maintain aspect ratio */
  max-width: 900px; /* Maximum width on larger screens */
  max-height: 550px; /* Maximum height on larger screens */
  aspect-ratio: 900 / 550; /* Maintain aspect ratio */
  transform: none; /* Remove any previous transforms */
}

@media (max-width: 768px) {
  .network {
    width: 96vw;
  }
}

.node {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--node);
  opacity: .65;
  transition: opacity 1.5s, box-shadow 1.5s;
}

.node.core {
  width: 10px;
  height: 10px;
}

.node.active {
  opacity: 1;
  box-shadow:
    0 0 6px var(--glow),
    0 0 14px rgba(56,189,248,.9);
}

.edge {
  position: absolute;
  height: 1px;
  transform-origin: left center;
}

.edge::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    to right,
    var(--edge) 0 6px,
    transparent 6px 12px
  );
}

.edge.hot::before {
  filter: drop-shadow(0 0 5px var(--edge-hot));
  opacity: .95;
}

.packet {
  position: absolute;
  top: -2px;
  width: 4px;
  height: 4px;
  background: #e0f2fe;
  border-radius: 50%;
  animation: travel linear forwards;
}

.packet::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(224,242,254,.6), transparent 70%);
  transform: scale(3);
}

@keyframes travel {
  from { transform: translateX(0); opacity: 0; }
  10% { opacity: 1; }
  to { transform: translateX(var(--len)); opacity: 0; }
}

/* Custom UI Styles */
.glass-card {
  background: rgba(17, 24, 39, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
}

/* Skill badges */
.skill-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.875rem;
  background: rgba(14, 165, 233, 0.08);
  color: #cbd5e1;
  border: 1px solid rgba(14, 165, 233, 0.2);
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.skill-badge:hover {
  background: rgba(14, 165, 233, 0.18);
  border-color: rgba(14, 165, 233, 0.5);
  color: #e0f2fe;
}

.text-gradient {
  background: linear-gradient(to right, #7dd3fc, #38bdf8, #0ea5e9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

