@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@400;700&display=swap');

:root {
  /* Data Forge Palette */
  --bg-deep: #05070e;
  --bg-card: rgba(10, 15, 28, 0.6);
  --bg-card-hover: rgba(15, 20, 35, 0.8);
  --glass: rgba(255, 255, 255, 0.03);
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(0, 212, 255, 0.3);
  
  --accent: #00d4ff;
  --accent-2: #7c3aed;
  --success: #00e68a;
  
  --text: #e8ecf4;
  --text-muted: #8b95a5;
  
  --glow: rgba(0, 212, 255, 0.15);
  --glow-2: rgba(124, 58, 237, 0.15);
  
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 8px;
  
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --nav-height: 70px;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-deep);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background-image: radial-gradient(rgba(255, 255, 255, 0.15) 1px, transparent 1px);
  background-size: 20px 20px;
  z-index: -1;
  pointer-events: none;
  animation: slideDots 5s linear infinite;
}

@keyframes slideDots {
  from { background-position: 0 0; }
  to { background-position: -20px -20px; }
}

/* Background Gradient Mesh */
.bg-mesh {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  z-index: -2;
  background: radial-gradient(circle at 15% 50%, rgba(0, 212, 255, 0.08), transparent 50%),
              radial-gradient(circle at 85% 30%, rgba(124, 58, 237, 0.08), transparent 50%);
  filter: blur(60px);
  animation: meshFlow 20s ease-in-out infinite alternate;
}

@keyframes meshFlow {
  0% { transform: scale(1) translate(0, 0); }
  50% { transform: scale(1.1) translate(2%, 2%); }
  100% { transform: scale(1) translate(-2%, -2%); }
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Typography */
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -0.02em; }
h1 { font-weight: 900; font-size: clamp(2.5rem, 5vw, 4rem); background: linear-gradient(135deg, #fff, #a0aec0); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
h2 { font-weight: 800; font-size: clamp(1.8rem, 3vw, 2.5rem); margin-bottom: 1.5rem; }
.mono { font-family: var(--font-mono); }
.text-accent { color: var(--accent); }
.text-muted { color: var(--text-muted); }

/* Floating Navbar */
.navbar {
  position: fixed;
  top: 16px; left: 16px; right: 16px;
  max-width: 1168px; margin: 0 auto;
  height: var(--nav-height);
  background: rgba(10, 15, 28, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 100px;
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 1.5rem;
  z-index: 1000;
  transition: all 0.3s ease;
}

.navbar.compact {
  top: 8px;
  background: rgba(10, 15, 28, 0.9);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.nav-brand {
  display: flex; align-items: center; gap: 0.75rem;
  text-decoration: none; color: var(--text); font-weight: 800; font-size: 1.25rem;
}

.nav-links {
  display: flex; list-style: none; gap: 1.5rem;
}
.nav-links a {
  color: var(--text-muted); text-decoration: none; font-size: 0.9rem; font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }

/* Language Dropdown */
.lang-dropdown { position: relative; }
.lang-btn {
  background: var(--glass); border: 1px solid var(--border);
  color: var(--text); padding: 0.4rem 1rem; border-radius: 50px;
  font-size: 0.85rem; font-weight: 500; cursor: pointer;
  display: flex; align-items: center; gap: 0.5rem; transition: all 0.2s;
}
.lang-btn:hover { background: rgba(255,255,255,0.08); }
.lang-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: #0a0f1c; border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 0.5rem;
  min-width: 180px; display: none; flex-direction: column; gap: 0.25rem;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}
.lang-menu::before {
  content: ""; position: absolute; top: -12px; left: 0; right: 0; height: 12px;
}
.lang-dropdown:hover .lang-menu, .lang-menu.show { display: flex; }
.lang-menu button {
  background: none; border: none; color: var(--text-muted);
  text-align: left; padding: 0.5rem 0.75rem; border-radius: var(--radius-sm);
  cursor: pointer; font-size: 0.85rem; transition: all 0.2s;
}
.lang-menu button:hover, .lang-menu button.active {
  background: var(--glass); color: var(--text);
}

/* Bento Grid */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem;
  padding: 8rem 0 5rem;
}

.bento-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.1s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  transform-style: preserve-3d;
  will-change: transform;
}

.bento-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4), 0 0 20px var(--glow);
}

/* 3D Tilt is handled by JS, but we set perspective on the grid */
.bento-grid { perspective: 1000px; }

