:root {
  --bg: #0f172a;
  --nav: #0b1120;
  --blue: #2196f3;
  --purple: #7b2ff7;
  --gradient: linear-gradient(90deg, var(--blue), var(--purple));
}

body {
  background: var(--bg);
  font-family: "Inter", sans-serif;
  color: #e2e8f0;
}

.navbar {
  background: var(--nav);
}
.nav-link {
  color: #e2e8f0;
  font-weight: 500;
}
.nav-link.active {
  border-bottom: 2px solid var(--purple);
}

.text-gradient {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.btn-gradient {
  background: var(--gradient);
  color: #fff;
  border: 0;
}
.btn-gradient:hover {
  color: #fff;
  opacity: 0.9;
}

.btn-outline-gradient {
  color: var(--blue);
  border: 1px solid var(--blue);
}
.btn-outline-gradient:hover {
  background: var(--blue);
  color: #fff;
}

.social {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #1e293b;
  color: #e2e8f0;
  text-decoration: none;
}
.social:hover {
  background: var(--gradient);
  color: #fff;
}

.card {
  background: #1e293b;
  border: 0;
}

/* personal touch */
h1,
h2,
h3,
.navbar-brand,
.stat {
  font-family: "Space Grotesk", sans-serif;
}
.dot {
  color: var(--purple);
  -webkit-text-fill-color: var(--purple);
}

html {
  overflow-x: clip; /* safety net: nothing decorative can cause a sideways scrollbar */
}
/* Because html has its own overflow, Bootstrap's scroll lock on body doesn't apply; lock html while a popup is open */
html:has(body.modal-open) {
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 15% 20%, rgba(33, 150, 243, 0.12), transparent 40%),
    radial-gradient(circle at 85% 60%, rgba(123, 47, 247, 0.15), transparent 45%),
    linear-gradient(rgba(148, 163, 184, 0.05) 1px, transparent 1px) 0 0 / 60px 60px,
    linear-gradient(90deg, rgba(148, 163, 184, 0.05) 1px, transparent 1px) 0 0 / 60px 60px;
}

/* diagonal accent lines across the screen */
body::after {
  content: "";
  position: fixed;
  inset: 0 -150px; /* wider than the screen so the drift never shows an edge */
  z-index: -1;
  pointer-events: none;
  will-change: transform;
  background:
    linear-gradient(115deg, transparent 49.9%, rgba(33, 150, 243, 0.35) 50%, transparent 50.1%) 0 0 / 100% 100%,
    linear-gradient(115deg, transparent 39.95%, rgba(123, 47, 247, 0.3) 40%, transparent 40.05%) 0 0 / 100% 100%,
    linear-gradient(115deg, transparent 59.95%, rgba(123, 47, 247, 0.2) 60%, transparent 60.05%) 0 0 / 100% 100%,
    linear-gradient(-25deg, transparent 49.95%, rgba(33, 150, 243, 0.15) 50%, transparent 50.05%) 0 0 / 100% 100%;
  animation: drift 20s ease-in-out infinite alternate;
}
@keyframes drift {
  to {
    transform: translateX(150px); /* transform = GPU, no repaint per frame */
  }
}

.navbar {
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  border-radius: 50rem;
  background: rgba(33, 150, 243, 0.1);
  border: 1px solid rgba(33, 150, 243, 0.3);
  font-size: 0.85rem;
}
.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6);
  }
  100% {
    box-shadow: 0 0 0 10px rgba(34, 197, 94, 0);
  }
}

.stat {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1;
}

.profile-ring {
  display: inline-block;
  width: 100%;
  max-width: 480px;
  padding: 6px;
  border-radius: 50%;
  position: relative;
  overflow: hidden; /* clips the spinning gradient to the circle */
  box-shadow: 0 0 60px rgba(123, 47, 247, 0.35);
}
.profile {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
  border: 6px solid var(--bg);
  position: relative;
}
/* the gradient spins on its own layer, so only the GPU works each frame */
.profile-ring::before {
  content: "";
  position: absolute;
  inset: 0;
  background: conic-gradient(var(--blue), var(--purple), var(--blue));
  animation: spin 8s linear infinite;
  will-change: transform;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.card {
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}


.skill { color: #e2e8f0; }

/* home bento grid */
.bento {
  background: rgba(30, 41, 59, .35); /* see-through so the grid and lines show behind */
  border: 1px solid rgba(148, 163, 184, .1);
  border-radius: 1.25rem;
}
.bento .profile-ring { max-width: 300px; }
.bento .social { background: #334155; }
.bento .stat { font-size: clamp(1.5rem, 4vw, 2.5rem); }
