:root {
  --bg-dark: #050507;
  --bg-panel: #0f0f14;
  --primary: #3b82f6;
  --primary-glow: rgba(59, 130, 246, 0.5);
  --accent: #f43f5e;
  --text-main: #ffffff;
  --text-muted: #94a3b8;
  --border: rgba(255, 255, 255, 0.08);
  --font-ui: 'Inter', system-ui, sans-serif;
  --font-code: 'JetBrains Mono', monospace;
}

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

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-ui);
  overflow-x: hidden;
  line-height: 1.5;
}

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-dark);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(59, 130, 246, 0.1);
  border-top: 3px solid var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.grid-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  z-index: -1;
  mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
  pointer-events: none;
}

.ambient-light {
  position: fixed;
  top: -20%;
  left: 50%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
  transform: translateX(-50%);
  z-index: -2;
  filter: blur(80px);
}

.navbar {
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: center;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.nav-content {
  width: 100%;
  max-width: 1200px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-code);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.5px;
}

.highlight {
  color: var(--primary);
}

.nav-status {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  padding: 6px 12px;
  border-radius: 20px;
}

.hero-section {
  padding: 8rem 2rem 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: 80vh;
}

.hero-content {
  max-width: 800px;
  width: 100%;
}

.badge-container {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.badge {
  font-family: var(--font-code);
  font-size: 0.8rem;
  padding: 4px 12px;
  border-radius: 6px;
  font-weight: 600;
}

.rust-badge {
  background: rgba(224, 93, 68, 0.1);
  color: #e05d44;
  border: 1px solid rgba(224, 93, 68, 0.2);
}

.version-badge {
  background: rgba(59, 130, 246, 0.1);
  color: var(--primary);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.glitch-header {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 1.1;
  font-weight: 800;
  margin-bottom: 1.5rem;
  letter-spacing: -0.03em;
}

.text-gradient {
  background: linear-gradient(135deg, #fff 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 2.5rem;
}

.hero-desc strong {
  color: #fff;
  font-weight: 600;
}

.code-highlight {
  font-family: var(--font-code);
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  color: #fff;
  font-size: 0.9em;
}

.cta-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 4rem;
}

.btn {
  padding: 0.8rem 1.5rem;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: var(--primary);
  color: white;
  border: 1px solid var(--primary);
}

.btn-primary:hover {
  background: #2563eb;
  box-shadow: 0 0 20px var(--primary-glow);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: #fff;
}

.terminal-window {
  background: #0d1117;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  max-width: 600px;
  margin: 0 auto;
  text-align: left;
  font-family: var(--font-code);
  transform: perspective(1000px) rotateX(2deg);
  transition: transform 0.3s ease;
}

.terminal-window:hover {
  transform: perspective(1000px) rotateX(0deg) translateY(-5px);
}

.terminal-header {
  background: rgba(255, 255, 255, 0.03);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.red {
  background: #ff5f56;
}

.yellow {
  background: #ffbd2e;
}

.green {
  background: #27c93f;
}

.terminal-title {
  margin-left: 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.terminal-body {
  padding: 1.5rem;
  font-size: 0.9rem;
  min-height: 160px;
}

.code-line {
  margin-bottom: 8px;
}

.prompt {
  color: var(--primary);
  margin-right: 8px;
}

.cmd {
  color: #e2e8f0;
}

.success {
  color: #4ade80;
}

.blink {
  animation: blink 1s infinite;
}

.stats-banner {
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 3rem;
  flex-wrap: wrap;
}

.stat-box {
  text-align: center;
}

.stat-value {
  font-family: var(--font-code);
  font-size: 2rem;
  font-weight: 700;
  display: block;
  color: #fff;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
}

.arch-section {
  padding: 5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

.section-header code {
  font-family: var(--font-code);
  font-size: 1.3em;
  color: var(--primary);
  background: rgba(59, 130, 246, 0.1);
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: 600;
  display: inline-block;
}

.pipeline-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  flex-wrap: nowrap;
}

.pipeline-node {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  width: 220px;
  text-align: center;
  position: relative;
  z-index: 2;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.core-node {
  border-color: var(--primary);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.15);
  transform: scale(1.1);
}

.pipeline-node:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.core-node:hover {
  transform: scale(1.1) translateY(-5px);
  box-shadow: 0 0 30px rgba(59, 130, 246, 0.25);
}

.node-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: block;
}

.node-label {
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.node-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.node-badge {
  position: absolute;
  top: -10px;
  right: -10px;
  background: #e05d44;
  color: white;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: bold;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.pipeline-connector {
  flex: 1;
  min-width: 60px;
  max-width: 150px;
  height: 4px;
  background: rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
  border-radius: 2px;
}

.data-stream {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.5), transparent);
  animation: streamFlow 2s infinite linear;
}

.data-packet {
  position: absolute;
  top: 50%;
  left: 0;
  width: 8px;
  height: 8px;
  background: #fff;
  border-radius: 50%;
  transform: translateY(-50%);
  box-shadow: 0 0 10px #fff;
  opacity: 0;
  animation: packetTravel 3s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

.delay-1 {
  animation-delay: 1s;
}

.delay-2 {
  animation-delay: 0.5s;
}

.delay-3 {
  animation-delay: 1.8s;
}

@keyframes streamFlow {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

@keyframes packetTravel {
  0% {
    left: 0;
    opacity: 0;
  }

  10% {
    opacity: 1;
  }

  90% {
    opacity: 1;
  }

  100% {
    left: 100%;
    opacity: 0;
  }
}

.specs-section {
  padding: 4rem 2rem;
  background: rgba(255, 255, 255, 0.015);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.specs-container {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.specs-card h3 {
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
  color: var(--primary);
}

.specs-table {
  width: 100%;
  border-collapse: collapse;
}

.specs-table td {
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border);
}

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

.spec-label {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.spec-value {
  text-align: right;
  font-family: var(--font-code);
  font-size: 0.9rem;
}

.tag.rust {
  color: #e05d44;
  background: rgba(224, 93, 68, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

.marquee-container {
  background: #000;
  padding: 1rem 0;
  overflow: hidden;
  white-space: nowrap;
  position: relative;
}

.marquee-content {
  display: inline-block;
  animation: scroll 40s linear infinite;
}

.marquee-content span {
  display: inline-block;
  padding: 0 2rem;
  font-family: var(--font-code);
  color: var(--text-muted);
  font-size: 0.9rem;
  text-transform: uppercase;
}

@keyframes scroll {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.4);
  }

  70% {
    box-shadow: 0 0 0 6px rgba(74, 222, 128, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0);
  }
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.status-dot {
  width: 8px;
  height: 8px;
  background: #4ade80;
  border-radius: 50%;
}

.pulse {
  animation: pulse 2s infinite;
}

footer {
  padding: 3rem 2rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-content a {
  color: var(--text-muted);
  text-decoration: none;
  margin: 0 10px;
  transition: color 0.2s;
}

.footer-content a:hover {
  color: var(--primary);
}

@media (max-width: 768px) {
  .hero-section {
    padding-top: 6rem;
  }

  .stat-divider {
    display: none;
  }

  .stats-banner {
    gap: 1.5rem;
  }

  .glitch-header {
    font-size: 2.5rem;
  }

  .pipeline-container {
    flex-direction: column;
    gap: 0;
    padding: 2rem 0;
  }

  .pipeline-node {
    width: 100%;
    max-width: 280px;
  }

  .core-node {
    transform: scale(1.05);
    margin: 10px 0;
  }

  .core-node:hover {
    transform: scale(1.05) translateY(-5px);
  }

  .pipeline-connector {
    width: 4px;
    height: 80px;
    min-width: 4px;
    max-width: 4px;
    flex: 0 0 auto;
    margin: 0 auto;
  }

  .data-stream {
    background: linear-gradient(180deg, transparent, rgba(59, 130, 246, 0.5), transparent);
    animation: streamFlowVertical 2s infinite linear;
  }

  .data-packet {
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    animation: packetTravelVertical 3s infinite cubic-bezier(0.4, 0, 0.2, 1);
  }

  @keyframes streamFlowVertical {
    0% {
      transform: translateY(-100%);
    }

    100% {
      transform: translateY(100%);
    }
  }

  @keyframes packetTravelVertical {
    0% {
      top: 0;
      opacity: 0;
    }

    10% {
      opacity: 1;
    }

    90% {
      opacity: 1;
    }

    100% {
      top: 100%;
      opacity: 0;
    }
  }

  .specs-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}
