/* ─── Global Reset & Typography ─────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-primary);
  background-color: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Hide default cursor when custom cursor is enabled */
body.custom-cursor,
body.custom-cursor * {
  cursor: none !important;
}

/* ─── Scrollbar ──────────────────────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-surface);
}
::-webkit-scrollbar-thumb {
  background: var(--accent-dim);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* ─── Selection ──────────────────────────────────────────────────────────────── */
::selection {
  background: var(--accent-glow);
  color: var(--text-primary);
}

/* ─── Typography ─────────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-primary);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover {
  color: var(--text-primary);
}

img {
  display: block;
  max-width: 100%;
}

/* ─── Utility classes ────────────────────────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.text-accent   { color: var(--accent); }
.text-muted    { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-center   { text-align: center; }

.hidden { display: none !important; }
.invisible { visibility: hidden; }

/* ─── Background grid noise ──────────────────────────────────────────────────── */
.bg-noise::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

/* ─── Glow divider line ──────────────────────────────────────────────────────── */
.glow-line {
  width: 80px;
  height: 2px;
  background: var(--accent);
  border-radius: var(--radius-full);
  box-shadow: 0 0 12px var(--accent-glow);
  margin: var(--space-4) auto;
}

/* ─── Section title ──────────────────────────────────────────────────────────── */
.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-2);
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: var(--space-3);
}

.section-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto var(--space-12);
}

/* ─── Badge ──────────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  padding: 0.2em 0.6em;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.badge-online  { background: rgba(61,220,132,0.15); color: var(--status-online);  border: 1px solid rgba(61,220,132,0.3); }
.badge-offline { background: rgba(226,84,84,0.15);  color: var(--status-offline); border: 1px solid rgba(226,84,84,0.3); }
.badge-warning { background: rgba(245,166,35,0.15); color: var(--status-warning); border: 1px solid rgba(245,166,35,0.3); }
.badge-accent  { background: rgba(90,174,255,0.15); color: var(--accent);         border: 1px solid rgba(90,174,255,0.3); }

/* ─── Skeleton loader ────────────────────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg,
    rgba(90,174,255,0.05) 0%,
    rgba(90,174,255,0.12) 50%,
    rgba(90,174,255,0.05) 100%);
  background-size: 200% 100%;
  animation: skeleton-pulse 1.4s ease infinite;
  border-radius: var(--radius-sm);
}
@keyframes skeleton-pulse {
  0%   { background-position: 200% center; }
  100% { background-position: -200% center; }
}

/* ─── Page transition fade ───────────────────────────────────────────────────── */
.page-fade-in {
  animation: pageFadeIn 0.4s ease forwards;
}
@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Background radial glows — kept very subtle ─────────────────────────────── */
.bg-glow-top {
  display: none; /* removed to clean up the blue tint on navbar */
}
.bg-glow-bottom {
  display: none;
}

/* ─── Empty state ────────────────────────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-16);
  gap: var(--space-4);
}
.empty-state svg,
.empty-state .empty-icon {
  width: 64px;
  height: 64px;
  color: var(--text-muted);
  opacity: 0.5;
}
.empty-state h3 {
  font-size: 1.1rem;
  color: var(--text-secondary);
}
.empty-state p {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 360px;
}

/* ─── Responsive container ───────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}
