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

:root {
  --bg-color: #f8fafc;
  --bg-card: rgba(255, 255, 255, 0.9);
  --border-color: rgba(0, 0, 0, 0.08);
  --border-glow: rgba(249, 115, 22, 0.35);

  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-dim: #94a3b8;

  --accent-orange: #f97316;
  --accent-amber: #ea580c;

  --gradient-title: linear-gradient(135deg, #0f172a 0%, #ea580c 60%, #f97316 100%);
  --gradient-card: linear-gradient(180deg, rgba(249, 115, 22, 0.03) 0%, rgba(255, 255, 255, 0) 100%);

  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;

  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
}

strong {
  font-weight: 500;
}

/* Background ambient light */
.ambient-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.blob-1 {
  position: absolute;
  top: -10%;
  left: 20%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.08) 0%, rgba(255, 255, 255, 0) 70%);
}

.blob-2 {
  position: absolute;
  top: 40%;
  right: -10%;
  width: 45vw;
  height: 45vw;
  background: radial-gradient(circle, rgba(251, 146, 60, 0.06) 0%, rgba(255, 255, 255, 0) 70%);
}

/* Header & Nav */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid var(--border-color);
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-main);
}

.brand-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--accent-orange), var(--accent-amber));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  color: #ffffff;
  font-family: var(--font-heading);
}

.brand-text {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  color: var(--text-main);
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 300;
  transition: color 0.2s;
  position: relative;
  padding: 0.25rem 0;
}

.nav-link:hover {
  color: var(--text-main);
}

.nav-link.active {
  color: var(--text-main);
  font-weight: 400;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-orange), var(--accent-amber));
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(249, 115, 22, 0.4);
}

/* Hero Section */
.hero {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 2rem;
  overflow: hidden;
  border-radius: var(--radius-lg);
}

/* Subtle Quantization Grid (Coarse -> Fine) */
.hero-grid-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
}

/* Layer 1: Coarse Grid (Left - Low-bit Quant representation, 48px) */
.hero-grid-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(249, 115, 22, 0.12) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(249, 115, 22, 0.12) 1px, transparent 1px);
  background-size: 52px 52px;
  -webkit-mask-image: linear-gradient(to right, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.15) 55%, rgba(0, 0, 0, 0) 80%);
  mask-image: linear-gradient(to right, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.15) 55%, rgba(0, 0, 0, 0) 80%);
}

/* Layer 2: Medium-to-Fine Grid (Center/Right - High-precision representation, 12px) */
.hero-grid-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(249, 115, 22, 0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(249, 115, 22, 0.08) 1px, transparent 1px);
  background-size: 13px 13px;
  -webkit-mask-image: linear-gradient(to right, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, 0.2) 50%, rgba(0, 0, 0, 0.85) 100%);
  mask-image: linear-gradient(to right, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, 0.2) 50%, rgba(0, 0, 0, 0.85) 100%);
}

.hero-title,
.hero-subtitle {
  position: relative;
  z-index: 1;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(1.85rem, 3.2vw, 2.6rem);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: -0.015em;
  background: var(--gradient-title);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1rem;
  max-width: 820px;
}

.hero-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 760px;
  margin-bottom: 1.75rem;
  font-weight: 300;
  line-height: 1.6;
}

/* Conclusions Cards Grid */
.conclusions-section {
  max-width: 1280px;
  margin: 0 auto 3rem;
  padding: 0 1.5rem;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 1.65rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--text-main);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-title::before {
  content: '';
  width: 3px;
  height: 22px;
  background: linear-gradient(to bottom, var(--accent-orange), var(--accent-amber));
  border-radius: 2px;
}

.conclusions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--bg-card);
  background-image: var(--gradient-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-glow);
  box-shadow: 0 12px 30px rgba(249, 115, 22, 0.12);
}

.card-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--accent-amber);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 400;
  line-height: 1.35;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.card-summary {
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.card-insight {
  background: rgba(249, 115, 22, 0.06);
  border-left: 2px solid var(--accent-orange);
  padding: 0.85rem 1rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.85rem;
  font-weight: 300;
  color: #c2410c;
}

/* Charts Grid */
.charts-section {
  max-width: 1280px;
  margin: 0 auto 3rem;
  padding: 0 1.5rem;
}

.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.chart-header {
  margin-bottom: 1.25rem;
}

.chart-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.chart-desc {
  font-size: 0.875rem;
  font-weight: 300;
  color: var(--text-muted);
}

.chart-container {
  width: 100%;
  height: 420px;
}

.charts-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(550px, 1fr));
  gap: 1.5rem;
}

@media (max-width: 640px) {
  .charts-row {
    grid-template-columns: 1fr;
  }
}

/* Leaderboard Table */
.table-section {
  max-width: 1280px;
  margin: 0 auto 4rem;
  padding: 0 1.5rem;
}

.table-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.search-box {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.6rem 1rem;
  color: var(--text-main);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.9rem;
  width: 280px;
  outline: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-box:focus {
  border-color: var(--accent-orange);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
}

.table-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

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

th {
  background: rgba(0, 0, 0, 0.02);
  padding: 1rem 1.25rem;
  font-family: var(--font-heading);
  font-weight: 400;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  color: var(--text-main);
  font-weight: 300;
  white-space: nowrap;
}

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

tr:hover td {
  background: rgba(249, 115, 22, 0.03);
}

.model-name {
  font-weight: 400;
  color: var(--text-main);
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 400;
  font-family: var(--font-mono);
}

.badge-recommended {
  background: rgba(5, 150, 105, 0.1);
  color: #047857;
}

.badge-intelligence {
  background: rgba(249, 115, 22, 0.1);
  color: #c2410c;
}

.badge-reasoning {
  background: rgba(2, 132, 199, 0.1);
  color: #0369a1;
}

.badge-velocity {
  background: rgba(234, 88, 12, 0.12);
  color: #c2410c;
}

.badge-warning {
  background: rgba(225, 29, 72, 0.1);
  color: #be123c;
}

.badge-default {
  background: rgba(0, 0, 0, 0.05);
  color: #475569;
}

/* Metric Highlight */
.metric-highlight {
  font-family: var(--font-mono);
  font-weight: 400;
  color: var(--accent-amber);
}

/* Footer */
footer {
  border-top: 1px solid var(--border-color);
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
  font-weight: 300;
}

footer a {
  color: var(--text-muted);
  text-decoration: none;
}

footer a:hover {
  color: var(--accent-orange);
}