/* Reset & Minimalist Black & Grey Design System */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-dark: #09090b;
  --bg-card: #141417;
  --bg-card-hover: #1c1c21;
  --border-color: #27272a;
  --border-hover: #3f3f46;
  --text-main: #f4f4f5;
  --text-muted: #a1a1aa;
  --text-subtle: #71717a;
  --accent-light: #e4e4e7;
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

/* Subtle Grid Background Overlay */
.screentone-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 32px 32px;
  z-index: 1;
}

/* Compact Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(9, 9, 11, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem 1.5rem;
}

.nav-container {
  max-width: 1050px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.3px;
}

.accent-cyan {
  color: var(--text-muted);
}

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

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.85rem;
  transition: color 0.15s ease;
}

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

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #18181b;
  border: 1px solid var(--border-color);
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  color: var(--text-main) !important;
}

.nav-btn:hover {
  border-color: var(--border-hover);
  background: #27272a;
}

/* Compact Hero Section */
.hero-section {
  padding: 3rem 1.5rem;
  text-align: center;
  position: relative;
  z-index: 2;
  max-width: 750px;
  margin: 0 auto;
}

.badge-row {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  background: #18181b;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

.badge-cyan, .badge-crimson, .badge-green {
  background: #18181b;
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.hero-title {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.5px;
  margin-bottom: 0.85rem;
  color: var(--text-main);
}

.gradient-text {
  color: var(--accent-light);
  border-bottom: 2px solid var(--border-hover);
}

.hero-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.hero-cta {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.15rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: #f4f4f5;
  color: #09090b;
}

.btn-primary:hover {
  background: #e4e4e7;
}

.btn-secondary {
  background: #18181b;
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: #27272a;
  border-color: var(--border-hover);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  margin-top: 0.75rem;
  padding: 0.45rem 1rem;
}

.btn-outline:hover {
  background: #18181b;
  border-color: var(--border-hover);
}

/* Sections */
.section {
  padding: 2.5rem 1.5rem;
  position: relative;
  z-index: 2;
}

.section-container {
  max-width: 1050px;
  margin: 0 auto;
}

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

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-bottom: 0.35rem;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Gallery Section */
.tab-controls {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.tab-btn {
  background: #141417;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 0.4rem 0.9rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tab-btn.active, .tab-btn:hover {
  background: #27272a;
  color: var(--text-main);
  border-color: var(--border-hover);
}

.gallery-viewport {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.25rem;
}

.gallery-display {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  background: #000;
  text-align: center;
}

.gallery-display img {
  max-width: 100%;
  max-height: 480px;
  object-fit: contain;
}

.image-overlay {
  position: absolute;
  bottom: 10px;
  right: 10px;
}

.zoom-btn {
  background: rgba(24, 24, 27, 0.9);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
}

.gallery-info h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.gallery-info p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 0.85rem;
}

.info-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.metric-card {
  background: #18181b;
  border: 1px solid var(--border-color);
  padding: 0.6rem;
  border-radius: 6px;
  text-align: center;
}

.metric-value {
  display: block;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
}

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

/* Pipeline Explorer */
.pipeline-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.pipeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 0.85rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pipeline-card:hover, .pipeline-card.active {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

.card-step {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-subtle);
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.pipeline-card h3 {
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
}

.pipeline-card p {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.step-detail-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.25rem;
}

.detail-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.detail-header h3 {
  font-size: 1.05rem;
}

.step-detail-box p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Benchmark Section */
.benchmark-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.b-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 1.25rem;
  border-radius: 8px;
  text-align: center;
}

.b-number {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.2rem;
}

.b-title {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.b-desc {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* Lightbox Modal */
.lightbox {
  display: none;
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  justify-content: center;
  align-items: center;
}

.lightbox-content {
  max-width: 90%;
  max-height: 90%;
  border-radius: 6px;
}

.lightbox-close {
  position: absolute;
  top: 15px;
  right: 25px;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border-color);
  padding: 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  position: relative;
  z-index: 2;
}

.footer-link {
  color: var(--text-main);
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 850px) {
  .gallery-viewport {
    grid-template-columns: 1fr;
  }
  .pipeline-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .benchmark-cards {
    grid-template-columns: 1fr;
  }
  .hero-title {
    font-size: 1.6rem;
  }
}
