/* ==============================================================================
   AetherEdge — Global Edge Network Infrastructure
   Design System: Cloudflare Radar / Fastly Engineering Infrastructure Aesthetics
   ============================================================================== */

:root {
  --bg-deep: #07090e;
  --bg-surface: #0d1117;
  --bg-surface-elevated: #151b23;
  --bg-panel: #0a0d13;
  
  --border-dim: rgba(255, 255, 255, 0.07);
  --border-highlight: rgba(16, 185, 129, 0.35);
  --border-active: #10b981;
  
  --text-primary: #f0f6fc;
  --text-secondary: #8b949e;
  --text-tertiary: #484f58;
  --text-mono: #7ee787;
  
  --accent-emerald: #10b981;
  --accent-mint: #34d399;
  --accent-teal: #14b8a6;
  --accent-cyan: #06b6d4;
  --accent-amber: #f59e0b;
  
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", "Fira Code", monospace;
  
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;
  
  --shadow-radar: 0 0 35px -5px rgba(16, 185, 129, 0.12);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

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

/* Radar Background Mesh */
.radar-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(16, 185, 129, 0.1), transparent 50%),
    radial-gradient(circle at 10% 80%, rgba(6, 182, 212, 0.06), transparent 40%);
}

.radar-grid::after {
  content: "";
  position: absolute;
  inset: 0;
  background-size: 48px 48px;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  mask-image: radial-gradient(ellipse at center, black 40%, transparent 85%);
}

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

/* Header */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 9, 14, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-dim);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.brand-icon {
  width: 24px;
  height: 24px;
  color: var(--accent-emerald);
}

.brand-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  background: rgba(16, 185, 129, 0.1);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 0.5rem;
}

nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

nav a:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

nav a.active {
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.08);
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
}

/* Hero Section */
.hero {
  padding: 4.5rem 0 3rem;
  text-align: center;
}

.telemetry-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent-emerald);
  margin-bottom: 1.75rem;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  background: var(--accent-emerald);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-emerald);
  animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

.hero h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.18;
  margin-bottom: 1.25rem;
  color: #ffffff;
}

.hero p {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto 2.25rem;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  font-size: 0.88rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all 0.15s ease;
  cursor: pointer;
}

.btn-emerald {
  background: var(--accent-emerald);
  color: #04140e;
  font-weight: 600;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.25);
}

.btn-emerald:hover {
  background: #34d399;
  transform: translateY(-1px);
}

.btn-outline {
  background: var(--bg-surface);
  color: var(--text-secondary);
  border: 1px solid var(--border-dim);
}

.btn-outline:hover {
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
  background: var(--bg-surface-elevated);
}

/* Global Edge Network SVG Visualization Card */
.radar-map-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-lg);
  padding: 2.25rem 1.5rem;
  margin: 2.5rem 0 4rem;
  box-shadow: var(--shadow-radar);
  position: relative;
  overflow: hidden;
}

.radar-map-card svg {
  width: 100%;
  height: auto;
  max-height: 380px;
  display: block;
}

/* Stat Grid (Telemetry Panels) */
.telemetry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 3.5rem;
}

.telemetry-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.telemetry-card:hover {
  border-color: var(--border-highlight);
  transform: translateY(-2px);
}

.telemetry-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.telemetry-val {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}

.telemetry-unit {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.telemetry-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
  line-height: 1.5;
}

/* Engineering Spec Panels */
.spec-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 3rem;
}

.spec-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-dim);
}

.spec-title {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Telemetry Data Tables */
.table-container {
  overflow-x: auto;
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-md);
  margin-bottom: 3rem;
  background: var(--bg-surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  text-align: left;
}

th {
  padding: 0.85rem 1.2rem;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-tertiary);
  font-weight: 500;
  border-bottom: 1px solid var(--border-dim);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

td {
  padding: 0.95rem 1.2rem;
  border-bottom: 1px solid var(--border-dim);
  color: var(--text-secondary);
}

tr:last-child td {
  border-bottom: none;
}

.mono-tag {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.08);
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-live {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--accent-emerald);
  font-weight: 500;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

/* Footer */
footer {
  margin-top: auto;
  border-top: 1px solid var(--border-dim);
  padding: 2.5rem 0;
  color: var(--text-tertiary);
  font-size: 0.82rem;
}

.footer-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  color: var(--text-tertiary);
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: var(--text-secondary);
}

@media (max-width: 768px) {
  .mobile-toggle {
    display: block;
  }
  nav ul {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    width: 100%;
    background: var(--bg-surface-elevated);
    border-bottom: 1px solid var(--border-dim);
    flex-direction: column;
    padding: 1rem;
  }
  nav ul.show {
    display: flex;
  }
  .footer-wrapper {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}
