:root {
  --bg-dark: #070a0f;
  --bg-alt: #0c1017;
  --panel: #111722;
  --panel-hover: #161e2b;
  --panel-border: #222b3a;
  --text-main: #eef2f7;
  --text-muted: #8e9bb0;
  --accent: #5e9eff;
  --accent-rgb: 94, 158, 255;
  --accent-teal: #78e0c2;
  --accent-warn: #f7ca6d;
  --accent-danger: #ff6b6b;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: min(1280px, 92vw);
  margin: 0 auto;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 10, 15, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--panel-border);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
}

.brand-icon {
  font-size: 20px;
}

.brand strong {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 24px;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
}

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

/* Hero Section */
.hero-section {
  padding: 70px 0 40px;
}

.badge-pill {
  display: inline-block;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-mono);
  background: rgba(94, 158, 255, 0.1);
  color: var(--accent);
  border: 1px solid rgba(94, 158, 255, 0.25);
  border-radius: 999px;
  margin-bottom: 16px;
}

.hero-title {
  font-size: clamp(34px, 5vw, 64px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

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

.hero-lead {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 820px;
  margin-bottom: 32px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.stat-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  padding: 20px;
  border-radius: var(--radius-md);
}

.stat-value {
  display: block;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Sections */
.section {
  padding: 64px 0;
}

.bg-alt {
  background-color: var(--bg-alt);
  border-top: 1px solid var(--panel-border);
  border-bottom: 1px solid var(--panel-border);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 28px;
  gap: 20px;
  flex-wrap: wrap;
}

.section-header h2 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-header p {
  color: var(--text-muted);
  font-size: 14px;
  max-width: 640px;
}

.search-box input {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  color: var(--text-main);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13px;
  width: 260px;
  outline: none;
  transition: var(--transition);
}

.search-box input:focus {
  border-color: var(--accent);
}

.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.filter-btn {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover {
  color: var(--text-main);
  background: var(--panel-hover);
}

.filter-btn.active {
  background: var(--text-main);
  color: #070a0f;
  border-color: var(--text-main);
}

/* Model Cards Grid */
.models-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 20px;
}

.model-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: var(--transition);
}

.model-card:hover {
  background: var(--panel-hover);
  border-color: rgba(var(--accent-rgb), 0.4);
  transform: translateY(-2px);
}

.model-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.model-name {
  font-size: 18px;
  font-weight: 700;
}

.model-role {
  font-size: 12px;
  color: var(--accent-teal);
  font-weight: 500;
}

.spec-matrix {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  background: rgba(0, 0, 0, 0.25);
  padding: 12px;
  border-radius: var(--radius-sm);
  margin: 14px 0;
  font-size: 11.5px;
}

.spec-matrix span {
  color: var(--text-muted);
}

.spec-matrix strong {
  display: block;
  color: var(--text-main);
  font-family: var(--font-mono);
}

.model-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 14px;
}

.model-footer {
  border-top: 1px solid var(--panel-border);
  padding-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tag {
  display: inline-block;
  padding: 3px 8px;
  font-size: 11px;
  font-family: var(--font-mono);
  border-radius: var(--radius-sm);
}

.tag-engine { background: #19273c; color: var(--accent); }
.tag-ram { background: #2c2117; color: var(--accent-warn); }
.tag-speed { background: #172c23; color: var(--accent-teal); }

/* Table */
.table-container {
  overflow-x: auto;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  background: var(--panel);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
  font-size: 13px;
}

.data-table th, .data-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--panel-border);
}

.data-table th {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-muted);
  font-weight: 600;
}

/* Simulator */
.simulator-wrapper {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
}

.simulator-controls {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  padding: 22px;
}

.sim-baseline-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--panel-border);
  margin-bottom: 14px;
  color: var(--text-muted);
}

.bullet-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.sim-checklist {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 6px;
}

.sim-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.2);
  font-size: 13px;
}

.sim-item label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.simulator-gauge-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.gauge-bar-track {
  height: 18px;
  background: #090e16;
  border-radius: 999px;
  position: relative;
  overflow: hidden;
  margin: 18px 0 12px;
  border: 1px solid var(--panel-border);
}

.gauge-bar-fill {
  height: 100%;
  background: var(--accent);
  transition: width 0.3s ease, background-color 0.3s ease;
}

.gauge-limit-marker {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 92.5%;
  width: 2px;
  background: var(--accent-danger);
}

.gauge-meta {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 14px;
}

.status-safe { color: var(--accent-teal); font-weight: 700; }
.status-danger { color: var(--accent-danger); font-weight: 700; }

.gauge-alert-box {
  padding: 14px;
  border-radius: var(--radius-md);
  background: rgba(120, 224, 194, 0.08);
  border: 1px solid rgba(120, 224, 194, 0.2);
  color: var(--text-muted);
  font-size: 13px;
}

/* Workflows Grid */
.workflows-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 20px;
}

.wf-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  padding: 22px;
}

.wf-intent {
  font-size: 12.5px;
  color: var(--accent);
  font-style: italic;
  margin: 4px 0 16px;
}

.wf-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.wf-step-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.25);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
}

.wf-step-name {
  font-weight: 600;
  color: var(--text-main);
}

.wf-step-sub {
  color: var(--text-muted);
  margin-left: 8px;
}

.wf-meta {
  border-top: 1px solid var(--panel-border);
  padding-top: 12px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

/* Architecture Box */
.arch-box {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.arch-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  height: 100%;
}

.arch-badge {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--accent);
  margin-bottom: 8px;
}

.arch-card h3 {
  font-size: 18px;
  margin-bottom: 10px;
}

.arch-card p {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 14px;
}

.arch-card ul {
  list-style: none;
  font-size: 12.5px;
  color: var(--text-muted);
}

.arch-card li {
  margin-bottom: 8px;
}

.arch-card strong {
  color: var(--text-main);
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.open {
  display: flex;
}

.modal-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  width: min(650px, 94vw);
  max-height: 85vh;
  overflow-y: auto;
  padding: 26px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 18px;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
}

.modal-body {
  font-size: 13.5px;
  line-height: 1.6;
}

.modal-section {
  margin-top: 16px;
}

.modal-section h4 {
  font-size: 14px;
  color: var(--text-main);
  margin-bottom: 6px;
}

/* Footer */
.footer {
  padding: 48px 0;
  border-top: 1px solid var(--panel-border);
  font-size: 13px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

/* Responsive */
@media (max-width: 992px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .simulator-wrapper { grid-template-columns: 1fr; }
  .arch-box { grid-template-columns: 1fr; }
  .workflows-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .hero-section { padding: 40px 0 20px; }
  .section { padding: 40px 0; }
  .nav-links { display: none; }
  .search-box { width: 100%; margin-top: 16px; }
  .search-box input { width: 100%; }
  .section-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .models-grid { grid-template-columns: repeat(auto-fill, minmax(100%, 1fr)); }
  .footer-content { flex-direction: column; text-align: center; justify-content: center; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .model-card { padding: 16px; }
  .spec-matrix { grid-template-columns: 1fr; gap: 8px; }
  .gauge-meta { flex-direction: column; align-items: center; gap: 8px; text-align: center; }
  .wf-step-row { flex-direction: column; align-items: flex-start; gap: 4px; }
  .wf-step-sub { margin-left: 0; }
  .arch-card { padding: 16px; }
}