/* Grid spans */
.col-span-12 { grid-column: span 12; }
.col-span-8 { grid-column: span 8; }
.col-span-6 { grid-column: span 6; }
.col-span-4 { grid-column: span 4; }

/* Hero Card inside Bento */
.hero-card {
  display: flex; flex-direction: column; justify-content: center;
  min-height: 400px;
}
.hero-tag {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: rgba(0, 212, 255, 0.1); border: 1px solid rgba(0, 212, 255, 0.2);
  color: var(--accent); padding: 0.4rem 1rem; border-radius: 50px;
  font-family: var(--font-mono); font-size: 0.75rem; font-weight: 700;
  margin-bottom: 1.5rem; align-self: flex-start;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.75rem 1.5rem; border-radius: var(--radius-sm);
  font-weight: 600; text-decoration: none; cursor: pointer;
  transition: all 0.2s; border: none; font-size: 0.95rem;
}
.btn-primary {
  background: var(--accent); color: #000;
  box-shadow: 0 0 20px var(--glow);
}
.btn-primary:hover {
  background: #33deff; transform: translateY(-2px);
  box-shadow: 0 5px 25px rgba(0,212,255,0.4);
}
.btn-secondary {
  background: var(--glass); color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.2);
}

/* Compression Visualizer */
.visualizer { margin-top: 2rem; padding: 1.5rem; background: rgba(0,0,0,0.3); border-radius: var(--radius-md); font-family: var(--font-mono); font-size: 0.85rem; }
.vis-row { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.vis-label { width: 80px; color: var(--text-muted); }
.vis-bar-wrapper { flex: 1; height: 12px; background: rgba(255,255,255,0.05); border-radius: 6px; overflow: hidden; }
.vis-bar { height: 100%; border-radius: 6px; transition: width 2s cubic-bezier(0.16, 1, 0.3, 1); }
.bar-uncompressed { background: var(--text-muted); width: 100%; }
.bar-compressed { background: var(--accent); width: 100%; }
.bar-compressed.animate { width: 28%; }
.vis-val { width: 60px; text-align: right; font-weight: 700; }

/* Format Carousel */
.format-strip {
  display: flex; gap: 1rem; overflow-x: auto; padding-bottom: 1rem;
  scrollbar-width: none; cursor: grab; margin-top: 1rem;
}
.format-strip::-webkit-scrollbar { display: none; }
.format-strip:active { cursor: grabbing; }
.format-pill {
  flex-shrink: 0; padding: 0.75rem 1.25rem;
  background: var(--glass); border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-family: var(--font-mono); font-size: 0.9rem;
  display: flex; align-items: center; gap: 0.5rem;
}
.format-pill.native { border-color: var(--accent); color: var(--accent); background: rgba(0,212,255,0.05); }

/* Stats */
.stat-num { font-size: 3rem; font-weight: 900; line-height: 1; margin-bottom: 0.5rem; font-family: var(--font-mono); }
.stat-num span { color: var(--accent); }

/* Download Table */
.dl-table { width: 100%; border-collapse: collapse; text-align: left; }
.dl-table th, .dl-table td { padding: 1rem; border-bottom: 1px solid var(--border); }
.dl-table th { color: var(--text-muted); font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.dl-table tr:hover td { background: rgba(255,255,255,0.02); }

/* Footer */
footer { border-top: 1px solid var(--border); padding: 3rem 1.5rem; margin-top: 5rem; text-align: center; color: var(--text-muted); font-size: 0.9rem; }

.menu-toggle {
  display: none;
  background: none; border: none; color: var(--text);
  cursor: pointer; padding: 0.5rem;
}

/* Responsive */
@media (max-width: 992px) {
  .col-span-8 { grid-column: span 12; }
  .col-span-6 { grid-column: span 12; }
  .col-span-4 { grid-column: span 12; }
  
  .menu-toggle { display: block; }
  .nav-links { 
    display: none; 
    position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(10, 15, 28, 0.95);
    backdrop-filter: blur(12px);
    flex-direction: column; padding: 1.5rem; gap: 1rem;
    border: 1px solid var(--border); border-radius: var(--radius-md);
    margin-top: 0.5rem;
  }
  .nav-links.show { display: flex; }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-delay: -1ms !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    background-attachment: initial !important;
    scroll-behavior: auto !important;
    transition-duration: 0s !important;
    transition-delay: 0s !important;
  }
  .bg-mesh { animation: none; }
  .bento-card { transform: none !important; }
}

/* Emojis strictly forbidden - SVG setup */
svg { width: 1.25rem; height: 1.25rem; stroke-width: 2; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
